I'm fairly new to OpenWRT so please be gentle! I'm trying to build a U-Boot image for a BT Homehub 5 from a repository that seems to work fine for everyone else. I suspect my issue is the Mac, but the others I've spoke to aren't using a Mac its difficult to get help. So I figured I would ask on the main OpenWRT forum for help, hence here I am!
The hub 5 discussion is here ... http://openwrt.ebilan.co.uk/viewforum.php?f=7.
I can build OpenWRT images just fine on my Mac after jumping through some hoops with MacPorts and some other bits. But the u-boot build always fails with an obscure error. The process I am following is this:
git clone https://github.com/xdarklight/u-boot-lantiq.git
cd u-boot-lantiq
wget https://github.com/openwrt/openwrt/raw/master/package/boot/uboot-lantiq/patches/0047-add-gcc5-support.patch
wget https://github.com/openwrt/openwrt/raw/de9b443207c2428c91d0ad75494e8e6941d762ac/package/boot/uboot-lantiq/patches/0045-no_extern_inline.patch
wget https://github.com/openwrt/openwrt/raw/de9b443207c2428c91d0ad75494e8e6941d762ac/package/boot/uboot-lantiq/patches/0046-no_weak_alias.patch
patch -p1 < 0045-no_extern_inline.patch
patch -p1 < 0046-no_weak_alias.patch
patch -p1 < 0047-add-gcc5-support.patch
export STAGING_DIR=/Volumes/OpenWRT/openwrt-trunk/staging_dir/toolchain-mips_34kc+dsp_gcc-5.3.0_musl-1.1.14/bin/
export PATH=$STAGING_DIR:$PATH
make bthomehubv5a_ram_config CROSS_COMPILE=mips-openwrt-linux-
make CROSS_COMPILE=mips-openwrt-linux-
On running those commands this is what is output:
Plasmas-MBP:u-boot-lantiq plasma$ make bthomehubv5a_ram_config CROSS_COMPILE=mips-openwrt-linux-
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
Configuring for bthomehubv5a_ram - Board: bthomehubv5a, Options: SYS_BOOT_RAM
Plasmas-MBP:u-boot-lantiq plasma$ make CROSS_COMPILE=mips-openwrt-linux-
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
Generating include/spl-autoconf.mk
Generating include/tpl-autoconf.mk
mips-openwrt-linux-gcc -DDO_DEPS_ONLY \
-g -Os -ffunction-sections -fdata-sections -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xA0100000 -I/Volumes/OpenWRT/u-boot-lantiq/include -I/Volumes/OpenWRT/u-boot-lantiq/arch/mips/include -fno-builtin -ffreestanding -nostdinc -isystem /Volumes/OpenWRT/openwrt-trunk/staging_dir/toolchain-mips_34kc+dsp_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -EB -msoft-float -march=mips32r2 -mabi=32 -DCONFIG_32BIT -mtune=34kc -I/Volumes/OpenWRT/u-boot-lantiq/board/bt/bthomehubv5a -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage \
-o lib/asm-offsets.s lib/asm-offsets.c -c -S
Generating include/generated/generic-asm-offsets.h
tools/scripts/make-asm-offsets lib/asm-offsets.s include/generated/generic-asm-offsets.h
if [ -f arch/mips/cpu/mips32/vrx200/asm-offsets.c ];then \
mips-openwrt-linux-gcc -DDO_DEPS_ONLY \
-g -Os -ffunction-sections -fdata-sections -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xA0100000 -I/Volumes/OpenWRT/u-boot-lantiq/include -I/Volumes/OpenWRT/u-boot-lantiq/arch/mips/include -fno-builtin -ffreestanding -nostdinc -isystem /Volumes/OpenWRT/openwrt-trunk/staging_dir/toolchain-mips_34kc+dsp_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -EB -msoft-float -march=mips32r2 -mabi=32 -DCONFIG_32BIT -mtune=34kc -I/Volumes/OpenWRT/u-boot-lantiq/board/bt/bthomehubv5a -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage \
-o arch/mips/cpu/mips32/vrx200/asm-offsets.s arch/mips/cpu/mips32/vrx200/asm-offsets.c -c -S; \
else \
touch arch/mips/cpu/mips32/vrx200/asm-offsets.s; \
fi
Generating include/generated/asm-offsets.h
tools/scripts/make-asm-offsets arch/mips/cpu/mips32/vrx200/asm-offsets.s include/generated/asm-offsets.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tools all
cat /dev/null >.depend
In file included from /Volumes/OpenWRT/u-boot-lantiq/common/image.c:53:
In file included from /Volumes/OpenWRT/u-boot-lantiq/include/image.h:20:
/Volumes/OpenWRT/u-boot-lantiq/arch/mips/include/asm/byteorder.h:72:4: error: "MIPS, but
neither __MIPSEB__, nor __MIPSEL__???"
# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"
^
1 error generated.
In file included from /Volumes/OpenWRT/u-boot-lantiq/common/image-sig.c:15:
In file included from /Volumes/OpenWRT/u-boot-lantiq/include/image.h:20:
/Volumes/OpenWRT/u-boot-lantiq/arch/mips/include/asm/byteorder.h:72:4: error: "MIPS, but
neither __MIPSEB__, nor __MIPSEL__???"
# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"
^
1 error generated.
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include /Volumes/OpenWRT/u-boot-lantiq/include/libfdt_env.h -idirafter /Volumes/OpenWRT/u-boot-lantiq/include -idirafter /Volumes/OpenWRT/u-boot-lantiq/arch/mips/include -idirafter /Volumes/OpenWRT/u-boot-lantiq/include -I /Volumes/OpenWRT/u-boot-lantiq/lib/libfdt -I /Volumes/OpenWRT/u-boot-lantiq/tools -DCONFIG_SYS_TEXT_BASE=0xA0100000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -o aisimage.o aisimage.c -c
In file included from aisimage.c:10:
In file included from /Volumes/OpenWRT/u-boot-lantiq/include/image.h:20:
/Volumes/OpenWRT/u-boot-lantiq/arch/mips/include/asm/byteorder.h:72:4: error: "MIPS, but
neither __MIPSEB__, nor __MIPSEL__???"
# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"
^
1 error generated.
make[1]: *** [aisimage.o] Error 1
make: *** [tools] Error 2
Plasmas-MBP:u-boot-lantiq plasma$
When I Google for the error error: "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" it really doesn't turn up anything of help. Has anyone successfully built u-boot on a Mac or can point me in the right direction.
Many Thanks in advance.
Plasma