Skip to contentSkip to conversation

Brotli: fix build failed if the path includes "-static"

PATCH In review Jamin Lin 2 participants 5 messages Nov 3, 2023 – Nov 6, 2023 Arm/Aspeed machine support

lore
Share & tools
lore

Jamin Lin

author
#0 lore raw

PATCH 1/1 Brotli: fix build failed if the path includes "-static"

It would like to remove "-static" in the name of statice library at the do_install task. For example: replace libbrotlicommon-static.a with ibbrotlicommon-static.a However, if the patch of
this statice library includes "-static", it would build failed. (ex: set my build directory "build-static")
Change to remove "-static" in the base name of static library to fix this build failed.

---
 meta-oe/recipes-extended/brotli/brotli_1.0.9.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +2 -1
index 4e2813dde..6492b1943 100644
@@ -16,7 +16,8 @@ inherit cmake lib_package
 
 do_install:append () {
 	for lib in $(ls ${D}${libdir}/*-static.a); do
-		mv -v "${lib}" "$(echo ${lib} | sed s/-static//)"
+		basename=$(basename ${lib})
+		mv -v "${lib}" "${D}${libdir}$(echo ${basename} | sed s/-static//)"
 	done
 }
 
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/1 ast2600:emmc: unsigned rot image align block size (512bytes)

Change-Id I9b82f11cdf3e8524b99f8dfe6a102fedf2b87e5f
---
 .../recipes-aspeed/images/aspeed-image-gen-secureboot.bb  | 8 ++++++++
 .../recipes-aspeed/images/aspeed-image-emmcboot.bb        | 5 +++++
 2 files changed, 13 insertions(+)
meta-aspeed-sdk/meta-ast2600-sdk/recipes-aspeed/images/aspeed-image-gen-secureboot.bb +8 -0
index 7a6ae1fa0b..f0d046ae58 100644
@@ -193,6 +193,12 @@ make_recovery_image() {
     python3 ${STAGING_BINDIR_NATIVE}/gen_uart_booting_image.py ${S}/${GEN_IMAGE_MODE}/${SPL_IMAGE_NAME} ${S}/${GEN_IMAGE_MODE}/recovery_${SPL_IMAGE_NAME}
 }
 
+make_emmc_unsigned_rot_image() {
+    if [ -f ${S}/${GEN_IMAGE_MODE}/${SPL_IMAGE_NAME}.unsigned ]; then
+        python3 ${STAGING_BINDIR_NATIVE}/gen_emmc_boot_image.py ${S}/${GEN_IMAGE_MODE}/${SPL_IMAGE_NAME}.unsigned ${S}/${GEN_IMAGE_MODE}/emmc_${SPL_IMAGE_NAME}.unsigned
+    fi
+}
+
 make_boot_partition_ext4() {
     # Generate a compressed ext4 filesystem with the fitImage file in it to be
     # flashed to the user data area at boot partition of the eMMC
@@ -617,6 +623,8 @@ python do_deploy() {
         bb.build.exec_func("make_recovery_image", d)
 
         if aspeed_boot_emmc == "yes":
+            print("Make emmc unsigned rot image")
+            bb.build.exec_func("make_emmc_unsigned_rot_image", d)
             print("Deploy mmc image...")
             deploy_mmc_image(d)
         else:
meta-aspeed-sdk/recipes-aspeed/images/aspeed-image-emmcboot.bb +5 -0
index 4faf0d032c..9eb91e8b00 100644
@@ -61,6 +61,11 @@ do_mk_emmc_boot_image_g6() {
         install -m 0644 ${SOURCE_IMAGE_DIR}/${ASPEED_EMMC_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX} ${OUTPUT_IMAGE_DIR}
     else
         install -m 0644 ${DEPLOY_DIR_IMAGE}/${ASPEED_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX} ${SOURCE_IMAGE_DIR}/${ASPEED_EMMC_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX}
+        if [ -f ${DEPLOY_DIR_IMAGE}/${ASPEED_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX}.unsigned ]; then
+            install -m 0644 ${DEPLOY_DIR_IMAGE}/${ASPEED_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX}.unsigned ${SOURCE_IMAGE_DIR}
+            python3 ${STAGING_BINDIR_NATIVE}/gen_emmc_boot_image.py ${SOURCE_IMAGE_DIR}/${ASPEED_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX}.unsigned ${SOURCE_IMAGE_DIR}/${ASPEED_EMMC_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX}.unsigned
+            install -m 0644 ${SOURCE_IMAGE_DIR}/${ASPEED_EMMC_IMAGE_UBOOT_SPL_IMAGE}.${UBOOT_SUFFIX}.unsigned ${OUTPUT_IMAGE_DIR}
+        fi
     fi
 }
 
Signature · 1 line
2.25.1
#2 lore raw
In reply to Jamin Lin
Quoted 19 lines · Jamin Lin via lists.openembedded.org

It would like to remove "-static" in the name of statice library at the do_install task. For example: replace libbrotlicommon-static.a with ibbrotlicommon-static.a However, if the patch of
this statice library includes "-static", it would build failed. (ex: set my build directory "build-static")
Change to remove "-static" in the base name of static library to fix this build failed.

---
 meta-oe/recipes-extended/brotli/brotli_1.0.9.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +0 -0
index 4e2813dde..6492b1943 100644

meta-oe/recipes-extended/brotli/brotli_1.0.9.bb inherit cmake lib_package · line 20

Quoted 6 lines
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +2 -1
@@ -16,7 +16,8 @@ inherit cmake lib_package
 
 do_install:append () {
        for lib in $(ls ${D}${libdir}/*-static.a); do
-               mv -v "${lib}" "$(echo ${lib} | sed s/-static//)"
+               basename=$(basename ${lib})
+               mv -v "${lib}" "${D}${libdir}$(echo ${basename} | sed s/-static//)"

This results in path without a sepator.

ERROR: brotli-1.0.9-r0 do_package: QA Issue: brotli: Files/directories were installed but not shipped in any package:
/usr/liblibbrotlienc.a
/usr/liblibbrotlicommon.a
/usr/liblibbrotlidec.a

Quoted 15 lines
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +0 -1
        done
 }
 
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#105854): https://lists.openembedded.org/g/openembedded-devel/message/105854
Mute This Topic: https://lists.openembedded.org/mt/102360862/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#4 lore raw
In reply to Khem Raj

Thanks for your review.
Will fix it

From: Khem Raj <[email protected]>
Sent: Saturday, November 4, 2023 12:29 AM
To: Jamin Lin <[email protected]>
Cc: [email protected]
Subject: Re: [oe] [PATCH v1 1/1] Brotli: fix build failed if the path includes "-static"

Quoted 19 lines · Jamin Lin via lists.openembedded.org

It would like to remove "-static" in the name of statice library at the do_install task. For example: replace libbrotlicommon-static.a with ibbrotlicommon-static.a However, if the patch of this statice library includes "-static", it would build failed.
(ex: set my build directory "build-static") Change to remove "-static" in the base name of static library to fix this build failed.

---
 meta-oe/recipes-extended/brotli/brotli_1.0.9.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +0 -0
index 4e2813dde..6492b1943 100644

meta-oe/recipes-extended/brotli/brotli_1.0.9.bb inherit cmake lib_package · line 20

Quoted 6 lines
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +2 -1
@@ -16,7 +16,8 @@ inherit cmake lib_package
 
 do_install:append () {
        for lib in $(ls ${D}${libdir}/*-static.a); do
-               mv -v "${lib}" "$(echo ${lib} | sed s/-static//)"
+               basename=$(basename ${lib})
+               mv -v "${lib}" "${D}${libdir}$(echo ${basename} | sed s/-static//)"

This results in path without a sepator.

ERROR: brotli-1.0.9-r0 do_package: QA Issue: brotli: Files/directories were installed but not shipped in any package:
/usr/liblibbrotlienc.a
/usr/liblibbrotlicommon.a
/usr/liblibbrotlidec.a

Quoted 17 lines
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +0 -1
        done
 }
 
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#105854):
https://lists.openembedded.org/g/openembedded-devel/message/105854
Mute This Topic: https://lists.openembedded.org/mt/102360862/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-