mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value
@ 2025-07-30  5:57 Ahmad Fatoum
  2025-07-30  5:57 ` [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-07-30  5:57 UTC (permalink / raw)
  To: barebox; +Cc: chalianis1, Ahmad Fatoum

The default for -D without = is to define the symbol to expand to 1.
This is nt what we want, because pbl/string.c defines it without value
leading to a build error. Fix this by defining it empty explicitly
instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 scripts/Makefile.pic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.pic b/scripts/Makefile.pic
index a08ee67f4a3e..0cefe350b39e 100644
--- a/scripts/Makefile.pic
+++ b/scripts/Makefile.pic
@@ -13,7 +13,7 @@ picflags-$(CONFIG_ARM64)	:= -fpie
 
 picflags-y			+= -include $(srctree)/include/linux/hidden.h \
 				   -D__fully_pic__ \
-				   -D__NO_FORTIFY \
+				   -D__NO_FORTIFY="" \
 				   -ffreestanding \
 				   -fno-stack-protector \
 				   $(call cc-option,-fno-addrsig) \
-- 
2.39.5




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

* [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily
  2025-07-30  5:57 [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Ahmad Fatoum
@ 2025-07-30  5:57 ` Ahmad Fatoum
  2025-08-05  5:43   ` Sascha Hauer
  2025-07-30  5:57 ` [PATCH 3/4] ARM: configs: multi: configure CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK Ahmad Fatoum
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2025-07-30  5:57 UTC (permalink / raw)
  To: barebox; +Cc: chalianis1, Ahmad Fatoum

With multi_v8, we build everything in a single build and that makes the
layerscape PBLs exceed their hard limit of 64K failing the build.

Until resolved, let's disable it from the defconfig. Users can still use
the dedicated layerscape defconfigs.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/configs/multi_v8_defconfig | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
index a487d331d04e..5c295cd58269 100644
--- a/arch/arm/configs/multi_v8_defconfig
+++ b/arch/arm/configs/multi_v8_defconfig
@@ -3,7 +3,6 @@ CONFIG_ARCH_BCM283X=y
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_K3=y
 CONFIG_ARCH_SUNXI=y
-CONFIG_ARCH_LAYERSCAPE=y
 CONFIG_ARCH_ROCKCHIP=y
 CONFIG_ARCH_ZYNQMP=y
 CONFIG_MACH_RPI3=y
@@ -28,9 +27,6 @@ CONFIG_MACH_ZII_IMX8MQ_DEV=y
 CONFIG_MACH_PHYTEC_PHYCORE_IMX93=y
 CONFIG_MACH_TQMA93XX=y
 CONFIG_IMX_IIM=y
-CONFIG_MACH_LS1028ARDB=y
-CONFIG_MACH_LS1046ARDB=y
-CONFIG_MACH_TQMLS1046A=y
 CONFIG_MACH_BEAGLEPLAY=y
 CONFIG_MACH_RK3568_EVB=y
 CONFIG_MACH_RK3568_BPI_R2PRO=y
@@ -258,7 +254,6 @@ CONFIG_REGULATOR_FIXED=y
 CONFIG_REGULATOR_ARM_SCMI=y
 CONFIG_REGULATOR_RK808=y
 CONFIG_RESET_IMX7=y
-CONFIG_PCI_LAYERSCAPE=y
 CONFIG_PCI_ECAM_GENERIC=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
-- 
2.39.5




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

