image: Update image_decomp() to avoid ifdefs
authorSimon Glass <sjg@chromium.org>
Sat, 25 Sep 2021 13:03:14 +0000 (07:03 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:26 +0000 (15:53 -0400)
commit458b30af66cd41ca8e6f8a52ea4c09cb50d3413d
treeaf8dca4cf49cc34bfb9156fc03f5ea626dba3428
parent5a4f10d71bfe2b7a5646cf1f96b298805b36df7a
image: Update image_decomp() to avoid ifdefs

Adjust this function so that preprocessor macros are not needed. With
this, the host build uses more of the same header files as the target
build.

Rather than definining CONFIG_SYS_MALLOC_LEN, add a CONSERVE_MEMORY
define, since that is the purpose of the value.

This appears to have no impact on code size from a spot check of a few
boards (snow, firefly-rk3288, boston32r2el, m53menlo).

Signed-off-by: Simon Glass <sjg@chromium.org>
common/image.c
configs/sandbox_defconfig