tizen: bootscript: unpack initramfs and pass its actual size to kernel 19/318719/1 accepted/tizen_unified_toolchain old/tizen_20241029 accepted/tizen/unified/toolchain/20241022.122452 accepted/tizen/unified/toolchain/20241022.122923 accepted/tizen/unified/x/20241011.113906 accepted/tizen/unified/x/asan/20241014.000031
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 7 Oct 2024 09:44:00 +0000 (11:44 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 7 Oct 2024 09:44:14 +0000 (11:44 +0200)
commit7a92d09dbfbbb09327b4aea686fe71a7472fddca
treec03e664a06f83b4a64c272d740a0c5ace9ae9951
parentf154cb059b8211ee99eb0a04c5d1cdfa43de8f0e
tizen: bootscript: unpack initramfs and pass its actual size to kernel

The initramfs ramdisk image (CPIO compressed archive) is stored on the
separate ramdisk/ramdisk-recovery partitions, thus it is not possible to
determine size of the compresszed archive. Passing the size of the
partition as the size of initramfs image to the kernel instructs the
kernel to check if the remaining bytes are another CPIO archive with more
initramfs data.

Decompressing or interpreting such additional garbage bytes sometimes
fails, what results in kernel ignoring the whole initramfs data as broken
one and thus breaking the Tizen boot sequence.

To avoid such problems and dependency on unknown/garbage data from
ramdisk partitions, lets decompres initramfs data (CPIO gzip archive)
directly in u-boot and pass the kernel only the single, uncompressed CPIO
archive as iniramfs image.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4d8e532ead5c4775b2eef9272e6121565083d9a0
tizen/bootscript/tizen-boot-lpi4a.scr