From patchwork Mon Dec 3 21:43:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Coulbourne X-Patchwork-Id: 203451 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id E83B32C00A3 for ; Tue, 4 Dec 2012 09:14:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0530D80C01; Mon, 3 Dec 2012 22:14:00 +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 rPABB6084GPM; Mon, 3 Dec 2012 22:13:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D06B87828; Mon, 3 Dec 2012 22:13:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3CF2B8F74A for ; Mon, 3 Dec 2012 22:13:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D4F484564 for ; Mon, 3 Dec 2012 22:13:42 +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 IcIqCCAhlsZ2 for ; Mon, 3 Dec 2012 22:13:39 +0000 (UTC) X-Greylist: delayed 00:30:29 by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3DFC187828 for ; Mon, 3 Dec 2012 22:13:39 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id u3so1598631wey.16 for ; Mon, 03 Dec 2012 14:13:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=5Kk+Fw8cTlsmZJyiLE0BR4GGWQrMaCGuNz8cS1CGsfs=; b=eMmrtbKBvoKLyVhj/SxsCKFZYH/L+qZQ3ICooksRuM/d29icpC06wVw1rapKS9cMNs PnIh+VCpac8eSMjE8fRmIi/GYiaDw/rb9FD1IKQbOb8NOS47c7kgTCAzjlaR/xJuYi9g QxG+rgZQQSqb9Oo62/0BhuG7x4C5W+SiDdpiDXwAr3y24xl3wxRe61e5wJt0/xBD4yKy RrsQbIPP+Aj7yhLTTHSozbtFrO5Z0fClz8xexMIw1VKtqjKhElhHiej0KULxhQ6xsEbe G5jGKouHZjFOTfbbWGtDnZ32CirbpVxKyrZ/nBRgiTvOB1adKUSaH8q1Z3RXHOBh683c LI4Q== MIME-Version: 1.0 Received: by 10.180.33.202 with SMTP id t10mr837583wii.3.1354570988600; Mon, 03 Dec 2012 13:43:08 -0800 (PST) Received: by 10.216.29.21 with HTTP; Mon, 3 Dec 2012 13:43:08 -0800 (PST) X-Originating-IP: [98.114.31.106] Date: Mon, 3 Dec 2012 16:43:08 -0500 Message-ID: From: Gary Coulbourne To: buildroot@busybox.net X-Gm-Message-State: ALoCoQmxi2iOSvZH0PF6zVEvZ24YnHWyfeAhctNUklo3Vq4bE6etAHrtqinvUqXqKfBZAAFDRsfl Subject: [Buildroot] [PATCH] Add support for dtb file in /boot directory on target X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Howdy! I'm using u-boot, and loading both the kernel image and the dtb from /boot on my target. I added support for this, and am submitting the patch should it be useful to anyone else. --- linux/Config.in | 6 ++++++ linux/linux.mk | 7 +++++++ 2 files changed, 13 insertions(+) define LINUX_BUILD_CMDS @@ -244,6 +250,7 @@ endef define LINUX_INSTALL_TARGET_CMDS $(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET) $(LINUX_INSTALL_DTB) + $(LINUX_DEVICE_TREE_INSTALL_TARGET) # Install modules and remove symbolic links pointing to build # directories, not relevant on the target @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ diff --git a/linux/Config.in b/linux/Config.in index f408ad5..d5ffa57 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -283,6 +283,12 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET /boot in the target root filesystem, as is typically done on x86/x86_64 systems. +config BR2_LINUX_DEVICE_TREE_INSTALL_TARGET + bool "Install Device Tree to /boot in target" + depends on BR2_LINUX_KERNEL_DTS_SUPPORT + help + Select this option to have the device tree installed to + /boot in the target root filesystem. # Linux extensions source "linux/Config.ext.in" diff --git a/linux/linux.mk b/linux/linux.mk index c4bdf90..8778c35 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -208,6 +208,12 @@ define LINUX_APPEND_DTB endef endif +ifeq ($(BR2_LINUX_DEVICE_TREE_INSTALL_TARGET),y) +define LINUX_DEVICE_TREE_INSTALL_TARGET + install -m 0644 -D $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(TARGET_DIR)/boot/$(KERNEL_DTS_NAME).dtb +endef +endif + # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed.