From: Stuart M. <stu...@st...> - 2007-04-09 21:14:26
|
Adrian Adrian McMenamin wrote: > This is what I am getting with 2.6.20 > > MODPOST vmlinux > printf: 1: $[0x80000000: expected numeric value > printf: 1: +: expected numeric value > printf: 1: +: expected numeric value > printf: 1: 0x00001000+0x1000]: not completely converted > printf: 1: $[0x80000000: expected numeric value > printf: 1: +: expected numeric value > printf: 1: +: expected numeric value > printf: 1: 0x00800000]: not completely converted > AS arch/sh/boot/compressed/head.o > CC arch/sh/boot/compressed/misc.o > OBJCOPY arch/sh/boot/compressed/vmlinux.bin > GZIP arch/sh/boot/compressed/vmlinux.bin.gz > LD arch/sh/boot/compressed/piggy.o > LD arch/sh/boot/compressed/vmlinux > /home/adrian/buildroot/build_sh4/staging_dir/bin/sh4-linux-ld: invalid > hex number `0x000000000x000000000x0c0000000x000000000x00800000' > make[2]: *** [arch/sh/boot/compressed/vmlinux] Error 1 > make[1]: *** [arch/sh/boot/compressed/vmlinux] Error 2 > make: *** [zImage] Error 2 > > I got similar stuff yesterday with 2.6.17 but I assumed this was bit rot > in the tools, so I rebuild them. > > This is over my head - anyone able to tell me where to start fixing > this? The problem is that you're not getting shell arithmetic expansion. I'm guessing that the shell invoked by your make (usually /bin/sh) is not bash, or is one of the versions which doesn't support $[ ... ] for arithmetic expansion (version 2.0 ?). Try this to see if your shell does support $(( ... )) style expansion: --- linux.orig/arch/sh/boot/Makefile +++ linux/arch/sh/boot/Makefile @@ -23,8 +23,8 @@ CONFIG_MEMORY_START ?= 0 CONFIG_ZERO_PAGE_OFFSET ?= 0 MKIMAGE := $(srctree)/scripts/mkuboot.sh -ULOADADDR := $(shell printf "0x%8x" $$[0x80000000 + $(CONFIG_MEMORY_START) + $(CONFIG_ZERO_PAGE_OFFSET)]) -UENTRYADDR := $(shell printf "0x%8x" $$[$(ULOADADDR) + 0x1000]) +ULOADADDR := $(shell printf "0x%8x" $$((0x80000000 + $(CONFIG_MEMORY_START) + $(CONFIG_ZERO_PAGE_OFFSET)))) +UENTRYADDR := $(shell printf "0x%8x" $$(($(ULOADADDR) + 0x1000))) quiet_cmd_uimage = UIMAGE $@ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \ |