Skip to contentSkip to conversation

Passing squashfs of unknown size to linux

U-Boot kkaras 1 participant 1 message Sep 5, 2016

lore
Share & tools
lore

kkaras

author
#0 lore raw

Hi, I would like to pass a rootfs.squashfs image to linux with the initrd in the bootargs parameter, but I can only get it to work by including the size of the image (e.g. ",21M"). Is there a way to make this work without hardcoding the size of the image in u-boot?

This is my current configuration:

/set bootargs 'console=ttymxc0,115200 root=/dev/ram0 ro initrd=0x83800000,21M rootfstype=squashfs' bootz 0x80800000 - 0x83000000/

During production, the rootfs.squashfs image is transferred to RAM without involving u-boot, so u-boot does not know the size of the image. The tool loading the image into RAM obviously know the size, but I do not have a shell into u-boot, so there is no easy way to tell u-boot.

I have considered prepending the size of the image, to the image it self, and have u-boot extract it from RAM. However, I'm wondering if there is a better method?

--
View this message in context: http://u-boot.10912.n7.nabble.com/Passing-squashfs-of-unknown-size-to-linux-tp266083.html
Sent from the U-Boot mailing list archive at Nabble.com.