Table of Contents

03. Bootloader [re]configuration

Modify the U-Boot script

For this task, you will need to configure u-boot with a default environment as documented in this previous lab.

Simply paste the recommended default and use menuconfig to enable it (don't worry about the bootcmd, we will replace it here with a custom script).

Now, edit the 20-modify-bootcmd.sh script and set the path to your default.env file. Read its source code to see what it does and run it!

Check out your default file again. It shoule have a quite large boot command concatenated from the source utils/boot.cmd.in script.

Now pay attention: make a backup of your current flash.bin file you used to boot using uuu -b spl. You'll need it later to flash the emmc, as the one you'll build in the following instructions will not work (you will override the boot command!). Put the backup file into artifacts as flash_spl.bin!

Let's get this over with: re-build your u-boot, copy all resulting binaries (uboot-imx/*.bin, uboot-imx/spl/*.bin) back into imx-mkimage/iMX93/, invoke the imx-mkimage make command again to obtain a new flash.bin file. Store it as artifacts/flash_emmc.bin (will get to reside on the eMMC persistent storage).

Kernel

We still have some work to do before generating the disk image…

We must pack our kernel + device tree again, but this time without the Buildroot initramfs (we don't need it since we've got 2xDebians now!). So back up your linux.its (surely you don't want to waste your work so far, right?), then modify the original and simply delete the initrd block from images and the ramdisk = “initrd”; property.

Rebuild the Linux FIT uImage to obtain your new linux.itb, which you'll then copy to rauc-lab/artifacts/linux.itb.

Now it's time to run 21-install-boot.sh. What's that? it wants a .env file? You can create an empty one ;)