LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to create a kernel bootable image (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-a-kernel-bootable-image-803252/)

aloktiagi 04-21-2010 07:05 AM

how to create a kernel bootable image
 
Hi,

the things i've tried:

1. Created an asm bootloader code that calls a c function which just prints a hello message.
2. Compiled both and linked them using LD command using a .ld file available.

Steps followed from http://wiki.osdev.org/Bare_bones

I get a kernel.bin file which is of ELF format. I've set up a tftp server using tftpd32 tool and created the necessary pxelinux.cfg files.

Now how do i create a bootable kernel image out of the elf file. The steps given in the above website to create an image doesn't help!!!

Any help is appreciated

Alok

onebuck 04-23-2010 08:15 AM

Hi,

What part of the 'Booting the kernel' section is confusing you? If you followed the example all the way then you should have a bootable kernel image;
Quote:

excerpt from 'Overview';

Even when using GRUB, some setup is required before entering an int main() type function. The most basic setup to get an ELF format kernel to be booted by GRUB consists of three files:

* loader.s - assembler "glue" between bootloader and kernel
* kernel.c - your actual kernel routines
* linker.ld - for linking the above files

The second part of this tutorial briefly describes how to boot the compiled kernel.
Other boot options or techniques are exampled.

So again I ask, Where are you having difficulty?


All times are GMT -5. The time now is 09:27 PM.