Hi, I am a newbie to linux . I am using x86 architecture with 1GB ram.
when i compile the kernel, i get this bvmlinux.out executable.
My requirement is that i need to boot my board with ramdisk. so this is what i did,
I have loaded the bvmlinix.out at 0x100000 and ramdisk at 0x20000000.
I have modified the kernel code to hardcode the address of the ramdisk to the kernel. Then i ask BIOS to jump to location 0x100000.
{ Note that i am not using any bootloader and the BIOS switch the processor to protected mode and has some more instructions(not sure what they are)
before it jumps to the kernel}
******************************************************** [ This is what is modified in the code:in arch/i386/kernel/setup.c ==> function: setup_memory(void)
{....
i have removed all the code under #defined CONFIG_BLK_DEVINITRD
and replaced with the fiollowing line:
initrd_start = 0x20000000
}function: setup_arch(char ** cmdline_p)
{...
//I have added below line
rd_image_start = 0x20000000;
setup_memory-region(); //This is already present in the code
..
}in init/main.c:: function: start_kernel(void)
{...
calibrate_delay(); // This is existing code
i have removed all the code under #defined CONFIG_BLK_DEVINITRD
and replaced with the fiollowing line:
initrd_start = phys_to_virt(0x20000000);
mem_init(); //This is existing code
} ]With all the above changes, i am able to mount the ramdisk properly. But the kernel is panic'ing as it could not find "/sbin/init"
i have all the required files in the ramdisk.i even tried with init=/bin/sh. still the kernel panics.
I believe somewhere kernel might be using the memory where the ramdisk is located. This is because if i increase my ram to 2GB then
i could reach the shell.
Can you please tell me what is that i am missing?
Thanks a lot in advance,
Uday