Hi all I have a basic question for understanding : If we want to boot the Linux kernel without bootloader what needs to be done? In other words what all the core subsystem like memory and all needs initialisation by bootloader and if bootloader is not there then how to do it ? Thanks Krishna
On Tue, Sep 6, 2016 at 3:32 PM, Er Krishna <erkrishna@gmail.com> wrote:
Hi all
I have a basic question for understanding :
If we want to boot the Linux kernel without bootloader what needs to be done?
In other words what all the core subsystem like memory and all needs initialisation by bootloader and if bootloader is not there then how to do it ?
http://duartes.org/gustavo/blog/post/kernel-boot-process/ https://0xax.gitbooks.io/linux-insides/content/Booting/ Thanks
Krishna
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Thank you Warm Regards Anuz
On Tue, Sep 6, 2016, 8:10 PM Er Krishna <erkrishna@gmail.com> wrote:
Hi all
I have a basic question for understanding :
If we want to boot the Linux kernel without bootloader what needs to be done?
In other words what all the core subsystem like memory and all needs initialisation by bootloader and if bootloader is not there then how to do it ?
I'm also a newbie but whatever I know I tell you. When you start/reset your board, there are some code in the ROM, which looks for your code at a particular address in an internal RAM. The size of this RAM is limited, so this code should initialize the regular RAM then load rest of your code and initialize other parts of the board. I've read that previously kernel used to include a bootloader but I think after availability of more general bootloaders, it has been removed. On which board do you want to test this? You may read docs and read bootloaders code to learn where ROM looks for your code and how to initialize RAM and load your code. Last but not least you need arm-none-eabi compiler and some linker scripts to place you code at a particular address. Thanks
Krishna _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Regards, Amit Kumar Twitter: @freeark1 Only Numbers Can Command.
On 02-Oct-2016, at 9:07 am, Amit Kumar <free.amit.kumar@gmail.com> wrote:
On Tue, Sep 6, 2016, 8:10 PM Er Krishna <erkrishna@gmail.com> wrote: Hi all
I have a basic question for understanding :
If we want to boot the Linux kernel without bootloader what needs to be done?
Floopy is a good example of booting OS without boot loader. This means that the compressed Linux image is placed right at the start of the floppy. This is where BIOS locates the floppy and boots the OS.
In other words what all the core subsystem like memory and all needs initialisation by bootloader and if bootloader is not there then how to do it ?
AFAIK, whatever GDT, IDT is initialised by boot-looder is overwritten by OS proper. We normally do not use GDT etc setup by boot loader.
I'm also a newbie but whatever I know I tell you. When you start/reset your board, there are some code in the ROM, which looks for your code at a particular address in an internal RAM.
Actually, BIOS is hard coded to execute a predefined address on power on. This in turn calls boot loader which loads OS from disk onto RAM.
The size of this RAM is limited, so this code should initialize the regular RAM then load rest of your code and initialize other parts of the board.
BIOS normally sets up hardware. Using the standard BIOS calls. Then the OS discards them and sets up the hardware later. For example after Linux is booted it does not use int 10h calls anymore.
I've read that previously kernel used to include a bootloader but I think after availability of more general bootloaders, it has been removed.
On which board do you want to test this? You may read docs and read bootloaders code to learn where ROM looks for your code and how to initialize RAM and load your code.
Last but not least you need arm-none-eabi compiler and some linker scripts to place you code at a particular address.
Thanks Krishna
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Regards, Amit Kumar Twitter: @freeark1 Only Numbers Can Command.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Tue, Sep 6, 2016, 8:10 PM Er Krishna <erkrishna@gmail.com <mailto:erkrishna@gmail.com>> wrote:
Hi all
I have a basic question for understanding :
If we want to boot the Linux kernel without bootloader what needs to be done?
In other words what all the core subsystem like memory and all needs initialisation by bootloader and if bootloader is not there then how to do it ?
The role of a bootloader is to load and initialize an operating system - so, in essence, you're asking "what does a bootloader do?" and "how do I write a bootloader?" Perhaps the easiest way to answer your question is to suggest that you study the Linux boot process - and how it proceeds from power up, to BIOS, to LILO or Grub. Your answer is in the details. Miles Fidelman -- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra
participants (5)
-
Amit Kumar -
Anuz Pratap Singh Tomar -
Arshad Hussain -
Er Krishna -
Miles Fidelman