DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH] v8a: barebox: compress with XZ
@ 2024-03-18 14:06 Ahmad Fatoum
  2024-03-18 14:10 ` Marco Felsch
  2024-03-18 14:18 ` Robert Schwebel
  0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2024-03-18 14:06 UTC (permalink / raw)
  To: distrokit; +Cc: Michael Olbrich, Ahmad Fatoum

This saves us 124K, which we dearly need, because otherwise barebox
would overlap the environment partition. The environment partition
is reserved in the genimage config, but it's used due to the description
in the barebox device tree. We may want to change both, but for now, buy
us some time by switching from LZO to XZ.

Reported-by: Michael Olbrich <mol@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v8a/barebox.config | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config
index 26be35533173..699b4f324afa 100644
--- a/configs/platform-v8a/barebox.config
+++ b/configs/platform-v8a/barebox.config
@@ -163,9 +163,9 @@ CONFIG_USE_COMPRESSED_DTB=y
 CONFIG_PBL_RELOCATABLE=y
 CONFIG_IMAGE_COMPRESSION=y
 # CONFIG_IMAGE_COMPRESSION_LZ4 is not set
-CONFIG_IMAGE_COMPRESSION_LZO=y
+# CONFIG_IMAGE_COMPRESSION_LZO is not set
 # CONFIG_IMAGE_COMPRESSION_GZIP is not set
-# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
+CONFIG_IMAGE_COMPRESSION_XZKERN=y
 # CONFIG_IMAGE_COMPRESSION_NONE is not set
 CONFIG_MMU=y
 CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
@@ -1063,7 +1063,14 @@ CONFIG_ZLIB=y
 # CONFIG_BZLIB is not set
 # CONFIG_LZ4_DECOMPRESS is not set
 # CONFIG_ZSTD_DECOMPRESS is not set
-# CONFIG_XZ_DECOMPRESS is not set
+CONFIG_XZ_DECOMPRESS=y
+CONFIG_XZ_DEC_X86=y
+CONFIG_XZ_DEC_POWERPC=y
+CONFIG_XZ_DEC_IA64=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_ARMTHUMB=y
+CONFIG_XZ_DEC_SPARC=y
+CONFIG_XZ_DEC_ARM64=y
 # CONFIG_BASE64 is not set
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_PROCESS_ESCAPE_SEQUENCE=y
-- 
2.39.2




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

* Re: [DistroKit] [PATCH] v8a: barebox: compress with XZ
  2024-03-18 14:06 [DistroKit] [PATCH] v8a: barebox: compress with XZ Ahmad Fatoum
@ 2024-03-18 14:10 ` Marco Felsch
  2024-03-18 14:17   ` Ahmad Fatoum
  2024-03-18 14:18 ` Robert Schwebel
  1 sibling, 1 reply; 5+ messages in thread
From: Marco Felsch @ 2024-03-18 14:10 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: Michael Olbrich, distrokit

On 24-03-18, Ahmad Fatoum wrote:
> This saves us 124K, which we dearly need, because otherwise barebox
> would overlap the environment partition. The environment partition
> is reserved in the genimage config, but it's used due to the description
> in the barebox device tree. We may want to change both, but for now, buy
> us some time by switching from LZO to XZ.

Why not making use of ZSTD instead?

Regards,
  Marco

> Reported-by: Michael Olbrich <mol@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v8a/barebox.config | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config
> index 26be35533173..699b4f324afa 100644
> --- a/configs/platform-v8a/barebox.config
> +++ b/configs/platform-v8a/barebox.config
> @@ -163,9 +163,9 @@ CONFIG_USE_COMPRESSED_DTB=y
>  CONFIG_PBL_RELOCATABLE=y
>  CONFIG_IMAGE_COMPRESSION=y
>  # CONFIG_IMAGE_COMPRESSION_LZ4 is not set
> -CONFIG_IMAGE_COMPRESSION_LZO=y
> +# CONFIG_IMAGE_COMPRESSION_LZO is not set
>  # CONFIG_IMAGE_COMPRESSION_GZIP is not set
> -# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
> +CONFIG_IMAGE_COMPRESSION_XZKERN=y
>  # CONFIG_IMAGE_COMPRESSION_NONE is not set
>  CONFIG_MMU=y
>  CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
> @@ -1063,7 +1063,14 @@ CONFIG_ZLIB=y
>  # CONFIG_BZLIB is not set
>  # CONFIG_LZ4_DECOMPRESS is not set
>  # CONFIG_ZSTD_DECOMPRESS is not set
> -# CONFIG_XZ_DECOMPRESS is not set
> +CONFIG_XZ_DECOMPRESS=y
> +CONFIG_XZ_DEC_X86=y
> +CONFIG_XZ_DEC_POWERPC=y
> +CONFIG_XZ_DEC_IA64=y
> +CONFIG_XZ_DEC_ARM=y
> +CONFIG_XZ_DEC_ARMTHUMB=y
> +CONFIG_XZ_DEC_SPARC=y
> +CONFIG_XZ_DEC_ARM64=y
>  # CONFIG_BASE64 is not set
>  CONFIG_GENERIC_FIND_NEXT_BIT=y
>  CONFIG_PROCESS_ESCAPE_SEQUENCE=y
> -- 
> 2.39.2
> 
> 
> 



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

* Re: [DistroKit] [PATCH] v8a: barebox: compress with XZ
  2024-03-18 14:10 ` Marco Felsch
