Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/9] add ARM FDPIC support
@ 2024-09-22  9:23 Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 1/9] Revert: "arch: drop now useless support for FDPIC" Dario Binacchi
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

I resumed the series [1] submitted by Waldemar Brodkorb, where I made
some changes to the patch [9/9] "configs/stm32f746_disco_sd: new defconfig"
based on the suggestions provided by Thomas Petazzoni during the review
of a previous series [2].

Like Waldemar, I also did not encounter any issues during testing on the
board.

[1] https://patchwork.ozlabs.org/project/buildroot/cover/20240919035308.2622723-1-wbx@openadk.org/
[2] https://patchwork.ozlabs.org/project/buildroot/patch/20240822183742.3550055-3-dario.binacchi@amarulasolutions.com/

Ben Wolsieffer (7):
  Revert: "arch: drop now useless support for FDPIC"
  arch: don't enable FDPIC binaries by default
  arch: make FDPIC dependent on toolchain support
  arch/arm: add support for FDPIC
  boot/uboot: pass -mno-fdpic if FDPIC is enabled
  linux: pass -mno-fdpic if FDPIC is enabled
  package/uclibc: enable NPTL on no-MMU ARM w/ FDPIC

Dario Binacchi (1):
  configs/stm32f746_disco_sd: new defconfig

Waldemar Brodkorb (1):
  package/busybox: remove STATIC from busybox-minimal.config

 DEVELOPERS                                    |  4 +++
 arch/Config.in                                | 15 +++++++++
 .../stm32f746-disco/extlinux.conf             |  4 +++
 .../stm32f746-disco/flash_sd.sh               | 22 +++++++++++++
 .../stm32f746-disco/genimage.cfg              | 10 ++++++
 .../stm32f746-disco/linux.fragment            | 13 ++++++++
 .../patches/linux-headers/linux-headers.hash  |  1 +
 .../stm32f746-disco/patches/linux/linux.hash  |  2 ++
 .../stm32f746-disco/patches/uboot/uboot.hash  |  2 ++
 .../stm32f746-disco/post-build.sh             |  4 +++
 .../stm32f746-disco/readme.txt                | 31 +++++++++++++++++++
 boot/uboot/uboot.mk                           |  5 +++
 configs/stm32f746_disco_sd_defconfig          | 31 +++++++++++++++++++
 linux/linux.mk                                |  8 ++++-
 package/Makefile.in                           |  6 ++++
 package/busybox/busybox-minimal.config        |  2 +-
 package/uclibc/Config.in                      |  2 +-
 package/uclibc/uclibc.mk                      |  7 +++++
 toolchain/Config.in                           |  4 +++
 19 files changed, 170 insertions(+), 3 deletions(-)
 create mode 100644 board/stmicroelectronics/stm32f746-disco/extlinux.conf
 create mode 100755 board/stmicroelectronics/stm32f746-disco/flash_sd.sh
 create mode 100644 board/stmicroelectronics/stm32f746-disco/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32f746-disco/linux.fragment
 create mode 120000 board/stmicroelectronics/stm32f746-disco/patches/linux-headers/linux-headers.hash
 create mode 100644 board/stmicroelectronics/stm32f746-disco/patches/linux/linux.hash
 create mode 100644 board/stmicroelectronics/stm32f746-disco/patches/uboot/uboot.hash
 create mode 100755 board/stmicroelectronics/stm32f746-disco/post-build.sh
 create mode 100644 board/stmicroelectronics/stm32f746-disco/readme.txt
 create mode 100644 configs/stm32f746_disco_sd_defconfig

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 1/9] Revert: "arch: drop now useless support for FDPIC"
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 2/9] arch: don't enable FDPIC binaries by default Dario Binacchi
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

This reverts commit 58dcd28dfbed481becb822b009583a63efbc6ffa.

ARM supports FDPIC, so this code is needed once again.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 arch/Config.in           | 14 ++++++++++++++
 package/uclibc/uclibc.mk |  7 +++++++
 2 files changed, 21 insertions(+)

