zImage fail on iMX6Solo

Hello!

I’m working with several Iris/Colibri boards and I want to use the newest BSP supplied by Toradex. After updating U-boot of some Toradex iMX6DL with success, I’m struggling to update iMX6S boards that I have to support zImage.

After update, the environment vars of iMX6DL became:

Colibri iMX6 # printenv
arch=arm
baudrate=115200
board=colibri_imx6
board_name=colibri_imx6
board_rev=011a
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_file=zImage
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc1 usb0 dhcp 
bootcmd "run emmcboot ; echo ; echo emmcboot failed ; run distro_bootcmd ; usb start ;setenv stdout serial,vga ; setenv stdin serial,usbkbd"
setenv bootcmd 'echo Booting from mmc ...; run mmcargs; mmc dev ${mmcdev}; run loadimage; run loadfdt; bootm ${loadaddr} - ${fdt_addr}'
bootcmd_dhcp=if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=1
bootm_size=0x10000000
console=ttymxc0
cpu=armv7
defargs=galcore.contiguousSize=50331648 user_debug=30
dfu_alt_info=u-boot.imx raw 0x2 0x3ff mmcpart 0;boot part 0 1;rootfs part 0 2;zImage fat 0 1;imx6q-colibri-eval-v3.dtb fat 0 1;imx6q-colibri-cam-eval-v3.dtb fat 0 1
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs}; echo Booting from internal eMMC chip...; run emmcdtbload; load mmc 0:1 ${kernel_addr_r} ${boot_file} && run fdt_fixup && bootz ${kernel_addr_r} ${dtbparam}
emmcdtbload=setenv dtbparam; load mmc 0:1 ${fdt_addr_r} ${fdt_file} && setenv dtbparam " - ${fdt_addr_r}" && true
ethact=FEC
ethaddr=00:14:2d:4e:f6:d1
ethprime=FEC
fdt_addr_r=0x12000000
fdt_file=imx6dl-colibri-eval-v3.dtb
fdt_fixup=;
fdt_high=0xffffffff
initrd_high=0xffffffff
ipaddr=192.168.10.2
kernel_addr_r=0x11000000
loadaddr=0x12000000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
netmask=255.255.255.0
nfsargs=ip=:::::eth0:on root=/dev/nfs rw
nfsboot=run setup; setenv bootargs ${defargs} ${nfsargs} ${setupargs} ${vidargs}; echo Booting via DHCP/TFTP/NFS...; run nfsdtbload; dhcp ${kernel_addr_r} && run fdt_fixup && bootz ${kernel_addr_r} ${dtbparam}
nfsdtbload=setenv dtbparam; tftp ${fdt_addr_r} ${fdt_file} && setenv dtbparam " - ${fdt_addr_r}" && true
pxefile_addr_r=0x17100000
ramdisk_addr_r=0x12100000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x17000000
sdargs=ip=off root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait
sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}; echo Booting from SD card; run sddtbload; load mmc 1:1 ${kernel_addr_r} ${boot_file} && run fdt_fixup && bootz ${kernel_addr_r} ${dtbparam}
sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} ${fdt_file} && setenv dtbparam " - ${fdt_addr_r}" && true
serial#=---
serverip=192.168.10.1
setethupdate=if env exists ethaddr; then; else setenv ethaddr 00:14:2d:00:00:00; fi; tftpboot ${loadaddr} flash_eth.img && source ${loadaddr}
setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr}
setup=setenv setupargs fec_mac=${ethaddr} consoleblank=0 no_console_suspend=1 console=tty1 console=${console},${baudrate}n8
setupdate=run setsdupdate || run setusbupdate || run setethupdate
setusbupdate=usb start && setenv interface usb; setenv drive 0; load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr}
soc=mx6
splashpos=m,m
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
vendor=toradex
ver=U-Boot 2016.11-2.8.3+gaca804c (Jun 26 2018 - 20:20:40 +0000)
vidargs=video=mxcfb0:dev=lcd,640x480M@60,if=RGB666 video=mxcfb1:off fbmem=8M

But, the environment vars of iMX6S didn’t change after update:

