From patchwork Fri Aug 3 16:27:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Floris Bos X-Patchwork-Id: 953307 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=je-eigen-domein.nl Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41ht2Y0FdLz9ryn for ; Sat, 4 Aug 2018 02:35:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5D9C68844C; Fri, 3 Aug 2018 16:35:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZpiC0xZDOGRF; Fri, 3 Aug 2018 16:35:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A772A8805A; Fri, 3 Aug 2018 16:35:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 8200D1BFF07 for ; Fri, 3 Aug 2018 16:35:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7F8D788B4B for ; Fri, 3 Aug 2018 16:35:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Un0c81CaPiqZ for ; Fri, 3 Aug 2018 16:35:42 +0000 (UTC) X-Greylist: delayed 00:07:43 by SQLgrey-1.7.6 Received: from mx2.je-eigen-domein.nl (mx2.je-eigen-domein.nl [85.10.196.86]) by hemlock.osuosl.org (Postfix) with ESMTP id 1B0B988B49 for ; Fri, 3 Aug 2018 16:35:42 +0000 (UTC) Received: from lynx.to-the-max.net (localhost.localdomain [127.0.0.1]) by mx2.je-eigen-domein.nl (Postfix) with ESMTP id 610FA1C401E1; Fri, 3 Aug 2018 18:27:57 +0200 (CEST) From: Floris Bos To: buildroot@buildroot.org Date: Fri, 3 Aug 2018 18:27:54 +0200 Message-Id: <1533313674-722-1-git-send-email-bos@je-eigen-domein.nl> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/1] linux: build default dtbs if no specific source files given X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently if one wants to build dtbs, one has to specify which dts source files to build exactly. This is inconvenient, and some platforms use non-standard file names that are currently not supported by buildroot. (e.g. the overlay files in downstream Raspberry Pi kernel) Fix this by allowing the DTS source to be left empty, in which case the standard list of dtbs for the kernel configuration will be build ("make dtbs") and installed ("make dtbs_install") Only corner case in which specifying file names is still required is when appending dtb to kernel. Signed-off-by: Floris Bos --- linux/Config.in | 4 ++++ linux/linux.mk | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/linux/Config.in b/linux/Config.in index d30489e..40d337d 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -377,6 +377,10 @@ config BR2_LINUX_KERNEL_INTREE_DTS_NAME the trailing .dts. You can provide a list of dts files to build, separated by spaces. + If both this option and out-of-tree path is left empty + the default set of dtbs for the kernel configuration + is build. + config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH string "Out-of-tree Device Tree Source file paths" help diff --git a/linux/linux.mk b/linux/linux.mk index 7527b11..a00029f 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -341,6 +341,15 @@ endef ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),) +ifeq ($(strip $(LINUX_DTS_NAME)),) +define LINUX_BUILD_DTB + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) dtbs +endef +define LINUX_INSTALL_DTB + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) \ + INSTALL_DTBS_PATH=$(1) dtbs_install +endef +else # LINUX_DTS_NAME define LINUX_BUILD_DTB $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_DTBS) endef @@ -353,6 +362,7 @@ define LINUX_INSTALL_DTB $(1) endef endif # BR2_LINUX_KERNEL_APPENDED_DTB +endif # LINUX_DTS_NAME endif # BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT endif # BR2_LINUX_KERNEL_DTS_SUPPORT @@ -501,8 +511,8 @@ $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUST endif endif -ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT):$(strip $(LINUX_DTS_NAME)),y:) -$(error No kernel device tree source specified, check your \ +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB):$(strip $(LINUX_DTS_NAME)),y:) +$(error If appending dtb to kernel, device tree source needs to be specified, check your \ BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings) endif