From patchwork Tue Sep 24 11:20:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1166503 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WO/LtQVJ"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46czJ63VVNz9sP3 for ; Tue, 24 Sep 2019 21:20:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 16C2A863E8; Tue, 24 Sep 2019 11:20:18 +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 TK6UF53niYqt; Tue, 24 Sep 2019 11:20:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1106D84EA0; Tue, 24 Sep 2019 11:20:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5F4681BF31B for ; Tue, 24 Sep 2019 11:20:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5C499207A1 for ; Tue, 24 Sep 2019 11:20:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jh3pt3evpXGz for ; Tue, 24 Sep 2019 11:20:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by silver.osuosl.org (Postfix) with ESMTPS id 3D4602049B for ; Tue, 24 Sep 2019 11:20:14 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id n14so1453312ljj.10 for ; Tue, 24 Sep 2019 04:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=XF27FfPKEfRZ5ck99d82WVABhgwkblI94GyVzSpnfNs=; b=WO/LtQVJlttUMe9YjBkrWRQLldCUzIhRlw0RdHSL++3mDdbLAEzQf3eqvc/JyKybpb ps+oDKW2hVrrKkZ44Zf/iBkGceC87YaS6Cm570rA+FyS+unVjiVfIb9vxB88mEtd3AFH mYoUM195AHUt/VhwLM5hfM410cMiWiFIMj3jzGN78MroY5ngFUh5II1PwHHmbMaCFHeo 46JZy3VdfIF7Rf8rZg3RYg5Vp3h923kOMV1vsyntRkrKATH7dyLT/dBgAGrBtO1P3GZN 3PfmwkVlGg9T++3CN2/+FlXCdI3atj9pIYeLUAlvPG6PC8gcCz2uLoIR5VydL0izotDt vRGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XF27FfPKEfRZ5ck99d82WVABhgwkblI94GyVzSpnfNs=; b=GotJUNPm9+K1mbMdIMP354ch81OIk7JYHA6Hfd6hDOPl8kH5R35e5d/kIZMDs9gp/E fWA4yA/VkLbA77kTkeAjLthuil1cMDTt9sBHTx+xOqvGKVf+qpdRb1yjQtdQ6GPpqrm5 YfbI6/Qob5R6Yy9xN1iIfZ4lrKeu4fFZEL76Z71iRD2/HE76UiGTbVaLGfyg+A4b57f2 gmFinI7vmmNaH4WZFZNMGKzp58U3ezCm8AB9x5uheMG8bnwaKftt9AQtKbGfkSam1T2R 8R7N60Fbr7SzW7hh66A/noM/Sldp+EiYhb5xkrtf9zauTdHPQTTsf9P39jlAguq2UR+R 8nwQ== X-Gm-Message-State: APjAAAUz9nTgraqdt+80H67cuAKyQzTdmP6WduYIqeuQ3yhx7saM299E tBw3BIMiMejS9VXk4jRfSBFFJut7 X-Google-Smtp-Source: APXvYqzfnc/oSFUgSuNspx0GYlCFle6THo91SAoRDo4uFy/kySqJzILFCc8fZjYAhGyv9u6w2hpGig== X-Received: by 2002:a2e:924d:: with SMTP id v13mr1582013ljg.226.1569324012085; Tue, 24 Sep 2019 04:20:12 -0700 (PDT) Received: from pc60716vkochan.x.ow.s ([217.20.186.93]) by smtp.gmail.com with ESMTPSA id i6sm390624lfo.83.2019.09.24.04.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2019 04:20:11 -0700 (PDT) From: Vadim Kochan To: buildroot@buildroot.org Date: Tue, 24 Sep 2019 14:20:06 +0300 Message-Id: <20190924112006.22823-1-vadim4j@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/1] linux: add config option to install custom dts in in-tree subdir X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" It allows to install custom dts in specified in-tree subdir relative to arch/{ARCH}/boot/dts. It might be helpful in case custom dts file uses includes located in vendor's dts folder. Signed-off-by: Vadim Kochan --- linux/Config.in | 8 ++++++++ linux/linux.mk | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/linux/Config.in b/linux/Config.in index 0e3cabf107..f48efbc3fb 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -400,6 +400,14 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH You can provide a list of dts paths to copy and build, separated by spaces. +config BR2_LINUX_KERNEL_CUSTOM_DTS_INTREE_SUBDIR + string "Out-of-tree Device Tree Source file in-tree install path" + help + Relative path to arch/${ARCH}/boot/dts where install + out-of-tree device tree source files. Some custom Device Tree + source file might need to be located in vendor's subfolder + (arch/arm64/boot/dts/xxx) to include its *.dtsi files. + config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT bool "Build Device Tree with overlay support" help diff --git a/linux/linux.mk b/linux/linux.mk index 95bde1aba5..cfbfb7c0b4 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -158,11 +158,16 @@ LINUX_VERSION_PROBED = `$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-d LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) +CUSTOM_DTS_INTREE_SUBDIR = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_INTREE_SUBDIR)) +CUSTOM_DTS_INTREE_SUBDIR_PATH = $(if $(CUSTOM_DTS_INTREE_SUBDIR),$(CUSTOM_DTS_INTREE_SUBDIR)/) + # We keep only the .dts files, so that the user can specify both .dts # and .dtsi files in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH. Both will be # copied to arch//boot/dts, but only the .dts files will # actually be generated as .dtb. -LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))))) +LINUX_CUSTOM_DTS_NAME = $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))))) + +LINUX_DTS_NAME += $(addprefix $(CUSTOM_DTS_INTREE_SUBDIR_PATH),$(LINUX_CUSTOM_DTS_NAME)) LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) @@ -451,7 +456,7 @@ endif # issues. define LINUX_BUILD_CMDS $(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \ - cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/ + cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/$(CUSTOM_DTS_INTREE_SUBDIR_PATH) ) $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) all $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)