Hello AldoG,
First of all, this "case IMAGE_FORMAT_FIT" is missing in the do_bootm function:
https://community.nxp.com/t5/i-MX-Processors/Patch-for-u-boot-imx-Using-FIT-and-HAB-in-bootm-command...
And in addition to that, I get some cache alignment errors when the sha256 of my FIT image components are calculated.
## Checking Image at 12000000 ...
FIT image found
FIT description: Kernel fitImage for NXP i.MX Release Distro/5.15.71+gitAUTOINC+50912be386/acp-imx6pos
Created: 2023-09-12 22:17:59 UTC
Image 0 (kernel-1)
Description: Linux kernel
Created: 2023-09-12 22:17:59 UTC
Type: Kernel Image
Compression: uncompressed
Data Start: 0x12000108
Data Size: 9274656 Bytes = 8.8 MiB
Architecture: ARM
OS: Linux
Load Address: 0x10008000
Entry Point: 0x10008000
Hash algo: sha256
Hash value: 3198aa66117966a11ea3c07f3e3d7c613bb9958f70e999c8e8897642d7544c7b
Image 1 (fdt-imx6dl.dtb)
Description: Flattened Device Tree blob
Created: 2023-09-12 22:17:59 UTC
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x128d873c
Data Size: 44419 Bytes = 43.4 KiB
Architecture: ARM
Hash algo: sha256
Hash value: 50751df99acda6d9bfe27dc0a558216e493c707f9fecce2238adcfb2f6788863
Default Configuration: 'conf-imx6dl.dtb'
Configuration 0 (conf-imx6dl.dtb)
Description: 1 Linux kernel, FDT blob
Kernel: kernel-1
FDT: fdt-imx6dl.dtb
Hash algo: sha256
Hash value: unavailable
## Checking hash(es) for FIT Image at 12000000 ...
Hash(es) for Image 0 (kernel-1): sha256CACHE: Misaligned operation at range [12000108, 128d8648]
CACHE: Misaligned operation at range [4e76b0d8, 4e76b118]
CACHE: Misaligned operation at range [4e76b0d8, 4e76b118]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4e76b0d8
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4e76b118
CACHE: Misaligned operation at range [4e76b0d8, 4e76b118]
CACHE: Misaligned operation at range [4e76b0d8, 4e76b118]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4e76b0d8
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4e76b118
error!
Bad hash value for 'hash-1' hash node in 'kernel-1' image node
Bad hash in FIT image
It seems to me as if FIT images are not widely used and tested yet.
Is there any "known-good" way to build a FIT-image-based distro and u-boot for example for imx6dlsabresd?
Also, u-boot-imx and mainline (or fslc) have deviated quite a bit, making switching very complicated.
Do you have any plans on getting back closer to mainline? If not, may I learn the motivation behind maintaining your "own u-boot"?
Thanks a lot!