From patchwork Thu Jan 1 20:23:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 424911 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 777061400F1 for ; Fri, 2 Jan 2015 07:24:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B11D832C22; Thu, 1 Jan 2015 20:24:21 +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 X07a0FOsDyzt; Thu, 1 Jan 2015 20:24:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 82D7132C20; Thu, 1 Jan 2015 20:24:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EAEBB1C296C for ; Thu, 1 Jan 2015 20:24:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E7FD48AE7A for ; Thu, 1 Jan 2015 20:24:03 +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 lkU4ba-6pulH for ; Thu, 1 Jan 2015 20:24:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by hemlock.osuosl.org (Postfix) with ESMTPS id 33C5A8AE6E for ; Thu, 1 Jan 2015 20:24:03 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id x12so23123592wgg.24 for ; Thu, 01 Jan 2015 12:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=yRGXO9ck5wlZCtNMvI7HRPCYmBsmI+jNPb4PO9ns5cQ=; b=D3sefQdadGotAk0GNJGsYly2x6G/ZF2yCX/ASL5aqYL3uVUzQuz1O7E+XbdFRG9khZ bcAQF08CA5UgPL8rHtmpjTdqr55qfZlamdO8cdRj0HF+sRBo8BHZG5Ew9umnz8ryePtf xPxwDRGIOuWdVKWFfDfRjdaPuDZkN06qSl94IUtrt/3WQrCGo6GAN0t17PaxD8K0UWkh sjnkNyMVOeQq6efM4NmTEsv3HqEP0YNLyeb9WdpJexxzC+7HiLxH+Zot4jeW7nvU1Tx7 c0B9ZXAeJeBZlgZxLkf6wvJoFy4QZQXefiNX+A2i4bysBhdSDrW046WarhCV8ga+R60f sgAQ== X-Received: by 10.180.85.4 with SMTP id d4mr126199962wiz.36.1420143841912; Thu, 01 Jan 2015 12:24:01 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id b10sm15806815wjr.32.2015.01.01.12.24.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jan 2015 12:24:01 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Thu, 1 Jan 2015 21:23:52 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 6/7] package/rpi-firmware: install DTB blobs X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" If we compile a DT-aware kernel, or the user wants them, install the DTB blobs: - standard DTBs for standalon A/B and A+/B+ models; - overlay DTBs for the 'hats' addon boards. The only configurations allowed are: - no kernel enabled : prompt the user - kernel enabled without DT support : hide the prompt - kernel enabled with DT support : show the prompt, force the option Install the DTBs as per the traditional layout expected by all RPi users, that is: - base DTBs alongside the other boot files; - overlay DTBs in a sub-directory. Signed-off-by: "Yann E. MORIN" --- package/rpi-firmware/Config.in | 11 +++++++++++ package/rpi-firmware/rpi-firmware.mk | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in index cd45be4..b708579 100644 --- a/package/rpi-firmware/Config.in +++ b/package/rpi-firmware/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_RPI_FIRMWARE bool "rpi-firmware" depends on BR2_arm + select BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DBS if BR2_LINUX_KERNEL_DTS_SUPPORT help RaspberryPi Firmware Pre-compiled binaries of the current bootloader and GPU firmware @@ -45,4 +46,14 @@ config BR2_PACKAGE_RPI_FIRMWARE_BOOT default "_x" if BR2_PACKAGE_RPI_FIRMWARE_X default "_cd" if BR2_PACKAGE_RPI_FIRMWARE_CD +config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DBS + bool "Install DTB blobs" + depends on !BR2_LINUX_KERNEL || BR2_LINUX_KERNEL_DTS_SUPPORT + help + Say 'y' here if you want to boot your kernel that has support + for the device tree. + + If Buildroot will also build a kernel, this is automatically + selected. + endif # BR2_PACKAGE_RPI_FIRMWARE diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk index eb835ee..dedfbc5 100644 --- a/package/rpi-firmware/rpi-firmware.mk +++ b/package/rpi-firmware/rpi-firmware.mk @@ -11,6 +11,19 @@ RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom RPI_FIRMWARE_INSTALL_TARGET = NO RPI_FIRMWARE_INSTALL_IMAGES = YES +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DBS),y) +RPI_FIRMWARE_DEPENDENCIES += host-rpi-firmware +# Override the version in this case. +RPI_FIRMWARE_VERSION = 09627457b9e15bf4ea4e6751d3c173a3fb65df07 +define RPI_FIRMWARE_INSTALL_DTB + $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb + $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb + for ovldtb in $(@D)/boot/overlays/*.dtb; do \ + $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ + done +endef +endif + define RPI_FIRMWARE_INSTALL_IMAGES_CMDS $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf