From patchwork Tue Sep 12 14:42:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianling Shen X-Patchwork-Id: 1833082 X-Patchwork-Delegate: mail@david-bauer.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3kQod1FK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RlRGY5ZRlz1ygM for ; Wed, 13 Sep 2023 00:45:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:List-Help: Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From:List-Post:List-Id: Message-ID:MIME-Version:References:In-Reply-To:Date:Subject:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YVkli2EZ/4zpnmeSDqQLzicMx1UejImZ0CoPxJyr41s=; b=3kQod1FKsJAKURCyO8n3lbNi4t AsB1xihjHM2aoSVDd92bp4ThAOoOyoxzo9ypBxHqZbMts1T0Xgf84sEF4RamgMix1Y8KXeIbXdafe lTA7axKfDN/USYYByoFY9hdvI9ij4AOB3/HSbDZU40u9FDnWBKV5DbtpuCRdRrpZQTvppuIvUYAfs 8xqpSGdrWJwL3TaJecMPDuk7FNZq3ZURU9utd7WZY0qLgnT79zS4fhIWyM8g92PLwnDnPEOU6kODn RFhr07nltzjbYKjc8naQbNpeQQcpVlnQzeoc8P+bxvD2PQ73ivC75cOIp02rvxzF8Kg+WpY8F79r+ O6itM44Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qg4by-003cBp-00; Tue, 12 Sep 2023 14:43:30 +0000 To: openwrt-devel@lists.openwrt.org Subject: [PATCH 01/12] u-boot: introduce dependencies check for swig and pyelftools Date: Tue, 12 Sep 2023 22:42:29 +0800 In-Reply-To: <20230912144240.51396-1-cnsztl@immortalwrt.org> References: <20230912144240.51396-1-cnsztl@immortalwrt.org> MIME-Version: 1.0 Message-ID: List-Id: OpenWrt Development List List-Post: X-Patchwork-Original-From: Tianling Shen via openwrt-devel From: Tianling Shen Precedence: list X-Mailman-Version: 2.1.34 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Tianling Shen List-Help: Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. They are required by modern u-boot builds, e.g. uboot-rockchip and uboot-sunxi. Signed-off-by: Tianling Shen --- include/u-boot.mk | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/include/u-boot.mk b/include/u-boot.mk index 2b8106410f..09a73327f6 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -1,3 +1,5 @@ +include $(INCLUDE_DIR)/prereq.mk + PKG_NAME ?= u-boot ifndef PKG_SOURCE_PROTO @@ -18,6 +20,27 @@ PKG_LICENSE_FILES:=Licenses/README PKG_BUILD_PARALLEL:=1 +ifdef UBOOT_USE_BINMAN + $(eval $(call TestHostCommand,python3-pyelftools, \ + Please install the Python3 elftools module, \ + $(STAGING_DIR_HOST)/bin/python3 -c 'import elftools')) +endif + +ifdef UBOOT_USE_INTREE_DTC + $(eval $(call TestHostCommand,swig, \ + Please install the swig package, \ + swig -version)) + + $(eval $(call TestHostCommand,python3-dev, \ + Please install the python3-dev package, \ + python3.11-config --includes 2>&1 | grep 'python3', \ + python3.10-config --includes 2>&1 | grep 'python3', \ + python3.9-config --includes 2>&1 | grep 'python3', \ + python3.8-config --includes 2>&1 | grep 'python3', \ + python3.7-config --includes 2>&1 | grep 'python3', \ + python3-config --includes 2>&1 | grep -E 'python3\.([7-9]|[0-9][0-9])\.?')) +endif + export GCC_HONOUR_COPTS=s define Package/u-boot/install/default @@ -88,7 +111,9 @@ define Build/Configure/U-Boot +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIGURE_VARS) oldconfig) endef -DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc) +ifndef UBOOT_USE_INTREE_DTC + DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc) +endif define Build/Compile/U-Boot +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \