Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8051

Advanced users • Re: Custom Linux, custom file system in RAM

$
0
0
Thus, I come to the conclusion that the kernel, by default, searches for the file system after itself in RAM.
the kernel never searches for the initrd

Code:

root@raspberrypi:~# hexdump -C /proc/device-tree/chosen/linux,initrd-start 00000000  2d fa 40 00                                       |-�@.|00000004root@raspberrypi:~# hexdump -C /proc/device-tree/chosen/linux,initrd-end   00000000  2e ff f9 86                                       |.��.|00000004root@raspberrypi:~# 
the device-tree explicitly tells linux where the initrd is in ram
of initramfs initramf.gz 0x00800000
this puts the initrd 8mb from the start of ram
the default kernel load addr is 0x200000 (2mb from the start of ram)
so that leaves a 6mb hole between the kernel and initrd

Code:

root@raspberrypi:~# cat /boot/firmware/kernel8.img | gunzip | wc -c23589376
and my kernel is 22mb
so based on your config, the kernel and initrd occupy the same space, and something gets trashed

the followkernel option saves you from having to do this math and update it every time things change

Statistics: Posted by cleverca22 — Mon Mar 11, 2024 3:40 pm



Viewing all articles
Browse latest Browse all 8051

Trending Articles