From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6873747158459219968 X-Received: by 2002:a17:906:90d5:: with SMTP id v21mr34469957ejw.123.1600418975334; Fri, 18 Sep 2020 01:49:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:4904:: with SMTP id b4ls1299747ejq.9.gmail; Fri, 18 Sep 2020 01:49:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjRspkBvKsjnv8Xb/h0Ek/DHkWRVdomDcx1g9w1Oi4e4GiEARxwQVfEPmHU5ZGzbp2dGhb X-Received: by 2002:a17:906:4d97:: with SMTP id s23mr35934113eju.157.1600418974386; Fri, 18 Sep 2020 01:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600418974; cv=none; d=google.com; s=arc-20160816; b=Fqk46WRp2ATn0/jUdJlcUIeQGkYO6YhTe+ktDk9o9YDMvaeK9f9B7XWimDo8sagaBF 9xF/F4K2Pug5zia5WOECABTVFMw5Skty5kDCwX26sqPrFayYKRaPyuW/xcHEcmQyOBNd t+ToP1Mdazq4VB8w+U3BJVu2DrEfZ8eUNbC591hsOnOQd/eLZ/TLNXQOTZw6er7Wdo2U nlo/n9uTVvAnzweHY2hTJyNRz6Mq9Ad7V8LzKK3aDpvXiszNHnUKYqEt5TykxuZqdCTn qRxzGzX5FRsnf8DaKE+Aiamk/DcLfJnby9IrRRLItpD7yWu09Gjg0tTKvWmk+E3Onb+G j3Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=LnsJZwpcaYP+MqPET7shHzxNjTCFg3/qRJcMyOMRGY0=; b=EBUoHU/LIjo641wCTi3wOsi9TVVMbsvFkM7Mo0vN8l6GkfcgCQqPC/76Bzk93yqojt j91zQAvaSt0+gle+7bUJefo5d5PZuRfz9fpCa1jPi6xD7qk0HWHXQs7phgVCXdop/nu0 ydV5a3elGHLWd7jFiDkkYIdVmTOwtsdMSfFoB6OGuGkvZWzP4H3l4Lz0ZAYAf0z0RnEc nstCbDRBRwZWTfuKo4JBVDbXvyvcU6077pcv5ScWOy2HonyzWqUtoR9pRDIJfSBLBcoU +xfpkfVfVatoOwTAl0JEuY8lPCC74j0sKTOHxKpUMhUFciy5mXAMqz3EAh06r9FfFwVV vZNg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id f17si61896edx.5.2020.09.18.01.49.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2020 01:49:34 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Bt6vy0sgHz1rx88; Fri, 18 Sep 2020 10:49:34 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Bt6vy0kVpz1r574; Fri, 18 Sep 2020 10:49:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id YVXu-GQtKcSk; Fri, 18 Sep 2020 10:49:33 +0200 (CEST) X-Auth-Info: v8bGUUIsCbkM6LmwtW64aynCsscUVbP5b1xHxqK1NTY= Received: from maia.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 18 Sep 2020 10:49:33 +0200 (CEST) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler Subject: [PATCH v2] u-boot-custom: Add a config package for Linux user-space Date: Fri, 18 Sep 2020 10:49:07 +0200 Message-Id: <20200918084907.1160151-1-hws@denx.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: 9cj4wWkM0hn3 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}. Signed-off-by: Harald Seiler --- Notes: Changes in v2: - Rebased on latest upstream 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 92c07b170700..85bda913ca3a 100755 --- a/meta/recipes-bsp/u-boot/files/debian/rules +++ b/meta/recipes-bsp/u-boot/files/debian/rules @@ -15,6 +15,7 @@ endif override_dh_auto_build: $(MAKE) $(PARALLEL_MAKE) $(U_BOOT_CONFIG) $(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN} + ./scripts/get_default_envs.sh >u-boot-initial-env $(MAKE) $(PARALLEL_MAKE) $(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 } -- 2.26.2