AnsweredAssumed Answered

How to boot linux with multi image boot with an initrd packed with it

Question asked by kevin.chaves on Jul 31, 2014
Latest reply on Aug 21, 2014 by Yixing Kong
Branched to a new discussion

I'm having a hard time getting an initrd to work nicely with a multi image boot. I'm using an imx6 quad with 1 gb or ram. Our starting address with it is 0x80000000.


So I have an issue with using the normal cpio image built into the kernel as an initramfs. My problem is that we have proprietary modules so it becomes a circular dependency in the tool we got from timesys. To be able to build the cpio in the kernel image I need to build the modules first, which require the kernel to be built, which needs the mudels... So I've opted for a single file with multiple images built into it. But I'm having a hard time finding any decent documentation with this.


I've noticed that the kernel load address is the same as the ramdisk which I'm not sure if this is a problem. I do have both images separate, but I'm not entirely sure where to load cpio image separate. It seems like that could be easier since then I could just use bootm {kerneladdress} {cpioaddress} ?


## Booting kernel from Legacy Image at 80800000 ...

   Image Name:   Linux-3.0.35

   Image Type:   ARM Linux Multi-File Image (uncompressed)

   Data Size:    61927702 Bytes = 59.1 MiB

   Load Address: 80008000

   Entry Point:  80008000


      Image 0: 3581868 Bytes = 3.4 MiB

      Image 1: 58345822 Bytes = 55.6 MiB

   Verifying Checksum ... OK

## Loading init Ramdisk from multi component Legacy Image at 80800000 ...

## Flattened Device Tree from multi component Image at 80800000

   Loading Multi-File Image ... OK


The kernel arguments I used I pulled from the only example of the multi image I could find.


] Kernel command line: console=ttymxc1,115200 consoleblank=0 root=/dev/ram0 rw initrd=80800000 rootfstype=cpio


[    1.152419] Unpacking initramfs...

[    1.155854] Initramfs unpacking failed: junk in compressed archive

[    1.173722] Freeing initrd memory: 56980K




I'm not sure if i needed this but I added some config options to my kernel





# CONFIG_RD_BZIP2 is not set

# CONFIG_RD_LZMA is not set

# CONFIG_RD_XZ is not set

# CONFIG_RD_LZO is not set