/
i.MX 8X Bootloader

i.MX 8X Bootloader

The u-boot bootloader is a GNU GPL licensed open source software. The u-boot input/output is redirected to one of the two onboard serial ports. In order to get access to the u-boot output, or the u-boot command-line interface in general, establish a serial connection between the host and target system.

The boot behavior is controlled via so called environment variables. They can be set with help of the u-boot command-line interface.

u-boot 2018.03
The source code for u-boot 2018.03 is provided on the congatec git server:

Fetch and build the bootloader standalone

conga-SMX8-X:

auth_os=auth_cntr ${cntr_addr} baudrate=115200 board_name=SX8X board_rev=iMX8QXP boot_fdt=try boot_os=booti ${loadaddr} - ${fdt_addr}; bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if test ${sec_boot} = yes; then if run loadcntr; then run mmcboot; else run netboot; fi; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi bootcmd_mfg=run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi; bootdelay=3 bootscript=echo Running bootscript from mmc ...; source cntr_addr=0x98000000 cntr_file=os_cntr_signed.bin commit_atf=1cb68fa commit_mkimage=dd023400 commit_scfw=f83a2bed commit_secofw=92ef1143 console=ttyLP2 dom0fdt_file=imx8qxp-cgtsx8x-dom0.dtb earlycon=lpuart32,0x5a080000 emmc_dev=0 ethact=FEC0 ethprime=eth0 fastboot_dev=mmc1 fdt_addr=0x83000000 fdt_file=imx8qxp-cgtsx8x-adv7533.dtb fdt_high=0xffffffffffffffff fdtcontroladdr=fd6732e8 image=Image initrd_addr=0x83100000 initrd_high=0xffffffffffffffff jh_mmcboot=setenv fdt_file imx8qxp-cgtsx8x-root.dtb;setenv boot_os 'scu_rm dtb ${fdt_addr}; booti ${loadaddr} - ${fdt_addr};'; run mmcboot; jh_netboot=setenv fdt_file imx8qxp-cgtsx8x-root.dtb;setenv boot_os 'scu_rm dtb ${fdt_addr}; booti ${loadaddr} - ${fdt_addr};'; run netboot; kboot=booti loadaddr=0x80280000 loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script}; loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file} loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file} loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image} m4_0_image=m4_0.bin m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0 mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused mmcargs=setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} root=${mmcroot} mmcboot=echo Booting from mmc ...; run mmcargs; if test ${sec_boot} = yes; then if run auth_os; then run boot_os; else echo ERR: failed to authenticate; fi; else if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then run boot_os; else echo WARN: Cannot load the DT; fi; else echo wait for boot; fi;fi; mmcdev=1 mmcpart=1 mmcroot=/dev/mmcblk1p2 rootwait rw netargs=setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if test ${sec_boot} = yes; then ${get_cmd} ${cntr_addr} ${cntr_file}; if run auth_os; then run boot_os; else echo ERR: failed to authenticate; fi; else ${get_cmd} ${loadaddr} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then run boot_os; else echo WARN: Cannot load the DT; fi; else booti; fi;fi; panel=NULL script=boot.scr sd_dev=1 sec_boot=no soc_type=imx8qxp xenboot_common=${get_cmd} ${loadaddr} xen;${get_cmd} ${fdt_addr} ${dom0fdt_file};${get_cmd} ${xenlinux_addr} ${image};fdt addr ${fdt_addr};fdt resize 256;fdt set /chosen/module@0 reg <0x00000000 ${xenlinux_addr} 0x00000000 0x${filesize}>; fdt set /chosen/module@0 bootargs "${bootargs} ${xenlinux_bootargs}"; setenv bootargs ${xenhyper_bootargs};booti ${loadaddr} - ${fdt_addr}; xenhyper_bootargs=console=dtuart dtuart=/serial@5a080000 dom0_mem=2048M dom0_max_vcpus=2 dom0_vcpus_pin=true xenlinux_addr=0x92000000 xenlinux_bootargs= xenlinux_console=hvc0 earlycon=xen xenmmcboot=setenv get_cmd "fatload mmc ${mmcdev}:${mmcpart}";setenv console ${xenlinux_console};run mmcargs;run xenboot_common; xennetboot=setenv get_cmd dhcp;setenv console ${xenlinux_console};run netargs;run xenboot_common;

Edit variables fdt_file as follows:

=> editenv fdt_file edit: imx8qxp-cgtsx8x-adv7533.dtb => boot

note: Contact congatec technical support to get access to the congatec git server.