From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6838950553093931008 X-Received: by 2002:a19:701:: with SMTP id 1mr2457505lfh.138.1592489355518; Thu, 18 Jun 2020 07:09:15 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:92d6:: with SMTP id k22ls1300000ljh.4.gmail; Thu, 18 Jun 2020 07:09:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmrJBC6sxMqD47/6ykiETxz3/Lo0bd/z1hOVDF8OsYrm/tlm8SRcN5im1FWlGlmWH/9N8C X-Received: by 2002:a2e:9ad6:: with SMTP id p22mr2560043ljj.3.1592489354729; Thu, 18 Jun 2020 07:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592489354; cv=none; d=google.com; s=arc-20160816; b=dsLNdRDyEjGqdYu2mFn0LwBlKi/id/+hLOIMzkAwWo3KVTuveROFZHYAgh7+AAFa0p +h/R9cEBMudhjuaopzv8dkUCorQPDJzNR4onI/w/UDONjinM5OllTZwVUACzNF1xsMZb PTgTvFI9vbiurArXEYHPPlOv46u9DLDGkzye8ad8gjyF3+iPdeHkTY+Y07ihU7Rbf5Ty Ky2q+N42x40AsRcmuK8Flf1T7HYR4/cZXSctfcP/OACMjbhYAyshiNzwWXKwJ7uFbr3/ 5k4+S08YOYGU+BNtCrJPMaKonxBMmoAcfim4VGTyB7htbOb5+akrvei7+LGxfO7uBmBH QUVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=iCHNoHf64p40xJrnZd3ShBeuTTqyBE5pP3tcO3/TiKo=; b=bMVOmJ+7nOalLXCpo997kETpL+9bJEeKd4zKrO4ClL7A7Umu4M4hfMw+rxd8zz/bN6 d5Qmao5G9BszPc30P5Abc9l81CMRepx2xyM5TiAknO9M7HhZNfl+fs8GFCiRK7Lq2DOK 5D7L5kc2ii1Wmud7ZzmSuHZ4uNkOudF30BqV7UdvW+IfDZUkfTTnvK9sigLbCPL2NTHF 2pG9IcBWh+GBXq+1+WSj5jVMmk5gFbqDw1mxX3I9eocuBkP7iyJ403AmfpvEJKqrAcBA 8UfSzzB7ztKxjj6/mDYrfRgLD/TcHx+o0uvBhYHG8EF9UXugL0+oUvO/CJFkogGRNmq0 3Y3Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id k6si219120ljj.6.2020.06.18.07.09.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 07:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 05IE9DdB026836 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Jun 2020 16:09:13 +0200 Received: from [167.87.74.25] ([167.87.74.25]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 05IE9Cc1003500; Thu, 18 Jun 2020 16:09:13 +0200 Subject: Re: [PATCH] u-boot-custom: Add a config package for Linux user-space To: Harald Seiler , isar-users References: <20200616142041.1908347-1-hws@denx.de> From: Jan Kiszka Message-ID: <0496c51d-a17e-527e-31a5-ca228ae5c1d1@siemens.com> Date: Thu, 18 Jun 2020 16:09:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200616142041.1908347-1-hws@denx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: U86y6j1X/RJZ On 16.06.20 16:20, Harald Seiler wrote: > Add a new (optional) u-boot-${MACHINE}-config package (which also > provides u-boot-config) that contains configuration files for Linux > user-space. Namely, the default environment as /etc/u-boot-initial-env > and a config for envtools as /etc/fw_env.config. > > This new package can be enabled by setting > > U_BOOT_CONFIG_PACKAGE = "1" > > in a concrete U-Boot recipe. The recipe then also needs to provide > a fw_env.config file in its SRC_URI / in ${WORKDIR}. > Would be worth mentioning that this is an important building block for switching to libubootenv as binding for swupdate (rather than u-boot--dev.deb) and for replacing classic u-boot-tools, including those self-built by this recipe. Recipes to build Debian's new libubootenv and update u-boot-tools (the latter is still needed for mkimage) from bullseye for buster will follow. > Signed-off-by: Harald Seiler > --- > meta/recipes-bsp/u-boot/files/debian/rules | 1 + > meta/recipes-bsp/u-boot/u-boot-custom.inc | 21 +++++++++++++++++++++ > 2 files changed, 22 insertions(+) > > diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u-boot/files/debian/rules > index 3f7a3218a870..e27299aa7a26 100755 > --- a/meta/recipes-bsp/u-boot/files/debian/rules > +++ b/meta/recipes-bsp/u-boot/files/debian/rules > @@ -17,6 +17,7 @@ PARALLEL_BUILD=-j $(shell echo $$(($$(nproc) * 2))) > override_dh_auto_build: > $(MAKE) $(PARALLEL_BUILD) $(U_BOOT_CONFIG) > $(MAKE) $(PARALLEL_BUILD) ${U_BOOT_BIN} > + ./scripts/get_default_envs.sh >u-boot-initial-env > $(MAKE) $(PARALLEL_BUILD) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools > > override_dh_auto_install: > diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc > index 41124fc359e8..3e4fc1b6ec3c 100644 > --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc > +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc > @@ -11,6 +11,8 @@ 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-config u-boot-' + d.getVar('MACHINE') + '-config') \ > + if d.getVar('U_BOOT_CONFIG_PACKAGE') == '1' else ''}" > > inherit dpkg > > @@ -22,6 +24,7 @@ TEMPLATE_FILES = "debian/control.tmpl" > TEMPLATE_VARS += "MACHINE BUILD_DEPENDS" > > U_BOOT_TOOLS_PACKAGE ?= "0" > +U_BOOT_CONFIG_PACKAGE ?= "0" > > do_prepare_build() { > cp -r ${WORKDIR}/debian ${S}/ > @@ -41,6 +44,24 @@ Package: u-boot-tools > Architecture: linux-any > Depends: \${shlibs:Depends}, \${misc:Depends} > Description: ${DESCRIPTION}, companion tools > +EOF > + fi > + > + if [ "${U_BOOT_CONFIG_PACKAGE}" = "1" ]; 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 > EOF > fi > } > Looks good to me. Thanks, Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux