linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files
@ 2022-02-14 22:23 Randy Dunlap
  2022-02-15  1:53 ` Luis Chamberlain
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2022-02-14 22:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Luis Chamberlain, Greg Kroah-Hartman, Rafael J. Wysocki

Document in the firmware loader Kconfig help text that firmware image
file compression is not supported for builtin EXTRA_FIRMWARE files so
that someone does not waste time trying that.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
---
Yeah, I wasted some time trying to use an xz compressed file
as builtin EXTRA_FIRMWARE, so try to prevent someone else from
doing that.

 drivers/base/firmware_loader/Kconfig |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-next-20220214.orig/drivers/base/firmware_loader/Kconfig
+++ linux-next-20220214/drivers/base/firmware_loader/Kconfig
@@ -60,6 +60,8 @@ config EXTRA_FIRMWARE
 	  image since it combines both GPL and non-GPL work. You should
 	  consult a lawyer of your own before distributing such an image.
 
+	  NOTE: Compressed files are not supported in EXTRA_FIRMWARE.
+
 config EXTRA_FIRMWARE_DIR
 	string "Firmware blobs root directory"
 	depends on EXTRA_FIRMWARE != ""
@@ -169,6 +171,9 @@ config FW_LOADER_COMPRESS
 	  be compressed with either none or crc32 integrity check type (pass
 	  "-C crc32" option to xz command).
 
+	  Compressed firmware support does not apply to firmware images
+	  that are built into the kernel image (CONFIG_EXTRA_FIRMWARE).
+
 config FW_CACHE
 	bool "Enable firmware caching during suspend"
 	depends on PM_SLEEP

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

* Re: [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files
  2022-02-14 22:23 [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files Randy Dunlap
@ 2022-02-15  1:53 ` Luis Chamberlain
  2022-02-15  3:30   ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Chamberlain @ 2022-02-15  1:53 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki

On Mon, Feb 14, 2022 at 02:23:11PM -0800, Randy Dunlap wrote:
> Document in the firmware loader Kconfig help text that firmware image
> file compression is not supported for builtin EXTRA_FIRMWARE files so
> that someone does not waste time trying that.
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Luis Chamberlain <mcgrof@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> ---
> Yeah, I wasted some time trying to use an xz compressed file
> as builtin EXTRA_FIRMWARE, 

Curious *why* you are using EXTRA_FIRMWARE BTW.

> so try to prevent someone else from
> doing that.

Acked-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis
> 
>  drivers/base/firmware_loader/Kconfig |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> --- linux-next-20220214.orig/drivers/base/firmware_loader/Kconfig
> +++ linux-next-20220214/drivers/base/firmware_loader/Kconfig
> @@ -60,6 +60,8 @@ config EXTRA_FIRMWARE
>  	  image since it combines both GPL and non-GPL work. You should
>  	  consult a lawyer of your own before distributing such an image.
>  
> +	  NOTE: Compressed files are not supported in EXTRA_FIRMWARE.
> +
>  config EXTRA_FIRMWARE_DIR
>  	string "Firmware blobs root directory"
>  	depends on EXTRA_FIRMWARE != ""
> @@ -169,6 +171,9 @@ config FW_LOADER_COMPRESS
>  	  be compressed with either none or crc32 integrity check type (pass
>  	  "-C crc32" option to xz command).
>  
> +	  Compressed firmware support does not apply to firmware images
> +	  that are built into the kernel image (CONFIG_EXTRA_FIRMWARE).
> +
>  config FW_CACHE
>  	bool "Enable firmware caching during suspend"
>  	depends on PM_SLEEP

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

* Re: [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files
  2022-02-15  1:53 ` Luis Chamberlain
@ 2022-02-15  3:30   ` Randy Dunlap
  2022-02-15  7:31     ` Luis Chamberlain
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2022-02-15  3:30 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki



On 2/14/22 17:53, Luis Chamberlain wrote:
> On Mon, Feb 14, 2022 at 02:23:11PM -0800, Randy Dunlap wrote:
>> Document in the firmware loader Kconfig help text that firmware image
>> file compression is not supported for builtin EXTRA_FIRMWARE files so
>> that someone does not waste time trying that.
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Luis Chamberlain <mcgrof@kernel.org>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> ---
>> Yeah, I wasted some time trying to use an xz compressed file
>> as builtin EXTRA_FIRMWARE, 
> 
> Curious *why* you are using EXTRA_FIRMWARE BTW.

Hi Luis,

I need to load i915 firmware very early
and I am not using an initramfs.

>> so try to prevent someone else from
>> doing that.
> 
> Acked-by: Luis Chamberlain <mcgrof@kernel.org>

Thanks.

>   Luis
>>
>>  drivers/base/firmware_loader/Kconfig |    5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> --- linux-next-20220214.orig/drivers/base/firmware_loader/Kconfig
>> +++ linux-next-20220214/drivers/base/firmware_loader/Kconfig
>> @@ -60,6 +60,8 @@ config EXTRA_FIRMWARE
>>  	  image since it combines both GPL and non-GPL work. You should
>>  	  consult a lawyer of your own before distributing such an image.
>>  
>> +	  NOTE: Compressed files are not supported in EXTRA_FIRMWARE.
>> +
>>  config EXTRA_FIRMWARE_DIR
>>  	string "Firmware blobs root directory"
>>  	depends on EXTRA_FIRMWARE != ""
>> @@ -169,6 +171,9 @@ config FW_LOADER_COMPRESS
>>  	  be compressed with either none or crc32 integrity check type (pass
>>  	  "-C crc32" option to xz command).
>>  
>> +	  Compressed firmware support does not apply to firmware images
>> +	  that are built into the kernel image (CONFIG_EXTRA_FIRMWARE).
>> +
>>  config FW_CACHE
>>  	bool "Enable firmware caching during suspend"
>>  	depends on PM_SLEEP

-- 
~Randy

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

* Re: [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files
  2022-02-15  3:30   ` Randy Dunlap
@ 2022-02-15  7:31     ` Luis Chamberlain
  2022-02-15 15:36       ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Chamberlain @ 2022-02-15  7:31 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki

On Mon, Feb 14, 2022 at 07:30:22PM -0800, Randy Dunlap wrote:
> 
> 
> On 2/14/22 17:53, Luis Chamberlain wrote:
> > On Mon, Feb 14, 2022 at 02:23:11PM -0800, Randy Dunlap wrote:
> >> Document in the firmware loader Kconfig help text that firmware image
> >> file compression is not supported for builtin EXTRA_FIRMWARE files so
> >> that someone does not waste time trying that.
> >>
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Cc: Luis Chamberlain <mcgrof@kernel.org>
> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> ---
> >> Yeah, I wasted some time trying to use an xz compressed file
> >> as builtin EXTRA_FIRMWARE, 
> > 
> > Curious *why* you are using EXTRA_FIRMWARE BTW.
> 
> Hi Luis,
> 
> I need to load i915 firmware very early
> and I am not using an initramfs.

Curious, why don't you use an initramfs? I'm just
trying to gather users of EXTRA_FIRMWARE as I thought
they didn't exist.

  Luis

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

* Re: [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files
  2022-02-15  7:31     ` Luis Chamberlain
@ 2022-02-15 15:36       ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2022-02-15 15:36 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki



On 2/14/22 23:31, Luis Chamberlain wrote:
> On Mon, Feb 14, 2022 at 07:30:22PM -0800, Randy Dunlap wrote:
>>
>>
>> On 2/14/22 17:53, Luis Chamberlain wrote:
>>> On Mon, Feb 14, 2022 at 02:23:11PM -0800, Randy Dunlap wrote:
>>>> Document in the firmware loader Kconfig help text that firmware image
>>>> file compression is not supported for builtin EXTRA_FIRMWARE files so
>>>> that someone does not waste time trying that.
>>>>
>>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>>>> Cc: Luis Chamberlain <mcgrof@kernel.org>
>>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>>>> ---
>>>> Yeah, I wasted some time trying to use an xz compressed file
>>>> as builtin EXTRA_FIRMWARE, 
>>>
>>> Curious *why* you are using EXTRA_FIRMWARE BTW.
>>
>> Hi Luis,
>>
>> I need to load i915 firmware very early
>> and I am not using an initramfs.
> 
> Curious, why don't you use an initramfs? I'm just
> trying to gather users of EXTRA_FIRMWARE as I thought
> they didn't exist.

It's an option, right?
I just prefer to be able to boot a bare kernel.


-- 
~Randy

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

end of thread, other threads:[~2022-02-15 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 22:23 [PATCH] firmware_loader: EXTRA_FIRMWARE does not support compressed files Randy Dunlap
2022-02-15  1:53 ` Luis Chamberlain
2022-02-15  3:30   ` Randy Dunlap
2022-02-15  7:31     ` Luis Chamberlain
2022-02-15 15:36       ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).