* [PATCH 3/4] ARM: configs: multi: configure CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK
  2025-07-30  5:57 [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Ahmad Fatoum
  2025-07-30  5:57 ` [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily Ahmad Fatoum
@ 2025-07-30  5:57 ` Ahmad Fatoum
  2025-07-30  5:57 ` [PATCH 4/4] ARM64: configs: add multi_v8_efi_defconfig Ahmad Fatoum
  2025-08-11 13:34 ` [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Sascha Hauer
  3 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-07-30  5:57 UTC (permalink / raw)
  To: barebox; +Cc: chalianis1, Ahmad Fatoum

To be more robust against regressions and to allow use for EFI payload,
where nothing yet enables a default console, have barebox activate all
consoles if none have been registered normally.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/configs/multi_v5_v6_defconfig | 2 +-
 arch/arm/configs/multi_v7_defconfig    | 2 +-
 arch/arm/configs/multi_v8_defconfig    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/multi_v5_v6_defconfig b/arch/arm/configs/multi_v5_v6_defconfig
index 91d3a63e85ab..c3739be1020d 100644
--- a/arch/arm/configs/multi_v5_v6_defconfig
+++ b/arch/arm/configs/multi_v5_v6_defconfig
@@ -27,7 +27,7 @@ CONFIG_BOOTM_VERBOSE=y
 CONFIG_BOOTM_INITRD=y
 CONFIG_BOOTM_OFTREE=y
 CONFIG_BLSPEC=y
-CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_RESET_SOURCE=y
 CONFIG_LONGHELP=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 726afe8ce6c5..334a1b951902 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -109,7 +109,7 @@ CONFIG_BOOTM_OFTREE_UIMAGE=y
 CONFIG_BOOTM_AIMAGE=y
 CONFIG_BOOTM_FITIMAGE=y
 CONFIG_BLSPEC=y
-CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK=y
 CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PBL_CONSOLE=y
 CONFIG_CONSOLE_RATP=y
diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
index 5c295cd58269..37642be19b22 100644
--- a/arch/arm/configs/multi_v8_defconfig
+++ b/arch/arm/configs/multi_v8_defconfig
@@ -58,7 +58,7 @@ CONFIG_BOOTM_OFTREE_UIMAGE=y
 CONFIG_BOOTM_AIMAGE=y
 CONFIG_BOOTM_FITIMAGE=y
 CONFIG_BLSPEC=y
-CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK=y
 CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PBL_CONSOLE=y
 CONFIG_CONSOLE_RATP=y
-- 
2.39.5




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

* [PATCH 4/4] ARM64: configs: add multi_v8_efi_defconfig
  2025-07-30  5:57 [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Ahmad Fatoum
  2025-07-30  5:57 ` [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily Ahmad Fatoum
  2025-07-30  5:57 ` [PATCH 3/4] ARM: configs: multi: configure CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK Ahmad Fatoum
@ 2025-07-30  5:57 ` Ahmad Fatoum
  2025-08-11 13:34 ` [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Sascha Hauer
  3 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-07-30  5:57 UTC (permalink / raw)
  To: barebox; +Cc: chalianis1, Ahmad Fatoum

We will want to have a efi_defconfig once all necessary components are
in place, but for now let's just add a config that extends
multi_v8_defconfig with an EFI stub.

To use, get QEMU_EFI.fd (e.g., from Debian qemu-efi-aarch64) and run:

  qemu-system-aarch64 -kernel images/barebox-dt-2nd.img \
  -bios QEMU_EFI.fd -machine virt,highmem=off -cpu cortex-a57 \
  -m 1024M -nographic -serial mon:stdio -trace file=/dev/null

A labgrid YAML will follow once we can provide QEMU_EFI.fd there.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/Makefile                        |  4 ++++
 common/boards/configs/efi-payload.config | 13 +++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 common/boards/configs/efi-payload.config

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index eb71c84f587a..8fa7f1dc80b7 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -8,6 +8,10 @@ am335x_mlo_sdmmc_defconfig:
 am335x_mlo_rawflash_defconfig:
 	$(call merge_into_defconfig,am335x_mlo_defconfig,nomci)
 
+multi_v8_efi_defconfig:
+	$(call merge_into_defconfig,multi_v8_defconfig,efi-payload)
+generated_configs += multi_v8_efi_defconfig
+
 KBUILD_CPPFLAGS	+= -D__ARM__ -fno-strict-aliasing
 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
 ifeq ($(CONFIG_CPU_64),y)
diff --git a/common/boards/configs/efi-payload.config b/common/boards/configs/efi-payload.config
new file mode 100644
index 000000000000..954910263a6f
--- /dev/null
+++ b/common/boards/configs/efi-payload.config
@@ -0,0 +1,13 @@
+CONFIG_COMPILE_TEST=y
+CONFIG_EFI_PAYLOAD=y
+CONFIG_FS_EFI=y
+CONFIG_FS_EFIVARFS=y
+CONFIG_DRIVER_SERIAL_EFI_STDIO=y
+CONFIG_EFI_BLK=y
+CONFIG_EFI_BLK_SEPARATE_USBDISK=y
+CONFIG_WATCHDOG_EFI=y
+CONFIG_HW_RANDOM_EFI=y
+CONFIG_I2C_EFI=y
+CONFIG_CLOCKSOURCE_EFI=y
+CONFIG_SERIAL_EFI_STDIO=y
+CONFIG_CMD_EFI_HANDLE_DUMP=y
-- 
2.39.5




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

* Re: [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily
  2025-07-30  5:57 ` [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily Ahmad Fatoum
@ 2025-08-05  5:43   ` Sascha Hauer
  2025-08-11 13:34     ` Ahmad Fatoum
  0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2025-08-05  5:43 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, chalianis1

Hi Ahmad,

On Wed, Jul 30, 2025 at 07:57:41AM +0200, Ahmad Fatoum wrote:
> With multi_v8, we build everything in a single build and that makes the
> layerscape PBLs exceed their hard limit of 64K failing the build.

This doesn't happen here. The biggest PBL I get here is the ls1046ardb
one with 58304 bytes. Are you using some other compiler than me?

The Layerscape PBLs for the other boards are much smaller because they
don't use a fixed SDRAM controller setup rather than detecting DIMMs via
SPD. Would it be enough to disable the LS1046ardb board?

Sascha

> 
> Until resolved, let's disable it from the defconfig. Users can still use
> the dedicated layerscape defconfigs.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> ---
>  arch/arm/configs/multi_v8_defconfig | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
> index a487d331d04e..5c295cd58269 100644
> --- a/arch/arm/configs/multi_v8_defconfig
> +++ b/arch/arm/configs/multi_v8_defconfig
> @@ -3,7 +3,6 @@ CONFIG_ARCH_BCM283X=y
>  CONFIG_ARCH_IMX=y
>  CONFIG_ARCH_K3=y
>  CONFIG_ARCH_SUNXI=y
> -CONFIG_ARCH_LAYERSCAPE=y
>  CONFIG_ARCH_ROCKCHIP=y
>  CONFIG_ARCH_ZYNQMP=y
>  CONFIG_MACH_RPI3=y
> @@ -28,9 +27,6 @@ CONFIG_MACH_ZII_IMX8MQ_DEV=y
>  CONFIG_MACH_PHYTEC_PHYCORE_IMX93=y
>  CONFIG_MACH_TQMA93XX=y
>  CONFIG_IMX_IIM=y
> -CONFIG_MACH_LS1028ARDB=y
> -CONFIG_MACH_LS1046ARDB=y
> -CONFIG_MACH_TQMLS1046A=y
>  CONFIG_MACH_BEAGLEPLAY=y
>  CONFIG_MACH_RK3568_EVB=y
>  CONFIG_MACH_RK3568_BPI_R2PRO=y
> @@ -258,7 +254,6 @@ CONFIG_REGULATOR_FIXED=y
>  CONFIG_REGULATOR_ARM_SCMI=y
>  CONFIG_REGULATOR_RK808=y
>  CONFIG_RESET_IMX7=y
> -CONFIG_PCI_LAYERSCAPE=y
>  CONFIG_PCI_ECAM_GENERIC=y
>  CONFIG_RTC_CLASS=y
>  CONFIG_RTC_DRV_DS1307=y
> -- 
> 2.39.5
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily
  2025-08-05  5:43   ` Sascha Hauer
@ 2025-08-11 13:34     ` Ahmad Fatoum
  0 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-08-11 13:34 UTC (permalink / raw)
  To: Sascha Hauer, Ahmad Fatoum; +Cc: barebox, chalianis1

Hello Sascha,

On 8/5/25 07:43, Sascha Hauer wrote:
> Hi Ahmad,
> 
> On Wed, Jul 30, 2025 at 07:57:41AM +0200, Ahmad Fatoum wrote:
>> With multi_v8, we build everything in a single build and that makes the
>> layerscape PBLs exceed their hard limit of 64K failing the build.
> 
> This doesn't happen here. The biggest PBL I get here is the ls1046ardb
> one with 58304 bytes. Are you using some other compiler than me?
> 
> The Layerscape PBLs for the other boards are much smaller because they
> don't use a fixed SDRAM controller setup rather than detecting DIMMs via
> SPD. Would it be enough to disable the LS1046ardb board?

I can't reproduce it now, but seem to recall I didn't change anything
intentionally..

We already have a layerscape defconfig for people intent on using the
RDB. Most other people don't care about this board for
multi_v8_defconfig, so it's unfortunate that you can't enable things
without risking build breakage.

I have patches that I need to finish in the coming months that make too
big images a soft error like we do for missing firmware. I would prefer
we add back Layerscape support after these patches are merged.

Thanks,
Ahmad

> 
> Sascha
> 
>>
>> Until resolved, let's disable it from the defconfig. Users can still use
>> the dedicated layerscape defconfigs.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
>> ---
>>  arch/arm/configs/multi_v8_defconfig | 5 -----
>>  1 file changed, 5 deletions(-)
>>
>> diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
>> index a487d331d04e..5c295cd58269 100644
>> --- a/arch/arm/configs/multi_v8_defconfig
>> +++ b/arch/arm/configs/multi_v8_defconfig
>> @@ -3,7 +3,6 @@ CONFIG_ARCH_BCM283X=y
>>  CONFIG_ARCH_IMX=y
>>  CONFIG_ARCH_K3=y
>>  CONFIG_ARCH_SUNXI=y
>> -CONFIG_ARCH_LAYERSCAPE=y
>>  CONFIG_ARCH_ROCKCHIP=y
>>  CONFIG_ARCH_ZYNQMP=y
>>  CONFIG_MACH_RPI3=y
>> @@ -28,9 +27,6 @@ CONFIG_MACH_ZII_IMX8MQ_DEV=y
>>  CONFIG_MACH_PHYTEC_PHYCORE_IMX93=y
>>  CONFIG_MACH_TQMA93XX=y
>>  CONFIG_IMX_IIM=y
>> -CONFIG_MACH_LS1028ARDB=y
>> -CONFIG_MACH_LS1046ARDB=y
>> -CONFIG_MACH_TQMLS1046A=y
>>  CONFIG_MACH_BEAGLEPLAY=y
>>  CONFIG_MACH_RK3568_EVB=y
>>  CONFIG_MACH_RK3568_BPI_R2PRO=y
>> @@ -258,7 +254,6 @@ CONFIG_REGULATOR_FIXED=y
>>  CONFIG_REGULATOR_ARM_SCMI=y
>>  CONFIG_REGULATOR_RK808=y
>>  CONFIG_RESET_IMX7=y
>> -CONFIG_PCI_LAYERSCAPE=y
>>  CONFIG_PCI_ECAM_GENERIC=y
>>  CONFIG_RTC_CLASS=y
>>  CONFIG_RTC_DRV_DS1307=y
>> -- 
>> 2.39.5
>>
>>
>>
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




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

* Re: [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value
  2025-07-30  5:57 [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2025-07-30  5:57 ` [PATCH 4/4] ARM64: configs: add multi_v8_efi_defconfig Ahmad Fatoum
@ 2025-08-11 13:34 ` Sascha Hauer
  3 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2025-08-11 13:34 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum; +Cc: chalianis1


On Wed, 30 Jul 2025 07:57:40 +0200, Ahmad Fatoum wrote:
> The default for -D without = is to define the symbol to expand to 1.
> This is nt what we want, because pbl/string.c defines it without value
> leading to a build error. Fix this by defining it empty explicitly
> instead.
> 
> 

Applied, thanks!

[1/4] scripts: Makefile.pic: define __NO_FORTIFY without value
      https://git.pengutronix.de/cgit/barebox/commit/?id=3ef8fcc2cf7d (link may not be stable)
[2/4] ARM64: configs: multi_v8: disable layerscape temporarily
      https://git.pengutronix.de/cgit/barebox/commit/?id=6deab4afe8ff (link may not be stable)
[3/4] ARM: configs: multi: configure CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK
      https://git.pengutronix.de/cgit/barebox/commit/?id=d7ef4f90d425 (link may not be stable)
[4/4] ARM64: configs: add multi_v8_efi_defconfig
      https://git.pengutronix.de/cgit/barebox/commit/?id=9e42f7a95a6d (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2025-08-11 13:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-30  5:57 [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Ahmad Fatoum
2025-07-30  5:57 ` [PATCH 2/4] ARM64: configs: multi_v8: disable layerscape temporarily Ahmad Fatoum
2025-08-05  5:43   ` Sascha Hauer
2025-08-11 13:34     ` Ahmad Fatoum
2025-07-30  5:57 ` [PATCH 3/4] ARM: configs: multi: configure CONFIG_CONSOLE_ACTIVATE_ALL_FALLBACK Ahmad Fatoum
2025-07-30  5:57 ` [PATCH 4/4] ARM64: configs: add multi_v8_efi_defconfig Ahmad Fatoum
2025-08-11 13:34 ` [PATCH 1/4] scripts: Makefile.pic: define __NO_FORTIFY without value Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox