i wish to load linux using my own bootloader .. preliminary research and google told me that i ll have to use start_kern开发者_运维问答e() function .. i want to ask how can i call start_kernel() from assembly .. i have already formatted my usb into ext3 and pasted the compiled kernel there .. now how can i start the linux kernel ? any help is welcome // Thankyou in advance
Mohsin .
Are you sure you need to write your own bootloader ?
You don't call start_kernel. You don't call any function by the way. What you need is to read the kernel image into memory, put some information like the commandline into memory, setup some register and then jump to the entrypoint of the kernel.
Each architecture (x86, ARM etc ...) can have different booting requirement.
If you want to have a deeper understanding, may be you can have a look at u-boot source, for example lib_386/zImage.c
The loader that comes with Grub 2 could be a good starting reference
精彩评论