Received: by 10.192.165.148 with SMTP id m20csp1234321imm; Wed, 25 Apr 2018 15:03:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpMviPfN5UZnhqGkq7hRwGVQbyeGNth1QWCW9KLIf54fCT/1HGBb4ROeiIJwnGWcddS3Z7u X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr8444478pli.335.1524693820170; Wed, 25 Apr 2018 15:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524693820; cv=none; d=google.com; s=arc-20160816; b=rmeCI4w0N4rfPrqWCTaEYTw+ybOALBo63X5xl/3LDkktpvqhZ+SHmuz7zyenaT6NDl V1+uHPFx9yIJs1deZFis+mySpqCw8MWZXSAaYUrmezsA/iN/d/baMLlp9ulXEjkEwp8H DacCqETGf6NDpAmx2CiyZU7/SoUGc4pyLU5akB58i4l0fLHOroTKEZPs44kZ99AqGl9D BNNKtUmOngsE9SqVJ0ZeOsHqapBISoz8pgsL4moa3A4vCrRAXMP6APq5+cwdN+f1XaQk exXFqok43kiWsfXb+V4X1xb58rlEihsPX2IBrA+Dxb0YdX7GT92Xrx/hc6K766FoHiRz orVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YYsFPWH7DyPhR0ENGqO4fghWFAdtJM2KqcTmISFj85Y=; b=IGYO2MVy+BmpTjbHidEtbaUG7W12edXmZ2CRvnuJNKiIUC/CRBSEta8j2myBP47MsC Q/jz4py3wQ5o+hbdIeoTKrsnn3tvZ3V/Iq3xnKQUagPCY1fH3yn7lWE/So09fJ/nzkq4 Z0MJq88GSamUSkOn7dzMzG5HuP9kz5qlDaltScxS9SJMIqV0iGxYoJfFSsG3ICqz+3/9 1mCHMplkI7/2VZw/jb/vJkustHvCb0x7BG5kjax5txTJ8A8YdXB1zI3WJXAaIVSBmM7V P2RhtNcWhZF6h0hz5kH6GHXSfklwG4UopoRGxMbf3HrhGP4TPRT9HjOuy0tIrNGu6F2P a5dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b38-v6si15279530plb.541.2018.04.25.15.03.25; Wed, 25 Apr 2018 15:03:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753549AbeDYWCB (ORCPT + 99 others); Wed, 25 Apr 2018 18:02:01 -0400 Received: from mail.bootlin.com ([62.4.15.54]:51044 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbeDYWCA (ORCPT ); Wed, 25 Apr 2018 18:02:00 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 1891D207C0; Thu, 26 Apr 2018 00:01:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [88.191.26.124]) by mail.bootlin.com (Postfix) with ESMTPSA id DDB6B2036F; Thu, 26 Apr 2018 00:01:48 +0200 (CEST) Date: Thu, 26 Apr 2018 00:01:49 +0200 From: Alexandre Belloni To: James Hogan , Ralf Baechle Cc: Allan Nielsen , Thomas Petazzoni , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mips: generic: allow not building DTB in Message-ID: <20180425220149.GI4813@piout.net> References: <20180425211607.2645-1-alexandre.belloni@bootlin.com> <20180425211607.2645-2-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180425211607.2645-2-alexandre.belloni@bootlin.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 25/04/2018 23:16:07+0200, Alexandre Belloni wrote: > Allow not building any DTB in the generic kernel so it gets smaller. This > is necessary for ocelot because it can be built as a legacy platform that > needs a built-in DTB and it can also handle a separate DTB once it is > updated with a more modern bootloader. In the latter case, it is preferable > to not include any DTB in the kernel image so it is smaller. > > Signed-off-by: Alexandre Belloni > --- > arch/mips/Kconfig | 1 - > arch/mips/Makefile | 2 +- > arch/mips/boot/dts/mscc/Makefile | 2 +- > arch/mips/generic/Kconfig | 1 + > arch/mips/generic/vmlinux.its.S | 2 ++ > 5 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index 225c95da23ce..61057761d096 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -81,7 +81,6 @@ choice > config MIPS_GENERIC > bool "Generic board-agnostic MIPS kernel" > select BOOT_RAW > - select BUILTIN_DTB > select CEVT_R4K > select CLKSRC_MIPS_GIC > select COMMON_CLK > diff --git a/arch/mips/Makefile b/arch/mips/Makefile > index 5e9fce076ab6..3d3554c13710 100644 > --- a/arch/mips/Makefile > +++ b/arch/mips/Makefile > @@ -404,7 +404,7 @@ endif > CLEAN_FILES += vmlinux.32 vmlinux.64 > > # device-trees > -core-$(CONFIG_BUILTIN_DTB) += arch/mips/boot/dts/ > +core-y += arch/mips/boot/dts/ > > %.dtb %.dtb.S %.dtb.o: | scripts > $(Q)$(MAKE) $(build)=arch/mips/boot/dts arch/mips/boot/dts/$@ > diff --git a/arch/mips/boot/dts/mscc/Makefile b/arch/mips/boot/dts/mscc/Makefile > index 8982b19504a3..437ec65ec14a 100644 > --- a/arch/mips/boot/dts/mscc/Makefile > +++ b/arch/mips/boot/dts/mscc/Makefile > @@ -1,3 +1,3 @@ > dtb-$(CONFIG_MSCC_OCELOT) += ocelot_pcb123.dtb > > -obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) > +obj-($CONFIG_BUILTIN_DTB) += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) I made a typo here, I'll resend after waiting for a few comments. > diff --git a/arch/mips/generic/Kconfig b/arch/mips/generic/Kconfig > index 6564f18b2012..012f283f99c4 100644 > --- a/arch/mips/generic/Kconfig > +++ b/arch/mips/generic/Kconfig > @@ -3,6 +3,7 @@ if MIPS_GENERIC > > config LEGACY_BOARDS > bool > + select BUILTIN_DTB > help > Select this from your board if the board must use a legacy, non-UHI, > boot protocol. This will cause the kernel to scan through the list of > diff --git a/arch/mips/generic/vmlinux.its.S b/arch/mips/generic/vmlinux.its.S > index 1a08438fd893..9c954f2ae561 100644 > --- a/arch/mips/generic/vmlinux.its.S > +++ b/arch/mips/generic/vmlinux.its.S > @@ -21,6 +21,7 @@ > }; > }; > > +#if IS_ENABLED(CONFIG_BUILTIN_DTB) > configurations { > default = "conf@default"; > > @@ -29,4 +30,5 @@ > kernel = "kernel@0"; > }; > }; > +#endif > }; > -- > 2.17.0 > -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com