All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
@ 2019-06-03 16:41 ` Pawel Dembicki
  0 siblings, 0 replies; 10+ messages in thread
From: Pawel Dembicki @ 2019-06-03 16:41 UTC (permalink / raw)
  Cc: Pawel Dembicki, Christian Lamparter, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev, linux-kernel

Enable kernel XZ compression option on PPC_85xx. Tested with
simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).

Suggested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8c1c636308c8..daf4cb968922 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -196,7 +196,7 @@ config PPC
 	select HAVE_IOREMAP_PROT
 	select HAVE_IRQ_EXIT_ON_IRQ_STACK
 	select HAVE_KERNEL_GZIP
-	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
+	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
 	select HAVE_KPROBES
 	select HAVE_KPROBES_ON_FTRACE
 	select HAVE_KRETPROBES
-- 
2.20.1


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

* [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
@ 2019-06-03 16:41 ` Pawel Dembicki
  0 siblings, 0 replies; 10+ messages in thread
From: Pawel Dembicki @ 2019-06-03 16:41 UTC (permalink / raw)
  Cc: Christian Lamparter, linux-kernel, Pawel Dembicki,
	Paul Mackerras, linuxppc-dev

Enable kernel XZ compression option on PPC_85xx. Tested with
simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).

Suggested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8c1c636308c8..daf4cb968922 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -196,7 +196,7 @@ config PPC
 	select HAVE_IOREMAP_PROT
 	select HAVE_IRQ_EXIT_ON_IRQ_STACK
 	select HAVE_KERNEL_GZIP
-	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
+	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
 	select HAVE_KPROBES
 	select HAVE_KPROBES_ON_FTRACE
 	select HAVE_KRETPROBES
-- 
2.20.1


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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
  2019-06-03 16:41 ` Pawel Dembicki
@ 2019-06-13  3:25   ` Daniel Axtens
  -1 siblings, 0 replies; 10+ messages in thread
From: Daniel Axtens @ 2019-06-13  3:25 UTC (permalink / raw)
  To: Pawel Dembicki
  Cc: Pawel Dembicki, Christian Lamparter, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev, linux-kernel

Pawel Dembicki <paweldembicki@gmail.com> writes:

> Enable kernel XZ compression option on PPC_85xx. Tested with
> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
>
> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
> ---
>  arch/powerpc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 8c1c636308c8..daf4cb968922 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -196,7 +196,7 @@ config PPC
>  	select HAVE_IOREMAP_PROT
>  	select HAVE_IRQ_EXIT_ON_IRQ_STACK
>  	select HAVE_KERNEL_GZIP
> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx

(I'm not super well versed in the compression stuff, so apologies if
this is a dumb question.) If it's this simple, is there any reason we
can't turn it on generally, or convert it to a blacklist of platforms
known not to work?

Regards,
Daniel

>  	select HAVE_KPROBES
>  	select HAVE_KPROBES_ON_FTRACE
>  	select HAVE_KRETPROBES
> -- 
> 2.20.1

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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
@ 2019-06-13  3:25   ` Daniel Axtens
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Axtens @ 2019-06-13  3:25 UTC (permalink / raw)
  To: Pawel Dembicki
  Cc: Christian Lamparter, linux-kernel, Pawel Dembicki,
	Paul Mackerras, linuxppc-dev

Pawel Dembicki <paweldembicki@gmail.com> writes:

> Enable kernel XZ compression option on PPC_85xx. Tested with
> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
>
> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
> ---
>  arch/powerpc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 8c1c636308c8..daf4cb968922 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -196,7 +196,7 @@ config PPC
>  	select HAVE_IOREMAP_PROT
>  	select HAVE_IRQ_EXIT_ON_IRQ_STACK
>  	select HAVE_KERNEL_GZIP
> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx

(I'm not super well versed in the compression stuff, so apologies if
this is a dumb question.) If it's this simple, is there any reason we
can't turn it on generally, or convert it to a blacklist of platforms
known not to work?

Regards,
Daniel

>  	select HAVE_KPROBES
>  	select HAVE_KPROBES_ON_FTRACE
>  	select HAVE_KRETPROBES
> -- 
> 2.20.1

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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
  2019-06-13  3:25   ` Daniel Axtens
