- Make sure you have these packages preinstalled in your host:
gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool gcc-arm-none-eabi
- If you plan to make a build for fwupd, make sure you also have these packages preinstalled in your host:
php gcab
- Make sure you have at least 50Gb of available space
- Do at least a quick read of Yocto's Project Quick build doc: http://docs.yoctoproject.org/brief-yoctoprojectqs/index.html
- Clone this repository in your computer
- Go to the folder where you downloaded your copy and run
./init.sh
- The init script should do the following things for you
- Get the modem's bootloader source
- Get the ARM toolchain to build the bootloader
- Get Yocto build source
- Get the specific layers and dependencies to build it all
- Initialize yocto and add the bitbake layers to the env
- Run
make
, without arguments, to see what you can build:
everything
: Build Bootloader, System and Recovery and pack itaboot
: build the LK bootloaderkernel
: Build the kernel and place a bootable image in target/root_fs
: Build the kernel and rootfs without proprietary blobs and place both in target/recovery_fs
: will initialize Yocto’s build environment if it wasn’t already done before, and will build a bootable image that fits into the recovery partition to make debugging easier. I've left two scripts: recoverymount and rootfs mount that mount either of the rootfs partitions into /tmp so you can make modifications to the running image more easilyclean
: Will remove build and temporary directoriestarget_extract
: Will dump the contents of the generated image to target/dump so you can examine the contents of what you're pushing (you'll need python and python's CRC and LZO modules for it to work - check out UBIDUMP here)target_clean
: Removes the target directory contentsaboot_clean
: Cleans the LK bootloader build folder along with the generated binaryyocto_clean
: Removes Yocto's temporary folderyocto_cleancache
: Removes Yocto's sstate-cache in case you need to force a rebuild while working on recipes