From patchwork Tue Jan 15 14:15:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1025197 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.b="Mdl3nJ++"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fC8x3Kywz9sD9 for ; Wed, 16 Jan 2019 01:17:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 603DB85633; Tue, 15 Jan 2019 14:17:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nEz8Wjqc48G0; Tue, 15 Jan 2019 14:17:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 400FD85551; Tue, 15 Jan 2019 14:17:31 +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 C3E541BF290 for ; Tue, 15 Jan 2019 14:17:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C112C82097 for ; Tue, 15 Jan 2019 14:17:29 +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 2xLC7M4XbEta for ; Tue, 15 Jan 2019 14:17:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4820882019 for ; Tue, 15 Jan 2019 14:17:28 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id h15so2671488edb.4 for ; Tue, 15 Jan 2019 06:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TPUiZSzncMmAfoDPhgum2/hE7v6CXGVouX0b2KCfbF0=; b=Mdl3nJ++fOomMnxMMhhxtk7lqvDNCZUSTxpBXRgt4m/iLT923KPxS2R/jpYgF8Nfih Za8f4jrsZp9WIanKbVb1wLWNnKVrXj+QmMV6TigMEQnfu4AvdfJTy4J7dOzx3KqJRCRZ 1w3jmp2DT4EnacgakD4wC8G0JsJkCzkSMN+Dg7AQU0s4k2y7sL5JcO6VOEO+O8n2ThSQ +M+XobNV1sUepTBAsNyyJZZNRhVOYC3ynNG4+flNLm2VuWCUnWkFpljXFihldX3xOjST aX5WlfQI0YG0l0TI6pQaIG0bpA+79xHISu4tnbQ8XVK4NXOVy6UkA5eY4AFlgOHpt3LD 5DXQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=TPUiZSzncMmAfoDPhgum2/hE7v6CXGVouX0b2KCfbF0=; b=USIcpvzsqc52zdm0jVXRALlXy5NaR+jFmZqnFACroOtJcJOSIUje80BECUD2vsYbZA 5s4XH1btb+c8LpbiooZ+tO9EAggIc+BZboyL5T6AHjp324Ik7GiCOPwTYGwwUfL7NiZe bdMcdUxjmRBcO4LSmD09ksgpcCMn1/WfxuPh+dpytgN5IPtNIXvevf/yv7vlREiwGvHd Vs3OL8tP74iVs7x1smTNvRBCdOjT0htzGF6CpxogLcVpq5FUngl56h1UESXUr0yrhr9X ykvwaJcSsUmmQ3sBW75c0C/Eq2sftUwJLcfecaeVfvm4OJFMMR8orbYQuIgIzVFgI3Iw jtEA== X-Gm-Message-State: AJcUukcakloeSDxGTe8DdOajvnWCW/TQyYU3wCJcGpyZ2TN4gyBrMrqm cqFvX9fDrlhO1/8hXo/eE/IbMdg4IHxRnw== X-Google-Smtp-Source: ALg8bN6QyUXvsg0aoPClMNWaSDTnJ2R4mvWfXS+7YUBxyaQvM5JaDF3FfZDq+MCp9CV/vbI1NJC7Kw== X-Received: by 2002:a50:a974:: with SMTP id m49mr3718301edc.220.1547561846425; Tue, 15 Jan 2019 06:17:26 -0800 (PST) Received: from localhost.localdomain ([212.76.254.67]) by smtp.gmail.com with ESMTPSA id d15sm4810000edv.20.2019.01.15.06.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 06:17:25 -0800 (PST) From: Titouan Christophe To: buildroot@buildroot.org Date: Tue, 15 Jan 2019 15:15:48 +0100 Message-Id: <20190115141548.8434-1-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190111114426.9888-1-titouan.christophe@railnova.eu> References: <20190111114426.9888-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [v3] linux: add option to enable support for Device Tree overlays 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: Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add an option to compile device trees in Linux with symbol generation such that device tree overlays can be loaded on the target system Signed-off-by: Titouan Christophe --- Changes v1->v2: * Make the option more specific about DT Overlays (rather than simply describing DT symbols generation) * Remove indentation in linux.mk to fit code style Changes V2->v3: * Fix formatting of the Config.in help section to fit code style --- linux/Config.in | 9 +++++++++ linux/linux.mk | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/linux/Config.in b/linux/Config.in index 8aeb4bdec3..19389fd0e3 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -394,6 +394,15 @@ 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_DTB_OVERLAY_SUPPORT + bool "Build Device Tree with overlay support" + default n + help + If enabled, pass the "-@" option to dtc, such that + symbols are generated in the compiled Device Tree. + Choose this option to support Device Tree overlays + on the target system. + endif config BR2_LINUX_KERNEL_INSTALL_TARGET diff --git a/linux/linux.mk b/linux/linux.mk index 6bf2b88038..950698f336 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -381,6 +381,10 @@ ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) # reproducibility, we use our owns rather than the host ones. LINUX_DEPENDENCIES += host-bison host-flex +ifeq ($(BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT),y) +LINUX_MAKE_ENV += DTC_FLAGS=-@ +endif + ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),) define LINUX_BUILD_DTB $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_DTBS)