From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 21 Mar 2025 09:53:22 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tvY83-002G1C-1e for lore@lore.pengutronix.de; Fri, 21 Mar 2025 09:53:22 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tvY82-0002xp-Ho; Fri, 21 Mar 2025 09:53:22 +0100 To: ptxdist@pengutronix.de Date: Fri, 21 Mar 2025 09:52:41 +0100 In-Reply-To: <20250321085246.21344-1-ada@thorsis.com> References: <20250321085246.21344-1-ada@thorsis.com> MIME-Version: 1.0 Message-ID: List-Id: PTXdist Development Mailing List List-Post: From: Alexander Dahl via ptxdist Precedence: list Cc: Alexander Dahl X-Mailman-Version: 2.1.29 X-BeenThere: ptxdist@pengutronix.de List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: ptxdist@pengutronix.de List-Help: Subject: [ptxdist] [RFC PATCH 2/7] libubootenv: Add option for installing tools Content-Type: message/rfc822 Content-Disposition: inline Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Received: from mail.thorsis.com ([2003:a:e28:26e4::10]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tvY7Y-00026P-CI for ptxdist@pengutronix.de; Fri, 21 Mar 2025 09:52:55 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D65AF1488D6F for ; Fri, 21 Mar 2025 09:52:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1742547171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H8vPPGvuWX8s7CdmFlmyElBIaQLh1FL83KiVR9sxTbc=; b=H+HY3BmTI4QQ0LXkVKaMjJTXDW39DkD57K+GesXgMTVLewuPIhbTpxiPso/IYOuPfdk//r RINFBnA5AckFo26HTggRSamBKF99HBNJYBApxlBHOXS+hpcJnkCUYFMWRy4fRcxEl4AP0x BvCELC5qBvz9mjpuQI/VLxd5dxBR9STCCQ7rXrXL7Bfq13qadYj9rz7Xli2hXkqxxqChYY ct99d3dagoZnOxsl4t+Ngw4yowLsNJmj5CWNt5SL/bBU0Z67OO5gl78qE44+3DIfBeIlHL sIn9NjDmGGrDtSZteympg1zUcfl3XsmnM7iI+bgtVVgAA6qTnYEsKvBfReXfLg== From: Alexander Dahl To: ptxdist@pengutronix.de Date: Fri, 21 Mar 2025 09:52:41 +0100 Message-Id: <20250321085246.21344-3-ada@thorsis.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250321085246.21344-1-ada@thorsis.com> References: <20250321085246.21344-1-ada@thorsis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-SA-Exim-Connect-IP: 2003:a:e28:26e4::10 X-SA-Exim-Mail-From: ada@thorsis.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.4 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [RFC PATCH 2/7] libubootenv: Add option for installing tools X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) X-PTX-Original-Recipient: ptxdist@pengutronix.de These tools can also be provided by the u-boot-tools package. This variant promises to be board independent, and comes with a library. Signed-off-by: Alexander Dahl --- rules/libubootenv.in | 18 ++++++++++++++++-- rules/libubootenv.make | 7 +++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/rules/libubootenv.in b/rules/libubootenv.in index 70f6d9863..317a440fc 100644 --- a/rules/libubootenv.in +++ b/rules/libubootenv.in @@ -1,15 +1,29 @@ ## SECTION=system_libraries -config LIBUBOOTENV +menuconfig LIBUBOOTENV tristate select HOST_CMAKE select LIBYAML select ZLIB - prompt "libubootenv" + prompt "libubootenv " help Generic library and tools to access and modify U-Boot environment from User Space. https://github.com/sbabic/libubootenv +if LIBUBOOTENV + +config LIBUBOOTENV_TOOLS + bool + prompt "fw_printenv / fw_setenv" + depends on !U_BOOT_TOOLS || ALLYES + help + Install fw_printenv and fw_setenv to target. + +comment "u-boot-tools is selected!" + depends on U_BOOT_TOOLS + +endif + # vim: ft=kconfig noet tw=72 ts=8 sw=8 diff --git a/rules/libubootenv.make b/rules/libubootenv.make index d4e678152..769961dfa 100644 --- a/rules/libubootenv.make +++ b/rules/libubootenv.make @@ -51,6 +51,13 @@ $(STATEDIR)/libubootenv.targetinstall: @$(call install_lib, libubootenv, 0, 0, 0644, libubootenv) +ifdef PTXCONF_LIBUBOOTENV_TOOLS +# # same path as the equivalents from u-boot-tools package + @$(call install_copy, libubootenv, 0, 0, 0755, \ + $(LIBUBOOTENV_PKGDIR)/usr/bin/fw_printenv, /usr/sbin/fw_printenv) + @$(call install_link, libubootenv, fw_printenv, /usr/sbin/fw_setenv) +endif + @$(call install_finish, libubootenv) @$(call touch) -- 2.39.5