@ 2019-06-13 11:42     ` Michael Ellerman
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2019-06-13 11:42 UTC (permalink / raw)
  To: Daniel Axtens, Pawel Dembicki
  Cc: Pawel Dembicki, Christian Lamparter, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev, linux-kernel

Daniel Axtens <dja@axtens.net> writes:
> Pawel Dembicki <paweldembicki@gmail.com> writes:
>
>> Enable kernel XZ compression option on PPC_85xx. Tested with
>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
>>
>> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
>> ---
>>  arch/powerpc/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 8c1c636308c8..daf4cb968922 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -196,7 +196,7 @@ config PPC
>>  	select HAVE_IOREMAP_PROT
>>  	select HAVE_IRQ_EXIT_ON_IRQ_STACK
>>  	select HAVE_KERNEL_GZIP
>> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
>> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
>
> (I'm not super well versed in the compression stuff, so apologies if
> this is a dumb question.) If it's this simple, is there any reason we
> can't turn it on generally, or convert it to a blacklist of platforms
> known not to work?

For some platforms enabling XZ requires that your u-boot has XZ support,
and I'm not very clear on when that support landed in u-boot and what
boards have it. And there are boards out there with old/custom u-boots
that effectively can't be updated.

But as a server guy I don't really know the details of all that very
well. So if someone tells me that we should enable XZ for everything, or
as you say just black list some platforms, then that's fine by me.

cheers

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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
@ 2019-06-13 11:42     ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2019-06-13 11:42 UTC (permalink / raw)
  To: Daniel Axtens, Pawel Dembicki
  Cc: Christian Lamparter, linux-kernel, Pawel Dembicki,
	Paul Mackerras, linuxppc-dev

Daniel Axtens <dja@axtens.net> writes:
> Pawel Dembicki <paweldembicki@gmail.com> writes:
>
>> Enable kernel XZ compression option on PPC_85xx. Tested with
>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
>>
>> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
>> ---
>>  arch/powerpc/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 8c1c636308c8..daf4cb968922 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -196,7 +196,7 @@ config PPC
>>  	select HAVE_IOREMAP_PROT
>>  	select HAVE_IRQ_EXIT_ON_IRQ_STACK
>>  	select HAVE_KERNEL_GZIP
>> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
>> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
>
> (I'm not super well versed in the compression stuff, so apologies if
> this is a dumb question.) If it's this simple, is there any reason we
> can't turn it on generally, or convert it to a blacklist of platforms
> known not to work?

For some platforms enabling XZ requires that your u-boot has XZ support,
and I'm not very clear on when that support landed in u-boot and what
boards have it. And there are boards out there with old/custom u-boots
that effectively can't be updated.

But as a server guy I don't really know the details of all that very
well. So if someone tells me that we should enable XZ for everything, or
as you say just black list some platforms, then that's fine by me.

cheers

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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
  2019-06-13 11:42     ` Michael Ellerman
@ 2019-06-14 10:06       ` Christophe Leroy
  -1 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2019-06-14 10:06 UTC (permalink / raw)
  To: Michael Ellerman, Daniel Axtens, Pawel Dembicki
  Cc: Christian Lamparter, linux-kernel, Paul Mackerras, linuxppc-dev



Le 13/06/2019 à 13:42, Michael Ellerman a écrit :
> Daniel Axtens <dja@axtens.net> writes:
>> Pawel Dembicki <paweldembicki@gmail.com> writes:
>>
>>> Enable kernel XZ compression option on PPC_85xx. Tested with
>>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
>>>
>>> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
>>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
>>> ---
>>>   arch/powerpc/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>>> index 8c1c636308c8..daf4cb968922 100644
>>> --- a/arch/powerpc/Kconfig
>>> +++ b/arch/powerpc/Kconfig
>>> @@ -196,7 +196,7 @@ config PPC
>>>   	select HAVE_IOREMAP_PROT
>>>   	select HAVE_IRQ_EXIT_ON_IRQ_STACK
>>>   	select HAVE_KERNEL_GZIP
>>> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
>>> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
>>
>> (I'm not super well versed in the compression stuff, so apologies if
>> this is a dumb question.) If it's this simple, is there any reason we
>> can't turn it on generally, or convert it to a blacklist of platforms
>> known not to work?
> 
> For some platforms enabling XZ requires that your u-boot has XZ support,
> and I'm not very clear on when that support landed in u-boot and what
> boards have it. And there are boards out there with old/custom u-boots
> that effectively can't be updated.

I don't think that it has anything to do with u-boot.
AFAIK, today's mainline U-boot only supports GZIP (by default) and the 
following optional ones: LZO, LZMA, LZ4.

If we want to set additional compression types for u-boot, it is not 
enough to select HAVE_KERNEL_XXXX, we also have to update uImage 
generation scripts.

See the series I sent some time ago: 
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=104153
I'll resent it without bzip2 as today's uboot doesn't support bzip2 anymore.

> 
> But as a server guy I don't really know the details of all that very
> well. So if someone tells me that we should enable XZ for everything, or
> as you say just black list some platforms, then that's fine by me.
> 

I guess we first need to understand how this is used.

Christophe

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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
@ 2019-06-14 10:06       ` Christophe Leroy
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2019-06-14 10:06 UTC (permalink / raw)
  To: Michael Ellerman, Daniel Axtens, Pawel Dembicki
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Christian Lamparter



Le 13/06/2019 à 13:42, Michael Ellerman a écrit :
> Daniel Axtens <dja@axtens.net> writes:
>> Pawel Dembicki <paweldembicki@gmail.com> writes:
>>
>>> Enable kernel XZ compression option on PPC_85xx. Tested with
>>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
>>>
>>> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
>>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
>>> ---
>>>   arch/powerpc/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>>> index 8c1c636308c8..daf4cb968922 100644
>>> --- a/arch/powerpc/Kconfig
>>> +++ b/arch/powerpc/Kconfig
>>> @@ -196,7 +196,7 @@ config PPC
>>>   	select HAVE_IOREMAP_PROT
>>>   	select HAVE_IRQ_EXIT_ON_IRQ_STACK
>>>   	select HAVE_KERNEL_GZIP
>>> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
>>> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
>>
>> (I'm not super well versed in the compression stuff, so apologies if
>> this is a dumb question.) If it's this simple, is there any reason we
>> can't turn it on generally, or convert it to a blacklist of platforms
>> known not to work?
> 
> For some platforms enabling XZ requires that your u-boot has XZ support,
> and I'm not very clear on when that support landed in u-boot and what
> boards have it. And there are boards out there with old/custom u-boots
> that effectively can't be updated.

I don't think that it has anything to do with u-boot.
AFAIK, today's mainline U-boot only supports GZIP (by default) and the 
following optional ones: LZO, LZMA, LZ4.

If we want to set additional compression types for u-boot, it is not 
enough to select HAVE_KERNEL_XXXX, we also have to update uImage 
generation scripts.

See the series I sent some time ago: 
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=104153
I'll resent it without bzip2 as today's uboot doesn't support bzip2 anymore.

> 
> But as a server guy I don't really know the details of all that very
> well. So if someone tells me that we should enable XZ for everything, or
> as you say just black list some platforms, then that's fine by me.
> 

I guess we first need to understand how this is used.

Christophe

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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
  2019-06-14 10:06       ` Christophe Leroy
@ 2019-06-14 19:56         ` Christian Lamparter
  -1 siblings, 0 replies; 10+ messages in thread
