questions on rootfs mouting and on initramfs functionning details
Hello all,
I need some information concerning rootfs and initramfs.
I have read a lot of stuff on this but some questions remain.
I need to understand how rootfs is mounted with the initramfs procedure.
Things I know: __initramfs_start symbol is defined in vmlinux.lds.S (in the .init section)
During boot, "populate_rootfs()" calls "unpack_to_roofs()" and after "decompress_method()" is called to check the magic number of the compression used to pack initramfs_data.cpio.<comp>. This magic number is expected at __initramfs_start adress. If a valid magic number is found, the name of the compressor is returned to "unpack_to_roofs()". Then the un<comp> routine (example: ungzip, unlzma ..) is called.
Are these things correct?
if so, the initramfs_data.cpio archive should already been in memory (at __initramfs_start) during boot.
So how to copy initramfs.cpio archive to __initramfs_start?
Where is the initramfs_data.cpio.<comp> placed in memory after it is decompressed.
Thanks in advance for your help.
Regards
|