diff --git a/arch/Config.in b/arch/Config.in
index 2e7ac080efc5..bd5f9ce47058 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -12,6 +12,9 @@ config BR2_SOFT_FLOAT
 config BR2_USE_MMU
 	bool
 
+config BR2_ARCH_HAS_FDPIC_SUPPORT
+	bool
+
 choice
 	prompt "Target Architecture"
 	default BR2_i386
@@ -430,6 +433,7 @@ endif
 choice
 	prompt "Target Binary Format"
 	default BR2_BINFMT_ELF if BR2_USE_MMU
+	default BR2_BINFMT_FDPIC if BR2_ARCH_HAS_FDPIC_SUPPORT
 	default BR2_BINFMT_FLAT
 
 config BR2_BINFMT_ELF
@@ -441,6 +445,16 @@ config BR2_BINFMT_ELF
 	  and executables used across different architectures and
 	  operating systems.
 
+config BR2_BINFMT_FDPIC
+	bool "FDPIC"
+	depends on BR2_ARCH_HAS_FDPIC_SUPPORT
+	select BR2_BINFMT_SUPPORTS_SHARED
+	help
+	  ELF FDPIC binaries are based on ELF, but allow the individual
+	  load segments of a binary to be located in memory
+	  independently of each other. This makes this format ideal for
+	  use in environments where no MMU is available.
+
 config BR2_BINFMT_FLAT
 	bool "FLAT"
 	depends on !BR2_USE_MMU
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index de834bac4f2a..600d72ce7ba8 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -57,6 +57,13 @@ UCLIBC_LOCALES = \
 endif
 
 # noMMU binary formats
+ifeq ($(BR2_BINFMT_FDPIC),y)
+define UCLIBC_BINFMT_CONFIG
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
+endef
+endif
 ifeq ($(BR2_BINFMT_FLAT),y)
 define UCLIBC_BINFMT_CONFIG
 	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT)
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 2/9] arch: don't enable FDPIC binaries by default
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 1/9] Revert: "arch: drop now useless support for FDPIC" Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 3/9] arch: make FDPIC dependent on toolchain support Dario Binacchi
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

FDPIC support is being added as a new option for an existing
architecture (ARM), so we don't want to suddenly change the default.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 arch/Config.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/Config.in b/arch/Config.in
index bd5f9ce47058..e57f4b2baa06 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -433,7 +433,6 @@ endif
 choice
 	prompt "Target Binary Format"
 	default BR2_BINFMT_ELF if BR2_USE_MMU
-	default BR2_BINFMT_FDPIC if BR2_ARCH_HAS_FDPIC_SUPPORT
 	default BR2_BINFMT_FLAT
 
 config BR2_BINFMT_ELF
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 3/9] arch: make FDPIC dependent on toolchain support
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 1/9] Revert: "arch: drop now useless support for FDPIC" Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 2/9] arch: don't enable FDPIC binaries by default Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22 10:06   ` Thomas Petazzoni via buildroot
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 4/9] arch/arm: add support for FDPIC Dario Binacchi
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

FDPIC support on ARM requires a certain target name, and therefore is
only currently available with the Buildroot toolchain. In addition,
only uClibc-ng supports FDPIC on ARM at the moment.

This may need to become more complicated if we end up in a situation
where each libc supports FDPIC on a different set of architectures.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 arch/Config.in      | 1 +
 toolchain/Config.in | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/arch/Config.in b/arch/Config.in
index e57f4b2baa06..52efe3aabda1 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -447,6 +447,7 @@ config BR2_BINFMT_ELF
 config BR2_BINFMT_FDPIC
 	bool "FDPIC"
 	depends on BR2_ARCH_HAS_FDPIC_SUPPORT
+	depends on BR2_TOOLCHAIN_SUPPORTS_FDPIC
 	select BR2_BINFMT_SUPPORTS_SHARED
 	help
 	  ELF FDPIC binaries are based on ELF, but allow the individual
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 6e91ab756cd4..0dd4bb5d9b8e 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -48,6 +48,7 @@ choice
 config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
 	depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
+	select BR2_TOOLCHAIN_SUPPORTS_FDPIC if BR2_TOOLCHAIN_USES_UCLIBC
 
 config BR2_TOOLCHAIN_EXTERNAL
 	bool "External toolchain"
@@ -307,6 +308,9 @@ config BR2_TOOLCHAIN_HAS_OPENMP
 config BR2_TOOLCHAIN_SUPPORTS_PIE
 	bool
 
+config BR2_TOOLCHAIN_SUPPORTS_FDPIC
+	bool
+
 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
 	bool "Copy gconv libraries"
 	depends on BR2_TOOLCHAIN_USES_GLIBC
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 4/9] arch/arm: add support for FDPIC
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (2 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 3/9] arch: make FDPIC dependent on toolchain support Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22 10:08   ` Thomas Petazzoni via buildroot
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 5/9] boot/uboot: pass -mno-fdpic if FDPIC is enabled Dario Binacchi
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

Linux on ARM supports FDPIC binaries intended for use on no-MMU systems.
This patch enables support for building a toolchain that produces FDPIC
binaries.

The target name for a FDPIC toolchain must be
arm-<vendor>-uclinuxfdpiceabi, which doesn't follow the standard format
and requires a special case.

According to the kernel help for CONFIG_BINFMT_ELF_FDPIC, "It is also
possible to run FDPIC ELF binaries on MMU linux," so FDPIC support is
available on all ARM platforms, not just no-MMU.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 arch/Config.in      | 1 +
 package/Makefile.in | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/arch/Config.in b/arch/Config.in
index 52efe3aabda1..cd258b2530d8 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -39,6 +39,7 @@ config BR2_arceb
 
 config BR2_arm
 	bool "ARM (little endian)"
+	select BR2_ARCH_HAS_FDPIC_SUPPORT
 	# MMU support is set by the subarchitecture file, arch/Config.in.arm
 	help
 	  ARM is a 32-bit reduced instruction set computer (RISC)
diff --git a/package/Makefile.in b/package/Makefile.in
index 808b71a93e99..829636900ba9 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -39,7 +39,13 @@ $(error BR2_TOOLCHAIN_BUILDROOT_VENDOR cannot be 'unknown'. \
 endif
 
 # Compute GNU_TARGET_NAME
+# FDPIC on ARM requires a special target name: it has no OS field and must
+# use the suffix -uclinuxfdpiceabi.
+ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_BINFMT_FDPIC),y:y)
+GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-uclinuxfdpiceabi
+else
 GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
+endif
 
 # FLAT binary format needs uclinux, except RISC-V which needs the
 # regular linux name.
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 5/9] boot/uboot: pass -mno-fdpic if FDPIC is enabled
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (3 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 4/9] arch/arm: add support for FDPIC Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22 10:10   ` Thomas Petazzoni via buildroot
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 6/9] linux: " Dario Binacchi
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

If the FDPIC ABI is enabled by default in the toolchain, it must be
explicitly disabled when building U-Boot.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 boot/uboot/uboot.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index ab534a8b3a20..d8faef648fad 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -172,6 +172,11 @@ UBOOT_MAKE_OPTS += \
 	HOSTLDFLAGS="$(HOST_LDFLAGS)" \
 	$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS))
 
+# Disable FDPIC if enabled by default in toolchain
+ifeq ($(BR2_BINFMT_FDPIC),y)
+UBOOT_MAKE_OPTS += KCFLAGS=-mno-fdpic
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
 UBOOT_DEPENDENCIES += arm-trusted-firmware
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 6/9] linux: pass -mno-fdpic if FDPIC is enabled
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (4 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 5/9] boot/uboot: pass -mno-fdpic if FDPIC is enabled Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 7/9] package/uclibc: enable NPTL on no-MMU ARM w/ FDPIC Dario Binacchi
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

If the FDPIC ABI is enabled by default in the toolchain, it must be
explicitly disabled when building the kernel.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 linux/linux.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 0a213d17b518..126e92e84c11 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -163,6 +163,7 @@ endif
 LINUX_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS))) $(HOST_LDFLAGS)" \
 	ARCH=$(KERNEL_ARCH) \
+	KCFLAGS="$(LINUX_CFLAGS)" \
 	INSTALL_MOD_PATH=$(TARGET_DIR) \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	WERROR=0 \
@@ -184,7 +185,12 @@ endif
 # sanitize the arguments passed from user space in registers.
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82435
 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