Colibri iMX6 # printenv
arch=arm
baudrate=115200
board=colibri_imx6
board_name=colibri_imx6
board_rev=010a
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_file=zImage
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc1 usb0 dhcp 
bootargs=enable_wait_mode=off galcore.contiguousSize=50331648 ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait fec_mac=00:14:2d:4a:48:5b consoleblank=0 no_console_suspend=1 console=ttymxc0,115200n8 video=mxcfb0:dev=lcd,1280x720M@60,if=RGB666 video=mxcfb1:off fbmem=8M
bootcmd=run emmcboot ; echo ; echo emmcboot failed ; run distro_bootcmd ; usb start ;setenv stdout serial,vga ; setenv stdin serial,usbkbd
bootcmd_dhcp=if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=1
bootfile=boot.scr.uimg
bootfstype=fat
bootm_size=0x10000000
console=ttymxc0
cpu=armv7
defargs=enable_wait_mode=off galcore.contiguousSize=50331648
devnum=0
devplist=1
devtype=mmc
dfu_alt_info=u-boot.imx raw 0x2 0x3ff mmcpart 0;boot part 0 1;rootfs part 0 2;zImage fat 0 1;imx6q-colibri-eval-v3.dtb fat 0 1;imx6q-colibri-cam-eval-v3.dtb fat 0 1
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
dtbparam= - 0x12000000
emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs}; echo Booting from internal eMMC chip...; run emmcdtbload; load mmc 0:1 ${kernel_addr_r} ${boot_file} && run fdt_fixup && bootm ${kernel_addr_r} ${dtbparam}
emmcdtbload=setenv dtbparam; load mmc 0:1 ${fdt_addr_r} ${fdt_file} && setenv dtbparam " - ${fdt_addr_r}" && true
ethact=FEC
ethaddr=00:14:2d:4a:48:5b
ethprime=FEC
fdt_addr_r=0x12000000
fdt_file=imx6dl-colibri-eval-v3.dtb
fdt_fixup=;
fdt_high=0xffffffff
fileaddr=11000000
filesize=4e1828
initrd_high=0xffffffff
ipaddr=192.168.10.2
kernel_addr_r=0x11000000
loadaddr=0x12000000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
netmask=255.255.255.0
nfsargs=ip=:::::eth0:on root=/dev/nfs rw
nfsboot=run setup; setenv bootargs ${defargs} ${nfsargs} ${setupargs} ${vidargs}; echo Booting via DHCP/TFTP/NFS...; run nfsdtbload; dhcp ${kernel_addr_r} && run fdt_fixup && bootm ${kernel_addr_r} ${dtbparam}
nfsdtbload=setenv dtbparam; tftp ${fdt_addr_r} ${fdt_file} && setenv dtbparam " - ${fdt_addr_r}" && true
noot_file=uImage
pxefile_addr_r=0x17100000
ramdisk_addr_r=0x12100000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x17000000
sdargs=root=/dev/mmcblk1p2 ip=off rw,noatime rootfstype=ext4 rootwait
sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}; echo Booting from SD card; run sddtbload; load mmc 1:1 ${kernel_addr_r} ${boot_file} && run fdt_fixup && bootm ${kernel_addr_r} ${dtbparam}
sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} ${fdt_file} && setenv dtbparam " - ${fdt_addr_r}" && true
serial#=---
serverip=192.168.10.1
setethupdate=if env exists ethaddr; then; else setenv ethaddr 00:14:2d:00:00:00; fi; tftpboot ${loadaddr} flash_eth.img && source ${loadaddr}
setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr}
setup=setenv setupargs fec_mac=00:14:2d:4a:48:5b consoleblank=0 no_console_suspend=1 console=ttymxc0,115200n8
setupargs=fec_mac=00:14:2d:4a:48:5b consoleblank=0 no_console_suspend=1 console=ttymxc0,115200n8
setupdate=run setsdupdate || run setusbupdate || run setethupdate
setusbupdate=usb start && setenv interface usb; setenv drive 0; load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr}
soc=mx6
splashpos=m,m
stdin=serial,usbkbd
stdout=serial,vga
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
vendor=toradex
ver=U-Boot 2016.11-2.8.3+gaca804c (Jun 26 2018 - 20:20:40 +0000)
vidargs=video=mxcfb0:dev=lcd,1280x720M@60,if=RGB666 video=mxcfb1:off fbmem=8M

I’ve tried set new vars manually and reset to default all vars, but boot still failing.

....
Hit any key to stop autoboot:  0 
Booting from internal eMMC chip...
reading imx6dl-colibri-eval-v3.dtb
49717 bytes read in 18 ms (2.6 MiB/s)
reading zImage
5117992 bytes read in 152 ms (32.1 MiB/s)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
...

So…
Is there a way to fix this?

Regards!

https://www.toradex.com/community/questions/19860/bsp-28b2-fails-to-load-linux-kernel-due-to-uimage.html

Thanks @marcel.tx !

You are very welcome.