piggletmoo
Posts: 3
Joined: Sun Jan 01, 2012 11:35 pm

Re: Bootloader

Sun Jan 01, 2012 11:50 pm

Could you tell me please if it will be possible to load arm 6 compatable adc,interrupt etc register configuration .asm of usused pins before main os boot, so some background processing can occur beneath the main os.

thank you

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: Bootloader

Mon Jan 02, 2012 12:25 am

The documented boot process is actually:

1) Power on

2) The GPU starts executing some ROM code -- nobody has control of this

3) The GPU reads a FAT partition from the SDcard

4) The GPU loads a graphics driver and a kernel image from the SDcard

5) The GPU then jumps to the kernel image

So, no. Lots happens before the first instruction of the kernel is executed.

Which brings us to another question: How long does it take before the kernel even starts booting? Linux boots kind-of slowly for anything intended to be a consumer device already (compare an Android phone to an Xbox, for example) and I can't help but think that loading the 12 MB blob from SDcard will add additional precious seconds...

foo
Posts: 52
Joined: Thu Dec 29, 2011 12:49 am

Re: Bootloader

Mon Jan 02, 2012 12:31 am

Will the RPi foundation potentially release updates to the GPU boot code, or is that permanent ROM?

Felix
Posts: 22
Joined: Tue Dec 06, 2011 5:13 pm

Re: Bootloader

Mon Jan 02, 2012 1:28 am

It may sound stupid,

But i thought that all linux distro's either grub legacy(grub4dos) or grub2.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Bootloader

Mon Jan 02, 2012 1:36 am

Grub (2) is x86-only, and is not even the only bootloader for x86: LILO...

ARM doesn't sue the same booloaders, if at all. The Pi doesn't really need one, the video firmware + linux kernel suffice, though you can use an ARM bootloader instead of the kernel, and have the bootloader point at one or several kernels. Not many reasons to go to that trouble, though.

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: Bootloader

Mon Jan 02, 2012 1:41 am

Not at all! The idea of a "boot sector" is spefific to the DOS systems, based on x86 and BIOS.

On x86 and x64, the three boot loaders most often used are, AFAICT, LILO, GRUB and SysLinux.

However, the kernel doesn't care about how it gets into memory; something needs to load it at the right address, and jump to it. Discovery of how the system is configured is typically hard-coded on embedded systems (like the Pi), or goes through a mechanism like AHCI (on x86 and friends).

btreut
Posts: 6
Joined: Thu Jan 26, 2012 9:36 am

Re: Bootloader

Fri Jan 27, 2012 6:00 pm

obarthelemy said:


Grub (2) is x86-only, and is not even the only bootloader for x86: LILO…


afaik, this is not true. According to Wikipedia: Grub2: "Some of the goals of the project [Grub 2] include support for non-x86 platforms, [...]".

It should be possible to load core.img (the core of Grub-2) instead of a linux kernel (both, the Linux kernel and core.img are statically linked ELF binaries. So it should be possible to have a (presumable tiny) ext2 partition with Grub-2 from which you again chainload any other OS sitting in yet another partition (or the same).



Bernhard

btreut
Posts: 6
Joined: Thu Jan 26, 2012 9:36 am

Re: Bootloader

Sat Mar 17, 2012 1:58 pm

Felix said:


It may sound stupid,

But i thought that all linux distro"s either grub legacy(grub4dos) or grub2.


no, you're wrong. Besides Grub 2 and Grub Legacy there is SYSLINUX (together with ISOLINUX) and Lilo. Afaik also MicroSofts NTLoader can be tweaked to load linux. I'm not aware of others (for x86), but wikipedia gives more options: https://en.wikipedia.org/wiki/Compariso ... ot_loaders
Last edited by btreut on Thu Nov 06, 2014 2:10 pm, edited 1 time in total.

Lynbarn
Posts: 464
Joined: Wed Jan 04, 2012 11:03 pm
Contact: Website

Re: Bootloader

Sat Mar 17, 2012 3:07 pm

btreut said:


Felix said:


It may sound stupid,

But i thought that all linux distro"s either grub legacy(grub4dos) or grub2.


no, you're wrong. B14esides Grub 2 and Grub Legacy there is SYSLINUX (together with ISOLINUX) and Lilo. Afaik also MicroSofts NTLoader can be tweaked to load linux. I'm not aware of others (for x86), but wikipedia gives more options: http://en.wikipedia.org/wiki/C.....ot_loaders


It is very dangerous to assume that that ALL linux distros do ANYTHING the same way

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Bootloader

Sat Mar 17, 2012 3:22 pm

s/distros/systems/

It is also unsafe to assume that every running Linux system is a "distro".
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “General discussion”