public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* kernel build issue whith "make tar-pkg" with INSTALL_FW_PATH [patch included]
@ 2011-05-24 20:29 Maximilian Pasternak
  2011-05-25 12:30 ` Michal Marek
  0 siblings, 1 reply; 3+ messages in thread
From: Maximilian Pasternak @ 2011-05-24 20:29 UTC (permalink / raw)
  To: linux-kbuild

Hello,

i sent this some time ago to "linux-kernel" but did not get an answer
so i try it again - hopefully this is the right list.

I found "make tar-pkg" with set INSTALL_FW_PATH does not work like expected.

Initial situation:
------------------
building a kernel package with
| make tar-pkg INSTALL_FW_PATH=/somewhere


Expected result:
----------------
* tar-archive including the firmware in folder /somehere


Result:
-------
* tar-archive without firmware
* firmware on hd in folder /somewhere


Reason:
-------
Makefile:
| # Firmware install
| INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
| export INSTALL FW PATH
 ...
| firmware_install: FORCE
| @mkdir -p $(objtree)/firmware
| $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware
__fw_install

Here INSTALL_MOD_PATH is not considered but is needed for packageing.


Potential fix:
--------------

--- BEGIN PATCH -------------------------------------------------------
diff -ur linux-2.6.38_orig/Makefile linux-2.6.38/Makefile
--- linux-2.6.38_orig/Makefile 2011-03-13 18:24:19.000000000 +0200
+++ linux-2.6.38/Makefile 2011-03-13 18:31:05.000000000 +0200
@@ -1028,8 +1028,9 @@

#
---------------------------------------------------------------------------
# Firmware install
-INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
-export INSTALL_FW_PATH
+INSTALL_FW_PATH=/lib/firmware
+INSTALL_FW_TO_PATH=$(INSTALL_MOD_PATH)$(INSTALL_FW_PATH)
+export INSTALL_FW_TO_PATH

PHONY += firmware_install
firmware_install: FORCE
diff -ur linux-2.6.38_orig/scripts/Makefile.fwinst
linux-2.6.38/scripts/Makefile.fwinst
--- linux-2.6.38_orig/scripts/Makefile.fwinst 2011-03-13
18:25:47.000000000 +0200
+++ linux-2.6.38/scripts/Makefile.fwinst 2011-03-13
18:29:38.000000000 +0200
@@ -24,14 +24,14 @@
mod-fw += $(fw-shipped-y)
endif

-installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
+installed-mod-fw := $(addprefix $(INSTALL_FW_TO_PATH)/,$(mod-fw))

-installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
-installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
+installed-fw := $(addprefix $(INSTALL_FW_TO_PATH)/,$(fw-shipped-all))
+installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_TO_PATH)/.

# Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
-PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
-$(INSTALL_FW_PATH)/$$(%): install-all-dirs
+PHONY += $(INSTALL_FW_TO_PATH)/$$(%) install-all-dirs
+$(INSTALL_FW_TO_PATH)/$$(%): install-all-dirs
@true
install-all-dirs: $(installed-fw-dirs)
@true
@@ -42,7 +42,7 @@
$(installed-fw-dirs):
$(call cmd,mkdir)

-$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% |
$(INSTALL_FW_PATH)/$$(dir %)
+$(installed-fw): $(INSTALL_FW_TO_PATH)/%: $(obj)/% |
$(INSTALL_FW_TO_PATH)/$$(dir %)
$(call cmd,install)

PHONY += __fw_install __fw_modinst FORCE
--- END PATCH ---------------------------------------------------------


Thank you

Maximilian





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

* Re: kernel build issue whith "make tar-pkg" with INSTALL_FW_PATH [patch included]
  2011-05-24 20:29 kernel build issue whith "make tar-pkg" with INSTALL_FW_PATH [patch included] Maximilian Pasternak
@ 2011-05-25 12:30 ` Michal Marek
  2011-05-25 12:33   ` Michal Marek
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Marek @ 2011-05-25 12:30 UTC (permalink / raw)
  To: Maximilian Pasternak; +Cc: linux-kbuild

On 24.5.2011 22:29, Maximilian Pasternak wrote:
> building a kernel package with
> | make tar-pkg INSTALL_FW_PATH=/somewhere
>
>
> Expected result:
> ----------------
> * tar-archive including the firmware in folder /somehere

I don't think that this should be supported, the firmware needs to be 
installed below /lib/firmware, which is where udev expects it.


> Makefile:
> | # Firmware install
> | INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
                       ^^^^^^^^^^^^^^^^
> | export INSTALL FW PATH
>   ...
> | firmware_install: FORCE
> | @mkdir -p $(objtree)/firmware
> | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware
> __fw_install
>
> Here INSTALL_MOD_PATH is not considered but is needed for packageing.

Why do you think that INSTALL_MOD_PATH is not considered?


> Potential fix:
> --------------
>
> --- BEGIN PATCH -------------------------------------------------------
> diff -ur linux-2.6.38_orig/Makefile linux-2.6.38/Makefile
> --- linux-2.6.38_orig/Makefile 2011-03-13 18:24:19.000000000 +0200
> +++ linux-2.6.38/Makefile 2011-03-13 18:31:05.000000000 +0200
> @@ -1028,8 +1028,9 @@
>
> #
> ---------------------------------------------------------------------------
> # Firmware install
> -INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
> -export INSTALL_FW_PATH
> +INSTALL_FW_PATH=/lib/firmware
> +INSTALL_FW_TO_PATH=$(INSTALL_MOD_PATH)$(INSTALL_FW_PATH)
> +export INSTALL_FW_TO_PATH

You're changing the semantics of INSTALL_FW_PATH, breaking it for people 
who might have been using it. BTW, the patch is corrupt, spaces before 
context lines are missing and long lines are broken.

Michal

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

* Re: kernel build issue whith "make tar-pkg" with INSTALL_FW_PATH [patch included]
  2011-05-25 12:30 ` Michal Marek
@ 2011-05-25 12:33   ` Michal Marek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Marek @ 2011-05-25 12:33 UTC (permalink / raw)
  To: Maximilian Pasternak; +Cc: linux-kbuild

On 25.5.2011 14:30, Michal Marek wrote:
> On 24.5.2011 22:29, Maximilian Pasternak wrote:
>> building a kernel package with
>> | make tar-pkg INSTALL_FW_PATH=/somewhere
>>
>>
>> Expected result:
>> ----------------
>> * tar-archive including the firmware in folder /somehere
>
> I don't think that this should be supported, the firmware needs to be
> installed below /lib/firmware, which is where udev expects it.

BTW, you can work around this by:
make INSTALL_FW_PATH=$PWD/tar-install/somewhere

Michal

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

end of thread, other threads:[~2011-05-25 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 20:29 kernel build issue whith "make tar-pkg" with INSTALL_FW_PATH [patch included] Maximilian Pasternak
2011-05-25 12:30 ` Michal Marek
2011-05-25 12:33   ` Michal Marek

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