Skip to contentSkip to conversation

u-boot cleanup

PATCH Applied Trevor Woerner 2 participants 7 messages Oct 3, 2023

lore
Share & tools
lore
#0 lore raw

v2 cover u-boot cleanup

The U-Boot bbappend recipe was in need of some cleanups.

v2:
- breakup the original 1 patch into 4 to make the steps easier to audit/verify.

Trevor Woerner (4):
u-boot cleanup: move task
u-boot cleanup: group dependencies
u-boot cleanup: group EXTRA_OEMAKE
u-boot cleanup: organize DEPENDS

 recipes-bsp/u-boot/u-boot%.bbappend | 32 ++++++++++++++---------------
 1 file changed, 15 insertions(+), 17 deletions(-)
Signature · 1 line
2.41.0.327.gaa9166bcc0ba
#1 lore raw

PATCH v2 1/4 u-boot cleanup: move task

According to the Yocto Recipe Style Guide[1] the tasks should be at the end.

[1] https://docs.yoctoproject.org/dev/contributor-guide/recipe-style-guide.html

---
 recipes-bsp/u-boot/u-boot%.bbappend | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
recipes-bsp/u-boot/u-boot%.bbappend +7 -7
index f7800625aaf1..c8444aacad89 100644
@@ -1,10 +1,3 @@
-do_compile:append:rock2-square () {
-	# copy to default search path
-	if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
-		cp ${B}/spl/${SPL_BINARY} ${B}
-	fi
-}
-
 DEPENDS:append:rock-pi-4 = " gnutls-native"
 # various machines require the pyelftools library for parsing dtb files
 DEPENDS:append = " python3-pyelftools-native"
@@ -25,3 +18,10 @@ EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
 INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"
 
 do_compile[depends] .= "${INIT_FIRMWARE_DEPENDS}"
+
+do_compile:append:rock2-square () {
+	# copy to default search path
+	if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
+		cp ${B}/spl/${SPL_BINARY} ${B}
+	fi
+}
Signature · 1 line
2.41.0.327.gaa9166bcc0ba
#2 lore raw

PATCH v2 2/4 u-boot cleanup: group dependencies

In reply to Trevor Woerner

Group the INIT_FIRMWARE_DEPENDS together and sort.

---
 recipes-bsp/u-boot/u-boot%.bbappend | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
recipes-bsp/u-boot/u-boot%.bbappend +5 -6
index c8444aacad89..8c6ac8627efa 100644
@@ -2,21 +2,20 @@ DEPENDS:append:rock-pi-4 = " gnutls-native"
 # various machines require the pyelftools library for parsing dtb files
 DEPENDS:append = " python3-pyelftools-native"
 
-INIT_FIRMWARE_DEPENDS ??= ""
-
 EXTRA_OEMAKE:append:rk3588s = " \
 	BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \
 	ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \
 	"
-INIT_FIRMWARE_DEPENDS:rk3588s = " rockchip-rkbin:do_deploy"
 
 EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
-INIT_FIRMWARE_DEPENDS:rk3399 = " trusted-firmware-a:do_deploy"
 EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"
-INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy"
 EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
-INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"
 
+INIT_FIRMWARE_DEPENDS ??= ""
+INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"
+INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy"
+INIT_FIRMWARE_DEPENDS:rk3399 = " trusted-firmware-a:do_deploy"
+INIT_FIRMWARE_DEPENDS:rk3588s = " rockchip-rkbin:do_deploy"
 do_compile[depends] .= "${INIT_FIRMWARE_DEPENDS}"
 
 do_compile:append:rock2-square () {
Signature · 1 line
2.41.0.327.gaa9166bcc0ba
#3 lore raw

PATCH v2 3/4 u-boot cleanup: group EXTRA_OEMAKE

In reply to Trevor Woerner

Group the EXTRA_OEMAKE items together and sort.

---
 recipes-bsp/u-boot/u-boot%.bbappend | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
recipes-bsp/u-boot/u-boot%.bbappend +3 -4
index 8c6ac8627efa..951e82af7743 100644
@@ -2,15 +2,14 @@ DEPENDS:append:rock-pi-4 = " gnutls-native"
 # various machines require the pyelftools library for parsing dtb files
 DEPENDS:append = " python3-pyelftools-native"
 
+EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
+EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"
+EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
 EXTRA_OEMAKE:append:rk3588s = " \
 	BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \
 	ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \
 	"
 
-EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
-EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"
-EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
-
 INIT_FIRMWARE_DEPENDS ??= ""
 INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"
 INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy"
Signature · 1 line
2.41.0.327.gaa9166bcc0ba
#4 lore raw

PATCH v2 4/4 u-boot cleanup: organize DEPENDS

In reply to Trevor Woerner

Group and sort the DEPENDS.

---
 recipes-bsp/u-boot/u-boot%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-bsp/u-boot/u-boot%.bbappend +1 -1
index 951e82af7743..e79c471cf5ce 100644
@@ -1,6 +1,6 @@
-DEPENDS:append:rock-pi-4 = " gnutls-native"
 # various machines require the pyelftools library for parsing dtb files
 DEPENDS:append = " python3-pyelftools-native"
+DEPENDS:append:rock-pi-4 = " gnutls-native"
 
 EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
 EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"
Signature · 1 line
2.41.0.327.gaa9166bcc0ba
Reviewed-by on the v2 series
#5 lore raw
In reply to Trevor Woerner

Hi Trevor,

Quoted 6 lines · Trevor Woerner via lists.yoctoproject.org

The U-Boot bbappend recipe was in need of some cleanups.

v2:
- breakup the original 1 patch into 4 to make the steps easier to audit/verify.

Quoted 6 lines

Trevor Woerner (4):
u-boot cleanup: move task
u-boot cleanup: group dependencies
u-boot cleanup: group EXTRA_OEMAKE
u-boot cleanup: organize DEPENDS

Perfect :)

Cheers,
Quentin

Quoted 13 lines
  recipes-bsp/u-boot/u-boot%.bbappend | 32 ++++++++++++++---------------
  1 file changed, 15 insertions(+), 17 deletions(-)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61203): https://lists.yoctoproject.org/g/yocto/message/61203
Mute This Topic: https://lists.yoctoproject.org/mt/101725918/6293953
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author Applied
#6 lore raw
In reply to Trevor Woerner
Quoted 6 lines · Trevor Woerner

The U-Boot bbappend recipe was in need of some cleanups.

v2:
- breakup the original 1 patch into 4 to make the steps easier to audit/verify.

Quoted 8 lines

Trevor Woerner (4):
u-boot cleanup: move task
u-boot cleanup: group dependencies
u-boot cleanup: group EXTRA_OEMAKE
u-boot cleanup: organize DEPENDS

 recipes-bsp/u-boot/u-boot%.bbappend | 32 ++++++++++++++---------------
 1 file changed, 15 insertions(+), 17 deletions(-)

Applied to meta-rockchip, master branch.