Hi All,
In preparation to the upcoming release of openwrt the new "trunk" branch
has been created in openwrt-xburst git.
I tried to build against the trunk using config.full_system and of
course there were issues here and there with some packages. Some of them
have been fixed and committed to openwrt-packages git, for some of them
openwrt tickets have been created.
Some changes I keep locally, because they might be not compatible with
older openwrt backfire release. Since the config.full_system was built
fine at the end, I wanted to share the patches that were used to build
the system. I hope somebody could follow it and already start testing
the trunk build :)
Anyway, here goes in attachment:
openwrt-packages-git.patch (all packages build fine, plplot marked as
broken. There are problems if 'perl' package was already built before
plplot, in which case plplot is using perl from staging dir, and then
perl fails to find its own modules).
openwrt-xburst-trunk.patch (basically, it takes couple of important
commits from openwrt-xburst and does some changes in trunk to make it
build and work, like https://dev.openwrt.org/ticket/9044).
openwrt-xburst-feeds.patch (it's the https://dev.openwrt.org/ticket/9048
fix).
Anyway, it's a starting point with these three patches for
openwrt-packages, openwrt-xburst-trunk and openwrt feeds to move to
openwrt trunk.
Now that the image can be built fine, it's a good chance to test how it
runs and to merge the rest of patches from openwrt-xburst-backfire ;)
I hope it helps someone.
diff --git a/alsa-lib/patches/002-versionsort.patch b/alsa-lib/patches/002-versionsort.patch
deleted file mode 100644
index 43f97de..0000000
--- a/alsa-lib/patches/002-versionsort.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- alsa-lib-1.0.24.1.orig/src/ucm/parser.c 2011-03-13 21:17:10.405058674 +0300
-+++ alsa-lib-1.0.24.1/src/ucm/parser.c 2011-03-13 21:26:24.705183404 +0300
-@@ -32,6 +32,9 @@
-
- #include "ucm_local.h"
- #include <dirent.h>
-+#include <string.h>
-+#include <ctype.h>
-+#include <stdint.h>
-
- /** The name of the environment variable containing the UCM directory */
- #define ALSA_CONFIG_UCM_VAR "ALSA_CONFIG_UCM"
-@@ -40,6 +43,100 @@
- struct list_head *base,
- snd_config_t *cfg);
-
-+ /* states: S_N: normal, S_I: comparing integral part, S_F: comparing
-+ fractional parts, S_Z: idem but with leading Zeroes only */
-+ #define S_N 0x0
-+ #define S_I 0x4
-+ #define S_F 0x8
-+ #define S_Z 0xC
-+
-+ /* result_type: CMP: return diff; LEN: compare using len_diff/diff */
-+ #define CMP 2
-+ #define LEN 3
-+
-+ /* using more efficient isdigit() */
-+ #undef isdigit
-+ #define isdigit(a) ((unsigned)((a) - '0') <= 9)
-+
-+ /* Compare S1 and S2 as strings holding indices/version numbers,
-+ returning less than, equal to or greater than zero if S1 is less than,
-+ equal to or greater than S2 (for more info, see the texinfo doc).
-+ */
-+ int strverscmp (const char *s1, const char *s2)
-+ {
-+ const unsigned char *p1 = (const unsigned char *) s1;
-+ const unsigned char *p2 = (const unsigned char *) s2;
-+ unsigned char c1, c2;
-+ int state;
-+ int diff;
-+
-+ /* Symbol(s) 0 [1-9] others (padding)
-+ Transition (10) 0 (01) d (00) x (11) - */
-+ static const uint8_t next_state[] =
-+ {
-+ /* state x d 0 - */
-+ /* S_N */ S_N, S_I, S_Z, S_N,
-+ /* S_I */ S_N, S_I, S_I, S_I,
-+ /* S_F */ S_N, S_F, S_F, S_F,
-+ /* S_Z */ S_N, S_F, S_Z, S_Z
-+ };
-+
-+ static const int8_t result_type[] =
-+ {
-+ /* state x/x x/d x/0 x/- d/x d/d d/0 d/-
-+ 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */
-+
-+ /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
-+ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
-+ /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP,
-+ +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP,
-+ /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
-+ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
-+ /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP,
-+ -1, CMP, CMP, CMP
-+ };
-+
-+ if (p1 == p2)
-+ return 0;
-+
-+ c1 = *p1++;
-+ c2 = *p2++;
-+ /* Hint: '0' is a digit too. */
-+ state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
-+
-+ while ((diff = c1 - c2) == 0 && c1 != '\0')
-+ {
-+ state = next_state[state];
-+ c1 = *p1++;
-+ c2 = *p2++;
-+ state |= (c1 == '0') + (isdigit (c1) != 0);
-+ }
-+
-+ state = result_type[state << 2 | (((c2 == '0') + (isdigit (c2) != 0)))];
-+
-+ switch (state)
-+ {
-+ case CMP:
-+ return diff;
-+
-+ case LEN:
-+ while (isdigit (*p1++))
-+ if (!isdigit (*p2++))
-+ return 1;
-+
-+ return isdigit (*p2) ? -1 : diff;
-+
-+ default:
-+ return state;
-+ }
-+ }
-+
-+int versionsort(const void *a, const void *b)
-+{
-+ return strverscmp((*(const struct dirent **) a)->d_name,
-+ (*(const struct dirent **) b)->d_name);
-+}
-+
- /*
- * Parse string
- */
diff --git a/gcc-mips/Makefile b/gcc-mips/Makefile
index 13e4418..f7dabc2 100644
--- a/gcc-mips/Makefile
+++ b/gcc-mips/Makefile
@@ -7,15 +7,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gcc
#PKG_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#"))
-PKG_VERSION:=4.3.3
-PKG_RELEASE:=3
+PKG_VERSION:=4.5.2
+PKG_RELEASE:=1
PATCH_DIR=$(TOPDIR)/toolchain/gcc/patches/$(PKG_VERSION)
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \
http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \
ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=354853e0b2da90c527e35aabb8d6f1e6
+PKG_MD5SUM:=d6559145853fbaaa0fd7556ed93bce9a
PKG_INSTALL:=1
PKG_FIXUP:=libtool
@@ -36,7 +36,7 @@ define Package/gcc-mips
SECTION:=devel
CATEGORY:=Development
TITLE:=gcc-mips
- DEPENDS:=+mpfr +binutils
+ DEPENDS:=+mpfr +binutils +libmpc
endef
define Package/gcc-mips/description
@@ -45,7 +45,7 @@ endef
define Build/Prepare
$(call Build/Prepare/Default)
- ($(CP) ./patches $(PKG_BUILD_DIR); cd $(PKG_BUILD_DIR); patch -Np1 < ./patches/001-cache-amnesia.patch;);
+# ($(CP) ./patches $(PKG_BUILD_DIR); cd $(PKG_BUILD_DIR); patch -Np1 < ./patches/001-cache-amnesia.patch;);
(cd $(PKG_BUILD_DIR)/libstdc++-v3; \
$(SED) 's/m4_rename(/m4_rename_force(/' acinclude.m4;);
endef
@@ -70,6 +70,7 @@ define Build/Configure
--disable-libmudflap \
--disable-multilib \
--with-gmp=$(STAGING_DIR)/usr \
+ --with-mpc=$(STAGING_DIR)/usr \
--with-mpfr=$(STAGING_DIR)/usr \
--prefix=/usr \
$(EXTRA_TARGET) \
@@ -84,12 +85,18 @@ define Build/Compile
endef
define Package/gcc-mips/install
- $(INSTALL_DIR) $(1)/usr
- cp -r $(PKG_INSTALL_DIR)/usr/{bin,include,lib,libexec} $(1)/usr
- cp -rf $(TOOLCHAIN_DIR)/usr/include/* $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/include
- cp -rf $(TOOLCHAIN_DIR)/usr/lib/*.{a,la,o} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
- cp -rf $(TOOLCHAIN_DIR)/lib/* $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
- rm -rf $(1)/usr/lib/libstdc++.so*
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+ cp -r $(PKG_INSTALL_DIR)/usr/{include,libexec} $(1)/usr
+ cp $(PKG_INSTALL_DIR)/usr/bin/{$(REAL_GNU_TARGET_NAME)-{g++,gcc},gccbug,cpp,gcov} $(1)/usr/bin
+ ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/c++
+ ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/g++
+ ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++
+ ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc
+ ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION)
+ cp $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+ cp -r $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib
+ cp -r $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+ cp $(TOOLCHAIN_DIR)/lib/*.{a,o} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
endef
$(eval $(call BuildPackage,gcc-mips))
diff --git a/gnuplot-gfx/Makefile b/gnuplot-gfx/Makefile
index 12ade57..fa325a4 100644
--- a/gnuplot-gfx/Makefile
+++ b/gnuplot-gfx/Makefile
@@ -161,6 +161,7 @@ MAKE_FLAGS += -j2 config m4 term src docs share
# how to set this as default?
#TARGET_LDFLAGS += -Wl,-rpath-link -Wl,$(STAGING_DIR)/usr/lib
+TARGET_LDFLAGS += -lncurses
define Package/gnuplot-gfx/install
$(INSTALL_DIR) $(1)/usr/bin
diff --git a/ncursesw/Makefile b/ncursesw/Makefile
index 79bc263..9bf705a 100644
--- a/ncursesw/Makefile
+++ b/ncursesw/Makefile
@@ -74,6 +74,12 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/bin $(2)/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/ncursesw5-config $(2)/bin/
+ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+ $(2)/bin/ncursesw5-config
+ ln -sf $(STAGING_DIR)/host/bin/ncursesw5-config $(1)/usr/bin/ncursesw5-config
endef
$(eval $(call BuildPackage,libncursesw))
diff --git a/plplot/Makefile b/plplot/Makefile
index 529dd9a..e408072 100644
--- a/plplot/Makefile
+++ b/plplot/Makefile
@@ -39,12 +39,13 @@ define Host/Configure
endef
define Host/Compile/Octave
+ PERL5LIB=$(STAGING_DIR)/usr/lib/perl5/5.10 \
$(MAKE) -C $(HOST_BUILD_DIR)/bindings/octave massage
endef
define Host/Compile
$(if $(CONFIG_PACKAGE_plplot-octave),$(Host/Compile/Octave),)
- $(MAKE) -C $(HOST_BUILD_DIR)/build_dir VERBOSE=1 -j4
+ $(MAKE) -C $(HOST_BUILD_DIR)/build_dir VERBOSE=1
endef
define Host/Install/Octave
@@ -77,7 +78,7 @@ endef
define Package/plplot
$(call Package/plplot/Default)
- DEPENDS:=+libltdl +zlib +libfreetype
+ DEPENDS:=+libltdl +zlib +libfreetype @BROKEN
TITLE+=
endef
@@ -277,7 +278,7 @@ define Build/Configure
endef
define Build/Compile
- $(call Build/Compile/Default, VERBOSE=1 -j4)
+ $(call Build/Compile/Default, VERBOSE=1)
endef
diff --git a/triggersad/patches/001-input.patch b/triggersad/patches/001-input.patch
index 2f8d448..60f7ecd 100644
--- a/triggersad/patches/001-input.patch
+++ b/triggersad/patches/001-input.patch
@@ -6,7 +6,7 @@ diff -ur triggerhappy-0.1.3.orig/Makefile triggerhappy-0.1.3/Makefile
$< > $@
-evtable_%.h: /usr/include/linux/input.h
-+evtable_%.h: $(TOOLCHAIN_DIR)/usr/include/linux/input.h
++evtable_%.h: $(TOOLCHAIN_DIR)/include/linux/input.h
awk '/^#define $*_/ && $$2 !~ /_(MAX|CNT|VERSION)$$/ {print "EV_MAP("$$2"),"}' $< > $@
clean:
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index b7fb073..b415408 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -99,7 +99,6 @@ define Package/libgcc/config
endmenu
endef
-
define Package/libssp
$(call Package/gcc/Default)
DEPENDS+=@SSP_SUPPORT
@@ -246,6 +245,32 @@ define Package/librt/config
endef
+define Package/libgfortran
+$(call Package/gcc/Default)
+ TITLE:=GFortran support library
+ DEPENDS+=@!(TARGET_avr32||TARGET_coldfire)
+endef
+
+define Package/libgfortran/config
+ menu "Configuration"
+ depends EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
+
+ config LIBGFORTRAN_ROOT_DIR
+ string
+ prompt "libgfortran shared library base directory"
+ depends EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
+ default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
+ default "/" if NATIVE_TOOLCHAIN
+
+ config LIBGFORTRAN_FILE_SPEC
+ string
+ prompt "libgcc shared library files (use wildcards)"
+ depends EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
+ default "./usr/lib/libgfortran.so.*"
+
+ endmenu
+endef
+
define Package/ldd
$(call Package/libc/Default)
SECTION:=utils
@@ -465,6 +490,11 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
$(CP) $(PKG_BUILD_DIR)/libgcc_s.so.* $(1)/lib/
endef
+ define Package/libgfortran/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/
+ endef
+
define Package/libssp/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(TOOLCHAIN_DIR)/lib/libssp.so.* $(1)/lib/
@@ -578,6 +608,14 @@ else
done
endef
+ define Package/libgfortran/install
+ for file in $(call qstrip,$(CONFIG_LIBGFORTRAN_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBGFORTRAN_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done
+ endef
+
define Package/libssp/install
for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \
dir=`dirname $$$$file` ; \
@@ -647,5 +685,6 @@ $(eval $(call BuildPackage,libssp))
$(eval $(call BuildPackage,libstdcpp))
$(eval $(call BuildPackage,libpthread))
$(eval $(call BuildPackage,librt))
+$(eval $(call BuildPackage,libgfortran))
$(eval $(call BuildPackage,ldd))
$(eval $(call BuildPackage,ldconfig))
diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile
index 8043588..6280778 100644
--- a/package/ncurses/Makefile
+++ b/package/ncurses/Makefile
@@ -113,6 +113,12 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/bin $(2)/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/ncursesw5-config $(2)/bin/
+ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+ $(2)/bin/ncursesw5-config
+ ln -sf $(STAGING_DIR)/host/bin/ncursesw5-config $(1)/usr/bin/ncursesw5-config
endef
else
define Build/InstallDev
@@ -121,6 +127,12 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/bin $(2)/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/ncurses5-config $(2)/bin/
+ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+ $(2)/bin/ncurses5-config
+ ln -sf $(STAGING_DIR)/host/bin/ncurses5-config $(1)/usr/bin/ncurses5-config
endef
endif
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 204219e..2a8b585 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -80,3 +80,11 @@ config INSTALL_LIBGCJ
default n
help
Build/install java compiler and GNU classpath ?
+
+
+config INSTALL_GFORTRAN
+ bool
+ prompt "Build/install fortran compiler?" if TOOLCHAINOPTS
+ default n
+ help
+ Build/install GNU fortran compiler ?
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 888cf7a..675f400 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -86,7 +86,7 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured
HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed
SEP:=,
-TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)"
+TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)"
export libgcc_cv_fixed_point=no
ifdef CONFIG_USE_UCLIBC
diff --git a/toolchain/uClibc/config-0.9.32/mipsel b/toolchain/uClibc/config-0.9.32/mipsel
index 7648f39..8053504 100644
--- a/toolchain/uClibc/config-0.9.32/mipsel
+++ b/toolchain/uClibc/config-0.9.32/mipsel
@@ -15,3 +15,7 @@ CONFIG_MIPS_O32_ABI=y
TARGET_ARCH="mips"
TARGET_mips=y
UCLIBC_HAS_FPU=y
+UCLIBC_HAS_LOCALE=y
+UCLIBC_HAS_XLOCALE=y
+# UCLIBC_PREGENERATED_LOCALE_DATA is not set
+# # UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set
Index: devel/binutils/Makefile
===================================================================
--- devel/binutils/Makefile (revision 26239)
+++ devel/binutils/Makefile (working copy)
@@ -57,6 +57,7 @@
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS := -L$(PKG_BUILD_DIR)/libiberty $(TARGET_LDFLAGS)
define Build/Configure
$(call Build/Configure/Default)
_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): [email protected]
Subscribe or Unsubscribe:
http://lists.en.qi-hardware.com/mailman/listinfo/discussion