Skip to content

Supporting a second Barebox build to build the MLO/SPL

Pieter Smith buildroot 1 version New

Get series with b4
b4 am 20151026212726.GA9761@smipidev

Versions newest first

  1. v1 Latest0 of 4 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [PATCH 0/4] Supporting a second Barebox build to build the MLO/SPL

Hi Thomas,

Quoted 18 lines · Thomas Petazzoni

Dear Pieter Smith,

Quoted 6 lines · Pieter Smith

Pieter Smith (4):
barebox: prepare for x-loader build
barebox: adds option to build x-loader
barebox: user selection of build output images
beaglebone: adds barebox bootloader defconfig

Quoted 7 lines
 boot/barebox/Config.in                        | 92 +++++++++++++++++++++++++++
 boot/barebox/barebox-boot/barebox-boot.hash   |  1 +
 boot/barebox/barebox-boot/barebox-boot.mk     | 89 ++++++++++++++++++++++++++
 boot/barebox/barebox-xload/barebox-xload.hash |  1 +
 boot/barebox/barebox-xload/barebox-xload.mk   | 51 +++++++++++++++
 boot/barebox/barebox.mk                       | 60 +----------------
 configs/beaglebone_barebox_defconfig          | 38 +++++++++++
Quoted 5 lines

I believe "xload" is really a term tied to the OMAP platforms, but Barebox can have this dual configuration situation for other platforms as well (ex: Atmel). Some other platforms use the term "SPL".

Can we find some better name ?

Yes please, but selecting a use-case agnostic name might be tricky:

U-Boot uses SPL (Secondary Program Loader) to describe a "run from internal SRAM" build as opposed to TPL (Tertiary Program Loader) for the normal "run from external RAM" build. This terminology however is U-Boot specific.

From a pure barebox perspective, there is nothing distinctive about the second build. It is just another defconfig, so there does not seem to be barebox terminology to differentiate between these types of builds. (Barebox even leaves the naming as a configuration option)

From an OMAP perspective, the second build is used to generate the X-loader when booting from NAND or MLO when booting from MMC.

I would have loved to just stick with the boot stage naming, but the stage is very much architecture dependent:
For BBB for example:
1. First-stage bootloader runs from internal hard-coded ROM
2. Second-stage bootloader runs from the internal SRAM (TI MLO) and is generated with a trimmed down configuration.
3. Third-stage bootloader runs from the external RAM and is generated with a full configuration.
But for the QCA4531 and family:
1. First-stage bootloader runs from external serial NOR flash and is generated with a full-blown configuration.

IMHO, let's just go with the suggested U-Boot naming (SPL) and if no barebox developers complain, stick to that.

Agreed?

Quoted 6 lines

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com