Muslpi
September 13, 2015 ยท View on GitHub
Muslpi is a cross lfs build system for raspberry pi and ci20 (but can/will possibly be extended to a generic cross lfs build system).
The resulting clfs will use the lightweight and posix-conformant musl libc, and a bsd style init system.
This build system will first build a cross toolchain (toolchain/host packages) and then build cross compiled core packages.
First (optional) step
First to simplify use of this build system, it is recommended to add tools directory to your PATH in order to run build scripts directly :
export PATH=${PWD}/tools:${PATH}
or setenv PATH {PATH}
The next part will suppose that PATH env variable has been set accordingly if not you have to prefix calls to build.sh, install.sh and uninstall.sh with path to tools directory
Build a package
In order to build a package, go to the package directory and run build.sh, this will build a tar.gz-based package
As footprints have not been well tested on different environment you can use "build.sh -f" to not check package footprint.
Install a package
Run install.sh <pkg.tar.gz>
Uninstall a package
To uninstall a cross package use "uninstall.sh pkg" and to uninstall a host package use "uninstall.sh pkg host"
Auto build
Lazy people can use install_pkglist.sh to automatically build a package list. You can find three usefull package lists in config/pkg_lists directory. For example to make a complete install run these two commands :
install_pkglist.sh config/pkg_lists/toolchain install_pkglist.sh config/pkg_lists/core install_pkglist.sh config/pkg_lists/opt
And go take a beer and 6 others because this will take a long long time.
You can use "install_pkglist.sh -f" if you want to bypass package footprint checking.
Stripping
If you want to strip your clfs use strip.sh when clfs has been fully built
Configure
You can play with some build options by modifying files in config/
Result
Toolchain and clfs result will be placed in build directory. When done you can cp the clfs dir inside a well formatted disk and boot up your raspberry pi. If you get lucky this possibly can boot sometimes.
Send to target
As an alternative you can use the send2target script to send one package or a package list to a target (ie a mounted disk). For example the following can be used just after the clfs has been built in order to copy the result system in a mounted usb disk that your rapberry pi will boot up :
mount /dev/sdd1 /mnt/ mount /dev/sdd2 /mnt/usr/ send2target.sh /mnt/ -p musl -l config/pkg_lists/core -l config/pkg_lists/opt