简体   繁体   中英

linux kernel booting from my bootloader

i wish to load linux using my own bootloader .. preliminary research and google told me that i ll have to use start_kerne() 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

Grub 2随附的装载机可能是一个很好的入门参考

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM