Skip to contentSkip to conversation

boot/arm-trusted-firmware: add target board options

PATCH Applied Xuanhao Shi via buildroot 2 participants 5 messages Jul 21, 2022 – Jul 23, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 boot/arm-trusted-firmware: add target board options

Some platforms such as TI's k3 outputs a TARGET_BOARD directory in their ATF build output paths after PLATFORM. $(@D)/build/<PLATFORM>/ does not contain the debug or release directories for these platforms.
They are under $(@D)/build/<PLATFORM>/<TARGET_BOARD>/

---
 boot/arm-trusted-firmware/Config.in               |  5 +++++
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
boot/arm-trusted-firmware/Config.in +4 -0
index b1fc03e10b..a9354522b5 100644
@@ -68,6 +68,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
 	help
 	  Target plaform to build for.
 +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD
+	string "ATF target board"
+	help
+	  Target board to build for.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
 	string "Device Tree Source file paths"
 	help
boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0
index 998de4b814..30ecb187ae 100644
@@ -41,18 +41,29 @@ endif
  ARM_TRUSTED_FIRMWARE_PLATFORM = $(call 

qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
+ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call
qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD))
+
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug +else
ARM_TRUSTED_FIRMWARE_IMG_DIR =
$(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug
+endif
+else
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release
else
ARM_TRUSTED_FIRMWARE_IMG_DIR =
$(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release
endif
+endif
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
CROSS_COMPILE="$(TARGET_CROSS)" \
$(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \
$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
- PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM)
+ PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
+ TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)
ARM_TRUSTED_FIRMWARE_MAKE_ENV += \
$(TARGET_MAKE_ENV) \

Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello,

Quoted 7 lines · On Thu, 21 Jul 2022 15:38:56 -0500 Xuanhao Shi via buildroot…

Some platforms such as TI's k3 outputs a TARGET_BOARD directory in their ATF build output paths after PLATFORM. $(@D)/build/<PLATFORM>/ does not contain the debug or release directories for these platforms.
They are under $(@D)/build/<PLATFORM>/<TARGET_BOARD>/

Thanks for your patch. Could you resend it with "git send-email"? Indeed, your e-mail client has mangled the patch, so it cannot be applied.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 1/1 boot/arm-trusted-firmware: add target board options

This is the second try sending this patch, sorry in advance if it's duplicated.

Some platforms such as TI's k3 outputs a TARGET_BOARD directory in their ATF build output paths after PLATFORM. $(@D)/build/<PLATFORM>/ does not contain the debug or release directories for these platforms.
They are under $(@D)/build/<PLATFORM>/<TARGET_BOARD>/

---
 boot/arm-trusted-firmware/Config.in               |  5 +++++
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
boot/arm-trusted-firmware/Config.in +5 -0
index b1fc03e10b..a9354522b5 100644
@@ -68,6 +68,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
 	help
 	  Target plaform to build for.
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD
+	string "ATF target board"
+	help
+	  Target board to build for.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
 	string "Device Tree Source file paths"
 	help
boot/arm-trusted-firmware/arm-trusted-firmware.mk +12 -1
index 998de4b814..30ecb187ae 100644
@@ -41,18 +41,29 @@ endif
 
 ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
 
+ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD))
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug
+else
 ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug
+endif
+else
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release
 else
 ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release
 endif
+endif
 
 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	$(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \
 	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
-	PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM)
+	PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
+	TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)
 
 ARM_TRUSTED_FIRMWARE_MAKE_ENV += \
 	$(TARGET_MAKE_ENV) \
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
Quoted 2 lines · Xuanhao Shi via buildroot

This is the second try sending this patch, sorry in advance if it's duplicated.

This time it was successful!

Comments like this however shouldn't be put here, but under a --- line. That
way, they're automatically removed from the log when it's applied to master.

Applied to master with that fixed, thanks!

Regards,
Arnout

Quoted 54 lines

Some platforms such as TI's k3 outputs a TARGET_BOARD directory in their ATF build output paths after PLATFORM. $(@D)/build/<PLATFORM>/ does not contain the debug or release directories for these platforms.
They are under $(@D)/build/<PLATFORM>/<TARGET_BOARD>/

---
  boot/arm-trusted-firmware/Config.in               |  5 +++++
  boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 ++++++++++++-
  2 files changed, 17 insertions(+), 1 deletion(-)
boot/arm-trusted-firmware/Config.in +5 -0
index b1fc03e10b..a9354522b5 100644
@@ -68,6 +68,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
  	help
  	  Target plaform to build for.
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD
+	string "ATF target board"
+	help
+	  Target board to build for.
+
  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
  	string "Device Tree Source file paths"
  	help
boot/arm-trusted-firmware/arm-trusted-firmware.mk +10 -0
index 998de4b814..30ecb187ae 100644
@@ -41,18 +41,29 @@ endif
 
  ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
 
+ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD))
+
  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
  ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug
+else
  ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug
+endif
+else
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release
  else
  ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release
  endif
+endif
 

boot/arm-trusted-firmware/arm-trusted-firmware.mk endif · line 69

Quoted 10 lines
boot/arm-trusted-firmware/arm-trusted-firmware.mk +2 -1
  ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
  	CROSS_COMPILE="$(TARGET_CROSS)" \
  	$(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \
  	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
-	PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM)
+	PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
+	TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)
 
  ARM_TRUSTED_FIRMWARE_MAKE_ENV += \
  	$(TARGET_MAKE_ENV) \

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

PATCH 1/1 boot/arm-trusted-firmware: add target board options

In reply to Thomas Petazzoni via buildroot

Some platforms such as TI's k3 outputs a TARGET_BOARD directory in their ATF build output paths after PLATFORM. $(@D)/build/<PLATFORM>/ does not contain the debug or release directories for these platforms.
They are under $(@D)/build/<PLATFORM>/<TARGET_BOARD>/

---
 boot/arm-trusted-firmware/Config.in               |  5 +++++
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
boot/arm-trusted-firmware/Config.in +5 -0
index b1fc03e10b..a9354522b5 100644
@@ -68,6 +68,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
 	help
 	  Target plaform to build for.
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD
+	string "ATF target board"
+	help
+	  Target board to build for.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
 	string "Device Tree Source file paths"
 	help
boot/arm-trusted-firmware/arm-trusted-firmware.mk +12 -1
index 998de4b814..30ecb187ae 100644
@@ -41,18 +41,29 @@ endif
 
 ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
 
+ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD))
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug
+else
 ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug
+endif
+else
+ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
+ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release
 else
 ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release
 endif
+endif
 
 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	$(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \
 	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
-	PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM)
+	PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
+	TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)
 
 ARM_TRUSTED_FIRMWARE_MAKE_ENV += \
 	$(TARGET_MAKE_ENV) \
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot