I'm trying to compile some firmware for a router. The company that made the router kindly gave the source for the firmware plus their own building scripts so people could create their own firmware. I'm in the stage of attempting to get the unmodified firmware to compile using the provided build scripts and I'm running into a problem that seems to be stopping the firmware from producing a binary successfully. I'm using Debian Wheezy as my building environment.
The part where it starts to all go awry is here:
And the trouble seems to start here:make -r -C hal/mips/pb42/current /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include/cyg/hal/plf_defs.inc
make[2]: Entering directory `/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/hal/mips/pb42/current'
mipsisa32-elf-gcc -finline-limit=7000 -mips32 -EB -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -G0 -mlong-calls -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current/src -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current/tests -I. -Wp,-MD,plf_defs.tmp -o plf_mk_defs.tmp -S /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current/src/plf_mk_defs.c
fgrep .equ plf_mk_defs.tmp | sed s/#// > /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include/cyg/hal/plf_defs.inc
tail: cannot open `+2' for reading: No such file or directory
make[2]: *** [/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include/cyg/hal/plf_defs.inc] Error 1
make[2]: Leaving directory `/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/hal/mips/pb42/current'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld'
/bin/sh: 1: cd: can't cd to /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/bin
mipsisa32-elf-objcopy: redboot.elf: No such file or directory
cp: cannot stat `redboot.rom': No such file or directory
make: *** [pb42_rom] Error 1
cp: cannot stat `./bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/bin/redboot.rom': No such file or directory
Google has told me that my problem is that the building scripts are using an old, outdated syntax for the tail command. I've tried two fixes that I found from searching, but unfortunately neither of those fixes work. One of the solutions given for fixing this was to use the command "export _POSIX2_VERSION=199209" in bash. This didn't work, and the error message stayed exactly the same. Another method I tried was using "sed -i 's/"tail +"/"tail -n +"/g' *" in to change any instances of the phrase in the source files, but that doesn't seem to work - every time I try to compile again using the build script I get the exact same message.tail: cannot open `+2' for reading: No such file or directory
I've linked the complete build log here which may help provide some clues (very verbose).
Anyone have any thoughts or ideas? I'm a bit lost and admittedly out of my depth here. Any help would be very much appreciated.
Regards,
fikasnus