Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linux-firmware: support paths with subdirs in LINUX_FIRMWARE_DIRS
@ 2018-04-15 20:22 Thomas Petazzoni
  2018-04-16  8:34 ` Yann E. MORIN
  2018-04-16 12:52 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-04-15 20:22 UTC (permalink / raw)
  To: buildroot

Following commit cdb7876f63a253254b86637aaac8b255a426b60a
("linux-firmware: add Qualcomm video accelerator and GPU firmware
options"), LINUX_FIRMWARE_DIRS can now contain entries with subdirs,
such as "qcom/venus-1.8". Such entries are currently not supported by
the logic in LINUX_FIRMWARE_INSTALL_DIRS.

Indeed the current logic consists in:

 - Removing the destination directory
 - Copying to the destination directory

Unfortunately, the last step fails if a component of the path leading
to the destination directory does not exist. To overcome this, we
simply add the appropriate mkdir before the copy.

Fixes:

  http://autobuild.buildroot.net/results/54cbca90742faf486e59d95b95a0b0494e47b385/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/linux-firmware/linux-firmware.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
index efe5cdd7dd..11231613e9 100644
--- a/package/linux-firmware/linux-firmware.mk
+++ b/package/linux-firmware/linux-firmware.mk
@@ -499,6 +499,7 @@ ifneq ($(LINUX_FIRMWARE_DIRS),)
 define LINUX_FIRMWARE_INSTALL_DIRS
 	$(foreach d,$(LINUX_FIRMWARE_DIRS), \
 		rm -rf $(TARGET_DIR)/lib/firmware/$(d); \
+		mkdir -p $(dir $(TARGET_DIR)/lib/firmware/$(d)); \
 		cp -a $(@D)/$(d) $(TARGET_DIR)/lib/firmware/$(d)$(sep))
 endef
 endif
-- 
2.14.3

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

* [Buildroot] [PATCH] linux-firmware: support paths with subdirs in LINUX_FIRMWARE_DIRS
  2018-04-15 20:22 [Buildroot] [PATCH] linux-firmware: support paths with subdirs in LINUX_FIRMWARE_DIRS Thomas Petazzoni
@ 2018-04-16  8:34 ` Yann E. MORIN
  2018-04-16 12:52 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2018-04-16  8:34 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2018-04-15 22:22 +0200, Thomas Petazzoni spake thusly:
> Following commit cdb7876f63a253254b86637aaac8b255a426b60a
> ("linux-firmware: add Qualcomm video accelerator and GPU firmware
> options"), LINUX_FIRMWARE_DIRS can now contain entries with subdirs,
> such as "qcom/venus-1.8". Such entries are currently not supported by
> the logic in LINUX_FIRMWARE_INSTALL_DIRS.
> 
> Indeed the current logic consists in:
> 
>  - Removing the destination directory
>  - Copying to the destination directory
> 
> Unfortunately, the last step fails if a component of the path leading
> to the destination directory does not exist. To overcome this, we
> simply add the appropriate mkdir before the copy.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/54cbca90742faf486e59d95b95a0b0494e47b385/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/linux-firmware/linux-firmware.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
> index efe5cdd7dd..11231613e9 100644
> --- a/package/linux-firmware/linux-firmware.mk
> +++ b/package/linux-firmware/linux-firmware.mk
> @@ -499,6 +499,7 @@ ifneq ($(LINUX_FIRMWARE_DIRS),)
>  define LINUX_FIRMWARE_INSTALL_DIRS
>  	$(foreach d,$(LINUX_FIRMWARE_DIRS), \
>  		rm -rf $(TARGET_DIR)/lib/firmware/$(d); \
> +		mkdir -p $(dir $(TARGET_DIR)/lib/firmware/$(d)); \
>  		cp -a $(@D)/$(d) $(TARGET_DIR)/lib/firmware/$(d)$(sep))
>  endef
>  endif
> -- 
> 2.14.3
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] linux-firmware: support paths with subdirs in LINUX_FIRMWARE_DIRS
  2018-04-15 20:22 [Buildroot] [PATCH] linux-firmware: support paths with subdirs in LINUX_FIRMWARE_DIRS Thomas Petazzoni
  2018-04-16  8:34 ` Yann E. MORIN
@ 2018-04-16 12:52 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-04-16 12:52 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 15 Apr 2018 22:22:45 +0200, Thomas Petazzoni wrote:
> Following commit cdb7876f63a253254b86637aaac8b255a426b60a
> ("linux-firmware: add Qualcomm video accelerator and GPU firmware
> options"), LINUX_FIRMWARE_DIRS can now contain entries with subdirs,
> such as "qcom/venus-1.8". Such entries are currently not supported by
> the logic in LINUX_FIRMWARE_INSTALL_DIRS.
> 
> Indeed the current logic consists in:
> 
>  - Removing the destination directory
>  - Copying to the destination directory
> 
> Unfortunately, the last step fails if a component of the path leading
> to the destination directory does not exist. To overcome this, we
> simply add the appropriate mkdir before the copy.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/54cbca90742faf486e59d95b95a0b0494e47b385/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/linux-firmware/linux-firmware.mk | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-04-16 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-15 20:22 [Buildroot] [PATCH] linux-firmware: support paths with subdirs in LINUX_FIRMWARE_DIRS Thomas Petazzoni
2018-04-16  8:34 ` Yann E. MORIN
2018-04-16 12:52 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox