All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/linux-firmware: fix build failure when no firmware item selected
@ 2021-03-09 18:25 Andreas Ziegler
  2021-03-09 20:07 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Ziegler @ 2021-03-09 18:25 UTC (permalink / raw)
  To: buildroot

The latest change in Linux firmware handling breaks the build if no 
specific firmware item is selected below BR2_PACKAGE_LINUX_FIRMWARE.

The firmware archive is only created if at least one firmware 
sub-category is selected; the installation step wants to unpack the 
archive unconditionally.

Use the same condition to control install command definition as in the 
build step.

Signed-off-by: Andreas Ziegler <br015@umbiko.net>

diff --git a/package/linux-firmware/linux-firmware.mk 
b/package/linux-firmware/linux-firmware.mk
index 5e92b0446e..5dfc4a657d 100644
--- a/package/linux-firmware/linux-firmware.mk
+++ b/package/linux-firmware/linux-firmware.mk
@@ -675,6 +675,7 @@ endif
  # sure we canonicalize the pointed-to file, to cover the symlinks of 
the form
  # a/foo -> ../b/foo  where a/ (the directory where to put the symlink) 
does
  # not yet exist.
+ifneq ($(LINUX_FIRMWARE_FILES)$(LINUX_FIRMWARE_DIRS),)
  define LINUX_FIRMWARE_INSTALL_FW
         mkdir -p $(1)
         $(TAR) xf $(@D)/br-firmware.tar -C $(1)
@@ -695,5 +696,6 @@ endef
  define LINUX_FIRMWARE_INSTALL_IMAGES_CMDS
         $(call LINUX_FIRMWARE_INSTALL_FW, $(BINARIES_DIR))
  endef
+endif # LINUX_FIRMWARE_FILES || LINUX_FIRMWARE_DIRS

  $(eval $(generic-package))

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

* [Buildroot] [PATCH 1/1] package/linux-firmware: fix build failure when no firmware item selected
  2021-03-09 18:25 [Buildroot] [PATCH 1/1] package/linux-firmware: fix build failure when no firmware item selected Andreas Ziegler
@ 2021-03-09 20:07 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2021-03-09 20:07 UTC (permalink / raw)
  To: buildroot

Andreas, All,

On 2021-03-09 18:25 +0000, Andreas Ziegler spake thusly:
> The latest change in Linux firmware handling breaks the build if no specific
> firmware item is selected below BR2_PACKAGE_LINUX_FIRMWARE.
> 
> The firmware archive is only created if at least one firmware sub-category
> is selected; the installation step wants to unpack the archive
> unconditionally.
> 
> Use the same condition to control install command definition as in the build
> step.
> 
> Signed-off-by: Andreas Ziegler <br015@umbiko.net>

Not sure why, but your patch ended up completely mangled on Patchwork:
    https://patchwork.ozlabs.org/project/buildroot/patch/539abc1b8ea48daa694b45242cab63d0 at umbiko.net/

Anyway, I fixed it, and moved everything inside a single conditional
block, rather than triplicate the same condition in sequence.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> diff --git a/package/linux-firmware/linux-firmware.mk
> b/package/linux-firmware/linux-firmware.mk
> index 5e92b0446e..5dfc4a657d 100644
> --- a/package/linux-firmware/linux-firmware.mk
> +++ b/package/linux-firmware/linux-firmware.mk
> @@ -675,6 +675,7 @@ endif
>  # sure we canonicalize the pointed-to file, to cover the symlinks of the
> form
>  # a/foo -> ../b/foo  where a/ (the directory where to put the symlink) does
>  # not yet exist.
> +ifneq ($(LINUX_FIRMWARE_FILES)$(LINUX_FIRMWARE_DIRS),)
>  define LINUX_FIRMWARE_INSTALL_FW
>         mkdir -p $(1)
>         $(TAR) xf $(@D)/br-firmware.tar -C $(1)
> @@ -695,5 +696,6 @@ endef
>  define LINUX_FIRMWARE_INSTALL_IMAGES_CMDS
>         $(call LINUX_FIRMWARE_INSTALL_FW, $(BINARIES_DIR))
>  endef
> +endif # LINUX_FIRMWARE_FILES || LINUX_FIRMWARE_DIRS
> 
>  $(eval $(generic-package))
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

end of thread, other threads:[~2021-03-09 20:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 18:25 [Buildroot] [PATCH 1/1] package/linux-firmware: fix build failure when no firmware item selected Andreas Ziegler
2021-03-09 20:07 ` Yann E. MORIN

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.