uboot Unknown image format!

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

uboot Unknown image format!

Jump to solution
9,410 Views
meb99
Contributor III

Hey, I have compiled yocto/linux on ubuntu 18 by following the documentation. I have the imx7ulpevk. I am trying to upload the image via uboot using uuu tool. I change the switches for uboot then run the command

~/bsp/bld-xwayland/tmp/deploy/images/imx7ulpevk$ sudo uuu -b emmc_all u-boot.imx imx-image-multimedia-imx7ulpevk.wic.bz2/*

 

which results in::

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.43-0-ga9c099a

Success 0 Failure 0


user@user-VirtualBox:~/bsp/bld-xwayland/tmp/deploy/images/imx7ulpevk$ sudo uuu -b emmc_all u-boot.imx imx-image-multimedia-imx7ulpevk.wic.bz2/*
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.43-0-ga9c099a

Success 0 Failure 0


1:3 1/ 1 [=================100%=================] SDP: boot -f u-boot.imx

and then it just sits here forever. Looking at the debug output I get the problem

Unknown image format!

The whole output is

U-Boot 2020.04-5.4.47-2.2.0+gffc3fbe7e5 (Dec 08 2020 - 06:29:23 +0000)

CPU: i.MX7ULP rev2.1 at 500 MHz
Reset cause: POR
Boot mode: Dual boot
PMC1: LDO bypass mode
Model: NXP i.MX7ULP EVK
DRAM: 1 GiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... *** Warning - No block device, using default environment

[*]-Video Link 0 (720 x 1280)
[0] lcdif@40AA0000, video
[1] mipi_dsi@40A90000, video_bridge
[2] rm68200_panel, panel
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc0 is current device
Detect USB boot. Will enter fastboot mode!
Net: No ethernet found.
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0

## Checking Image at 66800000 ...
Unknown image format!
Run fastboot ...

 

my local.conf is attached for reference

 

MACHINE ??= 'imx7ulpevk'
DISTRO ?= 'fsl-imx-xwayland'
PACKAGE_CLASSES ?= 'package_rpm'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"

UBOOT_CONFIG = "sd emmc sd-optee"

 

why would the device not be able to understand the image format? Thank you in advance

Labels (2)
0 Kudos
Reply
1 Solution
9,383 Views
meb99
Contributor III

I figured out why it just freezes. It turns out that during the process the device is seen as two different USB deices. If you are like me and running ubuntu in a virtualized environment you connected the usb-c type and forwarded it to your linux host. after it is done with the bootloader the USB deice changes from

NXP SemiConductor Inc SE Blank ULP1 

to

FSL USB download gadget

so you need to set those as to automatically be forwarded because there is a timeout , so just manually swapping them over in the middle of the process doesn't work. I understand why this wasn't in the docs, but could have at least been added to the uuu wiki page for special considerations for virtualized environments.

Unfortunately I still see "Unknown image format!" and then booting still fails with

platform regulatory.0: Direct firmware load for regulatory.db failed with error -2

this is true when I try to burn it with uuu, it is also true when I try to put the image on the micro SD card.

Any help is really appreciated!

View solution in original post

0 Kudos
Reply
13 Replies
9,347 Views
dewayne_gibson
Contributor II

You are UUU'ing the wrong file: u-boot.imx imx-image-multimedia-imx7ulpevk.wic.bz2/*

The *.wic.bz2 is not an image formatted file.

If you are only wanting uboot, then UUU the u-boot-imx7lpevk_emmc.imx file  or the _sd.imx file

If you want Linux Kernel and uboot, then UUU the zImage-imx7ulp_all.bin or evk.bin files

 

0 Kudos
Reply
9,367 Views
jhpark_vine
Contributor III

You can hit Ctrl-C after f/w download using  UUU  at console terminal.

then can enter uboot prompt. 

Can you  display uboot environment variables ?

## > printenv 

supposed to be related to env variables, i think.

0 Kudos
Reply
9,351 Views
meb99
Contributor III

Thanks for the response. Let me try that. I havn't gone into the U-boot prompt yet, still figuring everything out.

I did get linux to boot from an L4.X image with the accepted solution here. I do wish they would create a single starter doc that is step by step instruction on how to create the same image they did when they ship the product just so we could have a starting point. like with the imx.7 you have to do sd_all because they have both micro and emmc and normal SD card slot, and the L5 prebuilt image doesn't work with imx.7ulpevk kit but they don't tell you that, or that the image it ships with is an L4.X image.

0 Kudos
Reply
9,382 Views
meb99
Contributor III

Needed to add one more thing. L4.19.35 worked perfectly fine with the pre built binaries using the following command

sudo uuu -b sd_all u-boot-imx7ulpevk_sd.imx imx-image-multimedia-imx7ulpevk.wic

so it looks like there is an issue with the L5 binaries...

0 Kudos
Reply
9,384 Views
meb99
Contributor III

I figured out why it just freezes. It turns out that during the process the device is seen as two different USB deices. If you are like me and running ubuntu in a virtualized environment you connected the usb-c type and forwarded it to your linux host. after it is done with the bootloader the USB deice changes from

NXP SemiConductor Inc SE Blank ULP1 

to

FSL USB download gadget

so you need to set those as to automatically be forwarded because there is a timeout , so just manually swapping them over in the middle of the process doesn't work. I understand why this wasn't in the docs, but could have at least been added to the uuu wiki page for special considerations for virtualized environments.

Unfortunately I still see "Unknown image format!" and then booting still fails with

platform regulatory.0: Direct firmware load for regulatory.db failed with error -2

this is true when I try to burn it with uuu, it is also true when I try to put the image on the micro SD card.

Any help is really appreciated!

0 Kudos
Reply
5,476 Views
mmyers
Contributor I

I encountered the same problem running uuu from a Linux host. I found that if I connected the USB cable to a USB 2.0 port it worked OK, but connected to a port labeled "SS" it didn't work.

0 Kudos
Reply
5,512 Views
jackie2
Contributor III

If you read the source code, it is way BSP designed to get into  download fastboot mode. 

It is designed by BSP, if it could not read the correct image, it gets into download fastboot to let you can use uuu to flash the board

It is not an issue at all. It is a design.

Details, I replied to meb99 as following.

 

Meb99,

You just show the code, but you are still not aware of this. Highligt the "else" in Bold.

The statement "bootz ${loadaddr} ${initrd_addr} ${fdt_addr}" gets fails and "Unknown image format!" will print out. 

Next the "else" statement "echo "Run fastboot ..."; fastboot 0;" will be taken.

 

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;

0 Kudos
Reply
5,537 Views
jinmuyan
Contributor I

I also have the same problem as you, please how did it solve it in the end

0 Kudos
Reply
5,541 Views
jinmuyan
Contributor I

I also have the exact same problem as you, please ask how you solved it in the end

0 Kudos
Reply
9,401 Views
joanxie
NXP TechSupport
NXP TechSupport

this issue is from downloading images to the board not from booting up the board after download the images to the board,  right? did you test demo images? still has the same issue or not? and what bsp version do you use?

0 Kudos
Reply
9,389 Views
meb99
Contributor III

Any chance you could at least validate that the way to program those board with the default linux prebuilt  image is with the following command

sudo uuu -b emmc_all u-boot-imx7ulpevk_emmc.imx imx-image-multimedia-imx7ulpevk.wic

just as a sanity check? if that is correct I can better focus my debugging on the environment.

 

On a side note I noticed that after it finished step one, the USB device on the host (NXP semiconductor inc SE blank ULP1) disconnects (but the board is still powered on and the two UARTS are still operating). Which seems like UUU couldn't continue. Should that happen?

0 Kudos
Reply
9,397 Views
meb99
Contributor III

yeah this is an issue with downloading the files. I also get the exact same error when download the pre-built binaries.

L5.4.47_2.2.0_MX7ULP1

https://www.nxp.com/webapp/sps/download/license.jsp?colCode=L5.4.47_2.2.0_MX7ULP1&appType=file1&DOWN...

for the pre- built binaries I ran

sudo uuu -b emmc_all u-boot-imx7ulpevk_emmc.imx imx-image-multimedia-imx7ulpevk.wic

the debug output was

Err: serial
switch to partitions #0, OK
mmc0 is current device
Detect USB boot. Will enter fastboot mode!
Net: No ethernet found.
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0

## Checking Image at 66800000 ...
Unknown image format!
Run fastboot ...

 

 

and  the output of uuu was

 

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.43-0-ga9c099a

Success 0 Failure 0


1:3 1/ 1 [=================100%=================] SDP: boot -f u-bo

0 Kudos
Reply
5,511 Views
jackie2
Contributor III

'If you read the source code, it is way BSP designed to get into  download fastboot mode. 

It is designed by BSP, if it could not read the correct image, it gets into download fastboot to let you can use uuu to flash the board

It is not an issue at all. It is a design.

Meb99,

You just show the code, but you are still not aware of this. Highligt the "else" in Bold.

The statement "bootz ${loadaddr} ${initrd_addr} ${fdt_addr}" gets fails and "Unknown image format!" will print out. 

Next the "else" statement "echo "Run fastboot ..."; fastboot 0;" will be taken.

 

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;

0 Kudos
Reply