From patchwork Sun Jul 7 23:31:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spenser Gilliland X-Patchwork-Id: 257443 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 612722C00A1 for ; Mon, 8 Jul 2013 09:31:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 98C56A0178; Sun, 7 Jul 2013 23:31:17 +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 iBqpp29iIE5f; Sun, 7 Jul 2013 23:31:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BA48BA0168; Sun, 7 Jul 2013 23:31:15 +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 2965B8F753 for ; Sun, 7 Jul 2013 23:31:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9EAFB895CB for ; Sun, 7 Jul 2013 23:31: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 dJHKhNbQyuak for ; Sun, 7 Jul 2013 23:31:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 70D668966F for ; Sun, 7 Jul 2013 23:31:13 +0000 (UTC) Received: by mail-ob0-f171.google.com with SMTP id dn14so4849280obc.16 for ; Sun, 07 Jul 2013 16:31:12 -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=fbwUkZwLnAIiX5Tu2c+qt8a5nbp0q2YHQJF9DsC88H0=; b=JMSxNXiVCKT6GgcSgVykrLRd4/qc45IcbNBrHGW7bSZLCV2rnUuH2l16k0l+xmgLwI Z7QE3zXK+PVuE1b+FK+AlezKHoG9D+N0H6Ns2p3omvTR5+FwQyskqcL/dk9myeDISE54 +fiUr5fno4JHim18IPhQQKlrVWiqQFrXiom161Ypwcn9wj2NarYPx+YzGGkee9Fh/4vl cik8Y5jR/lHmPVvSXIv5EylQO6bBh6nf6kVP002eUJxdLfLBTrD5mohwxuc14mIIrUuK NegKakRVb4X+pBdUfHY0htTu79KlSvVXvhA1kti724sEhvunYDEQp1TtY3sSba8lI1ZO Qqng== X-Received: by 10.182.144.231 with SMTP id sp7mr18714653obb.14.1373239871986; Sun, 07 Jul 2013 16:31:11 -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 b7sm29820822oby.5.2013.07.07.16.31.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 16:31:11 -0700 (PDT) From: Spenser Gilliland To: buildroot@busybox.net Date: Sun, 7 Jul 2013 18:31:05 -0500 Message-Id: <1373239866-18076-1-git-send-email-spenser@gillilanding.com> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQnhe69+ggm+nTeqyTldLGrwaIaTZPvJAQoJjoD55TSMjHn5dPaEB1Apw2iGmJSIaMResSkL Subject: [Buildroot] [PATCH 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 --- linux/Config.in | 5 +++++ linux/linux.mk | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/linux/Config.in b/linux/Config.in index f58e714..b733019 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -297,6 +297,11 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET /boot in the target root filesystem, as is typically done on x86/x86_64 systems. +# This option is used to install firmware to staging. Other packages such as +# beagle-capes then install the firmware into the target. This avoids +# installing all linux firmware. +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)