Hi,
Currently I am looking into how to boot an Apalis_imx6 image from usb in uboot for a customer. I followed the instructions here:
I tried both of the methods (using WIC file and boot + rootfs partition) with the exact commands listed. When I try to use run usb_boot from uboot I get the following error:
I tried selecting on the boot flag for the boot partition in GParted, but this did not help either…
Do know what could be causing this issue?
My Uboot version : =U-Boot 2016.11-2.8.5+g02735f4 (Feb 25 2019 - 15:49:45 +0000)
Installed OS version Apalis-iMX6_LXDE-Image 2.8b5 20190314 (custom built in yocto)
Thanks,
Matthew
I believe run usb_boot
would be for a distroboot enabled media which our regular BSP is not (yet, however, e.g. a Toradex Easy Installer media would be). Have you tried run usbboot
which is how our variant would be called?
http://git.toradex.com/cgit/u-boot-toradex.git/tree/include/configs/apalis_imx6.h?h=2016.11-toradex#n251
The uboot I have that came with this image currently only has usb_boot in it’s environment variables. I built the u-boot from the branch you sent me. I tried updating both through flashing the entire image using installer, and through run setupdate; update_uboot commands. The uboot version seems to show in the printenv command that it was built today, but I’m not seeing the usbboot command variable and cannot use it.
I tried to manually add these commands and used the .wic file to create a bootable usb. The command seems to read the locations of the zimage and device trees, but freezes after trying to start the kernel:
[upload|i2ATsGWB5SzWfQ+BpzafB96zGS0=]
Here are my additions to the environment:
[upload|2iKsXAkT6GfX8UfrdrVE2oskNjo=]
And you tried resetting it’s environment?
env default -a; saveenv; reset
Resetting to default just removes my environment additions and brings the variables back to just having usb_boot. This is after compiling a new u-boot and updating it. I also have another module with the built bsp image (without an update to the u-boot) that only has this command after resetting.
Here is an image of the environment variables after reset:

For now I’m going to try downloading the demo image directly from easy installer and see if that fixes things…
-Matt
Okay these were the steps I took to test this today
- Installed easyinstaller image on apalis_imx6
- env default -a; saveenv (no saveenv defined so the u-boot for easyinstaller must have changed)
- Installed demo image
- env default -a; saveenv;reset (worked)
- No usbboot defined… here are the environment variables around where it should be listed along with the U-boot compilation date for that image:

Initially, you mentioned you are running U-Boot 2016.11-2.8.5+g02735f4 but then you suddenly talk about the Toradex Easy Installer. Please note that the Toradex Easy Installer does not ship a regular U-Boot but rather a special recovery mode optimised one which does neither allow saving any environment nor does it feature the legacy usbboot
command. Should you be running the Toradex Easy Installer, then you, in all cases, will need to first install a proper Embedded Linux image or at least the U-Boot thereof. Unfortunately, while USB_BOOTCMD seems to be defined, it is never actually used anywhere. So you would either have to use a custom U-Boot where you add it just like e.g. SD_BOOTCMD or alternatively manually add the same to your environment. Sorry about that.
Should you require any further assistance, then please do post complete textual console log files rather than screenshots. Thanks!
Attached is the log file from putty for my u-boot session. I printed out my environment variables before attempting to boot. The toradex is hanging at the bootz command right at the end of the usbboot command sequence. Also attached are images showing gparted and that the flashdrive has in fact been partitioned (#1 partition as boot and 2 as root). I used the .wic file from our build bsp image (with the dd if= of= command).
I tried this with two usb mass storage devices (one 16gb flashdrive and a 4Gb sdcard) on separate occasions just to rule out an issue with the usb storage devices I was using…
It seems maybe there is a problem with the way the rootfs is being interpreted? Or is there a way I can investigate this further?
Please let me know…
-Matt
link text


This really works just fine e.g. doing the following as suggested yesterday even from any older U-Boot:
setenv boot_file zImage
setenv usbargs 'ip=off root=/dev/sda2 ro rootfstype=ext4 rootwait'
setenv usbboot 'run setup; setenv bootargs ${defargs} ${setupargs} ${usbargs} ${vidargs}; echo Booting from USB stick...; usb start && run usbdtbload; load usb 0:1 ${kernel_addr_r} ${boot_file} && run fdt_fixup && bootz ${kernel_addr_r} ${dtbparam}'
setenv usbdtbload 'setenv dtbparam; load usb 0:1 ${fdt_addr_r} ${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true'
run usbboot
Please find attached log file.
This worked for me as well,
Thank you for your help, I really Appreciate it!
-Matt