Compile u-boot with specific options (bootargs)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compile u-boot with specific options (bootargs)

2,356 Views
milo
Contributor II

Hello,

after a lot of attempts, I've finally managed to automatize deployment of images on i.mx6 sabresd using network. I initially boot from SD card, where there is u-boot. The boot.scr makes u-boot download a kernel and a minimal rootfs (a .cpio.gz.uboot) and boot on RAM. From this minimal image, I download the real image and write it on the eMMC. I also donwload u-boot.imx and write it on the boot0 partition of the eMMC. When rebooting without the SD card (so I boot with the u-boot written on boot0), I boot using this in u-boot:

fatload mmc 2:1 0x12000000 zImage ; fatload mmc 2:1 0x18000000 imx6q-sabresd-ldo.dtb ; setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk3p2 ; bootz 0x12000000 - 0x18000000

It works well, but to boot I have to manually enter the command above. As I use u-boot.imx, it seems that I can't use a boot.scr: boot0 is a special partition, I can't do much with it save write a file using dd, so I can't copy a boot.scr on it without erasing u-boot.imx. If I can't use a script, I'll have to compile u-boot to obtain a u-boot.imx with the correct boot procedure, right? But I don't know how to do that. I've searched, but I haven't find anything fitting my needs. Any help would be appreciated, thanks.

Labels (3)
Tags (3)
0 Kudos
Reply
1 Reply

1,638 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

In case you are using a sabre board of imx6 you can find the environment settings in the include/configs/mx6sabre_common.h file.

You can try to modify the CONFIG_EXTRA_ENV_SETTINGS macro as you want.

Please take a look at this file and let me know if that helps.

Best Regards,

Alejandro

0 Kudos
Reply