-LINUX_MAKE_ENV += KCFLAGS=-Wno-attribute-alias
+LINUX_CFLAGS += -Wno-attribute-alias
+endif
+
+# Disable FDPIC if enabled by default in toolchain
+ifeq ($(BR2_BINFMT_FDPIC),y)
+LINUX_CFLAGS += -mno-fdpic
 endif
 
 ifeq ($(BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT),y)
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 7/9] package/uclibc: enable NPTL on no-MMU ARM w/ FDPIC
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (5 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 6/9] linux: " Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 8/9] package/busybox: remove STATIC from busybox-minimal.config Dario Binacchi
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Ben Wolsieffer <ben.wolsieffer@hefring.com>

NPTL is supported on no-MMU ARM systems if FDPIC binaries are used.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 package/uclibc/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 73ddd5ef5819..4c360809c3ab 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -78,7 +78,7 @@ choice
 
 config BR2_PTHREADS_NATIVE
 	bool "Native POSIX Threading (NPTL)"
-	depends on BR2_USE_MMU
+	depends on BR2_USE_MMU || ((BR2_arm || BR2_armeb) && BR2_BINFMT_FDPIC)
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
 
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 8/9] package/busybox: remove STATIC from busybox-minimal.config
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (6 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 7/9] package/uclibc: enable NPTL on no-MMU ARM w/ FDPIC Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 9/9] configs/stm32f746_disco_sd: new defconfig Dario Binacchi
  2024-09-22 10:14 ` [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Thomas Petazzoni via buildroot
  9 siblings, 0 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

From: Waldemar Brodkorb <wbx@openadk.org>

With FDPIC we want a shared busybox executable even with noMMU.
Static is already handled by busybox.mk for static toolchains.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1

 package/busybox/busybox-minimal.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/busybox/busybox-minimal.config b/package/busybox/busybox-minimal.config
index 5d2a30806ac8..9733dd215682 100644
--- a/package/busybox/busybox-minimal.config
+++ b/package/busybox/busybox-minimal.config
@@ -40,7 +40,7 @@ CONFIG_FEATURE_SYSLOG=y
 #
 # Build Options
 #
-CONFIG_STATIC=y
+# CONFIG_STATIC is not set
 # CONFIG_PIE is not set
 # CONFIG_NOMMU is not set
 # CONFIG_BUILD_LIBBUSYBOX is not set
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 9/9] configs/stm32f746_disco_sd: new defconfig
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (7 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 8/9] package/busybox: remove STATIC from busybox-minimal.config Dario Binacchi
@ 2024-09-22  9:23 ` Dario Binacchi
  2024-09-22 10:14 ` [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Thomas Petazzoni via buildroot
  9 siblings, 0 replies; 15+ messages in thread
From: Dario Binacchi @ 2024-09-22  9:23 UTC (permalink / raw)
  To: buildroot
  Cc: Ben Wolsieffer, yann.morin.1998, Thomas Petazzoni, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

The commit adds support for STM32F746G-DISCO board. The discovery kit is
a complete demonstration and development platform for STMicroelectronics
Arm Cortex-M7-core-based STM32F746NG.

Board support package includes the following components:
- mainline Linux kernel 5.15.165
- mainline U-Boot 2024.07
- default packages from buildroot

Link: https://www.st.com/en/evaluation-tools/32f746gdiscovery.html
Co-Developed-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes v1 -> v2:
 - Drop VFAT partition. Put kernel and DTB on the ext4 rootfs
   partition.
 - Add myself to the DEVELOPERS file.
 - Add Co-Developed-by tag.

 DEVELOPERS                                    |  4 +++
 .../stm32f746-disco/extlinux.conf             |  4 +++
 .../stm32f746-disco/flash_sd.sh               | 22 +++++++++++++
 .../stm32f746-disco/genimage.cfg              | 10 ++++++
 .../stm32f746-disco/linux.fragment            | 13 ++++++++
 .../patches/linux-headers/linux-headers.hash  |  1 +
 .../stm32f746-disco/patches/linux/linux.hash  |  2 ++
 .../stm32f746-disco/patches/uboot/uboot.hash  |  2 ++
 .../stm32f746-disco/post-build.sh             |  4 +++
 .../stm32f746-disco/readme.txt                | 31 +++++++++++++++++++
 configs/stm32f746_disco_sd_defconfig          | 31 +++++++++++++++++++
 11 files changed, 124 insertions(+)
 create mode 100644 board/stmicroelectronics/stm32f746-disco/extlinux.conf
 create mode 100755 board/stmicroelectronics/stm32f746-disco/flash_sd.sh
 create mode 100644 board/stmicroelectronics/stm32f746-disco/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32f746-disco/linux.fragment
 create mode 120000 board/stmicroelectronics/stm32f746-disco/patches/linux-headers/linux-headers.hash
 create mode 100644 board/stmicroelectronics/stm32f746-disco/patches/linux/linux.hash
 create mode 100644 board/stmicroelectronics/stm32f746-disco/patches/uboot/uboot.hash
 create mode 100755 board/stmicroelectronics/stm32f746-disco/post-build.sh
 create mode 100644 board/stmicroelectronics/stm32f746-disco/readme.txt
 create mode 100644 configs/stm32f746_disco_sd_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index ea4ee3377f89..44b19474876b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -788,10 +788,12 @@ F:	package/xinetd/
 
 N:	Dario Binacchi <dario.binacchi@amarulasolutions.com>
 F:	board/bsh/
+F:	board/stmicroelectronics/stm32f746-disco/
 F:	board/stmicroelectronics/stm32f769-disco/
 F:	configs/imx6ulz_bsh_smm_m2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
+F:	configs/stm32f746_disco_sd_defconfig
 F:	configs/stm32f769_disco_sd_defconfig
 F:	package/armadillo/
 F:	package/babeld/
@@ -3304,7 +3306,9 @@ F:	package/ngrep/
 
 N:	Waldemar Brodkorb <wbx@openadk.org>
 F:	board/qemu/riscv32-virt/
+F:	board/stmicroelectronics/stm32f746-disco/
 F:	configs/qemu_riscv32_nommu_virt_defconfig
+F:	configs/stm32f746_disco_sd_defconfig
 F:	package/asterisk/
 F:	package/evilwm/
 F:	package/fbv/
diff --git a/board/stmicroelectronics/stm32f746-disco/extlinux.conf b/board/stmicroelectronics/stm32f746-disco/extlinux.conf
new file mode 100644
index 000000000000..40fc04dd1035
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/extlinux.conf
@@ -0,0 +1,4 @@
+label stm32f746-disco-buildroot
+  kernel /boot/zImage
+  devicetree /boot/stm32f746-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p1 rw rootwait consoleblank=0 ignore_loglevel
diff --git a/board/stmicroelectronics/stm32f746-disco/flash_sd.sh b/board/stmicroelectronics/stm32f746-disco/flash_sd.sh
new file mode 100755
index 000000000000..b4858cb9dacb
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/flash_sd.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ $# -eq 0 ]; then
+    OUTPUT_DIR=output
+else
+    OUTPUT_DIR=$1
+fi
+
+if ! test -d "${OUTPUT_DIR}" ; then
+    echo "ERROR: no output directory specified."
+    echo "Usage: $0 OUTPUT_DIR"
+    exit 1
+fi
+
+"${OUTPUT_DIR}"/host/bin/openocd -f board/stm32f746g-disco.cfg \
+    -c "init" \
+    -c "reset init" \
+    -c "flash probe 0" \
+    -c "flash info 0" \
+    -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
+    -c "reset run" \
+    -c "shutdown"
diff --git a/board/stmicroelectronics/stm32f746-disco/genimage.cfg b/board/stmicroelectronics/stm32f746-disco/genimage.cfg
new file mode 100644
index 000000000000..e911a94e46b5
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/genimage.cfg
@@ -0,0 +1,10 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 32M
+	}
+}
diff --git a/board/stmicroelectronics/stm32f746-disco/linux.fragment b/board/stmicroelectronics/stm32f746-disco/linux.fragment
new file mode 100644
index 000000000000..625fdced9e8d
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/linux.fragment
@@ -0,0 +1,13 @@
+# CONFIG_PREEMPT is not set
+# CONFIG_MULTIUSER is not set
+# CONFIG_TIMERFD is not set
+CONFIG_SET_MEM_PARAM=y
+CONFIG_DRAM_BASE=0xC0000000
+CONFIG_DRAM_SIZE=0x01000000
+# CONFIG_GCC_PLUGINS is not set
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_PROC_SYSCTL is not set
+# CONFIG_CRYPTO is not set
+CONFIG_RCU_TRACE=y
\ No newline at end of file
diff --git a/board/stmicroelectronics/stm32f746-disco/patches/linux-headers/linux-headers.hash b/board/stmicroelectronics/stm32f746-disco/patches/linux-headers/linux-headers.hash
new file mode 120000
index 000000000000..5808d92afe89
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/patches/linux-headers/linux-headers.hash
@@ -0,0 +1 @@
+../linux/linux.hash
\ No newline at end of file
diff --git a/board/stmicroelectronics/stm32f746-disco/patches/linux/linux.hash b/board/stmicroelectronics/stm32f746-disco/patches/linux/linux.hash
new file mode 100644
index 000000000000..7f78b950f35c
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/patches/linux/linux.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  a36dd3e82ceb634afded31f2656568f57c4d9c4b399859f298b18116df11c6fe  linux-5.15.165.tar.xz
diff --git a/board/stmicroelectronics/stm32f746-disco/patches/uboot/uboot.hash b/board/stmicroelectronics/stm32f746-disco/patches/uboot/uboot.hash
new file mode 100644
index 000000000000..fe9b4f53dc63
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/patches/uboot/uboot.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f  u-boot-2024.07.tar.bz2
diff --git a/board/stmicroelectronics/stm32f746-disco/post-build.sh b/board/stmicroelectronics/stm32f746-disco/post-build.sh
new file mode 100755
index 000000000000..03e9dcae8215
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/post-build.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${TARGET_DIR}"/boot/extlinux/extlinux.conf
diff --git a/board/stmicroelectronics/stm32f746-disco/readme.txt b/board/stmicroelectronics/stm32f746-disco/readme.txt
new file mode 100644
index 000000000000..4ac16da33132
--- /dev/null
+++ b/board/stmicroelectronics/stm32f746-disco/readme.txt
@@ -0,0 +1,31 @@
+STM32F746-DISCO
+===================
+
+This tutorial describes how to use the predefined Buildroot
+configuration for the STM32F746-DISCO evaluation platform.
+
+Building
+--------
+
+  make stm32f746_disco_sd_defconfig
+  make
+
+Flashing
+--------
+
+  ./board/stmicroelectronics/stm32f746-disco/flash_sd.sh output/
+
+It will flash the U-boot bootloader.
+
+Creating SD card
+----------------
+
+Buildroot prepares an "sdcard.img" image in the output/images/ directory,
+ready to be dumped on a SD card. Launch the following command as root:
+
+  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout and its content, see the
+definition in board/stmicroelectronics/stm32f746-disco/genimage.cfg.
diff --git a/configs/stm32f746_disco_sd_defconfig b/configs/stm32f746_disco_sd_defconfig
new file mode 100644
index 000000000000..0a8a1ad4bb6b
--- /dev/null
+++ b/configs/stm32f746_disco_sd_defconfig
@@ -0,0 +1,31 @@
+BR2_arm=y
+BR2_cortex_m7=y
+BR2_BINFMT_FDPIC=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f746-disco/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+BR2_INIT_TINYINIT=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32f746-disco/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f746-disco/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.165"
+BR2_LINUX_KERNEL_DEFCONFIG="stm32"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32f746-disco/linux.fragment"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f746-disco"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.07"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f746-disco"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_OPENOCD=y
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 3/9] arch: make FDPIC dependent on toolchain support
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 3/9] arch: make FDPIC dependent on toolchain support Dario Binacchi
@ 2024-09-22 10:06   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-22 10:06 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: Romain Naour, yann.morin.1998, buildroot, Giulio Benetti,
	linux-amarula, Ben Wolsieffer

Hello Dario,

Thanks for reposting this patch series after our discussion last
week-end!

On Sun, 22 Sep 2024 11:23:06 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:

> From: Ben Wolsieffer <ben.wolsieffer@hefring.com>
> 
> FDPIC support on ARM requires a certain target name, and therefore is
> only currently available with the Buildroot toolchain. In addition,
> only uClibc-ng supports FDPIC on ARM at the moment.
> 
> This may need to become more complicated if we end up in a situation
> where each libc supports FDPIC on a different set of architectures.

However, I think this patch is incorrect, or more precisely it's not
how we want to handle things. Instead, what we want is:

- For internal toolchains, that C libraries that don't support FDPIC
  are made unavailable when FDPIC is selected. So basically I would add
  a depends on BR2_BINFMT_ELF to BR2_PACKAGE_GLIBC_ARCH_SUPPORTS and
  BR2_PACKAGE_MUSL_ARCH_SUPPORTS. In practice this will be a no-op as
  glibc and musl already have a "depends on BR2_USE_MMU", and FDPIC can
  only be selected on noMMU systems.

- For external toolchains, I would make sure that the ARM toolchains
  properly depend on the relevant BR2_BINFMT_* option.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 4/9] arch/arm: add support for FDPIC
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 4/9] arch/arm: add support for FDPIC Dario Binacchi
@ 2024-09-22 10:08   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-22 10:08 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: Romain Naour, yann.morin.1998, buildroot, Giulio Benetti,
	linux-amarula, Ben Wolsieffer

On Sun, 22 Sep 2024 11:23:07 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:

> The target name for a FDPIC toolchain must be
> arm-<vendor>-uclinuxfdpiceabi, which doesn't follow the standard format
> and requires a special case.
> 
> According to the kernel help for CONFIG_BINFMT_ELF_FDPIC, "It is also
> possible to run FDPIC ELF binaries on MMU linux," so FDPIC support is
> available on all ARM platforms, not just no-MMU.

but then I guess the tuple would not be arm-<vendor>-uclinuxfdpiceabi,
but something with "linux" instead? Did you test this support for FDPIC
on MMU systems? Unless it has been tested to be working, I believe I
would prefer to allow FDPIC only on noMMU systems, for which it has
been tested.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 5/9] boot/uboot: pass -mno-fdpic if FDPIC is enabled
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 5/9] boot/uboot: pass -mno-fdpic if FDPIC is enabled Dario Binacchi
@ 2024-09-22 10:10   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-22 10:10 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: Romain Naour, yann.morin.1998, buildroot, Giulio Benetti,
	linux-amarula, Ben Wolsieffer

Hello,

On Sun, 22 Sep 2024 11:23:08 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:

> From: Ben Wolsieffer <ben.wolsieffer@hefring.com>
> 
> If the FDPIC ABI is enabled by default in the toolchain, it must be
> explicitly disabled when building U-Boot.
> 
> Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

This patch and PATCH 6/9 which does the same for the Linux package makes me wonder what is the right approach, and I am not fully clear.

Indeed, we already have some logic in the toolchain-wrapper to pass or
not pass certain flags when we're building U-Boot or the kernel.

However, in this case, FDPIC is enabled by default, and the wrapper
would have to disable FDPIC when building U-Boot/Linux, which isn't
what the wrapper is doing today. So I'm a bit unsure on what's the best
approach between what you're proposing, and handling things in the
wrapper. Perhaps we need to try what you proposed, and see if it works
well for all use-cases.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 0/9] add ARM FDPIC support
  2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
                   ` (8 preceding siblings ...)
  2024-09-22  9:23 ` [Buildroot] [PATCH v2 9/9] configs/stm32f746_disco_sd: new defconfig Dario Binacchi
@ 2024-09-22 10:14 ` Thomas Petazzoni via buildroot
  2024-09-22 15:36   ` Waldemar Brodkorb
  9 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-22 10:14 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: Romain Naour, yann.morin.1998, buildroot, Giulio Benetti,
	linux-amarula, Ben Wolsieffer

Hello Dario,

On Sun, 22 Sep 2024 11:23:03 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:

> Dario Binacchi (1):
>   configs/stm32f746_disco_sd: new defconfig

Aside from this defconfig, it would be really nice to have a defconfig
that allows to test ARM noMMU (both FLAT and FDPIC) with Qemu. Could
you, and perhaps Waldemar, check what the options are? I had a quick
look, and it doesn't seem obvious which ARM noMMU platform supported by
Qemu is also supported by Linux. I vaguely remember at some point that
the versatile (or vexpress?) platforms allowed to boot a noMMU system,
but I'm not 100% sure.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 0/9] add ARM FDPIC support
  2024-09-22 10:14 ` [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Thomas Petazzoni via buildroot
@ 2024-09-22 15:36   ` Waldemar Brodkorb
  0 siblings, 0 replies; 15+ messages in thread
From: Waldemar Brodkorb @ 2024-09-22 15:36 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Ben Wolsieffer, yann.morin.1998, buildroot, Giulio Benetti,
	Dario Binacchi, linux-amarula, Romain Naour

Hi Thomas,
Thomas Petazzoni wrote,

> Hello Dario,
> 
> On Sun, 22 Sep 2024 11:23:03 +0200
> Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
> 
> > Dario Binacchi (1):
> >   configs/stm32f746_disco_sd: new defconfig
> 
> Aside from this defconfig, it would be really nice to have a defconfig
> that allows to test ARM noMMU (both FLAT and FDPIC) with Qemu. Could
> you, and perhaps Waldemar, check what the options are? I had a quick
> look, and it doesn't seem obvious which ARM noMMU platform supported by
> Qemu is also supported by Linux. I vaguely remember at some point that
> the versatile (or vexpress?) platforms allowed to boot a noMMU system,
> but I'm not 100% sure.

There is versatile which can boot ARM noMMU FLAT, which was removed
by Buildroot in 9c5c3fbb2295f3f2b0bb27ac235d5f59afcfd55e, because it
requires Kernel patches. This defconfig is not capable of running
FDPIC Binaries because of some missing features regarding NPTL.

There is still no Cortex-M system emulation we could use for testing
both.

So a no go.

best regards
 Waldemar
 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-09-22 15:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22  9:23 [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Dario Binacchi
2024-09-22  9:23 ` [Buildroot] [PATCH v2 1/9] Revert: "arch: drop now useless support for FDPIC" Dario Binacchi
2024-09-22  9:23 ` [Buildroot] [PATCH v2 2/9] arch: don't enable FDPIC binaries by default Dario Binacchi
2024-09-22  9:23 ` [Buildroot] [PATCH v2 3/9] arch: make FDPIC dependent on toolchain support Dario Binacchi
2024-09-22 10:06   ` Thomas Petazzoni via buildroot
2024-09-22  9:23 ` [Buildroot] [PATCH v2 4/9] arch/arm: add support for FDPIC Dario Binacchi
2024-09-22 10:08   ` Thomas Petazzoni via buildroot
2024-09-22  9:23 ` [Buildroot] [PATCH v2 5/9] boot/uboot: pass -mno-fdpic if FDPIC is enabled Dario Binacchi
2024-09-22 10:10   ` Thomas Petazzoni via buildroot
2024-09-22  9:23 ` [Buildroot] [PATCH v2 6/9] linux: " Dario Binacchi
2024-09-22  9:23 ` [Buildroot] [PATCH v2 7/9] package/uclibc: enable NPTL on no-MMU ARM w/ FDPIC Dario Binacchi
2024-09-22  9:23 ` [Buildroot] [PATCH v2 8/9] package/busybox: remove STATIC from busybox-minimal.config Dario Binacchi
2024-09-22  9:23 ` [Buildroot] [PATCH v2 9/9] configs/stm32f746_disco_sd: new defconfig Dario Binacchi
2024-09-22 10:14 ` [Buildroot] [PATCH v2 0/9] add ARM FDPIC support Thomas Petazzoni via buildroot
2024-09-22 15:36   ` Waldemar Brodkorb

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