From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] u-boot-custom: Add control for u-boot-tools package build
Date: Tue, 3 Sep 2019 07:41:32 +0200 [thread overview]
Message-ID: <dad68775-07e4-2499-08ea-e1fefad2105f@siemens.com> (raw)
From: Jan Kiszka <jan.kiszka@siemens.com>
Each custom u-boot currently generates also the u-boot-tools packages.
That can cause redundant builds in the best case when building multiple
targets with custom u-boots. In the worst case, an undeterministic
version is installed, depending one which u-boot with which version is
finished first.
Allow the user to define which recipe generates also the u-boot-tools
package so that only one is generated in a multi-target scenario. We
default to "no build" as a tools package different to the distro one is
rarely needed on the target.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb | 3 +++
meta/recipes-bsp/u-boot/files/debian/control.tmpl | 5 -----
meta/recipes-bsp/u-boot/u-boot-custom.inc | 15 ++++++++++++++-
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb b/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb
index fe00b73..9a3fd90 100644
--- a/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb
+++ b/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb
@@ -9,3 +9,6 @@ SRC_URI += " \
ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
"
SRC_URI[sha256sum] = "839bf23cfe8ce613a77e583a60375179d0ad324e92c82fbdd07bebf0fd142268"
+
+# Just for testing purposes, distro package would be recent enough
+U_BOOT_TOOLS_PACKAGE = "1"
diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
index 5c1cc92..0ab3a29 100644
--- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl
+++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
@@ -12,8 +12,3 @@ Description: ${DESCRIPTION}, bootloader binaries
Package: u-boot-${MACHINE}-dev
Architecture: ${DISTRO_ARCH}
Description: ${DESCRIPTION}, bootloader libraries
-
-Package: u-boot-tools
-Architecture: linux-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: ${DESCRIPTION}, companion tools
diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index 400aba2..8843789 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -9,7 +9,8 @@ FILESPATH =. "${LAYERDIR_core}/recipes-bsp/u-boot/files:"
DESCRIPTION ?= "Custom U-Boot"
-PROVIDES += "u-boot-${MACHINE} u-boot-${MACHINE}-dev u-boot-tools"
+PROVIDES += "u-boot-${MACHINE} u-boot-${MACHINE}-dev"
+PROVIDES += "${@'u-boot-tools' if d.getVar('U_BOOT_TOOLS_PACKAGE') == '1' else ''}"
inherit dpkg
@@ -20,6 +21,8 @@ BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
TEMPLATE_FILES = "debian/control.tmpl"
TEMPLATE_VARS += "MACHINE BUILD_DEPENDS"
+U_BOOT_TOOLS_PACKAGE ?= "0"
+
do_prepare_build() {
cp -r ${WORKDIR}/debian ${S}/
@@ -30,6 +33,16 @@ do_prepare_build() {
echo "tools/env/libubootenv.a usr/lib" > \
${S}/debian/u-boot-${MACHINE}-dev.install
+
+ if [ "${U_BOOT_TOOLS_PACKAGE}" = "1" ]; then
+ cat <<EOF >>${S}/debian/control
+
+Package: u-boot-tools
+Architecture: linux-any
+Depends: \${shlibs:Depends}, \${misc:Depends}
+Description: ${DESCRIPTION}, companion tools
+EOF
+ fi
}
dpkg_runbuild_prepend() {
--
2.16.4
next reply other threads:[~2019-09-03 5:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 5:41 Jan Kiszka [this message]
2019-09-12 14:12 ` Baurzhan Ismagulov
2019-09-13 6:21 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dad68775-07e4-2499-08ea-e1fefad2105f@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox