>>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: > .... >I hope this clears up the usecase. Some extra info for the design decision, sorry for the double post, I hope this makes the situation more clear: - This is used for development purposes only, if somehow the ram given to the kernel is not enough it's not a problem, it will crash (it was happening after the u-boot update because the tftp allocated regions were not considered free, and it was giving the kernel very little memory). - It will always be enough if it's calculated correctly. Boards have between 1 and 2 GB of ram and the rootfs is typically 30 to 50MB. - Previously this was calculated manually by subtracting reserved region sizes, but since the introduction of our armv8 boards it became simpler and more generic to use lmb. - using this instead of nfsroot lets us have multiple boards of the same type downloading the same rootfs. With nfs, we would need to point each board to a different nfsroot to avoid collisions. Tomas