From patchwork Fri Sep 18 00:49:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 59 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp1114713ooj; Fri, 18 Sep 2020 01:49:36 -0700 (PDT) X-Received: by 2002:a17:906:9491:: with SMTP id t17mr34000548ejx.227.1600418976158; Fri, 18 Sep 2020 01:49:36 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600418976; cv=pass; d=google.com; s=arc-20160816; b=LJYTuR+ZSUF6EAXTe58hAuedn/zhXLvIE+ugbLIxHnccDO7ab8WE6XGTa4fp6qAW9c ZMvSxC7td9jXI9maMV9YU1vxPpcKGENHum1iYeMtcYJTtOCbB2FvfhmsxpBXcHXR65hA aSQQbjEw0y3NwtEx8iQV97coZyShUQrUR+aPpPz7iN7MoUwC1SQ+lZEwIki9S8b0NiKR wnotdQ6MDa0XAeJk4SNK+Dq9hOjQYT6XMd0cPq1wwDOJPuwFNgO/Agw2kbNzK9ZCxtjY /AO9sxnwqAKSWCQEZ52g/pkK8VWETQn8+wecxMJfH7jJA1WKHv71x/yQaoTZB7jhmapS jWmg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=GQ4ahkFws6BlFbc/bFYkOxHal1PXxNWck8D1do2wcHY=; b=I+LoswTyrCxmVM/IOmJpDa91du1T7s0WhNAnB9KS3iBIX4dVcqdRyl+2tqNYzAUxGA hDwPzRXFK9w32UpkCzxkhPzYYRBPnJ2L09idnwFfRZL/323QSdV0SvHH+K/AmVSmRyQs UXqWG+TDfbqWlHtw3WyLdu/kcyuqJhGQdn9UdjQqI5eXEIpyYrD+dgEgQdXK+zqeJrOt OYCm+W2uVitMFB1LqFIPrqwUNijI0/wZI3RWchkuI1grnAqN2rYoywJ7ZzfDT5RLQwr5 8OJOVhugiwWKcUtsJWFBJNl4bJOW9ozMMCDFW328+mkvkEGMymI62yLUrh8WVtAEp6cZ 2AXw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=jpIbx8BA; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbh7jsh5qkgqe3ouwwui@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBH7JSH5QKGQE3OUWWUI@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id ha24sor1338874ejb.19.2020.09.18.01.49.35 (Google Transport Security); Fri, 18 Sep 2020 01:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbh7jsh5qkgqe3ouwwui@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=jpIbx8BA; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbh7jsh5qkgqe3ouwwui@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBH7JSH5QKGQE3OUWWUI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1600418975; cv=pass; d=google.com; s=arc-20160816; b=h7XUpx2OXyJcJsJT1zgyRPAqK160QE5Q1N3A/9qAaE7lzT2mbUZ+oh7692HqX5Ulb0 hKxT+iM00ZNH/YftDKM2o2VNA9xOCYz4GlOyMdRE+HBmxY/delpI7E6WZgcDfiJelijI K5jBtrUrkXhpA5LaJYeQSvmE1Txvvk9Y9OHo+rn4h0M8JPQC8hk7X+W931ajWJNcQaHK pm+xAVWs6CItUyY8DjunIMsipbge9h9vAFvdIvGklhDpIOgD2gFsEwAM25sdbWY7F2g2 rbI9d9GdlAv30i7eq50iQLIzlcGP5ipwAxkxu2Dtk3ZqvMw/Fwb4XGR9ottnbfz0PAaO UcBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=GQ4ahkFws6BlFbc/bFYkOxHal1PXxNWck8D1do2wcHY=; b=lkGqQDdbL+MYGjuhfpBTJvZghkXV40vyYNhFBVxTYxSr3nIRccEPvmOOOtPqX2xgWr ozos+ZEvxsInChA50WLOLop9USKbEufJvPkVaNZslHDJ8lGHuYVBRulk4iq7+XeUZa26 eU3y/0ykXiGBq+YhWsUAHMg3bwyp+fKgsCid+ru6HuRKx7m/AptrFX6wTcKowp/3J/SV 6yHWIroXUE2sx6orURa9UqZLRgwiSZgmStb95TsbCkRaae3Up6xsl4NuyTpAoEDoKm6O PmJlwyearfRf8ndJLmqbGaucB+/u9idfbHDbY2LiuGjE1gfwDduAIu5NW/Qem9wD4Fgv gYew== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=GQ4ahkFws6BlFbc/bFYkOxHal1PXxNWck8D1do2wcHY=; b=jpIbx8BAGKuumuz193FYGIqz2VwXujqs+XQFPmL4B+yCTuEX6kD1H+S+2A7LRnAHY4 E8nZSEgq2tPDDw4YDBUx6mtMn1j4LfoCYKs+TMkeSQ66Ei3O7TURMbu6Pn6DYbYjmPM7 yqV4U2alDpo+Y/y9gC86BRbYfKXecIE/roOP9/RnqNVSEmJgLxSspXJ+q9uWIFU+qCOm wE90S50IHFFYQnmKSIeqgHcFZBSWoQaqEJEtMULcCaeSaIq6V3DysTfhTY8oqCvE1KUX c9Obv6kzKbkUYl1NrJ9qlFfT/+d9VaKFBwxoRjk6IJV6O1HOT5KzEx2pswtNks8Ijc+X u/vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=GQ4ahkFws6BlFbc/bFYkOxHal1PXxNWck8D1do2wcHY=; b=fZIoZ56A0q2GE9C+ynZL2Cj3y4NySpaCGW+wYJw6UYdbRJKag2cvhthlug7USywgkl 6VWhb1Z8SJ9WLwiZ4l6m/BRzOdbEKlU5VF53v9xko5dn51E2Q/8mrQjaHMUEPpjnoVx2 YJ/7bq8q9l1NNfw/ye5/kq02XCwRJcQJ9QWisFxc+7Nrtx/0N3IVrWOUi7Vpowbttg5o HY9UxXb1IzZohdxVcQz9qalCyKDxmRbSfTX+yUcydGFwhBqLFVMqcT6Wwaqqv500KQMG 5Wo8mDpartk1qO4Z+E/I6M6mCh5KNY412cyU6/1Fqz+tmFkr0aWfZvNNC5U2V3TJ0DcT Gjgw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532wJlEKqLaoBr4sHul/mFBe0+N+OdI426jy5biWwEQ5//yp97tY uD3Ss//X6iG+2CMtZUxzzQc= X-Google-Smtp-Source: ABdhPJz5ljSdTYFDwXCkbZD16FInuIamxO6jWcz5GPBiq4hYOicxomZvSdfMIGHP0/B2kQyoQTj7zg== X-Received: by 2002:a17:906:1dd0:: with SMTP id v16mr34134690ejh.309.1600418975235; 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-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 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; 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 X-Original-Sender: hws@denx.de X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1678160927956326283?= X-GMAIL-MSGID: =?utf-8?q?1678160927956326283?= 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 }