diff mbox series

[v2,3/9] barebox: set default BAREBOX_CONFIG for qemu machines

Message ID 20230331104025.1478393-4-ejo@pengutronix.de
State New
Headers show
Series Add barebox bootloader support (and testing) | expand

Commit Message

Enrico Jörns March 31, 2023, 10:40 a.m. UTC
These are set in the barebox recipe rather in the corresponding machines
(where they would belong otherwise) to keep the impact of barebox to
oe-core minimal for now.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
 meta/recipes-bsp/barebox/barebox.inc | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alexander Kanavin March 31, 2023, 2:04 p.m. UTC | #1
On Fri, 31 Mar 2023 at 12:40, Enrico Jorns <ejo@pengutronix.de> wrote:
> +# set defaults for oe-core MACHINEs to allow building barebox
> +BAREBOX_CONFIG:qemuarm = "vexpress_defconfig"
> +BAREBOX_CONFIG:qemuarm64 = "qemu_virt64_defconfig"
> +BAREBOX_CONFIG:qemux86-64 = "efi_defconfig"

As all three are different perhaps there could be commentary in the
recipe explaining why that and how they differ? Note that there's also
a qemuall override if there's a single configuration that works for
all qemu targets.

Alex
Enrico Jörns April 3, 2023, 11:42 a.m. UTC | #2
Hi Alex,

Am Freitag, dem 31.03.2023 um 16:04 +0200 schrieb Alexander Kanavin:
> On Fri, 31 Mar 2023 at 12:40, Enrico Jorns <ejo@pengutronix.de> wrote:
> > +# set defaults for oe-core MACHINEs to allow building barebox
> > +BAREBOX_CONFIG:qemuarm = "vexpress_defconfig"
> > +BAREBOX_CONFIG:qemuarm64 = "qemu_virt64_defconfig"
> > +BAREBOX_CONFIG:qemux86-64 = "efi_defconfig"
> 
> As all three are different perhaps there could be commentary in the
> recipe explaining why that and how they differ? Note that there's also
> a qemuall override if there's a single configuration that works for
> all qemu targets.

as these three are different archs/machines, I do not find it surprising that they require different
configs. I assumed that this was self-explaining.

Note that for UBOOT, you have

in qemux86-64.conf:

  UBOOT_MACHINE ?= "qemu-x86_64_defconfig"

in qemuarm.conf:

  UBOOT_MACHINE ?= "qemu_arm_defconfig"

in qemuarm64.conf:

  UBOOT_MACHINE ?= "qemu_arm64_defconfig"

which is pretty much the same as for barebox, isn't it? Only the naming scheme is a bit more
consistent probably.


Thanks and regards

Enrico

> 
> Alex
>
Alexander Kanavin April 11, 2023, 2:16 p.m. UTC | #3
On Mon, 3 Apr 2023 at 13:42, Enrico Jörns <ejo@pengutronix.de> wrote:
> > > +# set defaults for oe-core MACHINEs to allow building barebox
> > > +BAREBOX_CONFIG:qemuarm = "vexpress_defconfig"
> > > +BAREBOX_CONFIG:qemuarm64 = "qemu_virt64_defconfig"
> > > +BAREBOX_CONFIG:qemux86-64 = "efi_defconfig"
> >
> > As all three are different perhaps there could be commentary in the
> > recipe explaining why that and how they differ? Note that there's also
> > a qemuall override if there's a single configuration that works for
> > all qemu targets.
>
> as these three are different archs/machines, I do not find it surprising that they require different
> configs. I assumed that this was self-explaining.

Not at all. What is this 'vexpress' thingy? What does 'express' mean?
Why does it apply to arm, but not arm64? Why arm64 is using
'qemu_virt64', but not any other targets, if that config does not seem
arm-specific? Why is x86 using 'efi' but not the arm targets?

The choices you made here should be explained.

Alex
Enrico Jörns April 24, 2023, 3:15 p.m. UTC | #4
Am Dienstag, dem 11.04.2023 um 16:16 +0200 schrieb Alexander Kanavin:
> On Mon, 3 Apr 2023 at 13:42, Enrico Jörns <ejo@pengutronix.de> wrote:
> > > > +# set defaults for oe-core MACHINEs to allow building barebox
> > > > +BAREBOX_CONFIG:qemuarm = "vexpress_defconfig"
> > > > +BAREBOX_CONFIG:qemuarm64 = "qemu_virt64_defconfig"
> > > > +BAREBOX_CONFIG:qemux86-64 = "efi_defconfig"
> > > 
> > > As all three are different perhaps there could be commentary in the
> > > recipe explaining why that and how they differ? Note that there's also
> > > a qemuall override if there's a single configuration that works for
> > > all qemu targets.
> > 
> > as these three are different archs/machines, I do not find it surprising that they require
> > different
> > configs. I assumed that this was self-explaining.
> 
> Not at all. What is this 'vexpress' thingy? What does 'express' mean?
> Why does it apply to arm, but not arm64? Why arm64 is using
> 'qemu_virt64', but not any other targets, if that config does not seem
> arm-specific? Why is x86 using 'efi' but not the arm targets?
> 
> The choices you made here should be explained.

Vexpress is "Versatile Express" which once was the ARMv7 reference platform and is one of the
platforms emulated in QEMU (when using "-machine vexpress-a9" or "-machine vexpress-a15").

virt, or virt64 are the generic QEMU ARM platform. For historical reasons, there is only a dedicated
vexpress defconfig in barebox.

EFI is used for x86 only, since on ARM barebox is normally used as the primary loader only.


However, since barebox builds are multi-platform builds by default, it should be possible to use the
standard multi_v7_defconfig and multi_v8_defconfig instead (for arm). I'll give it a try.

Regards, Enrico

> 
> Alex
>
diff mbox series

Patch

diff --git a/meta/recipes-bsp/barebox/barebox.inc b/meta/recipes-bsp/barebox/barebox.inc
index a6c790b84b..4827f7b3a4 100644
--- a/meta/recipes-bsp/barebox/barebox.inc
+++ b/meta/recipes-bsp/barebox/barebox.inc
@@ -48,6 +48,11 @@  EXTRA_OEMAKE = " \
 BAREBOX_CONFIG[doc] = "The barebox kconfig defconfig file. Not used if a file called defconfig is added to the SRC_URI."
 BAREBOX_CONFIG ?= ""
 
+# set defaults for oe-core MACHINEs to allow building barebox
+BAREBOX_CONFIG:qemuarm = "vexpress_defconfig"
+BAREBOX_CONFIG:qemuarm64 = "qemu_virt64_defconfig"
+BAREBOX_CONFIG:qemux86-64 = "efi_defconfig"
+
 do_configure() {
         if [ -e ${WORKDIR}/defconfig ]; then
                 cp ${WORKDIR}/defconfig ${B}/.config