diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 4 | ||||
-rw-r--r-- | tools/aisimage.c | 3 | ||||
-rw-r--r-- | tools/bmp_logo.c | 2 | ||||
-rwxr-xr-x | tools/dtc-version.sh | 20 | ||||
-rw-r--r-- | tools/imximage.c | 3 | ||||
-rw-r--r-- | tools/kwbimage.c | 3 | ||||
-rw-r--r-- | tools/logos/siemens.bmp | bin | 0 -> 25766 bytes | |||
-rw-r--r-- | tools/mkenvimage.c | 3 | ||||
-rw-r--r-- | tools/omapimage.c | 3 | ||||
-rw-r--r-- | tools/pblimage.c | 2 | ||||
-rw-r--r-- | tools/ublimage.c | 3 |
11 files changed, 24 insertions, 22 deletions
diff --git a/tools/Makefile b/tools/Makefile index f4ca1cf..0a29147 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -155,6 +155,7 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y)) # # Use native tools and options # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps +# Define _GNU_SOURCE to obtain the getline prototype from stdio.h # HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \ -idirafter $(SRCTREE)/include \ @@ -164,7 +165,8 @@ HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \ -I $(SRCTREE)/tools \ -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \ -DUSE_HOSTCC \ - -D__KERNEL_STRICT_NAMES + -D__KERNEL_STRICT_NAMES \ + -D_GNU_SOURCE all: $(obj).depend $(BINS) $(LOGO-y) subdirs diff --git a/tools/aisimage.c b/tools/aisimage.c index cd89145..980bf2e 100644 --- a/tools/aisimage.c +++ b/tools/aisimage.c @@ -5,9 +5,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* Required to obtain the getline prototype from stdio.h */ -#define _GNU_SOURCE - #include "mkimage.h" #include "aisimage.h" #include <image.h> diff --git a/tools/bmp_logo.c b/tools/bmp_logo.c index b2ad3d5..2247adc 100644 --- a/tools/bmp_logo.c +++ b/tools/bmp_logo.c @@ -179,7 +179,7 @@ int main (int argc, char *argv[]) printf("unsigned char bmp_logo_bitmap[] = {\n"); for (i=(b->height-1)*b->width; i>=0; i-=b->width) { for (x = 0; x < b->width; x++) { - b->data[(uint16_t) i + x] = (uint8_t) fgetc (fp) \ + b->data[i + x] = (uint8_t) fgetc(fp) + DEFAULT_CMAP_SIZE; } } diff --git a/tools/dtc-version.sh b/tools/dtc-version.sh new file mode 100755 index 0000000..e8c94d3 --- /dev/null +++ b/tools/dtc-version.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# dtc-version dtc-command +# +# Prints the dtc version of `dtc-command' in a canonical 4-digit form +# such as `0222' for binutils 2.22 +# + +dtc="$*" + +if [ ${#dtc} -eq 0 ]; then + echo "Error: No dtc command specified." + printf "Usage:\n\t$0 <dtc-command>\n" + exit 1 +fi + +MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1) +MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2) + +printf "%02d%02d\\n" $MAJOR $MINOR diff --git a/tools/imximage.c b/tools/imximage.c index 3f2dc68..c87669b 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -9,9 +9,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* Required to obtain the getline prototype from stdio.h */ -#define _GNU_SOURCE - #include "mkimage.h" #include <image.h> #include "imximage.h" diff --git a/tools/kwbimage.c b/tools/kwbimage.c index d08e498..1df6b20 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -6,9 +6,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* Required to obtain the getline prototype from stdio.h */ -#define _GNU_SOURCE - #include "mkimage.h" #include <image.h> #include "kwbimage.h" diff --git a/tools/logos/siemens.bmp b/tools/logos/siemens.bmp Binary files differnew file mode 100644 index 0000000..bff2b19 --- /dev/null +++ b/tools/logos/siemens.bmp diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index f685ff2..bbd3041 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -9,9 +9,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* We want the GNU version of basename() */ -#define _GNU_SOURCE - #include <errno.h> #include <fcntl.h> #include <stdio.h> diff --git a/tools/omapimage.c b/tools/omapimage.c index d4d77d8..00853dd 100644 --- a/tools/omapimage.c +++ b/tools/omapimage.c @@ -14,9 +14,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* Required to obtain the getline prototype from stdio.h */ -#define _GNU_SOURCE - #include "mkimage.h" #include <image.h> #include "omapimage.h" diff --git a/tools/pblimage.c b/tools/pblimage.c index 4542a9c..bac5faf 100644 --- a/tools/pblimage.c +++ b/tools/pblimage.c @@ -3,8 +3,6 @@ * * SPDX-License-Identifier: GPL-2.0+ */ -#define _GNU_SOURCE - #include "mkimage.h" #include <image.h> #include "pblimage.h" diff --git a/tools/ublimage.c b/tools/ublimage.c index 6495db6..b4ef7f0 100644 --- a/tools/ublimage.c +++ b/tools/ublimage.c @@ -13,9 +13,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* Required to obtain the getline prototype from stdio.h */ -#define _GNU_SOURCE - #include "mkimage.h" #include <image.h> #include "ublimage.h" |