mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* FIT: support for compressed images breaks existing images
@ 2023-08-25  9:44 Christian Eggers
  2023-08-25 10:23 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Eggers @ 2023-08-25  9:44 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

Hi Ahmad,

On Wednesday, 23 August 2023, 18:32:06 CEST, Ahmad Fatoum wrote:
> I need not tell you though that latest is greatest and all that ;)

after rebasing my internal branch to v2023.8.0, my system doesn't
boot anymore:

Booting entry '/dev/nand0.root.ubi.kernel0'
FIT: Opened FIT image: Barebox fitImage for Poky (Yocto Project Reference Distro)/1.0/orbiter
FIT: matching unit 'conf-imx6ull-arri-orbiter-revB.dtb' found
FIT: configuration 'conf-imx6ull-arri-orbiter-revB.dtb': 7 Linux kernel, FDT blob, ramdisk
FIT: image 'kernel-1': 'Linux kernel'
FIT: /images/kernel-1/hash-1: hash OK

Loading open firmware Device Tree flattened Binary '/dev/nand0.root.ubi.kernel0'
FIT: image 'ramdisk-1': 'lios-initramfs-ubifs-orbiter.cpio.lz4'
FIT: /images/ramdisk-1/hash-1: hash OK
cannot handle filetype LZ4 compressed
ERROR: FIT: data couldn't be decompressed
ERROR: Cannot open ramdisk image in FIT image: Function not implemented
ERROR: Booting entry '/dev/nand0.root.ubi.kernel0' failed


Since commit

2ab6780b80e3 ("FIT: add first support for compressed images")

Barebox uses the "compression" key from the FIT image which breaks loading my
ramdisk (LZ4 compressed, should be decompressed by the kernel).  Although the
compression parameter should be "none" in that case, it actually isn't.  Older
Yocto releases used to set the actual compression type here:

https://git.yoctoproject.org/poky/commit/?h=kirkstone&id=2c58079222310443f08df51e9fd6ce234e7e0019

In U-Boot, the "compression" parameter is ignored for ramdisks due to this
problem. Only a warning is printed:

https://source.denx.de/u-boot/u-boot/-/commit/bddd98573465
https://source.denx.de/u-boot/u-boot/-/blob/master/boot/image-fit.c#L2289

Could you also apply this workaround to Barebox?

regards,
Christian






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: FIT: support for compressed images breaks existing images
  2023-08-25  9:44 FIT: support for compressed images breaks existing images Christian Eggers
@ 2023-08-25 10:23 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2023-08-25 10:23 UTC (permalink / raw)
  To: Christian Eggers; +Cc: barebox

Hello Christian,

On 25.08.23 11:44, Christian Eggers wrote:
> Hi Ahmad,
> 
> On Wednesday, 23 August 2023, 18:32:06 CEST, Ahmad Fatoum wrote:
>> I need not tell you though that latest is greatest and all that ;)
> 
> after rebasing my internal branch to v2023.8.0, my system doesn't
> boot anymore:
> 
> Booting entry '/dev/nand0.root.ubi.kernel0'
> FIT: Opened FIT image: Barebox fitImage for Poky (Yocto Project Reference Distro)/1.0/orbiter
> FIT: matching unit 'conf-imx6ull-arri-orbiter-revB.dtb' found
> FIT: configuration 'conf-imx6ull-arri-orbiter-revB.dtb': 7 Linux kernel, FDT blob, ramdisk
> FIT: image 'kernel-1': 'Linux kernel'
> FIT: /images/kernel-1/hash-1: hash OK
> 
> Loading open firmware Device Tree flattened Binary '/dev/nand0.root.ubi.kernel0'
> FIT: image 'ramdisk-1': 'lios-initramfs-ubifs-orbiter.cpio.lz4'
> FIT: /images/ramdisk-1/hash-1: hash OK
> cannot handle filetype LZ4 compressed
> ERROR: FIT: data couldn't be decompressed
> ERROR: Cannot open ramdisk image in FIT image: Function not implemented
> ERROR: Booting entry '/dev/nand0.root.ubi.kernel0' failed
> 
> 
> Since commit
> 
> 2ab6780b80e3 ("FIT: add first support for compressed images")
> 
> Barebox uses the "compression" key from the FIT image which breaks loading my
> ramdisk (LZ4 compressed, should be decompressed by the kernel). Although the
> compression parameter should be "none" in that case, it actually isn't. Older
> Yocto releases used to set the actual compression type here:
> 
> https://git.yoctoproject.org/poky/commit/?h=kirkstone&id=2c58079222310443f08df51e9fd6ce234e7e0019
> 
> In U-Boot, the "compression" parameter is ignored for ramdisks due to this
> problem. Only a warning is printed:
> 
> https://source.denx.de/u-boot/u-boot/-/commit/bddd98573465
> https://source.denx.de/u-boot/u-boot/-/blob/master/boot/image-fit.c#L2289
> 
> Could you also apply this workaround to Barebox?

Thanks for the detailed report. I just Cc'd you on a patch that fixes this.
Please give it a test.

Cheers,
Ahmad

> 
> regards,
> Christian
> 
> 
> 
> _______________________________________________________​
> Christian	 
> 	Eggers
> 
> Software Engineer
> ​
> 
> ARRI
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG 
> 
> Arriweg 17	, 
> 	83071	 
> 	Stephanskirchen
> 
> www.arri.com 
> 
> <http://www.arri.com/>
> 	+49 8036 3009-3118 <tel:+49%208036%203009-3118>
> 	
> 	
> 	CEggers@arri.de <mailto:CEggers@arri.de>
> 
> 
> ​
> 
> CCM1 Camera Control Monitor <https://www.arri.com/en/camera-systems/cameras/ccm-1>
> Get all the latest information from www.arri.com <https://www.arri.com/>, Facebook <https://www.facebook.com/TeamARRI>, Twitter <https://twitter.com/ARRIChannel>, Instagram <https://www.instagram.com/arri/>, LinkedIn <https://www.linkedin.com/company/arri> and YouTube <https://www.youtube.com/user/ARRIChannel>.
> 
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRA 57918
> Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRB 54477
> Geschäftsführer: Dr. Matthias Erb (Chairman); Lars Weyer; Stephan Schenk; Walter Trauninger
> 
> ​
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-25 10:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25  9:44 FIT: support for compressed images breaks existing images Christian Eggers
2023-08-25 10:23 ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox