All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] linux: install firmware to staging.
@ 2013-07-09 17:00 Spenser Gilliland
  2013-07-09 17:00 ` [Buildroot] [PATCH 2/2] beagle-capes: new package Spenser Gilliland
  0 siblings, 1 reply; 7+ messages in thread
From: Spenser Gilliland @ 2013-07-09 17:00 UTC (permalink / raw)
  To: buildroot

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 <spenser@gillilanding.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
v1->v2:
  - increase comment clarity in Config.in
---
 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)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 1/2] linux: install firmware to staging.
@ 2013-07-09 17:39 Spenser Gilliland
  2013-07-09 20:03 ` Yann E. MORIN
  2013-07-10  7:11 ` Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Spenser Gilliland @ 2013-07-09 17:39 UTC (permalink / raw)
  To: buildroot

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 <spenser@gillilanding.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
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)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-11  8:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 17:00 [Buildroot] [PATCH v2 1/2] linux: install firmware to staging Spenser Gilliland
2013-07-09 17:00 ` [Buildroot] [PATCH 2/2] beagle-capes: new package Spenser Gilliland
2013-07-09 17:39 [Buildroot] [PATCH v2 1/2] linux: install firmware to staging Spenser Gilliland
2013-07-09 20:03 ` Yann E. MORIN
2013-07-10  7:11 ` Thomas Petazzoni
2013-07-10 17:12   ` Yann E. MORIN
2013-07-11  8:58     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.