Creating a Test initramfs

The scripts mentioned on this page can be obtained from the librem5-devkit-tools repository.

Download the latest image and kernel

Download the latest kernel and RS9116 out of tree modules:

./scripts/fetch_latest.sh -k

Extract the kernel

The kernel needs to be extracted from the deb for the SDP boot:

./scripts/extract_kernel.sh

Build the test filesystem tarball

This will create a minimal debian rootfs tarball to be used to create an initramfs. If you need additional packages you can add them to the packages variable in the script:

./scripts/create_tarball.sh

Create the initramfs

This will take the tarball created above and customize it to be able to flash the RS9116 module and also adds some test scripts:

./scripts/create_initramfs.sh -t build/test_rootfs.tgz -o files/test_initramfs.img

You can include a locally generated kernel, modules and devicetree as well:

./scripts/create_initramfs.sh -t build/test_rootfs.tgz -o files/test_initramfs.img -i <path to kernel>

Boot the initramfs

The initramfs can be booted on a board with an empty eMMC for testing and RS9116 flashing. Ensure the boot mode switch is switched to USB boot. Run the command below and then plug in the USB C port of the devkit:

sudo uuu uuu_scripts/test_librem5.lst

RS9116 normal operation

To use the RS9116 without flashing just load the modules by hand:

root@pureos-test:~# modprobe rsi_sdio