@ 2024-03-18 14:17   ` Ahmad Fatoum
  2024-03-18 14:21     ` Marco Felsch
  0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2024-03-18 14:17 UTC (permalink / raw)
  To: Marco Felsch; +Cc: Michael Olbrich, distrokit

On 18.03.24 15:10, Marco Felsch wrote:
> On 24-03-18, Ahmad Fatoum wrote:
>> This saves us 124K, which we dearly need, because otherwise barebox
>> would overlap the environment partition. The environment partition
>> is reserved in the genimage config, but it's used due to the description
>> in the barebox device tree. We may want to change both, but for now, buy
>> us some time by switching from LZO to XZ.
> 
> Why not making use of ZSTD instead?

There's no ZSTD option for barebox proper compression.
I had evaluated it a while ago, but found the ZSTD decompressor
to be too big to make it worthwhile. See
https://lore.barebox.org/barebox/20220713100922.1880282-1-a.fatoum@pengutronix.de/

Cheers,
Ahmad

> 
> Regards,
>   Marco
> 
>> Reported-by: Michael Olbrich <mol@pengutronix.de>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>>  configs/platform-v8a/barebox.config | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config
>> index 26be35533173..699b4f324afa 100644
>> --- a/configs/platform-v8a/barebox.config
>> +++ b/configs/platform-v8a/barebox.config
>> @@ -163,9 +163,9 @@ CONFIG_USE_COMPRESSED_DTB=y
>>  CONFIG_PBL_RELOCATABLE=y
>>  CONFIG_IMAGE_COMPRESSION=y
>>  # CONFIG_IMAGE_COMPRESSION_LZ4 is not set
>> -CONFIG_IMAGE_COMPRESSION_LZO=y
>> +# CONFIG_IMAGE_COMPRESSION_LZO is not set
>>  # CONFIG_IMAGE_COMPRESSION_GZIP is not set
>> -# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
>> +CONFIG_IMAGE_COMPRESSION_XZKERN=y
>>  # CONFIG_IMAGE_COMPRESSION_NONE is not set
>>  CONFIG_MMU=y
>>  CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
>> @@ -1063,7 +1063,14 @@ CONFIG_ZLIB=y
>>  # CONFIG_BZLIB is not set
>>  # CONFIG_LZ4_DECOMPRESS is not set
>>  # CONFIG_ZSTD_DECOMPRESS is not set
>> -# CONFIG_XZ_DECOMPRESS is not set
>> +CONFIG_XZ_DECOMPRESS=y
>> +CONFIG_XZ_DEC_X86=y
>> +CONFIG_XZ_DEC_POWERPC=y
>> +CONFIG_XZ_DEC_IA64=y
>> +CONFIG_XZ_DEC_ARM=y
>> +CONFIG_XZ_DEC_ARMTHUMB=y
>> +CONFIG_XZ_DEC_SPARC=y
>> +CONFIG_XZ_DEC_ARM64=y
>>  # CONFIG_BASE64 is not set
>>  CONFIG_GENERIC_FIND_NEXT_BIT=y
>>  CONFIG_PROCESS_ESCAPE_SEQUENCE=y
>> -- 
>> 2.39.2
>>
>>
>>
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [DistroKit] [PATCH] v8a: barebox: compress with XZ
  2024-03-18 14:06 [DistroKit] [PATCH] v8a: barebox: compress with XZ Ahmad Fatoum
  2024-03-18 14:10 ` Marco Felsch
@ 2024-03-18 14:18 ` Robert Schwebel
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2024-03-18 14:18 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: Michael Olbrich, distrokit

On Mon, Mar 18, 2024 at 03:06:33PM +0100, Ahmad Fatoum wrote:
> This saves us 124K, which we dearly need, because otherwise barebox
> would overlap the environment partition. The environment partition
> is reserved in the genimage config, but it's used due to the description
> in the barebox device tree. We may want to change both, but for now, buy
> us some time by switching from LZO to XZ.

Applied to next. We really should review the partitioning.

