Compiling and Testing compiled uboot

Uboot

When the system is powered on ,CPU needs to execute some instructions and these are stored in the ROM and these instructions are called as romcode , this will have access to the static RAM which will be in the range of 64-128kb to load the the system which can be in NAND /NOR flash ,eMMC cards and SD cards .The next step of executed code will be Linux kernel , initramfs (which can be used to mount file systems and perform other operations before the actual rootfs is loaded)and devicetree(which is the device tree blob which is got from the kernel code which contains the dts files which tell the kernel about the external peripherals to the kernel) into main memory, then the root file system loads and the applications are started on the system with systemd or initrd , the former is most commonly used.

Compiling

The steps mentioned are executed for SABRE Lite i.MX6 Development Board , however can be used for other boards as well using their respective config file .

sudo apt-get install gcc-arm-*
export CROSS_COMPILE=arm-linux-gnueabi-
make mx6qsabrelite_defconfig
make -j8

Once compiled you will be getting a u-boot.imx binary which needs to be added to a sd card

sudo dd if=u-boot.imx of=/dev/sdb bs=512 seek=2

Testing the u-boot changes for a single boot cycle in uboot shell

mw.l 0x020d8040 0x3040 && mw.l 0x020d8044 0x10000000
savee

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.