From patchwork Thu Feb 13 13:33:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Rehsack X-Patchwork-Id: 1237492 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netbsd.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=hbFDg+60; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48JJ5y4sxmz9s3x for ; Fri, 14 Feb 2020 00:59:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DB84781215; Thu, 13 Feb 2020 14:59:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=netbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hbFDg+60"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3CD3F81234; Thu, 13 Feb 2020 14:34:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7F48B81229 for ; Thu, 13 Feb 2020 14:34:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=netbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rehsack@gmail.com Received: by mail-wr1-x42e.google.com with SMTP id m16so6674772wrx.11 for ; Thu, 13 Feb 2020 05:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=tLsW4/7sjvQWK7/UMJS4WYqQjnF6YgzDtRrxbCFZJN0=; b=hbFDg+60OZhoMuwv8HvSe8Plj24MG1Vy2AbfpS1th83PBSla3Bzntsda3JejXK0a6l AsgzZq93dNTAjY7wR4tW6SCPVk5zuJMZAtV6HLGFn1+ur9CKpnP5cM6p6DWzPIA/zFt/ sl/NSHxlLc4qPT4KXAMy3p/i/5WxgQxUGYfhKS8XHGLLEy9T+XGD9j1iZkydlseZljJ2 pEziwMBsOXZ8cCb9PvF29orMj5AwY3suashz3mMMt9j6oONK2apAWEpk8c5uZq2x9bXJ 3bfn4IwZ03jzmHNJx4LvYeZOE4/qUS39QmLP8GozW9BdEMB5t2R2wGLCPAmoAzoNMj3E 1qqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=tLsW4/7sjvQWK7/UMJS4WYqQjnF6YgzDtRrxbCFZJN0=; b=CM1ZbYkBxiqW/GAwNy4XWEjQ36OwmDe5uotIow4dEP5ukVi1eC3rDdGP/x8WGkaNVE z12CQ6FQx0KNFi+jmXxAGoiWd677b28A37YQmrquAB8uMQanZWoTG/l/q42LbhMwNtR4 qA/9hmfdCajbPzvGbfhWV9JVr8pMtXcCRCFyB11pHNtxNg/72w6ll9YZ8yywNbHr0js/ TNudpyQJmT/wRqpAJmM4Y67C243GyrfjHvMWPnR+zyAq3xXZIGHQaX9DsTTo8goE5HBD qnyDVWqohHlinCxV2gU88pZlVl7iFFSAujJY8s7g9bPEUAB1UfX7O8Imf7gtuEKXED04 NWjA== X-Gm-Message-State: APjAAAUxJ/7QmMB3oZl9fk8zfzpm/CxAFGTpo8hewbgo3F5/M4IDIy2D wKuofWTTrgj8SJHSrU0zXYPAL/NJ X-Google-Smtp-Source: APXvYqzvmyu6Ux+Ncwrm18baV9vQRSJP9PxyQZzQzlGs3B4B1VzaPV5/l9zFwZ0rWrYc8kDKnSKILQ== X-Received: by 2002:a5d:6144:: with SMTP id y4mr21444353wrt.15.1581600855497; Thu, 13 Feb 2020 05:34:15 -0800 (PST) Received: from beaker.muppets.liwing.de (p4FE93807.dip0.t-ipconnect.de. [79.233.56.7]) by smtp.gmail.com with ESMTPSA id z133sm3127317wmb.7.2020.02.13.05.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 05:34:14 -0800 (PST) From: Jens Rehsack To: u-boot@lists.denx.de Cc: Jens Rehsack Subject: [PATCH] {Makefile,config.mk,a/Kconfig}: introduce SUPPLIER Date: Thu, 13 Feb 2020 14:33:53 +0100 Message-Id: <20200213133353.20353-1-sno@netbsd.org> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Thu, 13 Feb 2020 14:59:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.1 at phobos.denx.de X-Virus-Status: Clean From: Jens Rehsack Introduce SUPPLIER analogous to VENDOR to allow (from customer perspective) a VENDOR using it's SUPPLIER's common/ code. This is reasonable, when a VENDOR (from customer perspective) builds several machines sharing some features (e.g. some FPGA which has to be initialized during u-boot) but wants to use common NXP or Samsung code for the BSP instead of copying and create merge overhead. Signed-off-by: Jens Rehsack --- Makefile | 4 +++- arch/Kconfig | 12 ++++++++++++ config.mk | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0af89e0a78..94ef1e5003 100644 --- a/Makefile +++ b/Makefile @@ -427,7 +427,7 @@ UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null) UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION -export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR +export ARCH CPU BOARD VENDOR SUPPLIER SOC CPUDIR BOARDDIR export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC export CPP AR NM LDR STRIP OBJCOPY OBJDUMP export MAKE LEX YACC AWK PERL PYTHON PYTHON2 PYTHON3 @@ -721,9 +721,11 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags) # U-Boot objects....order is important (i.e. start must be first) HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) +HAVE_SUPPLIER_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(SUPPLIER)/common/Makefile),y,n) libs-y += lib/ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ +libs-$(HAVE_SUPPLIER_COMMON_LIB) += board/$(SUPPLIER)/common/ libs-$(CONFIG_OF_EMBED) += dts/ libs-y += fs/ libs-y += net/ diff --git a/arch/Kconfig b/arch/Kconfig index ae9c93ed7b..512ba7c0ac 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -248,6 +248,18 @@ config SYS_SOC This is optional. For those targets without the SoC directory, leave this option empty. +config SYS_SUPPLIER + string + help + This option should contain the supplier name of the target soc. + One could even distinguish between SYS_SUPPLIER and SYS_VENDOR as + SYS_SOC_VENDOR and SYS_BOARD_VENDOR. If it is set and + board//common/Makefile exists, the supplier + common directory is compiled. + + This is optional. For those targets without the vendor directory, + leave this option empty. + config SYS_VENDOR string help diff --git a/config.mk b/config.mk index caf0dd9b81..993d5a2b40 100644 --- a/config.mk +++ b/config.mk @@ -17,8 +17,9 @@ LDFLAGS := LDFLAGS_FINAL := LDFLAGS_STANDALONE := OBJCOPYFLAGS := -# clear VENDOR for tcsh +# clear VENDOR & SUPPLIER for tcsh VENDOR := +SUPPLIER := ######################################################################### ARCH := $(CONFIG_SYS_ARCH:"%"=%) @@ -32,6 +33,9 @@ BOARD := $(CONFIG_SYS_BOARD:"%"=%) ifneq ($(CONFIG_SYS_VENDOR),) VENDOR := $(CONFIG_SYS_VENDOR:"%"=%) endif +ifneq ($(CONFIG_SYS_SUPPLIER),) +SUPPLIER := $(CONFIG_SYS_SUPPLIER:"%"=%) +endif ifneq ($(CONFIG_SYS_SOC),) SOC := $(CONFIG_SYS_SOC:"%"=%) endif