hi,
i know this is a old release, but i got old hardware lying around. its a
http://wiki.openwrt.org/toh/buffalo/whr-g54s.
this thing got 4mb of flash and i would like to use openvpn, openvpn and probably nothing more besides network connectivity. jow_laptop from #openwrt estimated that maybe even luci will find its space.
thing is im sitting on debian 8 and the backfire svn output, probably because since it was release in 2011 the build environment looks rather alien to it.
someone from #openwrt was so nice to provide me with a patch to fix this (its attached at the end)
make menuconfig works, but after that "make V=99" for error output shows:
make V=99
make[1]: Entering directory '/home/julius/tmp/backfire_10.03.1'
make[2]: Entering directory '/home/julius/tmp/backfire_10.03.1'
+ mkdir -p /home/julius/tmp/backfire_10.03.1/staging_dir/target-mipsel_uClibc-0.9.30.1
+ cd /home/julius/tmp/backfire_10.03.1/staging_dir/target-mipsel_uClibc-0.9.30.1
+ mkdir -p bin lib include stamp
mkdir -p /home/julius/tmp/backfire_10.03.1/build_dir/target-mipsel_uClibc-0.9.30.1/stamp
touch /home/julius/tmp/backfire_10.03.1/staging_dir/target-mipsel_uClibc-0.9.30.1/.prepared
+ mkdir -p /home/julius/tmp/backfire_10.03.1/staging_dir/host
+ cd /home/julius/tmp/backfire_10.03.1/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/julius/tmp/backfire_10.03.1/build_dir/host/stamp
install -m0644 /home/julius/tmp/backfire_10.03.1/tools/include/*.h /home/julius/tmp/backfire_10.03.1/staging_dir/host/include/
touch /home/julius/tmp/backfire_10.03.1/staging_dir/host/.prepared
make[3]: Entering directory '/home/julius/tmp/backfire_10.03.1/tools/m4'
mkdir -p /home/julius/tmp/backfire_10.03.1/dl
/home/julius/tmp/backfire_10.03.1/scripts/download.pl "/home/julius/tmp/backfire_10.03.1/dl" "m4-1.4.15.tar.gz" "5649a2e593b6c639deae9e72ede777dd" "@GNU/m4"
converted 'ftp://ftp.gnu.org/gnu/m4/m4-1.4.15.tar.gz' (ANSI_X3.4-1968) -> 'ftp://ftp.gnu.org/gnu/m4/m4-1.4.15.tar.gz' (UTF-8)
--2015-05-05 20:45:38-- ftp://ftp.gnu.org/gnu/m4/m4-1.4.15.tar.gz
=> '-'
Resolving ftp.gnu.org (ftp.gnu.org)... 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|208.118.235.20|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /gnu/m4 ... done.
==> SIZE m4-1.4.15.tar.gz ... 1559715
==> PASV ... done. ==> RETR m4-1.4.15.tar.gz ... done.
Length: 1559715 (1.5M) (unauthoritative)
m4-1.4.15.tar.gz 100%[=======================================================================================================================>] 1.49M 481KB/s in 3.4s
2015-05-05 20:45:43 (452 KB/s) - written to stdout [1559715]
. /home/julius/tmp/backfire_10.03.1/include/shell.sh; gzip -dc /home/julius/tmp/backfire_10.03.1/dl/m4-1.4.15.tar.gz | /bin/tar -C /home/julius/tmp/backfire_10.03.1/build_dir/host/m4-1.4.15/.. -xf -
Applying ./patches/stdio.in.patch using plaintext:
patching file lib/stdio.in.h
Hunk #1 succeeded at 141 (offset -2 lines).
touch /home/julius/tmp/backfire_10.03.1/build_dir/host/m4-1.4.15/.prepared8228bb4a3e6f3fd70125e6a80bf906a1
(cd /home/julius/tmp/backfire_10.03.1/build_dir/host/m4-1.4.15/; if [ -x configure ]; then cp -fpR /home/julius/tmp/backfire_10.03.1/scripts/config.{guess,sub} /home/julius/tmp/backfire_10.03.1/build_dir/host/m4-1.4.15// && ./configure CFLAGS="-O2 -I/home/julius/tmp/backfire_10.03.1/staging_dir/host/include" CPPFLAGS="-O2 -I/home/julius/tmp/backfire_10.03.1/staging_dir/host/include" LDFLAGS="-L/home/julius/tmp/backfire_10.03.1/staging_dir/host/lib" SHELL="/bin/bash" --target=x86_64-linux-gnu --host=x86_64-linux-gnu --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/home/julius/tmp/backfire_10.03.1/staging_dir/host --exec-prefix=/home/julius/tmp/backfire_10.03.1/staging_dir/host --sysconfdir=/home/julius/tmp/backfire_10.03.1/staging_dir/host/etc --localstatedir=/home/julius/tmp/backfire_10.03.1/staging_dir/host/var ; fi )
cp: cannot stat '/home/julius/tmp/backfire_10.03.1/scripts/config.{guess,sub}': No such file or directory
Makefile:32: recipe for target '/home/julius/tmp/backfire_10.03.1/build_dir/host/m4-1.4.15/.configured' failed
make[3]: *** [/home/julius/tmp/backfire_10.03.1/build_dir/host/m4-1.4.15/.configured] Error 1
make[3]: Leaving directory '/home/julius/tmp/backfire_10.03.1/tools/m4'
tools/Makefile:105: recipe for target 'tools/m4/compile' failed
make[2]: *** [tools/m4/compile] Error 2
make[2]: Leaving directory '/home/julius/tmp/backfire_10.03.1'
tools/Makefile:104: recipe for target '/home/julius/tmp/backfire_10.03.1/staging_dir/target-mipsel_uClibc-0.9.30.1/stamp/.tools_install_nnnnn' failed
make[1]: *** [/home/julius/tmp/backfire_10.03.1/staging_dir/target-mipsel_uClibc-0.9.30.1/stamp/.tools_install_nnnnn] Error 2
make[1]: Leaving directory '/home/julius/tmp/backfire_10.03.1'
/home/julius/tmp/backfire_10.03.1/include/toplevel.mk:131: recipe for target 'world' failed
make: *** [world] Error 2
i can see that a copy fails, but how do you troubleshoot why the file isnt there in the first place?
Index: toolchain/binutils/Makefile
===================================================================
--- toolchain/binutils/Makefile (revision 36906)
+++ toolchain/binutils/Makefile (working copy)
@@ -72,6 +72,7 @@
endef
define Host/Compile
+ echo "MAKEINFO = :" >> $(HOST_BUILD_DIR)/Makefile
$(MAKE) -C $(HOST_BUILD_DIR) all
endef
Index: toolchain/gcc/Makefile
===================================================================
--- toolchain/gcc/Makefile (revision 36906)
+++ toolchain/gcc/Makefile (working copy)
@@ -172,6 +172,7 @@
endef
define Stage0/Compile
+ echo "MAKEINFO = :" >> $(HOST_BUILD_DIR0)/Makefile
$(GCC_MAKE) -C $(HOST_BUILD_DIR0) all-gcc
endef
@@ -188,6 +189,7 @@
endef
define Stage1/Compile
+ echo "MAKEINFO = :" >> $(HOST_BUILD_DIR1)/Makefile
$(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/
$(GCC_MAKE) -C $(HOST_BUILD_DIR1) \
all-build-libiberty \
@@ -222,6 +224,7 @@
endef
define Stage2/Compile
+ echo "MAKEINFO = :" >> $(HOST_BUILD_DIR2)/Makefile
$(GCC_MAKE) -C $(HOST_BUILD_DIR2) all
endef
Index: tools/mklibs/patches/001-missing_stdio.patch
===================================================================
--- tools/mklibs/patches/001-missing_stdio.patch (revision 36906)
+++ tools/mklibs/patches/001-missing_stdio.patch (working copy)
@@ -1,3 +1,13 @@
+--- a/src/mklibs-readelf/elf.cpp
++++ b/src/mklibs-readelf/elf.cpp
+@@ -25,6 +25,7 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+
+ using namespace Elf;
+
--- a/src/mklibs-readelf/main.cpp
+++ b/src/mklibs-readelf/main.cpp
@@ -7,6 +7,7 @@
Index: tools/m4/patches/stdio.in.patch
===================================================================
--- tools/m4/patches/stdio.in.patch (revisión: 0)
+++ tools/m4/patches/stdio.in.patch (copia de trabajo)
@@ -0,0 +1,12 @@
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -143,7 +143,9 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
Index: tools/bison/patches/stdio.in.patch
===================================================================
--- tools/bison/patches/stdio.in.patch (revisión: 0)
+++ tools/bison/patches/stdio.in.patch (copia de trabajo)
@@ -0,0 +1,12 @@
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -143,7 +143,9 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
Index: include/depends.mk
===================================================================
--- include/depends.mk (revision 33203)
+++ include/depends.mk (working copy)
@@ -13,7 +13,7 @@
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check"
-find_md5=find $(1) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | md5s
+find_md5=$(SH_FUNC) find $(1) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | md5s
define rdep
.PRECIOUS: $(2)
Index: include/kernel.mk
===================================================================
--- include/kernel.mk (revision 33203)
+++ include/kernel.mk (working copy)
@@ -68,6 +68,7 @@
endef
define ModuleAutoLoad
+ $(SH_FUNC) \
export modules=; \
add_module() { \
mkdir -p $(2)/etc/modules.d; \
Index: include/package-ipkg.mk
===================================================================
--- include/package-ipkg.mk (revision 33203)
+++ include/package-ipkg.mk (working copy)
@@ -94,6 +94,8 @@
echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
( \
+ echo "Package: $(1)"; \
+ echo "Version: $(VERSION)"; \
DEPENDS='$(EXTRA_DEPENDS)'; \
for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \
DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \
@@ -108,10 +110,10 @@
echo "Maintainer: $(MAINTAINER)"; \
echo "Architecture: $(PKGARCH)"; \
echo "Installed-Size: 0"; \
- echo -n "Description: "; getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
- ) >> $$(IDIR_$(1))/CONTROL/control
+ echo -n "Description: "; $(SH_FUNC) getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
+ ) > $$(IDIR_$(1))/CONTROL/control
chmod 644 $$(IDIR_$(1))/CONTROL/control
- (cd $$(IDIR_$(1))/CONTROL; \
+ $(SH_FUNC) (cd $$(IDIR_$(1))/CONTROL; \
$($(1)_COMMANDS) \
)
$(call Package/$(1)/install,$$(IDIR_$(1)))
Index: include/target.mk
===================================================================
--- include/target.mk (revision 33203)
+++ include/target.mk (working copy)
@@ -67,10 +67,10 @@
echo "Target-Profile-Kconfig: yes"; \
fi; \
echo "Target-Profile-Config: "; \
- getvar "$(call shvar,Profile/$(1)/Config)"; \
+ $(SH_FUNC) getvar "$(call shvar,Profile/$(1)/Config)"; \
echo "@@"; \
echo "Target-Profile-Description:"; \
- getvar "$(call shvar,Profile/$(1)/Description)"; \
+ $(SH_FUNC) getvar "$(call shvar,Profile/$(1)/Description)"; \
echo "@@"; \
echo;
ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(SUBTARGET),$(SUBTARGET)_)$(1))),y)
@@ -186,7 +186,7 @@
echo 'Linux-Release: $(LINUX_RELEASE)'; \
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
echo 'Target-Description:'; \
- getvar $(call shvar,Target/Description); \
+ $(SH_FUNC) getvar $(call shvar,Target/Description); \
echo '@@'; \
echo 'Default-Packages: $(DEFAULT_PACKAGES)'; \
$(DUMPINFO)
Index: include/unpack.mk
===================================================================
--- include/unpack.mk (revision 33203)
+++ include/unpack.mk (working copy)
@@ -71,10 +71,10 @@
endif
ifdef PKG_BUILD_DIR
- PKG_UNPACK ?= $(call UNPACK_CMD,$(PKG_BUILD_DIR)) $(call CRLF_CMD,$(PKG_BUILD_DIR))
+ PKG_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(PKG_BUILD_DIR)) $(call CRLF_CMD,$(PKG_BUILD_DIR))
endif
ifdef HOST_BUILD_DIR
- HOST_UNPACK ?= $(call UNPACK_CMD,$(HOST_BUILD_DIR)) $(call CRLF_CMD,$(HOST_BUILD_DIR))
+ HOST_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(HOST_BUILD_DIR)) $(call CRLF_CMD,$(HOST_BUILD_DIR))
endif
endif # PKG_SOURCE
Index: rules.mk
===================================================================
--- rules.mk (revision 40746)
+++ rules.mk (working copy)
@@ -16,8 +16,6 @@
TMP_DIR:=$(TOPDIR)/tmp
-export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' --
-
qstrip=$(strip $(subst ",,$(1)))
#"))
@@ -153,6 +151,7 @@
export PATH:=$(TARGET_PATH)
export STAGING_DIR
export GCC_HONOUR_COPTS:=0
+export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config