[SOLVED] Where to place kernel image in filesystem heirarchy for embedded environment?
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Where to place kernel image in filesystem heirarchy for embedded environment?
Hi,
I have cross compiled kernel image and kernel modules with me.I will place kernel modules in /lib directory in root filesystem heirarchy and where to place kernel image? If to place it in /boot directory what should i ensure with my boot loader generally? Or if i should place anywhere what should i ensure with my bootloader generally?
I planned to use U-boot bootloader. But i need to know the common ideas that should I have so that if I have to use any other bootloader, I should be able to do.
kernels gradually moved from / to /boot over the years, because people had boot partitions. Everything needed to boot should be mounted under /, i.e. not under /usr, var, or /opt.
A quick google for FHS hierarchy will tell you all you need to know, and probably much more :-P.
If I have to place in /boot directory how to determine the start address for bootloader to fetch the kernel.
If I didnot place in filesystem heirarchy while building rootfs image and if I flash the kernel image and rootfs image separately into embedded board
at which address I have to specify for bootloader to place. Should it be the same as the address of /boot directory?
You can drop the kernel in the / directory. That's fine, and better if you are using offsets. a /boot would only get in the way.
As I understand it, if you're not offering a choice you don't need to worry about a bootloader. It depends how elementary you are going. You probably want a maintenance option. But these are design issues, and you should know answers, not trust some geek on a forum.
Do i have to place compressed image of the kernel(zImage) or uncompressed image(vmlinuz) in / directory?
In the desktop filesystem when I checked while running in the /directory it shows vmlinuz.o like that dont remember the exact name sorry.
Is it due to that while running it decompresses the zImage and hence showing vmlinuz or we have to place vmlinuz image only?
Provided you compiled compression for the format used into the kernel, you only need a compressed image = ~/arch/x86/boot/bzImage usually. If that's not there grab the smallest one.
Address locating of kernel and rootfilesystem in Linux installed in PC
On comparing Linux installed in PC(laptop/desktop/workstation) with Linux installed in embedded boards, I got a doubt. ie) In embedded board we are passing exact physical address of kernel and root file system (in hexadecimal format) that resides in different partitions to embedded boot loader like Uboot or by specifying the partition information in board specific file that is in kernel source, so that boot loader loads kernel and then root file system was mounted.
In what mechanism for a Linux installed in PC loads kernel and root file system after boot loader?
How do we pass the information to boot loader for booting kernel and mounting of root file system(through which files)?
how does the boot loader locates the physical address of kernel image and root file system?
Does the kernel size can be modified on adding or removing drivers or modules or any features after installing in the PC? If it can be modified how the offset address info of root file system modified due to kernel size modified passed to Boot loader (through which files)?
I will reply but I'm not writing you a handbook.
This stuff is online in many guides. Look them up. The LinuxFromScratch book has detailed information on kernel builds and installs. http://www.linuxfromscratch.org
I see that booting information are passed as directory/file path starting from root partition ie mentioned as '/'. But I want to know where will be the physical starting address(in terms of hex) of the root partition and starting address of other path that requires to be mounted will translated and passed to the bootloader.
Thanks business_kid. I got cleared now. Until your reply I was in assumption that Bootloader will be light weighted and utilities contained in binutils will not be supported by that. Now I am clear.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.