* [PATCH 0/4] cmd: {zip, unzip} fixes
@ 2020-05-22 12:07 Michael Walle
2020-05-22 12:07 ` [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP Michael Walle
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Michael Walle @ 2020-05-22 12:07 UTC (permalink / raw)
To: u-boot
Automatically pull in the needed libraries for zip and unzip. Move the
CONFIG_GZIP_COMPRESSED from legacy config.h style to a Kconfig option. The
sole user of CONFIG_GZIP_COMPRESSED is the sandbox target for the
compression tests. Remove the CONFIG option in its config.h and instead
select it together with CONFIG_SANDBOX.
Michael Walle (4):
cmd: unzip: automatically select CONFIG_GZIP
cmd: zip: automatically pull in gzip()
cmd: zip: fix implicit declaration warning
sandbox: move compression option to Kconfig
arch/Kconfig | 2 ++
cmd/Kconfig | 2 ++
cmd/zip.c | 1 +
include/configs/sandbox.h | 3 ---
lib/Kconfig | 4 ++++
scripts/config_whitelist.txt | 2 --
6 files changed, 9 insertions(+), 5 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP
2020-05-22 12:07 [PATCH 0/4] cmd: {zip, unzip} fixes Michael Walle
@ 2020-05-22 12:07 ` Michael Walle
2020-05-22 14:57 ` Heinrich Schuchardt
2020-05-25 17:59 ` Tom Rini
2020-05-22 12:07 ` [PATCH 2/4] cmd: zip: automatically pull in gzip() Michael Walle
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Michael Walle @ 2020-05-22 12:07 UTC (permalink / raw)
To: u-boot
unzip calls gzwrite() which is provided in lib/gunzip.c. Make sure it is
automatically pulled in if the user selects CMD_UNZIP.
Signed-off-by: Michael Walle <michael@walle.cc>
---
cmd/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f9be1988f6..f4eb575b6e 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -810,6 +810,7 @@ config CMD_UNLZ4
config CMD_UNZIP
bool "unzip"
default y if CMD_BOOTI
+ select GZIP
help
Uncompress a zip-compressed memory region.
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/4] cmd: zip: automatically pull in gzip()
2020-05-22 12:07 [PATCH 0/4] cmd: {zip, unzip} fixes Michael Walle
2020-05-22 12:07 ` [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP Michael Walle
@ 2020-05-22 12:07 ` Michael Walle
2020-05-22 23:13 ` Simon Glass
2020-05-25 17:59 ` Tom Rini
2020-05-22 12:07 ` [PATCH 3/4] cmd: zip: fix implicit declaration warning Michael Walle
2020-05-22 12:07 ` [PATCH 4/4] sandbox: move compression option to Kconfig Michael Walle
3 siblings, 2 replies; 13+ messages in thread
From: Michael Walle @ 2020-05-22 12:07 UTC (permalink / raw)
To: u-boot
Move the CONFIG_GZIP_COMPRESSED from a config.h macro to a Kconfig menu
item. It is not selectable by a user because there is no reason to do
so. Instead it will be automatically selected by the stuff which uses
gzip(), like the zip command.
Remove it from the config_whitelist.txt. Also remove
CONFIG_GZIP_COMPRESS_DEF_SZ as this was never used on any board. The
default seems to be sane, otherwise it should be added as a Kconfig
option.
Signed-off-by: Michael Walle <michael@walle.cc>
---
cmd/Kconfig | 1 +
lib/Kconfig | 4 ++++
scripts/config_whitelist.txt | 2 --
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f4eb575b6e..153864c587 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -816,6 +816,7 @@ config CMD_UNZIP
config CMD_ZIP
bool "zip"
+ select GZIP_COMPRESSED
help
Compress a memory region with zlib deflate method.
diff --git a/lib/Kconfig b/lib/Kconfig
index c3f694afc0..f18bf3778b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -424,6 +424,10 @@ config GZIP
help
This enables support for GZIP compression algorithm.
+config GZIP_COMPRESSED
+ bool
+ select ZLIB
+
config BZIP2
bool "Enable bzip2 decompression support"
help
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 3f5e6504e1..2ec0758b75 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -644,8 +644,6 @@ CONFIG_GPIO_LED_STUBS
CONFIG_GREEN_LED
CONFIG_GURNARD_FPGA
CONFIG_GURNARD_SPLASH
-CONFIG_GZIP_COMPRESSED
-CONFIG_GZIP_COMPRESS_DEF_SZ
CONFIG_G_DNL_THOR_PRODUCT_NUM
CONFIG_G_DNL_THOR_VENDOR_NUM
CONFIG_G_DNL_UMS_PRODUCT_NUM
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] cmd: zip: fix implicit declaration warning
2020-05-22 12:07 [PATCH 0/4] cmd: {zip, unzip} fixes Michael Walle
2020-05-22 12:07 ` [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP Michael Walle
2020-05-22 12:07 ` [PATCH 2/4] cmd: zip: automatically pull in gzip() Michael Walle
@ 2020-05-22 12:07 ` Michael Walle
2020-05-22 23:13 ` Simon Glass
2020-05-25 18:00 ` Tom Rini
2020-05-22 12:07 ` [PATCH 4/4] sandbox: move compression option to Kconfig Michael Walle
3 siblings, 2 replies; 13+ messages in thread
From: Michael Walle @ 2020-05-22 12:07 UTC (permalink / raw)
To: u-boot
Fix the following warning:
cmd/zip.c: In function ?do_zip?:
cmd/zip.c:30:6: warning: implicit declaration of function ?gzip?; did you mean ?do_zip?? [-Wimplicit-function-declaration]
if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
^~~~
do_zip
Include gzip.h header which declares the gzip() function.
Signed-off-by: Michael Walle <michael@walle.cc>
---
cmd/zip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/zip.c b/cmd/zip.c
index b433f1889f..8ad3768464 100644
--- a/cmd/zip.c
+++ b/cmd/zip.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <gzip.h>
static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] sandbox: move compression option to Kconfig
2020-05-22 12:07 [PATCH 0/4] cmd: {zip, unzip} fixes Michael Walle
` (2 preceding siblings ...)
2020-05-22 12:07 ` [PATCH 3/4] cmd: zip: fix implicit declaration warning Michael Walle
@ 2020-05-22 12:07 ` Michael Walle
2020-05-22 23:13 ` Simon Glass
2020-05-25 18:00 ` Tom Rini
3 siblings, 2 replies; 13+ messages in thread
From: Michael Walle @ 2020-05-22 12:07 UTC (permalink / raw)
To: u-boot
CONFIG_BZIP2 and CONFIG_GZIP_COMPRESSED are Kconfig options. Select them
by CONFIG_SANDBOX instead of setting them in configs/sandbox.h.
Signed-off-by: Michael Walle <michael@walle.cc>
---
arch/Kconfig | 2 ++
include/configs/sandbox.h | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 91e049b322..a11f872938 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -86,6 +86,7 @@ config RISCV
config SANDBOX
bool "Sandbox"
select BOARD_LATE_INIT
+ select BZIP2
select DM
select DM_GPIO
select DM_I2C
@@ -94,6 +95,7 @@ config SANDBOX
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select GZIP_COMPRESSED
select HAVE_BLOCK_DEVICE
select LZO
select OF_BOARD_SETUP
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 4549c81169..a2c9811eca 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -114,9 +114,6 @@
BOOTENV \
MEM_LAYOUT_ENV_SETTINGS
-#define CONFIG_GZIP_COMPRESSED
-#define CONFIG_BZIP2
-
#ifndef CONFIG_SPL_BUILD
#define CONFIG_SYS_IDE_MAXBUS 1
#define CONFIG_SYS_ATA_IDE0_OFFSET 0
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP
2020-05-22 12:07 ` [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP Michael Walle
@ 2020-05-22 14:57 ` Heinrich Schuchardt
2020-05-25 17:59 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Heinrich Schuchardt @ 2020-05-22 14:57 UTC (permalink / raw)
To: u-boot
On 22.05.20 14:07, Michael Walle wrote:
> unzip calls gzwrite() which is provided in lib/gunzip.c. Make sure it is
> automatically pulled in if the user selects CMD_UNZIP.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Heinrich Schuchardt <xypron.glkp@gmx.de>
> ---
> cmd/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index f9be1988f6..f4eb575b6e 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -810,6 +810,7 @@ config CMD_UNLZ4
> config CMD_UNZIP
> bool "unzip"
> default y if CMD_BOOTI
> + select GZIP
> help
> Uncompress a zip-compressed memory region.
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/4] cmd: zip: automatically pull in gzip()
2020-05-22 12:07 ` [PATCH 2/4] cmd: zip: automatically pull in gzip() Michael Walle
@ 2020-05-22 23:13 ` Simon Glass
2020-05-25 17:59 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Simon Glass @ 2020-05-22 23:13 UTC (permalink / raw)
To: u-boot
On Fri, 22 May 2020 at 06:07, Michael Walle <michael@walle.cc> wrote:
>
> Move the CONFIG_GZIP_COMPRESSED from a config.h macro to a Kconfig menu
> item. It is not selectable by a user because there is no reason to do
> so. Instead it will be automatically selected by the stuff which uses
> gzip(), like the zip command.
>
> Remove it from the config_whitelist.txt. Also remove
> CONFIG_GZIP_COMPRESS_DEF_SZ as this was never used on any board. The
> default seems to be sane, otherwise it should be added as a Kconfig
> option.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> cmd/Kconfig | 1 +
> lib/Kconfig | 4 ++++
> scripts/config_whitelist.txt | 2 --
> 3 files changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/4] cmd: zip: fix implicit declaration warning
2020-05-22 12:07 ` [PATCH 3/4] cmd: zip: fix implicit declaration warning Michael Walle
@ 2020-05-22 23:13 ` Simon Glass
2020-05-25 18:00 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Simon Glass @ 2020-05-22 23:13 UTC (permalink / raw)
To: u-boot
On Fri, 22 May 2020 at 06:07, Michael Walle <michael@walle.cc> wrote:
>
> Fix the following warning:
>
> cmd/zip.c: In function ?do_zip?:
> cmd/zip.c:30:6: warning: implicit declaration of function ?gzip?; did you mean ?do_zip?? [-Wimplicit-function-declaration]
> if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
> ^~~~
> do_zip
>
> Include gzip.h header which declares the gzip() function.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> cmd/zip.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 4/4] sandbox: move compression option to Kconfig
2020-05-22 12:07 ` [PATCH 4/4] sandbox: move compression option to Kconfig Michael Walle
@ 2020-05-22 23:13 ` Simon Glass
2020-05-25 18:00 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Simon Glass @ 2020-05-22 23:13 UTC (permalink / raw)
To: u-boot
On Fri, 22 May 2020 at 06:07, Michael Walle <michael@walle.cc> wrote:
>
> CONFIG_BZIP2 and CONFIG_GZIP_COMPRESSED are Kconfig options. Select them
> by CONFIG_SANDBOX instead of setting them in configs/sandbox.h.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> arch/Kconfig | 2 ++
> include/configs/sandbox.h | 3 ---
> 2 files changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP
2020-05-22 12:07 ` [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP Michael Walle
2020-05-22 14:57 ` Heinrich Schuchardt
@ 2020-05-25 17:59 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2020-05-25 17:59 UTC (permalink / raw)
To: u-boot
On Fri, May 22, 2020 at 02:07:35PM +0200, Michael Walle wrote:
> unzip calls gzwrite() which is provided in lib/gunzip.c. Make sure it is
> automatically pulled in if the user selects CMD_UNZIP.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Heinrich Schuchardt <xypron.glkp@gmx.de>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200525/2e58a70c/attachment.sig>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/4] cmd: zip: automatically pull in gzip()
2020-05-22 12:07 ` [PATCH 2/4] cmd: zip: automatically pull in gzip() Michael Walle
2020-05-22 23:13 ` Simon Glass
@ 2020-05-25 17:59 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2020-05-25 17:59 UTC (permalink / raw)
To: u-boot
On Fri, May 22, 2020 at 02:07:36PM +0200, Michael Walle wrote:
> Move the CONFIG_GZIP_COMPRESSED from a config.h macro to a Kconfig menu
> item. It is not selectable by a user because there is no reason to do
> so. Instead it will be automatically selected by the stuff which uses
> gzip(), like the zip command.
>
> Remove it from the config_whitelist.txt. Also remove
> CONFIG_GZIP_COMPRESS_DEF_SZ as this was never used on any board. The
> default seems to be sane, otherwise it should be added as a Kconfig
> option.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200525/d3c90253/attachment.sig>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/4] cmd: zip: fix implicit declaration warning
2020-05-22 12:07 ` [PATCH 3/4] cmd: zip: fix implicit declaration warning Michael Walle
2020-05-22 23:13 ` Simon Glass
@ 2020-05-25 18:00 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2020-05-25 18:00 UTC (permalink / raw)
To: u-boot
On Fri, May 22, 2020 at 02:07:37PM +0200, Michael Walle wrote:
> Fix the following warning:
>
> cmd/zip.c: In function ?do_zip?:
> cmd/zip.c:30:6: warning: implicit declaration of function ?gzip?; did you mean ?do_zip?? [-Wimplicit-function-declaration]
> if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
> ^~~~
> do_zip
>
> Include gzip.h header which declares the gzip() function.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200525/a3392158/attachment.sig>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 4/4] sandbox: move compression option to Kconfig
2020-05-22 12:07 ` [PATCH 4/4] sandbox: move compression option to Kconfig Michael Walle
2020-05-22 23:13 ` Simon Glass
@ 2020-05-25 18:00 ` Tom Rini
1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2020-05-25 18:00 UTC (permalink / raw)
To: u-boot
On Fri, May 22, 2020 at 02:07:38PM +0200, Michael Walle wrote:
> CONFIG_BZIP2 and CONFIG_GZIP_COMPRESSED are Kconfig options. Select them
> by CONFIG_SANDBOX instead of setting them in configs/sandbox.h.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200525/9aee05bf/attachment.sig>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-05-25 18:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 12:07 [PATCH 0/4] cmd: {zip, unzip} fixes Michael Walle
2020-05-22 12:07 ` [PATCH 1/4] cmd: unzip: automatically select CONFIG_GZIP Michael Walle
2020-05-22 14:57 ` Heinrich Schuchardt
2020-05-25 17:59 ` Tom Rini
2020-05-22 12:07 ` [PATCH 2/4] cmd: zip: automatically pull in gzip() Michael Walle
2020-05-22 23:13 ` Simon Glass
2020-05-25 17:59 ` Tom Rini
2020-05-22 12:07 ` [PATCH 3/4] cmd: zip: fix implicit declaration warning Michael Walle
2020-05-22 23:13 ` Simon Glass
2020-05-25 18:00 ` Tom Rini
2020-05-22 12:07 ` [PATCH 4/4] sandbox: move compression option to Kconfig Michael Walle
2020-05-22 23:13 ` Simon Glass
2020-05-25 18:00 ` Tom Rini
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.