All of lore.kernel.org
 help / color / mirror / Atom feed
* Booting of Linux kernel
       [not found]         ` <CAMGjyMv7fyj1Yzm29+ur1etZm+28Pf332TWv2wS+aD3mZCQeoQ@mail.gmail.com>
@ 2016-09-06 14:32           ` Er Krishna
  2016-09-06 14:46             ` Anuz Pratap Singh Tomar
  2016-10-02  3:37             ` Amit Kumar
  0 siblings, 2 replies; 5+ messages in thread
From: Er Krishna @ 2016-09-06 14:32 UTC (permalink / raw)
  To: kernelnewbies

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160906/0ee782e9/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting of Linux kernel
  2016-09-06 14:32           ` Booting of Linux kernel Er Krishna
@ 2016-09-06 14:46             ` Anuz Pratap Singh Tomar
  2016-10-02  3:37             ` Amit Kumar
  1 sibling, 0 replies; 5+ messages in thread
From: Anuz Pratap Singh Tomar @ 2016-09-06 14:46 UTC (permalink / raw)
  To: kernelnewbies

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 at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Thank you
Warm Regards
Anuz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160906/7b36a3ba/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting of Linux kernel
  2016-09-06 14:32           ` Booting of Linux kernel Er Krishna
  2016-09-06 14:46             ` Anuz Pratap Singh Tomar
@ 2016-10-02  3:37             ` Amit Kumar
  2016-10-02  4:09               ` Arshad Hussain
  2016-10-02 14:48               ` Miles Fidelman
  1 sibling, 2 replies; 5+ messages in thread
From: Amit Kumar @ 2016-10-02  3:37 UTC (permalink / raw)
  To: kernelnewbies

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 at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-- 

Regards,
Amit Kumar
Twitter: @freeark1
Only Numbers Can Command.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161002/d56a6d97/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting of Linux kernel
  2016-10-02  3:37             ` Amit Kumar
@ 2016-10-02  4:09               ` Arshad Hussain
  2016-10-02 14:48               ` Miles Fidelman
  1 sibling, 0 replies; 5+ messages in thread
From: Arshad Hussain @ 2016-10-02  4:09 UTC (permalink / raw)
  To: kernelnewbies


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 at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> -- 
> Regards,
> Amit Kumar
> Twitter: @freeark1
> Only Numbers Can Command.
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting of Linux kernel
  2016-10-02  3:37             ` Amit Kumar
  2016-10-02  4:09               ` Arshad Hussain
@ 2016-10-02 14:48               ` Miles Fidelman
  1 sibling, 0 replies; 5+ messages in thread
From: Miles Fidelman @ 2016-10-02 14:48 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 6, 2016, 8:10 PM Er Krishna <erkrishna at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161002/01ef6700/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-02 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMGjyMuMhN-2XiRno6av9C_T5NWe7N68zVGKehXjM-MpNbD6BA@mail.gmail.com>
     [not found] ` <CAMGjyMs5rz8H0QDkFMM=rq198K-Mmc0kB5HohGgBo+vCadTR6A@mail.gmail.com>
     [not found]   ` <CAMGjyMs=tNogpKEagtkpHJGgE4t6Mum-7AF=osAxkok9U4bQAA@mail.gmail.com>
     [not found]     ` <CAMGjyMu_sZ9oW=HhtYitn6f5FmRhG_ypWv2rCgY3nnh-6b3ZcA@mail.gmail.com>
     [not found]       ` <CAMGjyMuWCMNoH_jkopKF1TW-7jSyVXdYYgYuHFUF5g0B2wDyvQ@mail.gmail.com>
     [not found]         ` <CAMGjyMv7fyj1Yzm29+ur1etZm+28Pf332TWv2wS+aD3mZCQeoQ@mail.gmail.com>
2016-09-06 14:32           ` Booting of Linux kernel Er Krishna
2016-09-06 14:46             ` Anuz Pratap Singh Tomar
2016-10-02  3:37             ` Amit Kumar
2016-10-02  4:09               ` Arshad Hussain
2016-10-02 14:48               ` Miles Fidelman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.