>I am confused here. You mention above that the address of the rootfs is >determined based on its size. So you do know the memory that would be needed >for the rootfs? Also, how does calculating the amount of RAM left over for the >kernel help. I mean, what if the kernel is bigger than the amount of >left >over memory? Can that not happen if you don't know the amount of memory that >would be needed for the kernel as you mention above.
Sorry, maybe I misused the term "kernel memory". I am referring to the amount of physical ram available for the kernel to use: From the kernel parameter docs: ``` mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory Amount of memory to be used when the kernel is not able to see the whole system memory or for test. [X86] Work as limiting max address. Use together with memmap= to avoid physical address space collisions. Without memmap= PCI devices could be placed at addresses belonging to unused RAM. ``` We know the memory that is needed based for the rootfs "in runtime", it's not something we can compile into u-boot (if you add a new binary to the rootfs then it's bigger). We don't want the kernel to be touching this piece of memory that emulates the mtd partition. I hope this clears up the usecase. Tomas