* [PATCH] arm-bsp/n1sdp-board-firmware: rewrite recipe
@ 2020-11-09 9:35 Ross Burton
2020-11-09 20:39 ` [meta-arm] " Jon Mason
0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2020-11-09 9:35 UTC (permalink / raw)
To: meta-arm
Any recipe that needs to use RM_WORK_EXCLUDE is either being very clever
or is breaking expectations. This recipe is doing several things in
non-idiomatic ways that breaks other tools, for example the source
doesn't exist in do_unpack.
Rename from board-firmware-n1sdp to n1sdp-board-firmware to match the
repository name.
As this recipe simply ships some precompiled binary, set
INHIBIT_DEFAULT_DEPS to avoid depending on the toolchain to reduce how
often it needs to be rebuilt.
Unpack normally and promptly delete the large SOFTWARE/ directory that
we don't care about, instead of unpacking in do_install.
Ensure deploy is scheduled appropriately.
Remove LICENSE_FLAGS, this is for licenses which need to be opted-in.
Setting LICENSE_FLAGS and then enabling it by default makes no sense.
Change-Id: I1fe906634977d323086de6f6c67a9c45aeb7585e
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta-arm-bsp/conf/machine/n1sdp.conf | 2 -
.../images/board-firmware-n1sdp_2020.07.27.bb | 53 -------------------
.../images/n1sdp-board-firmware_2020.07.27.bb | 34 ++++++++++++
.../images/sdcard-image-n1sdp_0.1.bb | 2 +-
4 files changed, 35 insertions(+), 56 deletions(-)
delete mode 100644 meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb
create mode 100644 meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb
diff --git a/meta-arm-bsp/conf/machine/n1sdp.conf b/meta-arm-bsp/conf/machine/n1sdp.conf
index 3d31c4c..8cadf44 100644
--- a/meta-arm-bsp/conf/machine/n1sdp.conf
+++ b/meta-arm-bsp/conf/machine/n1sdp.conf
@@ -39,6 +39,4 @@ EFI_PROVIDER ?= "grub-efi"
MACHINE_FEATURES += "efi"
# SD-Card firmware
-# Board firmware prebuilts are shared under custom license
-LICENSE_FLAGS_WHITELIST += "stm-sla0044"
EXTRA_IMAGEDEPENDS += "sdcard-image-n1sdp"
diff --git a/meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb b/meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb
deleted file mode 100644
index 8f7b6c1..0000000
--- a/meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-DESCRIPTION = "Board Firmware binaries for N1SDP"
-
-# Board-firmware-n1sdp custom license is whitelisted in n1sdp.conf file.
-# Uncomment, or copy this line to your local.conf to build board firmware,
-# if you are using custom n1sdp.conf file.
-# Please make sure to check the applicable license beforehand!
-#LICENSE_FLAGS_WHITELIST = "stm-sla0044"
-
-LICENSE = "STM-SLA0044-Rev5"
-LICENSE_FLAGS = "stm-sla0044"
-
-LIC_FILES_CHKSUM = "file://${S}/LICENSES/STM.TXT;md5=4b8dab81d0bfc0a5f63c9a983402705b"
-
-SECTION = "firmware"
-
-inherit deploy
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-COMPATIBLE_MACHINE = "n1sdp"
-RM_WORK_EXCLUDE += "${PN}"
-
-PV = "2020.07.27"
-TAG = "N1SDP-${PV}"
-FIRMWARE_TARBALL = "n1sdp-board-firmware-${TAG}"
-UNPACK_DIR = "n1sdp-board-firmware_source"
-S = "${WORKDIR}/${UNPACK_DIR}"
-
-SRC_URI = "https://git.linaro.org/landing-teams/working/arm/n1sdp-board-firmware.git/snapshot/${FIRMWARE_TARBALL}.tar.gz;unpack=0"
-SRC_URI[md5sum] = "8ba3807ff8f222201154861f11524b14"
-SRC_URI[sha256sum] = "57feba404026f2d6d49c167d63e0e84653ad8b808b13e2244b81fea9e0d58d66"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
- cd ${WORKDIR}
- tar -xvaf ${WORKDIR}/${FIRMWARE_TARBALL}.tar.gz --exclude=${FIRMWARE_TARBALL}/SOFTWARE/*
- mv -v ${WORKDIR}/${FIRMWARE_TARBALL}/* ${S}
-
- cp -R --no-dereference --preserve=mode,links -v ${S} ${D}
-}
-do_install[dirs] += "${S}"
-do_install[cleandirs] += "${S}"
-
-FILES_${PN} = "/${UNPACK_DIR}/*"
-SYSROOT_DIRS += "/${UNPACK_DIR}"
-addtask install after do_unpack before do_populate_lic
-
-do_deploy() {
- cp -av ${S} ${DEPLOYDIR}
-}
-addtask deploy after do_install
diff --git a/meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb b/meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb
new file mode 100644
index 0000000..1551ac9
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Board Firmware binaries for N1SDP"
+SECTION = "firmware"
+
+LICENSE = "STM-SLA0044-Rev5"
+LIC_FILES_CHKSUM = "file://LICENSES/STM.TXT;md5=4b8dab81d0bfc0a5f63c9a983402705b"
+
+inherit deploy
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "n1sdp"
+
+SRC_URI = "https://git.linaro.org/landing-teams/working/arm/n1sdp-board-firmware.git/snapshot/${BPN}-N1SDP-${PV}.tar.gz"
+SRC_URI[sha256sum] = "57feba404026f2d6d49c167d63e0e84653ad8b808b13e2244b81fea9e0d58d66"
+
+S = "${WORKDIR}/${BPN}-N1SDP-${PV}"
+
+INSTALL_DIR = "/n1sdp-board-firmware_source"
+
+do_install() {
+ rm -rf ${S}/SOFTWARE
+ install -d ${D}${INSTALL_DIR}
+ cp -Rp --no-preserve=ownership ${S}/* ${D}${INSTALL_DIR}
+}
+
+FILES_${PN} = "${INSTALL_DIR}"
+SYSROOT_DIRS += "${INSTALL_DIR}"
+
+do_deploy() {
+ install -d ${DEPLOYDIR}${INSTALL_DIR}
+ cp -Rp --no-preserve=ownership ${S}/* ${DEPLOYDIR}${INSTALL_DIR}
+}
+addtask deploy after do_install before do_build
diff --git a/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb b/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb
index 68b13eb..13fa560 100644
--- a/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb
+++ b/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb
@@ -4,7 +4,7 @@ inherit deploy nopackages
DEPENDS = "virtual/uefi-firmware \
virtual/control-processor-firmware \
- board-firmware-n1sdp"
+ n1sdp-board-firmware"
LICENSE = "MIT"
PACKAGE_ARCH = "${MACHINE_ARCH}"
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-arm] [PATCH] arm-bsp/n1sdp-board-firmware: rewrite recipe
2020-11-09 9:35 [PATCH] arm-bsp/n1sdp-board-firmware: rewrite recipe Ross Burton
@ 2020-11-09 20:39 ` Jon Mason
0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2020-11-09 20:39 UTC (permalink / raw)
To: Ross Burton; +Cc: meta-arm
On Mon, Nov 09, 2020 at 09:35:27AM +0000, Ross Burton wrote:
> Any recipe that needs to use RM_WORK_EXCLUDE is either being very clever
> or is breaking expectations. This recipe is doing several things in
> non-idiomatic ways that breaks other tools, for example the source
> doesn't exist in do_unpack.
>
> Rename from board-firmware-n1sdp to n1sdp-board-firmware to match the
> repository name.
>
> As this recipe simply ships some precompiled binary, set
> INHIBIT_DEFAULT_DEPS to avoid depending on the toolchain to reduce how
> often it needs to be rebuilt.
>
> Unpack normally and promptly delete the large SOFTWARE/ directory that
> we don't care about, instead of unpacking in do_install.
>
> Ensure deploy is scheduled appropriately.
>
> Remove LICENSE_FLAGS, this is for licenses which need to be opted-in.
> Setting LICENSE_FLAGS and then enabling it by default makes no sense.
>
> Change-Id: I1fe906634977d323086de6f6c67a9c45aeb7585e
> Signed-off-by: Ross Burton <ross.burton@arm.com>
Patch pushed to master.
Thanks,
Jon
> ---
> meta-arm-bsp/conf/machine/n1sdp.conf | 2 -
> .../images/board-firmware-n1sdp_2020.07.27.bb | 53 -------------------
> .../images/n1sdp-board-firmware_2020.07.27.bb | 34 ++++++++++++
> .../images/sdcard-image-n1sdp_0.1.bb | 2 +-
> 4 files changed, 35 insertions(+), 56 deletions(-)
> delete mode 100644 meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb
> create mode 100644 meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb
>
> diff --git a/meta-arm-bsp/conf/machine/n1sdp.conf b/meta-arm-bsp/conf/machine/n1sdp.conf
> index 3d31c4c..8cadf44 100644
> --- a/meta-arm-bsp/conf/machine/n1sdp.conf
> +++ b/meta-arm-bsp/conf/machine/n1sdp.conf
> @@ -39,6 +39,4 @@ EFI_PROVIDER ?= "grub-efi"
> MACHINE_FEATURES += "efi"
>
> # SD-Card firmware
> -# Board firmware prebuilts are shared under custom license
> -LICENSE_FLAGS_WHITELIST += "stm-sla0044"
> EXTRA_IMAGEDEPENDS += "sdcard-image-n1sdp"
> diff --git a/meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb b/meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb
> deleted file mode 100644
> index 8f7b6c1..0000000
> --- a/meta-arm-bsp/recipes-bsp/images/board-firmware-n1sdp_2020.07.27.bb
> +++ /dev/null
> @@ -1,53 +0,0 @@
> -DESCRIPTION = "Board Firmware binaries for N1SDP"
> -
> -# Board-firmware-n1sdp custom license is whitelisted in n1sdp.conf file.
> -# Uncomment, or copy this line to your local.conf to build board firmware,
> -# if you are using custom n1sdp.conf file.
> -# Please make sure to check the applicable license beforehand!
> -#LICENSE_FLAGS_WHITELIST = "stm-sla0044"
> -
> -LICENSE = "STM-SLA0044-Rev5"
> -LICENSE_FLAGS = "stm-sla0044"
> -
> -LIC_FILES_CHKSUM = "file://${S}/LICENSES/STM.TXT;md5=4b8dab81d0bfc0a5f63c9a983402705b"
> -
> -SECTION = "firmware"
> -
> -inherit deploy
> -
> -PACKAGE_ARCH = "${MACHINE_ARCH}"
> -
> -COMPATIBLE_MACHINE = "n1sdp"
> -RM_WORK_EXCLUDE += "${PN}"
> -
> -PV = "2020.07.27"
> -TAG = "N1SDP-${PV}"
> -FIRMWARE_TARBALL = "n1sdp-board-firmware-${TAG}"
> -UNPACK_DIR = "n1sdp-board-firmware_source"
> -S = "${WORKDIR}/${UNPACK_DIR}"
> -
> -SRC_URI = "https://git.linaro.org/landing-teams/working/arm/n1sdp-board-firmware.git/snapshot/${FIRMWARE_TARBALL}.tar.gz;unpack=0"
> -SRC_URI[md5sum] = "8ba3807ff8f222201154861f11524b14"
> -SRC_URI[sha256sum] = "57feba404026f2d6d49c167d63e0e84653ad8b808b13e2244b81fea9e0d58d66"
> -
> -do_configure[noexec] = "1"
> -do_compile[noexec] = "1"
> -
> -do_install() {
> - cd ${WORKDIR}
> - tar -xvaf ${WORKDIR}/${FIRMWARE_TARBALL}.tar.gz --exclude=${FIRMWARE_TARBALL}/SOFTWARE/*
> - mv -v ${WORKDIR}/${FIRMWARE_TARBALL}/* ${S}
> -
> - cp -R --no-dereference --preserve=mode,links -v ${S} ${D}
> -}
> -do_install[dirs] += "${S}"
> -do_install[cleandirs] += "${S}"
> -
> -FILES_${PN} = "/${UNPACK_DIR}/*"
> -SYSROOT_DIRS += "/${UNPACK_DIR}"
> -addtask install after do_unpack before do_populate_lic
> -
> -do_deploy() {
> - cp -av ${S} ${DEPLOYDIR}
> -}
> -addtask deploy after do_install
> diff --git a/meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb b/meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb
> new file mode 100644
> index 0000000..1551ac9
> --- /dev/null
> +++ b/meta-arm-bsp/recipes-bsp/images/n1sdp-board-firmware_2020.07.27.bb
> @@ -0,0 +1,34 @@
> +SUMMARY = "Board Firmware binaries for N1SDP"
> +SECTION = "firmware"
> +
> +LICENSE = "STM-SLA0044-Rev5"
> +LIC_FILES_CHKSUM = "file://LICENSES/STM.TXT;md5=4b8dab81d0bfc0a5f63c9a983402705b"
> +
> +inherit deploy
> +
> +INHIBIT_DEFAULT_DEPS = "1"
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +COMPATIBLE_MACHINE = "n1sdp"
> +
> +SRC_URI = "https://git.linaro.org/landing-teams/working/arm/n1sdp-board-firmware.git/snapshot/${BPN}-N1SDP-${PV}.tar.gz"
> +SRC_URI[sha256sum] = "57feba404026f2d6d49c167d63e0e84653ad8b808b13e2244b81fea9e0d58d66"
> +
> +S = "${WORKDIR}/${BPN}-N1SDP-${PV}"
> +
> +INSTALL_DIR = "/n1sdp-board-firmware_source"
> +
> +do_install() {
> + rm -rf ${S}/SOFTWARE
> + install -d ${D}${INSTALL_DIR}
> + cp -Rp --no-preserve=ownership ${S}/* ${D}${INSTALL_DIR}
> +}
> +
> +FILES_${PN} = "${INSTALL_DIR}"
> +SYSROOT_DIRS += "${INSTALL_DIR}"
> +
> +do_deploy() {
> + install -d ${DEPLOYDIR}${INSTALL_DIR}
> + cp -Rp --no-preserve=ownership ${S}/* ${DEPLOYDIR}${INSTALL_DIR}
> +}
> +addtask deploy after do_install before do_build
> diff --git a/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb b/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb
> index 68b13eb..13fa560 100644
> --- a/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb
> +++ b/meta-arm-bsp/recipes-bsp/images/sdcard-image-n1sdp_0.1.bb
> @@ -4,7 +4,7 @@ inherit deploy nopackages
>
> DEPENDS = "virtual/uefi-firmware \
> virtual/control-processor-firmware \
> - board-firmware-n1sdp"
> + n1sdp-board-firmware"
>
> LICENSE = "MIT"
> PACKAGE_ARCH = "${MACHINE_ARCH}"
> --
> 2.25.1
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-09 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 9:35 [PATCH] arm-bsp/n1sdp-board-firmware: rewrite recipe Ross Burton
2020-11-09 20:39 ` [meta-arm] " Jon Mason
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.