diff options
author | Tom Rini <trini@konsulko.com> | 2021-03-15 12:15:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-15 12:15:38 -0400 |
commit | 22fc991dafee0142fc6bf621e7bd558bd58020b4 (patch) | |
tree | e5da8826fd735de968519f432864dc1545d96017 /common/image.c | |
parent | 1876b390f31afca15de334e499aa071b0bf64a44 (diff) | |
parent | 4103e13534141c31e4e9bf40848ab3a61dabce81 (diff) |
Merge tag 'v2021.04-rc4' into next
Prepare v2021.04-rc4
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/common/image.c b/common/image.c index a6500f5f5c7..51854aae5dd 100644 --- a/common/image.c +++ b/common/image.c @@ -462,13 +462,16 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, else ret = -ENOSPC; break; -#ifdef CONFIG_GZIP +#ifndef USE_HOSTCC +#if CONFIG_IS_ENABLED(GZIP) case IH_COMP_GZIP: { ret = gunzip(load_buf, unc_len, image_buf, &image_len); break; } #endif /* CONFIG_GZIP */ -#ifdef CONFIG_BZIP2 +#endif +#ifndef USE_HOSTCC +#if CONFIG_IS_ENABLED(BZIP2) case IH_COMP_BZIP2: { uint size = unc_len; @@ -484,7 +487,9 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, break; } #endif /* CONFIG_BZIP2 */ -#ifdef CONFIG_LZMA +#endif +#ifndef USE_HOSTCC +#if CONFIG_IS_ENABLED(LZMA) case IH_COMP_LZMA: { SizeT lzma_len = unc_len; @@ -494,7 +499,9 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, break; } #endif /* CONFIG_LZMA */ -#ifdef CONFIG_LZO +#endif +#ifndef USE_HOSTCC +#if CONFIG_IS_ENABLED(LZO) case IH_COMP_LZO: { size_t size = unc_len; @@ -503,7 +510,9 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, break; } #endif /* CONFIG_LZO */ -#ifdef CONFIG_LZ4 +#endif +#ifndef USE_HOSTCC +#if CONFIG_IS_ENABLED(LZ4) case IH_COMP_LZ4: { size_t size = unc_len; @@ -512,7 +521,9 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, break; } #endif /* CONFIG_LZ4 */ -#ifdef CONFIG_ZSTD +#endif +#ifndef USE_HOSTCC +#if CONFIG_IS_ENABLED(ZSTD) case IH_COMP_ZSTD: { size_t size = unc_len; ZSTD_DStream *dstream; @@ -562,6 +573,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, break; } #endif /* CONFIG_ZSTD */ +#endif default: printf("Unimplemented compression type %d\n", comp); return -ENOSYS; |