From patchwork Tue Jul 9 17:39:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spenser Gilliland X-Patchwork-Id: 257846 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 CA71F2C0098 for ; Wed, 10 Jul 2013 03:41:20 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 961538C8CE; Tue, 9 Jul 2013 17:41:14 +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 KRAU6mv16iAJ; Tue, 9 Jul 2013 17:40:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 29E728B087; Tue, 9 Jul 2013 17:40:35 +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 448CD1BFA9F for ; Tue, 9 Jul 2013 17:40:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4A3948B087 for ; Tue, 9 Jul 2013 17:40:33 +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 smbeC8hlihJE for ; Tue, 9 Jul 2013 17:40:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id 55EA58AB46 for ; Tue, 9 Jul 2013 17:40:03 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id up14so7356654obb.0 for ; Tue, 09 Jul 2013 10:40:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=IsPY0AXmUu3D9alAJ5o/JYglxj1PEAcK8B2DI94Wg2U=; b=EX7S0dqXaJZGBK/AgWchXVF1FW6CqXy4oax9l3o0Lted8g/aAGmqL4YfAwS+ePy9RX 1SX7rIdwXHQvxTQ4ood6/Ol8J/ITxq/G/LNAIFyohENeYEM1tVwNy28GqzzKHnmfeylL 36NQFQnvkEhlzMS9F6GlDrj7rd/Mcd5276LHlOK+oWPAcJS+2Ko/iutvkwynRnZnfAbM +L6WRiWt7GDXxuDrnL4BwIHga9Sqz+amcVz1Qwp4FA3ouDzv9A90o8oBqsP2qFYsx7oP XPu4KEI0wWWirg1sjMPGDCV0O5B1h5l1mjj4y7z5p4SxIIod3Meu3G6QUpwFq/tJ1uJu EflA== X-Received: by 10.60.97.34 with SMTP id dx2mr24855222oeb.54.1373391602597; Tue, 09 Jul 2013 10:40:02 -0700 (PDT) Received: from bourban.gateway.2wire.net (108-90-245-135.lightspeed.cicril.sbcglobal.net. [108.90.245.135]) by mx.google.com with ESMTPSA id fk3sm39208885obb.2.2013.07.09.10.40.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 10:40:01 -0700 (PDT) From: Spenser Gilliland To: buildroot@busybox.net Date: Tue, 9 Jul 2013 12:39:54 -0500 Message-Id: <1373391595-19359-1-git-send-email-spenser@gillilanding.com> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQnl8yf29vgsSPIl/6VozLMGfpezDYBCdjKR11Ozr6BXbeBZ+HXxUGoWOyqtnq948+OzXOsA Cc: Thomas Petazzoni , "Yann E. Morin" Subject: [Buildroot] [PATCH v2 1/2] linux: install firmware to staging. 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Install firmware to staging when the hidden option BR2_LINUX_KERNEL_INSTALL_FIRMWARE is selected. This allows parts of the firmware provided by the linux kernel to be installed in the target. Signed-off-by: Spenser Gilliland Cc: Peter Korsgaard Cc: Yann E. Morin Cc: Thomas Petazzoni Acked-by: "Yann E. MORIN" --- v1->v2: - increase comment clarity in Config.in --- linux/Config.in | 7 +++++++ linux/linux.mk | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/linux/Config.in b/linux/Config.in index f58e714..f5c4764 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -297,6 +297,13 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET /boot in the target root filesystem, as is typically done on x86/x86_64 systems. +# This option can be selected by other packages that require special +# firmwares bundled in some forks of the Linux kernel (e.g. the BeagleBone +# Black cape firmwares (.dtbo) as distibuted in the TI Linux Kernel fork.) To +# install firmware from the mainline kernel please use the +# linux-firmware package. +config BR2_LINUX_KERNEL_INSTALL_FIRMWARE + bool # Linux extensions source "linux/Config.ext.in" diff --git a/linux/linux.mk b/linux/linux.mk index befef16..88c954d 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -256,6 +256,15 @@ define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET endef endif +ifeq ($(BR2_LINUX_KERNEL_INSTALL_FIRMWARE),y) + +LINUX_INSTALL_STAGING = YES + +define LINUX_INSTALL_FIRMWARE_TO_STAGING + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) firmware_install \ + INSTALL_FW_PATH=$(STAGING_DIR)/lib/firmware/ +endef +endif define LINUX_INSTALL_HOST_TOOLS # Installing dtc (device tree compiler) as host tool, if selected @@ -269,6 +278,10 @@ define LINUX_INSTALL_IMAGES_CMDS cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) endef +define LINUX_INSTALL_STAGING_CMDS + $(LINUX_INSTALL_FIRMWARE_TO_STAGING) +endef + define LINUX_INSTALL_TARGET_CMDS $(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET) $(LINUX_INSTALL_DTB)