From: Christian Lamparter @ 2019-06-14 19:56 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Michael Ellerman, Daniel Axtens, Pawel Dembicki, linux-kernel,
	Paul Mackerras, linuxppc-dev

On Friday, June 14, 2019 12:06:48 PM CEST Christophe Leroy wrote:
> 
> Le 13/06/2019 à 13:42, Michael Ellerman a écrit :
> > Daniel Axtens <dja@axtens.net> writes:
> >> Pawel Dembicki <paweldembicki@gmail.com> writes:
> >>
> >>> Enable kernel XZ compression option on PPC_85xx. Tested with
> >>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
> >>>
> >>> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
> >>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
> >>> ---
> >>>   arch/powerpc/Kconfig | 2 +-
> >>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> >>> index 8c1c636308c8..daf4cb968922 100644
> >>> --- a/arch/powerpc/Kconfig
> >>> +++ b/arch/powerpc/Kconfig
> >>> @@ -196,7 +196,7 @@ config PPC
> >>>   	select HAVE_IOREMAP_PROT
> >>>   	select HAVE_IRQ_EXIT_ON_IRQ_STACK
> >>>   	select HAVE_KERNEL_GZIP
> >>> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
> >>> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
> >>
> >> (I'm not super well versed in the compression stuff, so apologies if
> >> this is a dumb question.) If it's this simple, is there any reason we
> >> can't turn it on generally, or convert it to a blacklist of platforms
> >> known not to work?
> > 
> > For some platforms enabling XZ requires that your u-boot has XZ support,
> > and I'm not very clear on when that support landed in u-boot and what
> > boards have it. And there are boards out there with old/custom u-boots
> > that effectively can't be updated.
> 
> I don't think that it has anything to do with u-boot.
> AFAIK, today's mainline U-boot only supports GZIP (by default) and the 
> following optional ones: LZO, LZMA, LZ4.
> 
> If we want to set additional compression types for u-boot, it is not 
> enough to select HAVE_KERNEL_XXXX, we also have to update uImage 
> generation scripts.
> 
> See the series I sent some time ago: 
> https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=104153
> I'll resent it without bzip2 as today's uboot doesn't support bzip2 anymore.
> 
> > 
> > But as a server guy I don't really know the details of all that very
> > well. So if someone tells me that we should enable XZ for everything, or
> > as you say just black list some platforms, then that's fine by me.
> > 
> 
> I guess we first need to understand how this is used.
> 

to add to the confusion:

The powerpc arch is sort of special since it has the various targets have
different arch/powerpc/boot/wrapper for everyone unfamiliar (people from
ARM or other targets,) please look at: 

https://www.kernel.org/doc/Documentation/powerpc/bootwrapper.txt

and see that this is very different from ARM, MIPS, x86, etc.

I think the cuImage*, dtbImage*, simpleImage, etc... wouldn't
be affected if the kernel is compressed by XZ, as in they should
still boot fine, altough XZ takes a bit longer to unpack of course.

However, for the uImage this could spell a problem, however "HAVE_KERNEL_XZ"
does not automatically entail that the wrapper script from above
compresses the generated uimage with LZMAd/xz. Instead this is controlled
by init/Kconfig and the "Kernel compression mode" setting there. 
And currently that defaults to CONFIG_KERNEL_GZIP. So the wrapper script
currently gzipped uImages unless the target config overwrites it to
something else (and the target has the right 
HAVE_KERNEL_XZ/BZIP2/LZMA/LZO/LZ4/... as well).

Regards,
Christian



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

* Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx
@ 2019-06-14 19:56         ` Christian Lamparter
  0 siblings, 0 replies; 10+ messages in thread
From: Christian Lamparter @ 2019-06-14 19:56 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: linux-kernel, Pawel Dembicki, Paul Mackerras, linuxppc-dev,
	Daniel Axtens

On Friday, June 14, 2019 12:06:48 PM CEST Christophe Leroy wrote:
> 
> Le 13/06/2019 à 13:42, Michael Ellerman a écrit :
> > Daniel Axtens <dja@axtens.net> writes:
> >> Pawel Dembicki <paweldembicki@gmail.com> writes:
> >>
> >>> Enable kernel XZ compression option on PPC_85xx. Tested with
> >>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor).
> >>>
> >>> Suggested-by: Christian Lamparter <chunkeey@gmail.com>
> >>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
> >>> ---
> >>>   arch/powerpc/Kconfig | 2 +-
> >>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> >>> index 8c1c636308c8..daf4cb968922 100644
> >>> --- a/arch/powerpc/Kconfig
> >>> +++ b/arch/powerpc/Kconfig
> >>> @@ -196,7 +196,7 @@ config PPC
> >>>   	select HAVE_IOREMAP_PROT
> >>>   	select HAVE_IRQ_EXIT_ON_IRQ_STACK
> >>>   	select HAVE_KERNEL_GZIP
> >>> -	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
> >>> +	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x || PPC_85xx
> >>
> >> (I'm not super well versed in the compression stuff, so apologies if
> >> this is a dumb question.) If it's this simple, is there any reason we
> >> can't turn it on generally, or convert it to a blacklist of platforms
> >> known not to work?
> > 
> > For some platforms enabling XZ requires that your u-boot has XZ support,
> > and I'm not very clear on when that support landed in u-boot and what
> > boards have it. And there are boards out there with old/custom u-boots
> > that effectively can't be updated.
> 
> I don't think that it has anything to do with u-boot.
> AFAIK, today's mainline U-boot only supports GZIP (by default) and the 
> following optional ones: LZO, LZMA, LZ4.
> 
> If we want to set additional compression types for u-boot, it is not 
> enough to select HAVE_KERNEL_XXXX, we also have to update uImage 
> generation scripts.
> 
> See the series I sent some time ago: 
> https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=104153
> I'll resent it without bzip2 as today's uboot doesn't support bzip2 anymore.
> 
> > 
> > But as a server guy I don't really know the details of all that very
> > well. So if someone tells me that we should enable XZ for everything, or
> > as you say just black list some platforms, then that's fine by me.
> > 
> 
> I guess we first need to understand how this is used.
> 

to add to the confusion:

The powerpc arch is sort of special since it has the various targets have
different arch/powerpc/boot/wrapper for everyone unfamiliar (people from
ARM or other targets,) please look at: 

https://www.kernel.org/doc/Documentation/powerpc/bootwrapper.txt

and see that this is very different from ARM, MIPS, x86, etc.

I think the cuImage*, dtbImage*, simpleImage, etc... wouldn't
be affected if the kernel is compressed by XZ, as in they should
still boot fine, altough XZ takes a bit longer to unpack of course.

However, for the uImage this could spell a problem, however "HAVE_KERNEL_XZ"
does not automatically entail that the wrapper script from above
compresses the generated uimage with LZMAd/xz. Instead this is controlled
by init/Kconfig and the "Kernel compression mode" setting there. 
And currently that defaults to CONFIG_KERNEL_GZIP. So the wrapper script
currently gzipped uImages unless the target config overwrites it to
something else (and the target has the right 
HAVE_KERNEL_XZ/BZIP2/LZMA/LZO/LZ4/... as well).

Regards,
Christian



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

end of thread, other threads:[~2019-06-14 19:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 16:41 [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx Pawel Dembicki
2019-06-03 16:41 ` Pawel Dembicki
2019-06-13  3:25 ` Daniel Axtens
2019-06-13  3:25   ` Daniel Axtens
2019-06-13 11:42   ` Michael Ellerman
2019-06-13 11:42     ` Michael Ellerman
2019-06-14 10:06     ` Christophe Leroy
2019-06-14 10:06       ` Christophe Leroy
2019-06-14 19:56       ` Christian Lamparter
2019-06-14 19:56         ` Christian Lamparter

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.