From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6838950553093931008 X-Received: by 2002:a05:6402:1776:: with SMTP id da22mr2889178edb.84.1592317259623; Tue, 16 Jun 2020 07:20:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d04d:: with SMTP id n13ls2549724edo.2.gmail; Tue, 16 Jun 2020 07:20:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz937+hEo5qXj1OV2lz32iUIC2Y3X8NQte0kVhH9F0grz5L2agh9To/LKQ7ARzDOiiS5swP X-Received: by 2002:aa7:d785:: with SMTP id s5mr2935207edq.17.1592317259020; Tue, 16 Jun 2020 07:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592317259; cv=none; d=google.com; s=arc-20160816; b=THQ6OfOlgpSzEMBhkKkh97qyTqfWLsLpeUwuEw3iEYIE2xrrnMlgqmfnet84sgCpP9 n0Tb/fGN5zRqQv/iCBmbPry8+9e8Dypv5E7wRidKdRewoLmonU6gWC5aoysEHonZ3bE9 plnwdxBt3LJfztk2UAp+hXEj+OQc9ySCEMiubi4bxQkwP6xHrDvQcnegSr8Pp/qp7X52 BwG7YhSkm8VCwbtYDDGrz0BShudzDR7jabChSHszNA9HjiPzEnNR8RXO4cpUqj1JMHj2 2/Yi8MKKvHEKSKfe7EKDOys3USdH2lV0VRJqtgICsrnPf/Df85TXSV/pcNZsKOkK7w0z v94Q== 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=Dd5+D+HuG7HHHsPgxU7oQMrrfw099EzBBgUVdCK7Zbg=; b=fFRUeRmDZOV6Uzl9hCFJoCkD8xZz5CCOETSq3hGn2EkoaZmsQ7zjsPowEVfLrQTZw3 BatEwLkNbwVh31K23vBf1RJDMIKCSWTizvMcw6K+XT4HnOr1oJToGCG6F3Sg2KW34UqF m9hv1R6yZIst6Bz7CJgA7IqnUO4GeG/yKWdobxb97a9oDjCv+GWgqGeI5YAqR0YOUCNF ozy32Z1soBuTm61D0P1Fgr4ZfP6Wc/8s1pLeTBot7hm8pL8z1MPHSzxVFxEFHCUOokXT zxBFTUGCzEfh+fyCRzc18yEhr16WrGFxVfzaWfZ4qRgBe8MhTPDN2GUvwfll1AzzMpov 9meQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id r19si1025866eja.1.2020.06.16.07.20.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2020 07:20:58 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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 49mVjk5hbDz1qs3l; Tue, 16 Jun 2020 16:20:58 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49mVjk5TXvz1qqkW; Tue, 16 Jun 2020 16:20:58 +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 T-5EjOEu_ics; Tue, 16 Jun 2020 16:20:57 +0200 (CEST) X-Auth-Info: Is6RNNwV7BR6jme63HnrgPH3tkyA5Sv9t1qyqX7J9hQ= 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; Tue, 16 Jun 2020 16:20:57 +0200 (CEST) From: Harald Seiler To: isar-users Cc: Jan Kiszka , Harald Seiler Subject: [PATCH] u-boot-custom: Add a config package for Linux user-space Date: Tue, 16 Jun 2020 16:20:41 +0200 Message-Id: <20200616142041.1908347-1-hws@denx.de> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: GpIqXNUK8ApP 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 --- 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 } -- 2.25.4