From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 1/4] Respect that some compression algos can be enabled separately for SPL
Date: Sat, 23 Jan 2021 13:39:08 +0100 [thread overview]
Message-ID: <7f2cf756-16ee-7a81-d28a-2d136c8734ab@denx.de> (raw)
In-Reply-To: <1610557225-3822-2-git-send-email-tharvey@gateworks.com>
Hi Tim,
there is a weird side effect with this patch, breaking m68k
architecture. For some reason, image.c is not compiled clean because gd
is not declared anymore.
In file included from tools/common/image.c:1:
./tools/../common/image.c: In function ?get_table_entry_id?:
./tools/../common/image.c:982:41: error: ?gd? undeclared (first use in
this function)
982 | if (t->sname && strcasecmp(t->sname + gd->reloc_off, name) == 0)
| ^~
./tools/../common/image.c:982:41: note: each undeclared identifier is
reported only once for each functi
Can you take a look ? Thanks !
Best regards,
Stefano
On 13.01.21 18:00, Tim Harvey wrote:
> From: Frieder Schrempf <frieder.schrempf@kontron.de>
>
> Some compression algorithms currently can be enabled for SPL and
> U-Boot proper separately. Therefore we need to use
> CONFIG_IS_ENABLED() in these cases and also prevent compiling these
> functions in case of a host tool build.
>
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.d
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
> common/image.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/common/image.c b/common/image.c
> index 451fc68..bda19c0 100644
> --- a/common/image.c
> +++ b/common/image.c
> @@ -72,6 +72,7 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch,
>
> #include <u-boot/crc.h>
> #include <imximage.h>
> +#include <linux/kconfig.h>
>
> #ifndef CONFIG_SYS_BARGSIZE
> #define CONFIG_SYS_BARGSIZE 512
> @@ -460,13 +461,13 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
> else
> ret = -ENOSPC;
> break;
> -#ifdef CONFIG_GZIP
> +#if CONFIG_IS_ENABLED(GZIP) && !defined(USE_HOSTCC)
> case IH_COMP_GZIP: {
> ret = gunzip(load_buf, unc_len, image_buf, &image_len);
> break;
> }
> #endif /* CONFIG_GZIP */
> -#ifdef CONFIG_BZIP2
> +#if CONFIG_IS_ENABLED(BZIP2) && !defined(USE_HOSTCC)
> case IH_COMP_BZIP2: {
> uint size = unc_len;
>
> @@ -482,7 +483,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
> break;
> }
> #endif /* CONFIG_BZIP2 */
> -#ifdef CONFIG_LZMA
> +#if CONFIG_IS_ENABLED(LZMA) && !defined(USE_HOSTCC)
> case IH_COMP_LZMA: {
> SizeT lzma_len = unc_len;
>
> @@ -492,7 +493,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
> break;
> }
> #endif /* CONFIG_LZMA */
> -#ifdef CONFIG_LZO
> +#if CONFIG_IS_ENABLED(LZO) && !defined(USE_HOSTCC)
> case IH_COMP_LZO: {
> size_t size = unc_len;
>
> @@ -501,7 +502,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
> break;
> }
> #endif /* CONFIG_LZO */
> -#ifdef CONFIG_LZ4
> +#if CONFIG_IS_ENABLED(LZ4) && !defined(USE_HOSTCC)
> case IH_COMP_LZ4: {
> size_t size = unc_len;
>
> @@ -510,7 +511,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
> break;
> }
> #endif /* CONFIG_LZ4 */
> -#ifdef CONFIG_ZSTD
> +#if CONFIG_IS_ENABLED(ZSTD) && !defined(USE_HOSTCC)
> case IH_COMP_ZSTD: {
> size_t size = unc_len;
> ZSTD_DStream *dstream;
>
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2021-01-23 12:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 17:00 [PATCH 0/4] Add Gateworks Venice board support Tim Harvey
2021-01-13 17:00 ` [PATCH 1/4] Respect that some compression algos can be enabled separately for SPL Tim Harvey
2021-01-23 12:39 ` Stefano Babic [this message]
2021-01-26 17:53 ` Tim Harvey
2021-01-27 7:57 ` Frieder Schrempf
2021-01-27 13:19 ` Stefano Babic
2021-01-30 21:22 ` Stefano Babic
2021-02-04 17:31 ` Tim Harvey
2021-02-04 20:49 ` Stefano Babic
2021-02-05 1:37 ` Tim Harvey
2021-01-13 17:00 ` [PATCH 2/4] power: pmic: add driver for Monolithic Power mp5416 Tim Harvey
2021-01-14 22:08 ` Jaehoon Chung
2021-01-14 22:10 ` Tim Harvey
2021-01-13 17:00 ` [PATCH 3/4] arm: dts: imx8mm: add Gateworks i.MX8 Mini Dev kits Tim Harvey
2021-01-13 17:00 ` [PATCH 4/4] board: gateworks: imx8mm: Add Gateworks Venice board support Tim Harvey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f2cf756-16ee-7a81-d28a-2d136c8734ab@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox