ret = fit_image_get_data_and_size(fit, image_noffset, &data, &size);
- if (!host_build()) {
+ if (!tools_build()) {
printf("%s Data Start: ", p);
if (ret) {
printf("unavailable\n");
if (conf_uname == NULL) {
/* get configuration unit name from the default property */
debug("No configuration specified, trying default...\n");
- if (!host_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
noffset = fit_find_config_node(fit);
if (noffset < 0)
return noffset;
}
bootstage_mark(bootstage_id + BOOTSTAGE_SUB_CHECK_ARCH);
- if (!host_build() && IS_ENABLED(CONFIG_SANDBOX)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_SANDBOX)) {
if (!fit_image_check_target_arch(fit, noffset)) {
puts("Unsupported Architecture\n");
bootstage_error(bootstage_id + BOOTSTAGE_SUB_CHECK_ARCH);
}
/* perform any post-processing on the image data */
- if (!host_build() && IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS))
+ if (!tools_build() && IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS))
board_fit_image_post_process(fit, noffset, &buf, &size);
len = (ulong)size;
ret = -ENOSPC;
break;
case IH_COMP_GZIP:
- if (!host_build() && CONFIG_IS_ENABLED(GZIP))
+ if (!tools_build() && CONFIG_IS_ENABLED(GZIP))
ret = gunzip(load_buf, unc_len, image_buf, &image_len);
break;
case IH_COMP_BZIP2:
- if (!host_build() && CONFIG_IS_ENABLED(BZIP2)) {
+ if (!tools_build() && CONFIG_IS_ENABLED(BZIP2)) {
uint size = unc_len;
/*
}
break;
case IH_COMP_LZMA:
- if (!host_build() && CONFIG_IS_ENABLED(LZMA)) {
+ if (!tools_build() && CONFIG_IS_ENABLED(LZMA)) {
SizeT lzma_len = unc_len;
ret = lzmaBuffToBuffDecompress(load_buf, &lzma_len,
}
break;
case IH_COMP_LZO:
- if (!host_build() && CONFIG_IS_ENABLED(LZO)) {
+ if (!tools_build() && CONFIG_IS_ENABLED(LZO)) {
size_t size = unc_len;
ret = lzop_decompress(image_buf, image_len, load_buf, &size);
}
break;
case IH_COMP_LZ4:
- if (!host_build() && CONFIG_IS_ENABLED(LZ4)) {
+ if (!tools_build() && CONFIG_IS_ENABLED(LZ4)) {
size_t size = unc_len;
ret = ulz4fn(image_buf, image_len, load_buf, &size);
}
break;
case IH_COMP_ZSTD:
- if (!host_build() && CONFIG_IS_ENABLED(ZSTD)) {
+ if (!tools_build() && CONFIG_IS_ENABLED(ZSTD)) {
struct abuf in, out;
abuf_init_set(&in, image_buf, image_len);
#endif
/**
- * host_build() - check if we are building for the host
+ * tools_build() - check if we are building host tools
*
* @return true if building for the host, false if for a target
*/
-static inline bool host_build(void) {
+static inline bool tools_build(void)
+{
#ifdef USE_HOSTCC
return true;
#else