> Reported-by: Michael Olbrich <mol@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v8a/barebox.config | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config
> index 26be35533173..699b4f324afa 100644
> --- a/configs/platform-v8a/barebox.config
> +++ b/configs/platform-v8a/barebox.config
> @@ -163,9 +163,9 @@ CONFIG_USE_COMPRESSED_DTB=y
>  CONFIG_PBL_RELOCATABLE=y
>  CONFIG_IMAGE_COMPRESSION=y
>  # CONFIG_IMAGE_COMPRESSION_LZ4 is not set
> -CONFIG_IMAGE_COMPRESSION_LZO=y
> +# CONFIG_IMAGE_COMPRESSION_LZO is not set
>  # CONFIG_IMAGE_COMPRESSION_GZIP is not set
> -# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
> +CONFIG_IMAGE_COMPRESSION_XZKERN=y
>  # CONFIG_IMAGE_COMPRESSION_NONE is not set
>  CONFIG_MMU=y
>  CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
> @@ -1063,7 +1063,14 @@ CONFIG_ZLIB=y
>  # CONFIG_BZLIB is not set
>  # CONFIG_LZ4_DECOMPRESS is not set
>  # CONFIG_ZSTD_DECOMPRESS is not set
> -# CONFIG_XZ_DECOMPRESS is not set
> +CONFIG_XZ_DECOMPRESS=y
> +CONFIG_XZ_DEC_X86=y
> +CONFIG_XZ_DEC_POWERPC=y
> +CONFIG_XZ_DEC_IA64=y
> +CONFIG_XZ_DEC_ARM=y
> +CONFIG_XZ_DEC_ARMTHUMB=y
> +CONFIG_XZ_DEC_SPARC=y
> +CONFIG_XZ_DEC_ARM64=y
>  # CONFIG_BASE64 is not set
>  CONFIG_GENERIC_FIND_NEXT_BIT=y
>  CONFIG_PROCESS_ESCAPE_SEQUENCE=y
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



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

* Re: [DistroKit] [PATCH] v8a: barebox: compress with XZ
  2024-03-18 14:17   ` Ahmad Fatoum
@ 2024-03-18 14:21     ` Marco Felsch
  0 siblings, 0 replies; 5+ messages in thread
From: Marco Felsch @ 2024-03-18 14:21 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: Michael Olbrich, distrokit

On 24-03-18, Ahmad Fatoum wrote:
> On 18.03.24 15:10, Marco Felsch wrote:
> > On 24-03-18, Ahmad Fatoum wrote:
> >> This saves us 124K, which we dearly need, because otherwise barebox
> >> would overlap the environment partition. The environment partition
> >> is reserved in the genimage config, but it's used due to the description
> >> in the barebox device tree. We may want to change both, but for now, buy
> >> us some time by switching from LZO to XZ.
> > 
> > Why not making use of ZSTD instead?
> 
> There's no ZSTD option for barebox proper compression.
> I had evaluated it a while ago, but found the ZSTD decompressor
> to be too big to make it worthwhile. See
> https://lore.barebox.org/barebox/20220713100922.1880282-1-a.fatoum@pengutronix.de/

Ah okay, thanks for the link.

Regards,
  Marco

> 
> Cheers,
> Ahmad
> 
> > 
> > Regards,
> >   Marco
> > 
> >> Reported-by: Michael Olbrich <mol@pengutronix.de>
> >> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> ---
> >>  configs/platform-v8a/barebox.config | 13 ++++++++++---
> >>  1 file changed, 10 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config
> >> index 26be35533173..699b4f324afa 100644
> >> --- a/configs/platform-v8a/barebox.config
> >> +++ b/configs/platform-v8a/barebox.config
> >> @@ -163,9 +163,9 @@ CONFIG_USE_COMPRESSED_DTB=y
> >>  CONFIG_PBL_RELOCATABLE=y
> >>  CONFIG_IMAGE_COMPRESSION=y
> >>  # CONFIG_IMAGE_COMPRESSION_LZ4 is not set
> >> -CONFIG_IMAGE_COMPRESSION_LZO=y
> >> +# CONFIG_IMAGE_COMPRESSION_LZO is not set
> >>  # CONFIG_IMAGE_COMPRESSION_GZIP is not set
> >> -# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
> >> +CONFIG_IMAGE_COMPRESSION_XZKERN=y
> >>  # CONFIG_IMAGE_COMPRESSION_NONE is not set
> >>  CONFIG_MMU=y
> >>  CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
> >> @@ -1063,7 +1063,14 @@ CONFIG_ZLIB=y
> >>  # CONFIG_BZLIB is not set
> >>  # CONFIG_LZ4_DECOMPRESS is not set
> >>  # CONFIG_ZSTD_DECOMPRESS is not set
> >> -# CONFIG_XZ_DECOMPRESS is not set
> >> +CONFIG_XZ_DECOMPRESS=y
> >> +CONFIG_XZ_DEC_X86=y
> >> +CONFIG_XZ_DEC_POWERPC=y
> >> +CONFIG_XZ_DEC_IA64=y
> >> +CONFIG_XZ_DEC_ARM=y
> >> +CONFIG_XZ_DEC_ARMTHUMB=y
> >> +CONFIG_XZ_DEC_SPARC=y
> >> +CONFIG_XZ_DEC_ARM64=y
> >>  # CONFIG_BASE64 is not set
> >>  CONFIG_GENERIC_FIND_NEXT_BIT=y
> >>  CONFIG_PROCESS_ESCAPE_SEQUENCE=y
> >> -- 
> >> 2.39.2
> >>
> >>
> >>
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> 



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

end of thread, other threads:[~2024-03-18 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 14:06 [DistroKit] [PATCH] v8a: barebox: compress with XZ Ahmad Fatoum
2024-03-18 14:10 ` Marco Felsch
2024-03-18 14:17   ` Ahmad Fatoum
2024-03-18 14:21     ` Marco Felsch
2024-03-18 14:18 ` Robert Schwebel

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