I am using an iMX7Dual V1.1D on a Viola V1.2B Board
There are some problems with loading another linux as already discussed partly in this thread:
I want to reinstall any Toradex Easy Installer in order to be able to load another Linux. Unfortunately the current U-Boot seems to have some bugs (or missing features) that prevent me from succeeding. The version of current U-Boot is 2019.07-0 which I loaded with the Qt demo image.
SD boot seems to be unavailable for this u-boot version, as an answer in the above thread says.
Running distroboot with Easy installer on SD card leads to the following error, because FIT image is not supported:
Colibri iMX7 # run distro_bootcmd
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
523 bytes read in 14 ms (36.1 KiB/s)
## Executing script at 87000000
31013732 bytes read in 1362 ms (21.7 MiB/s)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
So my aim is now to load another u-boot version that is able to load the Easy Installer. As I already did this successfully before I assume that other u-boot versions (not only with the patch) also would work. But how can I load a new bootloader on the system?
I can see that in the different distributions there are u-boot.imx files. I assume I have to somehow get them into RAM and boot them? But what are the necessary steps? Does the SD card need specific partitions or does it not matter as long as the current u-boot can read the file?
As it seems the SD boot is available. I was able to boot the Angstrom demo. Probably there was a problem with the partitions when I tried this the last time…
But the problem still remains: How can I start the Easy Installer? Is there a download available with zImage and device tree instead of FIT image? Or do I have to build it from source somehow?
And indeed, this way I can get 3 files from the tezi.itb
Now, is it enough to place the image and device tree into first partition and squashfs into second? If yes how can I do that with squashfs? (In the working example I get all folders by untaring the rootfs file into the second partition)
For your issue, you should extract the Bsp 3.0.4 image on the media of your choice and make a custom version of u-boot-nand.imx and replace the one in the download Bsp 3.0.4 image with the compiled one.
That was not really what I was asking for, but thanks anyway. The problem just was that there were 5 files inside the FIT image instead of 3. With selecting the correct 3 out of the 5 I was able to use SD boot again
So here is the solution that worked for me. It is applicable without building an own image and by just using the images provided by Toradex:
Download Toradex Easy installer (stable or beta does not matter)
install u-boot-tools on your host machine for using the tool dumpimage (attention I had to download a new version manually because old versions do not include dumpimage)
with dumpimage extract the downloaded FIT image file “tezi.itb”, make sure to have all necessary files afterwards
Make two partitions on an SD card, first as FAT32, second as ext4
Copy extracted zImage and device tree to first partition (select the correct devicetree if multiple are available from FIT image extraction)
Extract the filesystem (which was extracted from FIT image) to the second partition
insert SD card into target and run sdboot from u-boot
This way you can start the easy installer if the u-boot version does not support FIT-images. With the help of the Easy Installer (which runs just in RAM at this point) you can install any other image and therefore replace the u-boot
A simpler way should be to replace the u-boot directly in Flash memory. This seems to be more risky/difficult, but I´m pretty sure it is possible. But right now I was not able to write the u-boot-nand.imx into the correct memory adress. Further advice would be nice but it´s not that important anymore, since I discovered the workaround described above.