summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rwxr-xr-xtools/binman/binman.py2
-rw-r--r--tools/buildman/kconfiglib.py11
-rw-r--r--tools/env/Makefile2
-rw-r--r--tools/kwbimage.c13
-rw-r--r--tools/kwboot.c8
-rw-r--r--tools/omapimage.c2
7 files changed, 21 insertions, 20 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 5000f4d5bb..a894b5c9d2 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -246,7 +246,6 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
$(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \
-I$(srctree)/lib/libfdt \
-I$(srctree)/tools \
- -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-DUSE_HOSTCC \
-D__KERNEL_STRICT_NAMES \
-D_GNU_SOURCE
@@ -263,7 +262,7 @@ $(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP)
subdir- += env
ifneq ($(CROSS_BUILD_TOOLS),)
-HOSTCC = $(CC)
+override HOSTCC = $(CC)
quiet_cmd_crosstools_strip = STRIP $^
cmd_crosstools_strip = $(STRIP) $^; touch $@
diff --git a/tools/binman/binman.py b/tools/binman/binman.py
index e1cb2fbb6f..857d698b4c 100755
--- a/tools/binman/binman.py
+++ b/tools/binman/binman.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
diff --git a/tools/buildman/kconfiglib.py b/tools/buildman/kconfiglib.py
index 7a47be9153..d28bbf0b49 100644
--- a/tools/buildman/kconfiglib.py
+++ b/tools/buildman/kconfiglib.py
@@ -892,7 +892,7 @@ class Config(object):
line_feeder.unget()
- elif t0 == T_SELECT:
+ elif t0 == T_SELECT or t0 == T_IMPLY:
target = tokens.get_next()
stmt.referenced_syms.add(target)
@@ -3406,8 +3406,8 @@ def _internal_error(msg):
T_OPTIONAL, T_PROMPT, T_DEFAULT,
T_BOOL, T_TRISTATE, T_HEX, T_INT, T_STRING,
T_DEF_BOOL, T_DEF_TRISTATE,
- T_SELECT, T_RANGE, T_OPTION, T_ALLNOCONFIG_Y, T_ENV,
- T_DEFCONFIG_LIST, T_MODULES, T_VISIBLE) = range(39)
+ T_SELECT, T_IMPLY, T_RANGE, T_OPTION, T_ALLNOCONFIG_Y, T_ENV,
+ T_DEFCONFIG_LIST, T_MODULES, T_VISIBLE) = range(40)
# The leading underscore before the function assignments below prevent pydoc
# from listing them. The constants could be hidden too, but they're fairly
@@ -3424,8 +3424,9 @@ _get_keyword = \
"prompt": T_PROMPT, "default": T_DEFAULT, "bool": T_BOOL, "boolean": T_BOOL,
"tristate": T_TRISTATE, "int": T_INT, "hex": T_HEX, "def_bool": T_DEF_BOOL,
"def_tristate": T_DEF_TRISTATE, "string": T_STRING, "select": T_SELECT,
- "range": T_RANGE, "option": T_OPTION, "allnoconfig_y": T_ALLNOCONFIG_Y,
- "env": T_ENV, "defconfig_list": T_DEFCONFIG_LIST, "modules": T_MODULES,
+ "imply": T_IMPLY, "range": T_RANGE, "option": T_OPTION,
+ "allnoconfig_y": T_ALLNOCONFIG_Y, "env": T_ENV,
+ "defconfig_list": T_DEFCONFIG_LIST, "modules": T_MODULES,
"visible": T_VISIBLE}.get
# Strings to use for True and False
diff --git a/tools/env/Makefile b/tools/env/Makefile
index 38ad118d03..95b28c0b3a 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -8,7 +8,7 @@
# fw_printenv is supposed to run on the target system, which means it should be
# built with cross tools. Although it may look weird, we only replace "HOSTCC"
# with "CC" here for the maximum code reuse of scripts/Makefile.host.
-HOSTCC = $(CC)
+override HOSTCC = $(CC)
# Compile for a hosted environment on the target
HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index 93797c99da..2c637c7446 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -992,7 +992,11 @@ int add_binary_header_v1(uint8_t *cur)
return -1;
}
- fstat(fileno(bin), &s);
+ if (fstat(fileno(bin), &s)) {
+ fprintf(stderr, "Cannot stat binary file %s\n",
+ binarye->binary.file);
+ goto err_close;
+ }
binhdrsz = sizeof(struct opt_hdr_v1) +
(binarye->binary.nargs + 2) * sizeof(uint32_t) +
@@ -1022,7 +1026,7 @@ int add_binary_header_v1(uint8_t *cur)
fprintf(stderr,
"Could not read binary image %s\n",
binarye->binary.file);
- return -1;
+ goto err_close;
}
fclose(bin);
@@ -1040,6 +1044,11 @@ int add_binary_header_v1(uint8_t *cur)
cur += sizeof(uint32_t);
return 0;
+
+err_close:
+ fclose(bin);
+
+ return -1;
}
#if defined(CONFIG_KWB_SECURE)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 26b394963c..8a421cda4e 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -664,14 +664,6 @@ kwboot_img_patch_hdr(void *img, size_t size)
hdr_v0->srcaddr = hdr_v0->ext
? sizeof(struct kwb_header)
: sizeof(*hdr_v0);
- } else {
- /*
- * Subtract mkimage header size from destination address
- * as this header is not expected by the Marvell BootROM.
- * This way, the execution address is identical to the
- * one the image is compiled for (TEXT_BASE).
- */
- hdr->destaddr = hdr->destaddr - sizeof(struct image_header);
}
hdr->checksum = kwboot_img_csum8(hdr, hdrsz) - csum;
diff --git a/tools/omapimage.c b/tools/omapimage.c
index 7198b3330d..e31b94ae4f 100644
--- a/tools/omapimage.c
+++ b/tools/omapimage.c
@@ -143,7 +143,7 @@ static void omapimage_set_header(void *ptr, struct stat *sbuf, int ifd,
toc++;
memset(toc, 0xff, sizeof(*toc));
- gph_set_header(gph, sbuf->st_size - OMAP_FILE_HDR_SIZE,
+ gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE + GPIMAGE_HDR_SIZE,
params->addr, 0);
if (strncmp(params->imagename, "byteswap", 8) == 0) {