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. Please help! |
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. |
Hi business_kid,
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? Please help! |
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. |
Hi business_kid,
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? Please help! |
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)? Please reply! Thanks in Advance! |
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 |
Hi business_kid,
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. Please reply! |
Can't help you there. There are utilities that calculate the disk offset. Some are complex boot loaders, but even
Code:
DD skip=<some_number> |
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.
Thanks again. |
All times are GMT -5. The time now is 07:16 PM. |