Re: How to boot from SD but run from USB?

Liste des GroupesRevenir à cs raspberry-pi 
Sujet : Re: How to boot from SD but run from USB?
De : theom+news (at) *nospam* chiark.greenend.org.uk (Theo)
Groupes : comp.sys.raspberry-pi
Date : 28. Jan 2025, 11:36:08
Autres entêtes
Organisation : University of Cambridge, England
Message-ID : <OCn*gZI5z@news.chiark.greenend.org.uk>
References : 1 2 3 4
User-Agent : tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-28-amd64 (x86_64))
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Mon, 27 Jan 2025 14:04:07 +0000, The Natural Philosopher wrote:
 
Yup Arm/broadcomm based Pis 'do it their way'
 
It goes back to the chips inception as a set top box embedded processpor
 
Also remember that GRUB depends on BIOS or UEFI, and the former is x86-
specific -- not sure about the latter.

UEFI isn't x86 specific - Arm uses it as well.

Basically, every vendor’s ARM chipset came up with its own way of booting.
In the absence of a BIOS-style interface for querying what hardware is
available, the Linux kernel is built with a “device tree” structure that
hard-codes this information for your specific chipset.

Yes, although to note that there are typically several stages of booting.
The UEFI / u-boot / etc is often the second or third stage of booting.  They
come after things like the ROM first-stage bootloader then the second stage
bootloader loadered from flash, or similar.  Sometimes boot is handled by a
CPU that isn't the main one, such as a 'management' CPU or in the Pi
1/2/3's case the GPU.

In the classic Pi 1, the process is:
1st stage: ROM bootloader (enough to read SD card)
2nd stage: bootcode.bin on SD card (firmware for GPU)
3rd stage: start.elf on SD card (firmware for GPU)
4th stage: Linux kernel from SD card (for CPU)

In Pi 3 and later the ROM bootloader also knows enough to read USB sticks as
well as SD cards.  The early stage(s) also move to EEPROM on Pi 4 to make
them easier to update.

There is now an equivalent spec standardized for the ARM world (adaptation
of UEFI??), but I understand this is only in use on servers with AArch64,
and the Raspberry Pi predates it anyway.

It's possible to run another bootloader like u-boot or UEFI as your fourth
stage, ie:

1st stage: ROM bootloader (GPU)
2nd stage: bootcode.bin on SD card (GPU)
3rd stage: start.elf on SD card (GPU)
4th stage: UEFI / u-boot on SD card (CPU)
5th stage: Linux kernel (CPU)

This is useful if you need more flexible booting than the regular boot
process provides - eg you want to fetch the kernel from an NFS share, which
is something not supported in the standard Pi firmware.

If the board vendor puts the firmware for stages 1-4 into EEPROM/flash, the
board now supports UEFI but the boot process didn't change, it just hid the
first four stages from you.

Theo

Date Sujet#  Auteur
23 Jan 25 * How to boot from SD but run from USB?36Chris Green
24 Jan 25 +* Re: How to boot from SD but run from USB?6yeti
24 Jan 25 i`* Re: How to boot from SD but run from USB?5Chris Green
24 Jan 25 i `* Re: How to boot from SD but run from USB?4Theo
24 Jan 25 i  `* Re: How to boot from SD but run from USB?3Chris Green
28 Jan 25 i   `* Re: How to boot from SD but run from USB?2Lawrence D'Oliveiro
28 Jan 25 i    `- Re: How to boot from SD but run from USB?1Chris Green
23 Jan 25 +* How to boot from SD but run from USB?19Dennis Slagers
24 Jan 25 i`* Re: How to boot from SD but run from USB?18druck
24 Jan 25 i +* How to boot from SD but run from USB?7Dennis Slagers
26 Feb 25 i i`* How to boot from SD but run from US6Dave Vandermeer
28 Feb 25 i i +* How to boot from SD but run from US2Dennis Slagers
2 Mar 25 i i i`- Re: How to boot from SD but run from US1The Natural Philosopher
2 Mar 25 i i +- Re: How to boot from SD but run from US1yeti
11 Mar 25 i i +- Re: How to boot from SD but run from US1Lawrence D'Oliveiro
11 Mar 25 i i `- How to boot from SD but run from US1Grant Weasner
24 Jan 25 i `* How to boot from SD but run from USB?10Dennis Slagers
27 Jan 25 i  +* Re: How to boot from SD but run from USB?3The Natural Philosopher
28 Jan 25 i  i`* Re: How to boot from SD but run from USB?2Lawrence D'Oliveiro
28 Jan 25 i  i `- Re: How to boot from SD but run from USB?1Theo
26 Feb 25 i  `* How to boot from SD but run from US6Dave Vandermeer
28 Feb 25 i   +* How to boot from SD but run from US2Dennis Slagers
5 Mar 25 i   i`- Re: How to boot from SD but run from US1Adrian Caspersz
4 Mar 25 i   +- Re: How to boot from SD but run from US1The Natural Philosopher
4 Mar 25 i   `* Re: How to boot from SD but run from US2druck
5 Mar 25 i    `- Re: How to boot from SD but run from US1The Natural Philosopher
24 Jan 25 +* Re: How to boot from SD but run from USB?9The Natural Philosopher
24 Jan 25 i+* Re: How to boot from SD but run from USB?3Theo
24 Jan 25 ii`* Re: How to boot from SD but run from USB?2The Natural Philosopher
28 Jan 25 ii `- Re: How to boot from SD but run from USB?1Lawrence D'Oliveiro
24 Jan 25 i`* Re: How to boot from SD but run from USB?5Chris Green
24 Jan 25 i `* Re: How to boot from SD but run from USB?4The Natural Philosopher
24 Jan 25 i  +* Re: How to boot from SD but run from USB?2Chris Green
24 Jan 25 i  i`- Re: How to boot from SD but run from USB?1The Natural Philosopher
28 Jan 25 i  `- Re: How to boot from SD but run from USB?1Lawrence D'Oliveiro
23 Jan 25 `- How to boot from SD but run from USB?1Dennis Slagers

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal