Hi,
I am trying to boot the imx93_11x11_evk board. When I flash the sd card with wic , it boots, but when I only flash with flash.bin I see nothing and I need to boot with flash.bin to work on it.
I use this link for that https://xterra2.avnet.com/poc/nxp/buildroot-for-i.mx93
and I follow the guide https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf
Am I missing something?
Thank you
As I wrote, the wic file contains some meta data which allows an imaging tool to create a partition setup on the SD card and then program data into the partitions. Also the command dd is able to do this.
A simple binary like flash.bin does not have this information, therefore dd would simply write the file to the SD card from 0x0 up to the length of the file. No offsets or partition numbers are taken into account. That's why you need to tell dd with the parameter seek where to place it:
$ sudo dd if=flash.bin of=/dev/sda1 bs=1k seek=32 conv=fsync
But you also need to partition the SD card first, following the instructions in chapter 4.3.3 of the i.MX Linux User's Guide.
If you did all this correctly, then I don't really know where it's going wrong.
If you would use uuu.exe for programming an SD card (or eMMC) in-target, then the partitioning and dd job is done by uu for you:
$ uuu -b sd flash.bin
To be honest, I never tried the boot image creation from this https://xterra2.avnet.com/poc/nxp/buildroot-for-i.mx93/ location, but I assume it should work on the 11x11 EVK, but you could make a crosscheck using this script. Take care that you have the right toolchain in place:
# i.MX93 Boot Image build script for eMMC/SD
# Version: 6.1.22-mickledore
# Requires ARMv8 toolchain, please adapt path to toolchain below
# Adapt path to your toolchain here. The toolchain was created with Yocto
# ($ bitbake imx-image-multimedia -c populate_sdk) and provides the
# following setup script:
. /opt/toolchains/imx-wayland/6.1-mickledore/environment-setup-armv8a-poky-linux
# If you created it differently, please make sure you run the correct initializations
# for your individual ARMv8 toolchain.
git clone https://github.com/nxp-imx/uboot-imx
git clone https://github.com/nxp-imx/imx-atf
git clone https://github.com/nxp-imx/imx-mkimage
mkdir firmware-imx
cd firmware-imx
wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.20.bin
chmod a+x firmware-imx-8.20.bin
./firmware-imx-8.20.bin
wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.10.bin
chmod a+x firmware-sentinel-0.10.bin
./firmware-sentinel-0.10.bin
cd ..
cd uboot-imx
git checkout -b lf_v2023.04 origin/lf_v2023.04
make imx93_11x11_evk_defconfig
make
cd ..
cd imx-atfgit
checkout -b lf_v2.8 origin/lf_v2.8
unset LDFLAGS
make PLAT=imx93 bl31
cd ..
cp ../uboot-imx/spl/u-boot-spl.bin iMX9
cp ../uboot-imx/u-boot.bin iMX9
cp ../imx-atf/build/imx93/release/bl31.bin iMX9
cp ../firmware-imx/firmware-sentinel-0.10/mx93a0-ahab-container.img iMX9
cp ../firmware-imx/firmware-imx-8.20/firmware/ddr/synopsys/lpddr4_dmem_1d_v202201.bin iMX9
cp ../firmware-imx/firmware-imx-8.20/firmware/ddr/synopsys/lpddr4_dmem_2d_v202201.bin iMX9
cp ../firmware-imx/firmware-imx-8.20/firmware/ddr/synopsys/lpddr4_imem_1d_v202201.bin iMX9
cp ../firmware-imx/firmware-imx-8.20/firmware/ddr/synopsys/lpddr4_imem_2d_v202201.bin iMX9
cp ../uboot-imx/tools/mkimage iMX9/mkimage_uboot
cd imx-mkimage
git checkout --track –b local/lf-6.1.22_2.0.0 origin/lf-6.1.22_2.0.0
# With "DEV=flexspi" a boot image for Serial Flash is built.
# Default (no DEV parameter) builds for eMMC/SD-card.
make SOC=iMX9 flash_singleboot
cd ..
I know for sure that the resulting flash.bin will boot when it's programmed with uuu.exe using the Serial Downloader Mode.
However, I'll give it a try with the buildroot setup as well, in this case I will just take the generated u-boot.bin and feed it into my flow from the script above to be built into a final flash.bin.
Regards,
Bernhard.
UUU doesnt work on my linux I cant build it. I use sudo dd.
Hello,
We use Yocto to compile our images, I suggest you use it and flash the file:
imx-boot-<your board>-sd.bin-flash
Are you flashing the file with UUU?
Best regards.
I use sudo dd to flash
The .wic is an ISO image, so the information about the placement of the various components of this image on the SD card or eMMC is included. You can use a PC tool to program an SD card.
flash.bin is a binary file and you need a tool which knows where to place this binary (hardcoded in some way).
If you use uuu.exe, then you can program a complete .wic file:
uuu -b sd_all sd imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot imx-image-full-imx93evk.wic
You can also program just a boot image (called flash.bin in the Yocto build process, before renaming):
uuu -b sd flash.bin
uuu -b sd imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot (after renaming the flash.bin)
The "sd" tells uuu to flash the following binary at the right place into the SD card.
The "sd_all" from above tells uuu to do a similar job as an ISO imager tool on the PC would do.
Regards,
Bernhard.
When I flash .wic , it boots, but if I flash only boot image it doesnt work I only see black screen. I use "sudo dd if=flash.bin of=/dev/sdx bs=1k seek=32 conv=fsync". I boot from sd card and I set also pins for that.