From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7059709284601298944 X-Received: by 2002:a2e:80d2:: with SMTP id r18mr13042653ljg.474.1643742233049; Tue, 01 Feb 2022 11:03:53 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:651c:12c2:: with SMTP id 2ls1720957lje.6.gmail; Tue, 01 Feb 2022 11:03:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5IO6rhDqOTf1CWKxqvUt5SqTNuITl+pv/I7umrC3Ue2FoK/sBWHH5BBYHlaFUZ9b5FvD+ X-Received: by 2002:a2e:a5ca:: with SMTP id n10mr18299741ljp.300.1643742231980; Tue, 01 Feb 2022 11:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643742231; cv=none; d=google.com; s=arc-20160816; b=sbmCBSxfdEJ2YNtoSP2wzfssRge51r4JKkyYqmWuK9/Ck9q1En8WH3a3UXPji0JfEF NZOv574lNghPYE2+W22tHabatOiJIrbznfGhrW1CdksjlxBSJ1jcKqIytFRR0mDmszzM D54K5MkwJ9v6eLVPgWoUcXrk9O2D0XHiu85eshBvKKEMI/qbleoKCjIvMYJVU8gH3tXC 62IxKXP0gN+zrcX1gGJoYM8u1mKxDwuyBzGDKOv7bJqDlfN7o0ub0hS2KHqSKFp5BKiC IDJ4+E0LsgMHGQkWQ+xDmimk0T/4f7cWMLQcPF5qm4JPccDb66rlilQh1LnicnmJWczS lysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=adE6FB3W6jKGVBbMHFzo8xr3E4fY2ZHGRpbWnd9RkE0=; b=TAWk2frU1F2bz7jU9ouC2q6k9NF1Fgkaqf+Hjom9Y8hHyOYSSnNoasdyND4nWMHgDO PVcQttJA+8nMXciXyziYfX0fAUoes9tNmub44i8YeylPQMpOiuIN9AZW6KQb1fh8DaOm +5tY8TwtNcXZ5ghPb+DGRHHvUr2oh6Cj+7hTlLEOlA9ZIgE83ntJIpImJchkuu9uW14i Esl7jdViOaJ/cBIxEyzNhjuBoR/bjD6jXcxJmk+qXHlRQSIkkGO3cOmZ1HOPw80uWP3Q 7kYBOmvwstd5VjgyCJkdO/dUJTfQ0+g6ig23yzAJT8fUG/HyJHGpntG+Ovzxo/w2kDrh RyJg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EC+k0awy; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::333 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com. [2a00:1450:4864:20::333]) by gmr-mx.google.com with ESMTPS id l17si158588lje.5.2022.02.01.11.03.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Feb 2022 11:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::333 as permitted sender) client-ip=2a00:1450:4864:20::333; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EC+k0awy; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::333 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-wm1-x333.google.com with SMTP id v123so13479345wme.2 for ; Tue, 01 Feb 2022 11:03:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=adE6FB3W6jKGVBbMHFzo8xr3E4fY2ZHGRpbWnd9RkE0=; b=EC+k0awymQJrr+7iE34E6B9XqelZq3LsrbyKKByg8UfSj3xbvQA759Ji1Nu5u8sIzH /3EPWTSmaKvW1lMuTsNAx2xvPZkFrO9LOkvLj3Kt2Ng41Wimxtu9BKswpw3mFh3LU7Vu rXat6gkWtlq0uouZLhBtTXRhZZoKqcqmzV8IvPOlCWJBlr8dpuBQnHuHFXU8sAqQFhGr EomtkNSW6/uyuYOPTKVttbjNGFh0UUe3k1hRo5IGaGC/D6761WTnLfIllg7Qt5qrro1h fGlw6nLSlwUZwWEOUAHCwOjlFXrorPfp4bMN7meZLTTr5J0KP00MMqRmC1JvwqiCFBZT NIVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=adE6FB3W6jKGVBbMHFzo8xr3E4fY2ZHGRpbWnd9RkE0=; b=OAQhe3LLn2MNW1pESu9c+Vwg5zp3hG19e6+CeEFJLBiRAPcyXH/b1B0nSFICs8FUJT 0atwD0D8zsMaFnAolM9dUeRy/tYz60QdoUeY2vlIS6RquTToVLzDNbZPXyeNUut86dqy PT3KDghq9h7AG9FHFP6EZRagt28ic+yCYh3QET/T9Wut0U6Ujbd8Ex4/0NU8OLkKSNJO zrdsLcoDubd0nxBZf0W1Fm5/qgKBIdcxUfDRa9SJiszXoRt8d/LkDpOUeWNljpG+Y8Jo vIYUY5tpshwERNs+I1e+BmSgxVdxIkxrLFw/mKO1BOIOg/ijS8mkf254J6bbwqhIZmBW oYbw== X-Gm-Message-State: AOAM531ld26gcH99bsZXFSvRXheKMXF8rIM6R3l0SPQGJM6BeBwKWPtQ bYRLGFKb1z7TqzStwEXZsDVVoyso4BmUS6VV5jSJ/olF X-Received: by 2002:a05:600c:6020:: with SMTP id az32mr3088638wmb.2.1643742231164; Tue, 01 Feb 2022 11:03:51 -0800 (PST) MIME-Version: 1.0 References: <20220201115713.3062835-1-Vijaikumar_Kanagarajan@mentor.com> <20220201115713.3062835-2-Vijaikumar_Kanagarajan@mentor.com> In-Reply-To: From: vijai kumar Date: Wed, 2 Feb 2022 00:33:40 +0530 Message-ID: Subject: Re: [PATCH v5 1/4] u-boot: Switch to use DEB_BUILD_PROFILES To: "Moessbauer, Felix" Cc: Vijai Kumar K , "isar-users@googlegroups.com" , "jan.kiszka@siemens.com" Content-Type: text/plain; charset="UTF-8" X-TUID: G1HaojgbtPI6 On Tue, Feb 1, 2022 at 6:24 PM Moessbauer, Felix wrote: > > Hi Vijai, > > > -----Original Message----- > > From: isar-users@googlegroups.com On > > Behalf Of Vijai Kumar K > > Sent: Tuesday, February 1, 2022 12:57 PM > > To: isar-users@googlegroups.com; Kiszka, Jan (T CED) > > > > Cc: Vijai Kumar K > > Subject: [PATCH v5 1/4] u-boot: Switch to use DEB_BUILD_PROFILES > > > > Use DEB_BUILD_PROFILES to select packages to build. > > > > This patch drops the U_BOOT_TOOLS_PACKAGE and > > U_BOOT_CONFIG_PACKAGE variables and introduces > > U_BOOT_BUILD_PROFILES through which we can enable particular packages > > like u-boot-tools, u-boot-dev and u-boot-config. > > > > Also, provide backward compatibility with U_BOOT_*_PACKAGES variable and > > prompt a deprecation warning to user. > > > > Signed-off-by: Vijai Kumar K > > --- > > RECIPE-API-CHANGELOG.md | 11 ++++ > > .../u-boot/files/debian/control.tmpl | 13 +++++ > > meta/recipes-bsp/u-boot/files/debian/rules | 9 +++- > > meta/recipes-bsp/u-boot/u-boot-custom.inc | 52 ++++++++++--------- > > 4 files changed, 59 insertions(+), 26 deletions(-) > > > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index > > ce0a6da..118b328 100644 > > --- a/RECIPE-API-CHANGELOG.md > > +++ b/RECIPE-API-CHANGELOG.md > > @@ -335,3 +335,14 @@ names for kernel/headers. > > Changes in next > > --------------- > > > > +### Deprecate U_BOOT_TOOLS_PACKAGE and U_BOOT_CONFIG_PACKAGE > > + > > +Use U_BOOT_BUILD_PROFILES instead of U_BOOT_TOOLS_PACKAGE and > > +U_BOOT_CONFIG_PACKAGE > > + > > +U_BOOT_TOOLS_PACKAGE = "1" is achieved by U_BOOT_BUILD_PROFILES += > > "tools" > > +U_BOOT_CONFIG_PACKAGE = "1" is achieved by U_BOOT_BUILD_PROFILES += > > "config" > > + > > +u-boot-${MACHINE}-dev package build can also be controlled now. Enabled > > +by default in u-boot-custom.inc. To remove use the below code in your recipe. > > + > > +U_BOOT_BUILD_PROFILES_remove = "dev" > > diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes- > > bsp/u-boot/files/debian/control.tmpl > > index 9379be7..7ac11ad 100644 > > --- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl > > +++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl > > @@ -11,4 +11,17 @@ Description: ${DESCRIPTION}, bootloader binaries > > > > Package: u-boot-${MACHINE}-dev > > Architecture: ${DISTRO_ARCH} > > +Build-Profiles: > > Description: ${DESCRIPTION}, bootloader libraries > > + > > +Package: u-boot-tools > > +Architecture: linux-any > > +Build-Profiles: > > +Depends: ${shlibs:Depends}, ${misc:Depends} > > +Description: ${DESCRIPTION}, companion tools > > + > > +Package: u-boot-${MACHINE}-config > > +Build-Profiles: > > +Provides: u-boot-config > > +Architecture: ${DISTRO_ARCH} > > +Description: ${DESCRIPTION}, environment configuration > > diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u- > > boot/files/debian/rules > > index 3d66762..121b00e 100755 > > --- a/meta/recipes-bsp/u-boot/files/debian/rules > > +++ b/meta/recipes-bsp/u-boot/files/debian/rules > > @@ -20,10 +20,17 @@ override_dh_auto_build: > > else \ > > ./scripts/get_default_envs.sh >u-boot-initial-env; \ > > fi > > - $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 > > tools-only envtools > > +ifneq (,$(filter dev,$(DEB_BUILD_PROFILES))) > > + $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 > > envtools > > +endif ifneq (,$(filter tools,$(DEB_BUILD_PROFILES))) > > + $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 > > tools-only > > +endif > > > > override_dh_auto_install: > > +ifneq (,$(filter dev,$(DEB_BUILD_PROFILES))) > > mv tools/env/lib.a tools/env/libubootenv.a > > +endif > > > > override_dh_auto_test: > > > > diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u- > > boot/u-boot-custom.inc > > index 9984d8c..5198809 100644 > > --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc > > +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc > > @@ -9,10 +9,13 @@ FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/files:" > > > > DESCRIPTION ?= "Custom U-Boot" > > > > -PROVIDES += "u-boot-${MACHINE} u-boot-${MACHINE}-dev" > > -PROVIDES += "${@'u-boot-tools' if d.getVar('U_BOOT_TOOLS_PACKAGE') == '1' > > else ''}" > > +PROVIDES += "u-boot-${MACHINE}" > > +PROVIDES += "${@'u-boot-tools' \ > > + if bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}" > > PROVIDES += "${@('u-boot-config u-boot-' + d.getVar('MACHINE') + '-config') \ > > - if d.getVar('U_BOOT_CONFIG_PACKAGE') == '1' else ''}" > > + if bb.utils.contains('U_BOOT_BUILD_PROFILES', 'config', 1, 0, d) else ''}" > > +PROVIDES += "${@('u-boot-' + d.getVar('MACHINE') + '-dev') \ > > + if bb.utils.contains('U_BOOT_BUILD_PROFILES', 'dev', 1, 0, d) else ''}" > > > > inherit dpkg > > > > @@ -22,6 +25,20 @@ python() { > > if d.getVar('BUILD_DEPENDS'): > > bb.warn("u-boot-custom: Deprecated use of BUILD_DEPENDS, please > > switch to DEBIAN_BUILD_DEPENDS") > > d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS')) > > + > > + if d.getVar('U_BOOT_TOOLS_PACKAGE') is not None: > > + bb.warn("u-boot-custom: Deprecated use of U_BOOT_TOOLS_PACKAGE, > > please switch to U_BOOT_BUILD_PROFILES") > > + if d.getVar('U_BOOT_TOOLS_PACKAGE') == "1": > > + d.appendVar('U_BOOT_BUILD_PROFILES', " tools") > > + else: > > + d.setVar('U_BOOT_BUILD_PROFILES_remove', "tools") > > + > > + if d.getVar('U_BOOT_CONFIG_PACKAGE') is not None: > > + bb.warn("u-boot-custom: Deprecated use of U_BOOT_CONFIG_PACKAGE, > > please switch to U_BOOT_BUILD_PROFILES") > > + if d.getVar('U_BOOT_CONFIG_PACKAGE') == "1": > > + d.appendVar('U_BOOT_BUILD_PROFILES', " config") > > + else: > > + d.setVar('U_BOOT_BUILD_PROFILES_remove', "config") > > } > > > > DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git" > > @@ -29,8 +46,8 @@ DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree- > > compiler, git" > > TEMPLATE_FILES = "debian/control.tmpl" > > TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS" > > > > -U_BOOT_TOOLS_PACKAGE ?= "0" > > -U_BOOT_CONFIG_PACKAGE ?= "0" > > + > > +U_BOOT_BUILD_PROFILES ?= "dev" > > > > do_prepare_build() { > > cp -r ${WORKDIR}/debian ${S}/ > > @@ -40,31 +57,15 @@ do_prepare_build() { > > echo "${U_BOOT_BIN} /usr/lib/u-boot/${MACHINE}" > \ > > ${S}/debian/u-boot-${MACHINE}.install > > > > - echo "tools/env/libubootenv.a usr/lib" > \ > > - ${S}/debian/u-boot-${MACHINE}-dev.install > > - > > - if [ "${U_BOOT_TOOLS_PACKAGE}" = "1" ]; then > > - cat <>${S}/debian/control > > - > > -Package: u-boot-tools > > -Architecture: linux-any > > -Depends: \${shlibs:Depends}, \${misc:Depends} > > -Description: ${DESCRIPTION}, companion tools -EOF > > + if [ "${@bb.utils.contains('U_BOOT_BUILD_PROFILES', 'dev', 'yes', 'no', d)}" = > > "yes" ];then > > + echo "tools/env/libubootenv.a usr/lib" > \ > > + ${S}/debian/u-boot-${MACHINE}-dev.install > > fi > > > > - if [ "${U_BOOT_CONFIG_PACKAGE}" = "1" ]; then > > + if [ "${@bb.utils.contains('U_BOOT_BUILD_PROFILES', 'config', > > + 'yes', 'no', d)}" = "yes" ];then > > cp ${WORKDIR}/fw_env.config ${S}/ || \ > > die "U_BOOT_CONFIG_PACKAGE requires a fw_env.config in SRC_URI" > > > > - cat <>${S}/debian/control > > - > > -Package: u-boot-${MACHINE}-config > > -Provides: u-boot-config > > -Architecture: ${DISTRO_ARCH} > > -Description: ${DESCRIPTION}, environment configuration -EOF > > - > > cat <>${S}/debian/u-boot-${MACHINE}-config.install > > u-boot-initial-env /etc > > fw_env.config /etc > > @@ -75,4 +76,5 @@ EOF > > dpkg_runbuild_prepend() { > > export U_BOOT_CONFIG="${U_BOOT_CONFIG}" > > export U_BOOT_BIN="${U_BOOT_BIN}" > > + export DEB_BUILD_PROFILES="${U_BOOT_BUILD_PROFILES}" > > Can we wait with this until the DEB_BUILD_PROFILES patch series is merged. > Then, you can simply define via bitbake: DEB_BUILD_PROFILES="${U_BOOT_BUILD_PROFILES}" > Manually exporting will break either on the sbuilder series or the DEB_BUILD_PROFILES series as both have API changes. Works for me. I will rebase once your changes are in. Thanks, Vijai Kumar K > > Best regards, > Felix > > > } > > -- > > 2.25.1 > > > > -- > > You received this message because you are subscribed to the Google Groups > > "isar-users" group. > > To unsubscribe from this group and stop receiving emails from it, send an email > > to isar-users+unsubscribe@googlegroups.com. > > To view this discussion on the web visit > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.g > > oogle.com%2Fd%2Fmsgid%2Fisar-users%2F20220201115713.3062835-2- > > Vijaikumar_Kanagarajan%2540mentor.com&data=04%7C01%7Cfelix.moes > > sbauer%40siemens.com%7C7c8fc33935e249cbc16e08d9e57a0b6d%7C38ae3bc > > d95794fd4addab42e1495d55a%7C1%7C0%7C637793135659965600%7CUnkno > > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha > > WwiLCJXVCI6Mn0%3D%7C3000&sdata=s%2FUtf%2FS8cSwq4Pi%2Bqjbs%2 > > F49aeewXBhaA7b3m38cWxgo%3D&reserved=0. > > -- > You received this message because you are subscribed to the Google Groups "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/AM9PR10MB4869BCA3C85B3DBA0D50B3CE89269%40AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM.