Przeglądaj źródła

Merge branch 'master' of git+ssh://www.openadk.org/git/openadk

Waldemar Brodkorb 10 lat temu
rodzic
commit
5bcfd51dfd
64 zmienionych plików z 798 dodań i 748 usunięć
  1. 1 1
      mk/build.mk
  2. 1 1
      mk/image.mk
  3. 10 1
      mk/vars.mk
  4. 1 1
      package/adk-test-tools/Makefile
  5. 2 0
      package/adk-test-tools/files/test.init
  6. 1 1
      package/base-files/Makefile
  7. 19 39
      package/base-files/src/etc/init.d/fs
  8. 16 9
      package/conntrack-tools/Makefile
  9. 41 0
      package/conntrack-tools/patches/patch-include_bitops_h
  10. 10 0
      package/conntrack-tools/patches/patch-include_mcast_h
  11. 10 0
      package/conntrack-tools/patches/patch-include_tcp_h
  12. 10 0
      package/conntrack-tools/patches/patch-include_udp_h
  13. 13 7
      package/curl/Makefile
  14. 0 11
      package/curl/patches/patch-ltmain_sh
  15. 13 0
      package/curl/patches/patch-src_tool_operate_c
  16. 5 5
      package/e2fsprogs/Makefile
  17. 5 0
      package/glibc/files/libc.so.sh4
  18. 1 1
      package/iproute2/Makefile
  19. 25 0
      package/iproute2/patches/patch-include_iptables_common_h
  20. 38 0
      package/iproute2/patches/patch-include_iptables_h
  21. 25 0
      package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h
  22. 2 2
      package/libcec/Makefile
  23. 2 0
      package/libjasper/Makefile
  24. 3 3
      package/libnetfilter_conntrack/Makefile
  25. 2 2
      package/libnetfilter_queue/Makefile
  26. 1 1
      package/libnfnetlink/Makefile
  27. 13 0
      package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_compat_h
  28. 33 0
      package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_h
  29. 2 2
      package/libnfs/Makefile
  30. 53 69
      package/mysql/Makefile
  31. 17 0
      package/mysql/patches/patch-cmake_os_Linux_cmake
  32. 22 0
      package/mysql/patches/patch-cmd-line-utils_libedit_chartype_h
  33. 0 365
      package/mysql/patches/patch-configure
  34. 0 21
      package/mysql/patches/patch-include_config_h_in
  35. 0 54
      package/mysql/patches/patch-include_my_global_h
  36. 0 11
      package/mysql/patches/patch-ltmain_sh
  37. 0 11
      package/mysql/patches/patch-scripts_mysql_config_sh
  38. 0 15
      package/mysql/patches/patch-sql_sql_builtin_cc
  39. 2 2
      package/nasm/Makefile
  40. 2 2
      package/openldap/Makefile
  41. 1 0
      package/pkgconf/Makefile
  42. 4 4
      package/postgresql/Makefile
  43. 20 13
      package/qemu/Makefile
  44. 19 6
      package/qemu/patches/patch-linux-user_syscall_c
  45. 11 0
      package/qemu/patches/patch-util_qemu-openpty_c
  46. 1 1
      package/rdate/Makefile
  47. 25 3
      package/samba/Makefile
  48. 1 0
      package/squashfs/Makefile
  49. 48 72
      scripts/install-rpi.sh
  50. 13 0
      scripts/scan-tools.sh
  51. 10 0
      scripts/toolchain.cmake.in
  52. 2 2
      target/config/Config.in
  53. 7 0
      target/config/Config.in.adk
  54. 27 3
      target/config/Config.in.tools
  55. 1 1
      target/linux/config/Config.in.audio
  56. 1 1
      target/microblaze/Makefile
  57. 1 0
      target/packages/pkg-available/mpdbox
  58. 1 0
      target/packages/pkg-available/test
  59. 11 0
      target/sh/sys-available/toolchain-sh4
  60. 11 0
      target/sh/sys-available/toolchain-sh4eb
  61. 19 0
      target/x86/kernel/generic-pc
  62. 9 0
      target/x86/sys-available/generic-pc
  63. 0 5
      toolchain/gcc/Makefile.inc
  64. 154 0
      toolchain/gcc/patches/4.8.2/sparc-miscompile.patch

+ 1 - 1
mk/build.mk

@@ -471,9 +471,9 @@ bulktoolchain:
 		while read arch; do \
 			mkdir -p ${TOPDIR}/firmware; \
 		    ( \
-			echo === building $$arch $$libc toolchain-$$arch on $$(date); \
 			tarch=$$(echo $$arch|sed -e "s#sh4.*#sh#" -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##" -e "s#x86_64.*#x86_64#" ); \
 			carch=$$(echo $$arch|sed -e "s#hf##" -e "s#mips64n.*#mips64#" -e "s#mips64el.*#mips64el#" -e 's#x86$$#i686#' -e "s#x86_64.*#x86_64#" ); \
+			echo === building $$tarch $$libc toolchain-$$arch on $$(date); \
 			$(GMAKE) prereq && \
 				$(GMAKE) ARCH=$$tarch SYSTEM=toolchain-$$arch LIBC=$$libc defconfig; \
 				tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\

+ 1 - 1
mk/image.mk

@@ -238,7 +238,7 @@ ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package
 		${TARGET_DIR}/boot/syslinux
 	echo 'DEFAULT /boot/kernel root=/dev/sr0' > \
 		${TARGET_DIR}/boot/syslinux/isolinux.cfg
-	${STAGING_HOST_DIR}/usr/bin/mkisofs -R -uid 0 -gid 0 -o $@ \
+	PATH='${HOST_PATH}' mkisofs -R -uid 0 -gid 0 -o $@ \
 		-b boot/syslinux/isolinux.bin \
 		-c boot/syslinux/boot.cat -no-emul-boot \
 		-boot-load-size 4 -boot-info-table ${TARGET_DIR}

+ 10 - 1
mk/vars.mk

@@ -54,7 +54,7 @@ SCRIPT_TARGET_DIR:=	${STAGING_TARGET_DIR}/scripts
 
 # PATH variables
 TARGET_PATH=		${SCRIPT_DIR}:${STAGING_TARGET_DIR}/scripts:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
-HOST_PATH=		${SCRIPT_DIR}:${TOOLCHAIN_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
+HOST_PATH=		${SCRIPT_DIR}:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
 AUTOTOOL_PATH=		${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${STAGING_TARGET_DIR}/scripts:${_PATH}
 
 ifeq ($(ADK_DISABLE_HONOUR_CFLAGS),)
@@ -123,8 +123,17 @@ TARGET_CXXFLAGS+=	-flto
 TARGET_LDFLAGS+=	-flto
 endif
 
+ifeq ($(ADK_LINUX_MICROBLAZE),y)
+TARGET_CFLAGS+=		-mxl-barrel-shift
+TARGET_CXX_FLAGS+=	-mxl-barrel-shift
+endif
+
 ifneq ($(ADK_DEBUG),)
+ifeq ($(ADK_DEBUG_OPTS),y)
+TARGET_CFLAGS+=		-g3 -fno-omit-frame-pointer $(ADK_TARGET_CFLAGS_OPT)
+else
 TARGET_CFLAGS+=		-g3 -fno-omit-frame-pointer
+endif
 else
 TARGET_CPPFLAGS+=	-DNDEBUG
 TARGET_CFLAGS+=		-fomit-frame-pointer $(ADK_TARGET_CFLAGS_OPT)

+ 1 - 1
package/adk-test-tools/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		adk-test-tools
 PKG_VERSION:=		0.1
-PKG_RELEASE:=		5
+PKG_RELEASE:=		6
 PKG_DESCR:=		helper tools and scripts for adk-test-framework
 PKG_SECTION:=		misc
 PKG_URL:=		http://openadk.org/

+ 2 - 0
package/adk-test-tools/files/test.init

@@ -2,6 +2,8 @@
 #PKG adk-test-tools
 #INIT 90
 [[ $1 = autostart ]] || exit 0
+echo "Setting time via network ..."
+rdate -nv pool.ntp.org
 echo "Starting test script ..."
 grep shell /proc/cmdline > /dev/null 2&>1
 if [ $? -eq 0 ];then

+ 1 - 1
package/base-files/Makefile

@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
 
 PKG_NAME:=		base-files
 PKG_VERSION:=		1.0
-PKG_RELEASE:=		81
+PKG_RELEASE:=		82
 PKG_SECTION:=		base
 PKG_DESCR:=		basic files and scripts
 

+ 19 - 39
package/base-files/src/etc/init.d/fs

@@ -8,46 +8,26 @@
 # activate any logical volumes
 [ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; }
 
+fstypes="ext2 ext3 ext4 xfs"
+
 # filesystem checks
-[ -x /sbin/fsck.ext2 ] && {
-	for i in $(grep -v "^#" /etc/fstab|grep ext2|awk '{ print $1}');do fsck.ext2 $i;done;
-}
-[ -x /sbin/fsck.ext3 ] && {
-	for i in $(grep -v "^#" /etc/fstab|grep ext3|awk '{ print $1}');do fsck.ext3 $i;done;
-}
-[ -x /sbin/fsck.ext4 ] && {
-	for i in $(grep -v "^#" /etc/fstab|grep ext4|awk '{ print $1}');do fsck.ext4 $i;done;
-}
-[ -x /sbin/fsck.xfs ] && {
-	for i in $(grep -v "^#" /etc/fstab|grep xfs|awk '{ print $1}');do xfs_repair $i;done;
-}
-# local filesystems
-grep ext2 /proc/filesystems  >/dev/null 2>&1
-if [ $? -eq 0 ];then
-	grep -v "^#" /etc/fstab |grep ext2 >/dev/null 2>&1
-	if [ $? -eq 0 ];then
-		mount -a -t ext2
-	fi
-fi
-grep ext3 /proc/filesystems  >/dev/null 2>&1
-if [ $? -eq 0 ];then
-	grep -v "^#" /etc/fstab |grep ext3 >/dev/null 2>&1
-	if [ $? -eq 0 ];then
-		mount -a -t ext3
-	fi
-fi
-grep ext4 /proc/filesystems  >/dev/null 2>&1
-if [ $? -eq 0 ];then
-	grep -v "^#" /etc/fstab |grep ext4 >/dev/null 2>&1
-	if [ $? -eq 0 ];then
-		mount -a -t ext4
-	fi
-fi
-grep xfs /proc/filesystems  >/dev/null 2>&1
-if [ $? -eq 0 ];then
-	grep -v "^#" /etc/fstab |grep xfs >/dev/null 2>&1
+for fs in $fstypes; do
+	[ -x /usr/sbin/fsck.$fs ] && {
+		for i in $(grep -v "^#" /etc/fstab|grep $fs|awk '{ print $1}');do 
+			echo "Checking filesystem on $i with $fs"
+			fsck -p -t $fs $i
+		done
+	}
+done
+
+# mount local filesystems
+for fs in $fstypes; do
+	grep $fs /proc/filesystems >/dev/null 2>&1
 	if [ $? -eq 0 ];then
-		mount -a -t xfs
+		grep -v "^#" /etc/fstab |grep $fs >/dev/null 2>&1
+		if [ $? -eq 0 ];then
+			mount -a -t $fs
+		fi
 	fi
-fi
+done
 exit 0

+ 16 - 9
package/conntrack-tools/Makefile

@@ -4,28 +4,35 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		conntrack-tools
-PKG_VERSION:=		1.4.1
+PKG_VERSION:=		1.4.2
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		3cc4703d883c6f07085e29bdc993222b
-PKG_DESCR:=		Connection tracking userspace tools
+PKG_MD5SUM:=		b1f9d006e7bf000a77395ff7cd3fac16
+PKG_DESCR:=		connection tracking userspace tools
 PKG_SECTION:=		firewall
 PKG_DEPENDS:=		libtirpc libnetfilter_queue libnetfilter-conntrack libnetfilter-cttimeout libnetfilter-cthelper libmnl
 PKG_BUILDDEP:=		libtirpc libnetfilter_queue libnetfilter_conntrack libnetfilter_cttimeout libnetfilter_cthelper libmnl
 PKG_URL:=		http://conntrack-tools.netfilter.org/
 PKG_SITES:=		http://www.netfilter.org/projects/conntrack-tools/files/
 
-PKG_LIBC_DEPENDS:=	uclibc glibc
+PKG_SUBPKGS:=		CONNTRACK CONNTRACKD
+PKGSD_CONNTRACK:=	client utility
+PKGSD_CONNTRACKD:=	daemon
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2
 
 include $(TOPDIR)/mk/package.mk
 
-TARGET_CPPFLAGS+=	-I$(STAGING_TARGET_DIR)/usr/include/tirpc
+TARGET_CPPFLAGS+=	-I$(STAGING_TARGET_DIR)/usr/include/tirpc -D_GNU_SOURCE
 
-$(eval $(call PKG_template,CONNTRACK_TOOLS,conntrack-tools,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,CONNTRACK,conntrack,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_CONNTRACK},${PKG_SECTION}))
+$(eval $(call PKG_template,CONNTRACKD,conntrackd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_CONNTRACKD},${PKG_SECTION}))
 
-conntrack-tools-install:
-	$(INSTALL_DIR) $(IDIR_CONNTRACK_TOOLS)/usr/sbin
-	$(INSTALL_BIN) $(WRKINST)/usr/sbin/conntrack{,d} $(IDIR_CONNTRACK_TOOLS)/usr/sbin
+conntrack-install:
+	$(INSTALL_DIR) $(IDIR_CONNTRACK)/usr/sbin
+	$(INSTALL_BIN) $(WRKINST)/usr/sbin/conntrack $(IDIR_CONNTRACK)/usr/sbin
+
+conntrackd-install:
+	$(INSTALL_DIR) $(IDIR_CONNTRACKD)/usr/sbin
+	$(INSTALL_BIN) $(WRKINST)/usr/sbin/conntrackd $(IDIR_CONNTRACKD)/usr/sbin
 
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 41 - 0
package/conntrack-tools/patches/patch-include_bitops_h

@@ -0,0 +1,41 @@
+--- conntrack-tools-1.4.2.orig/include/bitops.h	2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/bitops.h	2014-04-05 09:39:37.219463608 +0200
+@@ -3,32 +3,32 @@
+ 
+ #include <stdlib.h>
+ 
+-static inline void set_bit_u32(int nr, u_int32_t *addr)
++static inline void set_bit_u32(int nr, uint32_t *addr)
+ {
+ 	addr[nr >> 5] |= (1UL << (nr & 31));
+ }
+ 
+-static inline void unset_bit_u32(int nr, u_int32_t *addr)
++static inline void unset_bit_u32(int nr, uint32_t *addr)
+ {
+ 	addr[nr >> 5] &= ~(1UL << (nr & 31));
+ }
+ 
+-static inline int test_bit_u32(int nr, const u_int32_t *addr)
++static inline int test_bit_u32(int nr, const uint32_t *addr)
+ {
+ 	return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
+ }
+ 
+-static inline void set_bit_u16(int nr, u_int16_t *addr)
++static inline void set_bit_u16(int nr, uint16_t *addr)
+ {
+ 	addr[nr >> 4] |= (1UL << (nr & 15));
+ }
+ 
+-static inline void unset_bit_u16(int nr, u_int16_t *addr)
++static inline void unset_bit_u16(int nr, uint16_t *addr)
+ {
+ 	addr[nr >> 4] &= ~(1UL << (nr & 15));
+ }
+ 
+-static inline int test_bit_u16(int nr, const u_int16_t *addr)
++static inline int test_bit_u16(int nr, const uint16_t *addr)
+ {
+ 	return ((1UL << (nr & 15)) & (addr[nr >> 4])) != 0;
+ }

+ 10 - 0
package/conntrack-tools/patches/patch-include_mcast_h

@@ -0,0 +1,10 @@
+--- conntrack-tools-1.4.2.orig/include/mcast.h	2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/mcast.h	2014-04-05 09:37:11.363340860 +0200
+@@ -2,6 +2,7 @@
+ #define _MCAST_H_
+ 
+ #include <stdint.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+ #include <net/if.h>
+ 

+ 10 - 0
package/conntrack-tools/patches/patch-include_tcp_h

@@ -0,0 +1,10 @@
+--- conntrack-tools-1.4.2.orig/include/tcp.h	2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/tcp.h	2014-04-05 09:40:10.923493847 +0200
+@@ -2,6 +2,7 @@
+ #define _TCP_H_
+ 
+ #include <stdint.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+ 
+ struct tcp_conf {

+ 10 - 0
package/conntrack-tools/patches/patch-include_udp_h

@@ -0,0 +1,10 @@
+--- conntrack-tools-1.4.2.orig/include/udp.h	2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/udp.h	2014-04-05 09:38:04.015383617 +0200
+@@ -2,6 +2,7 @@
+ #define _UDP_H_
+ 
+ #include <stdint.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+ 
+ struct udp_conf {

+ 13 - 7
package/curl/Makefile

@@ -4,10 +4,10 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		curl
-PKG_VERSION:=		7.28.0
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		cbdc0a79bdf6e657dd387c3d88d802e3
-PKG_DESCR:=		a client-side URL transfer tool
+PKG_VERSION:=		7.36.0
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		643a7030b27449e76413d501d4b8eb57
+PKG_DESCR:=		client-side URL transfer tool
 PKG_SECTION:=		www
 PKG_DEPENDS:=		libcurl
 PKG_BUILDDEP:=		zlib
@@ -58,7 +58,6 @@ CONFIGURE_ARGS+=	--with-gnutls="${STAGING_TARGET_DIR}/usr" \
 			--without-axtls
 endif
 
-TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
 CONFIGURE_ENV+=		curl_typeof_curl_socklen_t=socklen_t
 CONFIGURE_ARGS+=	--disable-thread \
 			--enable-cookies \
@@ -67,17 +66,24 @@ CONFIGURE_ARGS+=	--disable-thread \
 			--enable-file \
 			--enable-ftp \
 			--enable-http \
+			--enable-proxy \
+			--disable-symbol-hiding \
 			--disable-ares \
 			--disable-dict \
 			--disable-gopher \
 			--disable-ldap \
+			--disable-smtp \
+			--disable-imap \
+			--disable-ldaps \
 			--disable-manual \
 			--disable-sspi \
 			--disable-telnet \
 			--disable-verbose \
+			--without-libssh2 \
+			--without-librtmp \
+			--without-libidn \
 			--with-random="/dev/urandom" \
-			--with-ca-bundle="/etc/ssl/cert.pem" \
-			--without-libidn
+			--with-ca-bundle="/etc/ssl/cert.pem"
 
 ifneq (${ADK_PACKAGE_CURL_WITH_IPV6},)
 CONFIGURE_ARGS+=	--enable-ipv6

+ 0 - 11
package/curl/patches/patch-ltmain_sh

@@ -1,11 +0,0 @@
---- curl-7.28.0.orig/ltmain.sh	2012-08-16 19:20:36.000000000 +0200
-+++ curl-7.28.0/ltmain.sh	2012-10-14 14:00:11.000000000 +0200
-@@ -5853,7 +5853,7 @@ func_mode_link ()
-       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
--      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
-         func_quote_for_eval "$arg"
- 	arg="$func_quote_for_eval_result"
-         func_append compile_command " $arg"

+ 13 - 0
package/curl/patches/patch-src_tool_operate_c

@@ -0,0 +1,13 @@
+--- curl-7.36.0.orig/src/tool_operate.c	2014-03-25 11:36:28.000000000 +0100
++++ curl-7.36.0/src/tool_operate.c	2014-04-02 14:59:00.000000000 +0200
+@@ -1794,8 +1794,10 @@ CURLcode operate(struct GlobalConfig *co
+       if(res == PARAM_HELP_REQUESTED)
+         tool_help();
+       /* Check if we were asked for the manual */
++#ifdef USE_MANUAL
+       else if(res == PARAM_MANUAL_REQUESTED)
+         hugehelp();
++#endif
+       /* Check if we were asked for the version information */
+       else if(res == PARAM_VERSION_INFO_REQUESTED)
+         tool_version_info();

+ 5 - 5
package/e2fsprogs/Makefile

@@ -4,9 +4,9 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		e2fsprogs
-PKG_VERSION:=		1.42.8
-PKG_RELEASE:=		3
-PKG_MD5SUM:=		8ef664b6eb698aa6b733df59b17b9ed4
+PKG_VERSION:=		1.42.9
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		3f8e41e63b432ba114b33f58674563f7
 PKG_DESCR:=		Ext2/3/4 filesystem utilities (meta-package)
 PKG_SECTION:=		fs
 PKG_DEPENDS:=		libcom-err libuuid libblkid libpthread
@@ -16,8 +16,6 @@ PKG_URL:=		http://e2fsprogs.sourceforge.net/
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=e2fsprogs/}
 PKG_OPTS:=		dev
 
-PKG_CFLINE_E2FSPROGS:=	default y if ADK_TARGET_ROOTFS_CF
-
 PKG_SUBPKGS:=		E2FSPROGS LIBE2FS LIBCOM_ERR LIBSS E2FSCK_STATIC
 PKG_SUBPKGS+=		RESIZE2FS TUNE2FS E2FSCK MKE2FS
 PKGSD_LIBE2FS:=		e2fsprogs library
@@ -88,6 +86,8 @@ e2fsck-install:
 	${INSTALL_DIR} ${IDIR_E2FSCK}/usr/sbin
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSCK}/usr/sbin
 	cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext2
+	cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext3
+	cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext4
 
 mke2fs-install:
 	${INSTALL_DIR} ${IDIR_MKE2FS}/usr/sbin

+ 5 - 0
package/glibc/files/libc.so.sh4

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+   the static library, so try that secondarily.  */
+OUTPUT_FORMAT(elf32-sh-linux)
+GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )

+ 1 - 1
package/iproute2/Makefile

@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		iproute2
 PKG_VERSION:=		3.12.0
-PKG_RELEASE:=		2
+PKG_RELEASE:=		3
 PKG_MD5SUM:=		f87386aaaecafab95607fd10e8152c68
 PKG_DESCR:=		iproute2 routing control utility
 PKG_SECTION:=		route

+ 25 - 0
package/iproute2/patches/patch-include_iptables_common_h

@@ -0,0 +1,25 @@
+--- iproute2-3.12.0.orig/include/iptables_common.h	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/iptables_common.h	2014-04-05 05:21:46.946376336 +0200
+@@ -1,5 +1,8 @@
+ #ifndef _IPTABLES_COMMON_H
+ #define _IPTABLES_COMMON_H
++
++#include <stdint.h>
++
+ /* Shared definitions between ipv4 and ipv6. */
+ 
+ enum exittype {
+@@ -43,9 +46,9 @@ extern char *lib_dir;
+   extern void init_extensions(void);
+ #endif
+ 
+-#define __be32	u_int32_t
+-#define __le32	u_int32_t
+-#define __be16	u_int16_t
+-#define __le16	u_int16_t
++#define __be32	uint32_t
++#define __le32	uint32_t
++#define __be16	uint16_t
++#define __le16	uint16_t
+ 
+ #endif /*_IPTABLES_COMMON_H*/

+ 38 - 0
package/iproute2/patches/patch-include_iptables_h

@@ -0,0 +1,38 @@
+--- iproute2-3.12.0.orig/include/iptables.h	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/iptables.h	2014-04-05 05:22:26.690501973 +0200
+@@ -20,7 +20,7 @@ struct ipt_get_revision
+ {
+ 	char name[IPT_FUNCTION_MAXNAMELEN-1];
+ 
+-	u_int8_t revision;
++	uint8_t revision;
+ };
+ #endif /* IPT_SO_GET_REVISION_MATCH   Old kernel source */
+ 
+@@ -39,7 +39,7 @@ struct iptables_match
+ 	ipt_chainlabel name;
+ 
+ 	/* Revision of match (0 by default). */
+-	u_int8_t revision;
++	uint8_t revision;
+ 
+ 	const char *version;
+ 
+@@ -92,7 +92,7 @@ struct iptables_target
+ 	ipt_chainlabel name;
+ 
+ 	/* Revision of target (0 by default). */
+-	u_int8_t revision;
++	uint8_t revision;
+ 
+ 	const char *version;
+ 
+@@ -153,7 +153,7 @@ extern char *mask_to_dotted(const struct
+ 
+ extern void parse_hostnetworkmask(const char *name, struct in_addr **addrpp,
+                       struct in_addr *maskp, unsigned int *naddrs);
+-extern u_int16_t parse_protocol(const char *s);
++extern uint16_t parse_protocol(const char *s);
+ 
+ extern int do_command(int argc, char *argv[], char **table,
+ 		      iptc_handle_t *handle);

+ 25 - 0
package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h

@@ -0,0 +1,25 @@
+--- iproute2-3.12.0.orig/include/libiptc/ipt_kernel_headers.h	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/libiptc/ipt_kernel_headers.h	2014-04-05 05:25:40.983670487 +0200
+@@ -5,22 +5,10 @@
+ 
+ #include <limits.h>
+ 
+-#if defined(__GLIBC__) && __GLIBC__ == 2
+ #include <netinet/ip.h>
+ #include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+ #include <sys/types.h>
+-#else /* libc5 */
+-#include <sys/socket.h>
+-#include <linux/ip.h>
+-#include <linux/in.h>
+-#include <linux/if.h>
+-#include <linux/icmp.h>
+-#include <linux/tcp.h>
+-#include <linux/udp.h>
+-#include <linux/types.h>
+-#include <linux/in6.h>
+-#endif
+ #endif

+ 2 - 2
package/libcec/Makefile

@@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		libcec
 PKG_VERSION:=		2.1.4
-PKG_RELEASE:=		2
+PKG_RELEASE:=		3
 PKG_MD5SUM:=		d65e52ab3295e9e4b73bf4580f3bd4f7
 PKG_DESCR:=		control your device with your TV remote control
 PKG_SECTION:=		libs
 PKG_BUILDDEP:=		autotool
 PKG_URL:=		http://libcec.pulse-eight.com/
-PKG_SITES:=		http://www.openadk.org/distfiles
+PKG_SITES:=		http://packages.pulse-eight.net/pulse/sources/libcec/
 PKG_OPTS:=		dev
 
 PKG_DEPENDS_RASPBERRY_PI:=	bcm2835-vc

+ 2 - 0
package/libjasper/Makefile

@@ -20,6 +20,8 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,LIBJASPER,libjasper,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
+XAKE_FLAGS+=		GCC_HONOUR_COPTS=s
+
 libjasper-install:
 	$(INSTALL_DIR) $(IDIR_LIBJASPER)/usr/lib
 	$(CP) $(WRKINST)/usr/lib/libjasper*.so* \

+ 3 - 3
package/libnetfilter_conntrack/Makefile

@@ -4,9 +4,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		libnetfilter_conntrack
-PKG_VERSION:=		1.0.3
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		73394a3d8d0cfecc6abb6027b4792d52
+PKG_VERSION:=		1.0.4
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		18cf80c4b339a3285e78822dbd4f08d7
 PKG_DESCR:=		API to connection tracking state table
 PKG_SECTION:=		libs
 PKG_DEPENDS:=		libnfnetlink

+ 2 - 2
package/libnetfilter_queue/Makefile

@@ -15,14 +15,14 @@ PKG_URL:=		http://www.netfilter.org/projects/libnetfilter_queue/
 PKG_SITES:=		http://www.netfilter.org/projects/libnetfilter_queue/files/
 PKG_OPTS:=		dev
 
-PKG_LIBC_DEPENDS:=	uclibc glibc
-
 DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.tar.bz2
 
 include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,LIBNETFILTER_QUEUE,libnetfilter-queue,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
+TARGET_CPPFLAGS+=	-D_GNU_SOURCE
+
 libnetfilter-queue-install:
 	$(INSTALL_DIR) $(IDIR_LIBNETFILTER_QUEUE)/usr/lib
 	$(CP) $(WRKINST)/usr/lib/libnetfilter_queue*so* \

+ 1 - 1
package/libnfnetlink/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		libnfnetlink
 PKG_VERSION:=		1.0.1
-PKG_RELEASE:=		2
+PKG_RELEASE:=		3
 PKG_MD5SUM:=		98927583d2016a9fb1936fed992e2c5e
 PKG_DESCR:=		low-level library for netfilter related kernel/userspace communication
 PKG_SECTION:=		libs

+ 13 - 0
package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_compat_h

@@ -0,0 +1,13 @@
+--- libnfnetlink-1.0.1.orig/include/libnfnetlink/linux_nfnetlink_compat.h	2008-06-18 14:36:57.000000000 +0200
++++ libnfnetlink-1.0.1/include/libnfnetlink/linux_nfnetlink_compat.h	2014-04-05 09:33:12.251169468 +0200
+@@ -20,8 +20,8 @@
+ 
+ struct nfattr
+ {
+-	u_int16_t nfa_len;
+-	u_int16_t nfa_type;	/* we use 15 bits for the type, and the highest
++	uint16_t nfa_len;
++	uint16_t nfa_type;	/* we use 15 bits for the type, and the highest
+ 				 * bit to indicate whether the payload is nested */
+ };
+ 

+ 33 - 0
package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_h

@@ -0,0 +1,33 @@
+--- libnfnetlink-1.0.1.orig/include/libnfnetlink/linux_nfnetlink.h	2008-06-18 14:36:57.000000000 +0200
++++ libnfnetlink-1.0.1/include/libnfnetlink/linux_nfnetlink.h	2014-04-05 09:34:31.863222315 +0200
+@@ -25,9 +25,9 @@ enum nfnetlink_groups {
+ /* General form of address family dependent message.
+  */
+ struct nfgenmsg {
+-	u_int8_t  nfgen_family;		/* AF_xxx */
+-	u_int8_t  version;		/* nfnetlink version */
+-	u_int16_t    res_id;		/* resource id */
++	uint8_t  nfgen_family;		/* AF_xxx */
++	uint8_t  version;		/* nfnetlink version */
++	uint16_t    res_id;		/* resource id */
+ };
+ 
+ #define NFNETLINK_V0	0
+@@ -59,7 +59,7 @@ struct nfnl_callback
+ 	int (*call)(struct sock *nl, struct sk_buff *skb, 
+ 		struct nlmsghdr *nlh, struct nlattr *cda[]);
+ 	const struct nla_policy *policy;	/* netlink attribute policy */
+-	const u_int16_t attr_count;		/* number of nlattr's */
++	const uint16_t attr_count;		/* number of nlattr's */
+ };
+ 
+ struct nfnetlink_subsystem
+@@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(c
+ extern int nfnetlink_has_listeners(unsigned int group);
+ extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, 
+ 			  int echo);
+-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
++extern int nfnetlink_unicast(struct sk_buff *skb, uint32_t pid, int flags);
+ 
+ #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
+ 	MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))

+ 2 - 2
package/libnfs/Makefile

@@ -4,9 +4,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		libnfs
-PKG_VERSION:=		1.8.0
+PKG_VERSION:=		1.9.3
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		0f20c7c104aa2e2ee563169b7e164aab
+PKG_MD5SUM:=		a07656eeca58ad8d4870da546745628a
 PKG_DESCR:=		NFS client library
 PKG_SECTION:=		libs
 PKG_BUILDDEP:=		autotool

+ 53 - 69
package/mysql/Makefile

@@ -4,91 +4,75 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		mysql
-PKG_VERSION:=		5.1.61
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		4efd10c69c4c99dbdb8fae3834a6d7b8
+PKG_VERSION:=		5.6.17
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		82114fa7c13fa3ca897b34666577d9f4
 PKG_DESCR:=		MySQL client library
 PKG_SECTION:=		db
 PKG_DEPENDS:=		libncurses zlib
-PKG_BUILDDEP:=		ncurses zlib readline
+PKG_BUILDDEP:=		cmake-host mysql-host ncurses zlib readline
+HOST_BUILDDEP:=		cmake-host
 PKG_URL:=		http://www.mysql.com/
-PKG_SITES=		${MASTER_SITE_MYSQL:=Downloads/MySQL-5.1/}
+PKG_SITES=		${MASTER_SITE_MYSQL:=Downloads/MySQL-5.6/}
 PKG_LIBNAME:=		libmysqlclient
 PKG_OPTS:=		dev
 
-PKG_HOST_DEPENDS:=	!cygwin
-
+include ${TOPDIR}/mk/host.mk
 include ${TOPDIR}/mk/package.mk
 
+$(eval $(call HOST_template,MYSQL,mysql,${PKG_VERSION}-${PKG_RELEASE}))
 $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-BUILD_STYLE:=		manual
-INSTALL_STYLE:=		manual
+HOST_STYLE:=		manual
+CONFIG_STYLE:=		manual
+
+host-configure:
+	cd ${WRKBUILD} && PATH='${HOST_PATH}' \
+		cmake .
+
+host-build:
+	cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+		${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
 
-CONFIGURE_ENV+=		OPTIMIZE_CFLAGS="${TARGET_CFLAGS}" \
-			OPTIMIZE_CXXFLAGS="${TARGET_CXXFLAGS}" \
-			ac_cv_lib_nsl_gethostbyname_r=no \
-			ac_cv_lib_nsl_yp_get_default_domain=no \
-			ac_cv_sys_restartable_syscalls=yes \
-			mysql_cv_sys_os=Linux \
-			mysql_cv_compress=yes \
-			ac_cv_sys_restartable_syscalls=no \
-			ac_cv_conv_longlong_to_float=yes \
-			mysql_cv_gcc_atomic_builtins=yes \
-			mysql_cv_gethostname_style=glibc2
-CONFIGURE_ARGS+=	--disable-assembler \
-			--with-pthread \
-			--with-atomic-ops=rwlocks \
-			--with-unix-socket-path=/tmp/.mysql.sock \
-			--with-named-thread-libs=-lpthread \
-			--without-libwrap \
-			--without-pstack \
-			--with-low-memory \
-			--without-server \
-			--without-embedded-server \
-			--without-query-cache \
-			--without-ssl \
-			--without-docs \
-			--without-readline \
-			--with-machine-type=${CPU_ARCH}
-BUILD_LFLAGS=		CC="${CC_FOR_BUILD}" \
-			CXX='${CXX_FOR_BUILD}' \
-			CFLAGS='${CFLAGS_FOR_BUILD} -DHOSTCOMPILE=1' \
-			CXXFLAGS='${CXXFLAGS_FOR_BUILD}' \
-			LDFLAGS='${LDFLAGS_FOR_BUILD}' \
-			CPPFLAGS='${CPPFLAGS_FOR_BUILD}' \
-			CXXLINK='${CXX_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $$@' \
-			LINK='${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $$@'
-ifneq (${OStype},Linux)
-BUILD_FLAGS+=		LIBS='-lm -lz'
-endif
+mysql-hostinstall:
+	$(INSTALL_BIN) ${WRKBUILD}/extra/comp_err \
+		$(STAGING_HOST_DIR)/usr/bin
+	$(INSTALL_BIN) ${WRKBUILD}/scripts/comp_sql \
+		$(STAGING_HOST_DIR)/usr/bin
+	$(INSTALL_BIN) ${WRKBUILD}/sql/gen_lex_hash \
+		$(STAGING_HOST_DIR)/usr/bin
+	$(INSTALL_BIN) ${WRKBUILD}/storage/perfschema/gen_pfs_lex_token \
+		$(STAGING_HOST_DIR)/usr/bin
 
-do-build:
-	${MAKE} -C "${WRKBUILD}" \
-		SUBDIRS="include" \
-		DESTDIR="${WRKINST}" \
-		all install
-	${MAKE} -C "${WRKBUILD}/libmysql" \
-		LINK="${CC_FOR_BUILD} -o conf_to_src -lc" \
-		${BUILD_FLAGS} \
-		conf_to_src
-	${MAKE} -C "${WRKBUILD}" \
-		CFLAGS="${TARGET_CFLAGS}" \
-		SUBDIRS="libmysql" \
-		DESTDIR="${WRKINST}" \
-		all install
-	${MAKE} -C "${WRKBUILD}" \
-		CFLAGS="${TARGET_CFLAGS}" \
-		SUBDIRS="scripts" \
-		DESTDIR="${WRKINST}" \
-		bin_SCRIPTS="mysql_config" \
-		all install
+do-configure:
+	sed -e "s#@@TARGET_CC@@#$(TARGET_CC)#" \
+	 	-e "s#@@TARGET_CXX@@#$(TARGET_CXX)#" \
+		-e "s#@@TARGET_CFLAGS@@#$(TARGET_CFLAGS)#" \
+		-e "s#@@TARGET_CXXFLAGS@@#$(TARGET_CXXFLAGS)#" \
+		-e "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" \
+		-e "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \
+		$(SCRIPT_DIR)/toolchain.cmake.in > $(SCRIPT_DIR)/toolchain.cmake
+	(cd ${WRKBUILD} && PATH='${HOST_PATH}' \
+		cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+			-DCMAKE_TOOLCHAIN_FILE="$(SCRIPT_DIR)/toolchain.cmake" \
+			-DWITH_EDITLINE=bundled \
+			-DCURSES_LIBRARY="$(STAGING_TARGET_DIR)/usr/lib" \
+			-DCURSES_INCLUDE_PATH="$(STAGING_TARGET_DIR)/usr/lib" \
+			-DSTACK_DIRECTION=1 \
+			.)
+	$(CP) $(STAGING_HOST_DIR)/usr/bin/comp_err \
+		${WRKBUILD}/extra/
+	$(CP) $(STAGING_HOST_DIR)/usr/bin/comp_sql \
+		${WRKBUILD}/scripts/
+	$(CP) $(STAGING_HOST_DIR)/usr/bin/gen_lex_hash \
+		${WRKBUILD}/sql/
+	$(CP) $(STAGING_HOST_DIR)/usr/bin/gen_pfs_lex_token \
+		${WRKBUILD}/storage/perfschema/
 
 libmysqlclient-install:
 	${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
-	${CP} ${WRKINST}/usr/lib/mysql/libmysqlclient.so* \
+	${CP} ${WRKINST}/usr/lib/libmysqlclient.so* \
 	    ${IDIR_LIBMYSQLCLIENT}/usr/lib
-	$(SED) "s,\(^pkgincludedir='\)\(.*\),\1${STAGING_TARGET_DIR}\2," \
-		${WRKINST}/usr/bin/mysql_config
 
+include ${TOPDIR}/mk/host-bottom.mk
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 17 - 0
package/mysql/patches/patch-cmake_os_Linux_cmake

@@ -0,0 +1,17 @@
+--- mysql-5.6.17.orig/cmake/os/Linux.cmake	2014-03-14 20:07:26.000000000 +0100
++++ mysql-5.6.17/cmake/os/Linux.cmake	2014-04-04 10:11:45.000000000 +0200
+@@ -23,14 +23,6 @@ SET(TARGET_OS_LINUX 1)
+ SET(HAVE_NPTL 1)
+ SET(_GNU_SOURCE 1)
+ 
+-# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
+-FOREACH(LANG C CXX)
+-  STRING(REPLACE "-rdynamic" "" 
+-  CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
+-  ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}  
+-  )
+-ENDFOREACH()
+-
+ # Ensure we have clean build for shared libraries
+ # without unresolved symbols
+ # Not supported with AddressSanitizer

+ 22 - 0
package/mysql/patches/patch-cmd-line-utils_libedit_chartype_h

@@ -0,0 +1,22 @@
+--- mysql-5.6.17.orig/cmd-line-utils/libedit/chartype.h	2014-03-14 20:07:26.000000000 +0100
++++ mysql-5.6.17/cmd-line-utils/libedit/chartype.h	2014-04-05 06:38:33.000000000 +0200
+@@ -45,19 +45,6 @@
+  * seems to actually advertise this properly, despite Unicode 3.1 having
+  * been around since 2001... */
+ 
+-/* XXXMYSQL : Added FreeBSD & AIX to bypass this check.
+-  TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */
+-#if !defined(__NetBSD__) && !defined(__sun) \
+-  && !(defined(__APPLE__) && defined(__MACH__)) \
+-  && !defined(__FreeBSD__) && !defined(_AIX)
+-#ifndef __STDC_ISO_10646__
+-/* In many places it is assumed that the first 127 code points are ASCII
+- * compatible, so ensure wchar_t indeed does ISO 10646 and not some other
+- * funky encoding that could break us in weird and wonderful ways. */
+-	#error wchar_t must store ISO 10646 characters
+-#endif
+-#endif
+-
+ /* Oh for a <uchar.h> with char32_t and __STDC_UTF_32__ in it...
+  * ref: ISO/IEC DTR 19769
+  */

+ 0 - 365
package/mysql/patches/patch-configure

@@ -1,365 +0,0 @@
---- mysql-5.1.48.orig/configure	2010-06-03 17:54:47.000000000 +0200
-+++ mysql-5.1.48/configure	2011-01-15 12:58:47.000000000 +0100
-@@ -19764,15 +19764,6 @@ fi
- 
- 
- 
--# Enable the abi_check rule only if gcc is available
--
--if test "$GCC" != "yes" || expr "$CC" : ".*icc.*"
--then
--  ABI_CHECK=""
--else
--  ABI_CHECK="abi_check"
--fi
--
- 
- 
- # Look for PS usage.  We use double dollar-signs in FIND_PROC because this
-@@ -19825,45 +19816,7 @@ fi
- $as_echo_n "checking \"how to check if pid exists\"... " >&6; }
- PS=$ac_cv_path_PS
- # Linux style
--if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
--then
--  FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--# Solaris
--elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null
--then
--  FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--# BSD style
--elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null
--then
--  FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
--# SysV style
--elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null
--then
--  FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
--# Do anybody use this?
--elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null
--then
--  FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--else
--  case $SYSTEM_TYPE in
--    *freebsd*|*dragonfly*)
--      FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--      ;;
--    *darwin*)
--      FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
--      ;;
--    *cygwin*)
--      FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
--      ;;
--    *netware*)
--      FIND_PROC=
--      ;;
--    *)
--      { { $as_echo "$as_me:$LINENO: error: Could not find the right ps and/or grep switches. Which OS is this?  See the Installation chapter in the Reference Manual." >&5
--$as_echo "$as_me: error: Could not find the right ps and/or grep switches. Which OS is this?  See the Installation chapter in the Reference Manual." >&2;}
--   { (exit 1); exit 1; }; }
--  esac
--fi
-+FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
- 
- { $as_echo "$as_me:$LINENO: result: \"$FIND_PROC\"" >&5
- $as_echo "\"$FIND_PROC\"" >&6; }
-@@ -48273,197 +48226,14 @@ $as_echo "$as_me: error: unknown endiann
-   esac
- 
- 
--  { $as_echo "$as_me:$LINENO: checking whether GCC atomic builtins are available" >&5
--$as_echo_n "checking whether GCC atomic builtins are available... " >&6; }
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  if test "$cross_compiling" = yes; then
--  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }; }
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--
--	return(0);
--      }
--
--_ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--
--
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_IB_GCC_ATOMIC_BUILTINS 1
- _ACEOF
- 
--      { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--else
--  $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--
--      { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--
--
--
--  { $as_echo "$as_me:$LINENO: checking whether pthread_t can be used by GCC atomic builtins" >&5
--$as_echo_n "checking whether pthread_t can be used by GCC atomic builtins... " >&6; }
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  if test "$cross_compiling" = yes; then
--  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }; }
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--
--_ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--
--
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_IB_ATOMIC_PTHREAD_T_GCC 1
- _ACEOF
- 
--      { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--else
--  $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--
--      { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--
--
- 
-   { $as_echo "$as_me:$LINENO: checking whether Solaris libc atomic functions are available" >&5
- $as_echo_n "checking whether Solaris libc atomic functions are available... " >&6; }
-@@ -48581,101 +48351,6 @@ fi
- done
- 
- 
--  { $as_echo "$as_me:$LINENO: checking whether pthread_t can be used by Solaris libc atomic functions" >&5
--$as_echo_n "checking whether pthread_t can be used by Solaris libc atomic functions... " >&6; }
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  if test "$cross_compiling" = yes; then
--  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }; }
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--
--          atomic_cas_32(&x1, x2, x3);
--
--        } else if (sizeof(pthread_t) == 8) {
--
--          atomic_cas_64(&x1, x2, x3);
--
--        } else {
--
--          return(1);
--        }
--
--	return(0);
--      }
--
--_ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS 1
--_ACEOF
--
--      { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--else
--  $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--
--      { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--
- 
- 
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()

+ 0 - 21
package/mysql/patches/patch-include_config_h_in

@@ -1,21 +0,0 @@
---- mysql-5.1.48.orig/include/config.h.in	2010-06-03 17:54:04.000000000 +0200
-+++ mysql-5.1.48/include/config.h.in	2011-01-21 00:08:19.737408555 +0100
-@@ -856,7 +856,7 @@
- /* Define to 1 if you have the `strtoull' function. */
- #undef HAVE_STRTOULL
- 
--/* Define to 1 if `st_rdev' is member of `struct stat'. */
-+/* Define to 1 if `struct stat' is a member of `st_rdev'. */
- #undef HAVE_STRUCT_STAT_ST_RDEV
- 
- /* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
-@@ -1151,6 +1151,9 @@
- /* Define to the one symbol short name of this package. */
- #undef PACKAGE_TARNAME
- 
-+/* Define to the home page for this package. */
-+#undef PACKAGE_URL
-+
- /* Define to the version of this package. */
- #undef PACKAGE_VERSION
- 

+ 0 - 54
package/mysql/patches/patch-include_my_global_h

@@ -1,54 +0,0 @@
---- mysql-5.1.48.orig/include/my_global.h	2010-06-03 17:50:27.000000000 +0200
-+++ mysql-5.1.48/include/my_global.h	2010-07-12 22:51:23.369609493 +0200
-@@ -18,6 +18,8 @@
- #ifndef _global_h
- #define _global_h
- 
-+#include <sys/param.h>
-+
- /*
-   InnoDB depends on some MySQL internals which other plugins should not
-   need.  This is because of InnoDB's foreign key support, "safe" binlog
-@@ -428,7 +430,7 @@ C_MODE_END
- #ifdef HAVE_FLOAT_H
- #include <float.h>
- #endif
--#ifdef HAVE_FENV_H
-+#if defined(HAVE_FENV_H) && !defined(BSD)
- #include <fenv.h> /* For fesetround() */
- #endif
- 
-@@ -458,15 +460,20 @@ C_MODE_END
- #undef HAVE_ALLOCA
- #undef HAVE_ALLOCA_H
- #endif
--#ifdef HAVE_ALLOCA_H
-+#if defined(HAVE_ALLOCA_H) && !defined(BSD)
- #include <alloca.h>
- #endif
- 
- #include <errno.h>				/* Recommended by debian */
- /* We need the following to go around a problem with openssl on solaris */
-+#ifdef BSD
-+#include <pwd.h>
-+#include <unistd.h>
-+#else
- #if defined(HAVE_CRYPT_H)
- #include <crypt.h>
- #endif
-+#endif
- 
- /*
-   A lot of our programs uses asserts, so better to always include it
-@@ -883,9 +890,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
- #endif /* HAVE_FINITE */
- #endif /* isfinite */
- 
-+/*
- #ifndef HAVE_ISNAN
- #define isnan(x) ((x) != (x))
- #endif
-+*/
- 
- #ifdef HAVE_ISINF
- /* Check if C compiler is affected by GCC bug #39228 */

+ 0 - 11
package/mysql/patches/patch-ltmain_sh

@@ -1,11 +0,0 @@
---- mysql-5.1.48.orig/ltmain.sh	2010-06-03 17:54:04.000000000 +0200
-+++ mysql-5.1.48/ltmain.sh	2011-01-15 13:03:34.000000000 +0100
-@@ -4765,7 +4765,7 @@ func_mode_link ()
-       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
-       # @file GCC response files
-       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
--      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
-         func_quote_for_eval "$arg"
- 	arg="$func_quote_for_eval_result"
-         func_append compile_command " $arg"

+ 0 - 11
package/mysql/patches/patch-scripts_mysql_config_sh

@@ -1,11 +0,0 @@
---- mysql-5.1.48.orig/scripts/mysql_config.sh	2010-06-03 17:50:21.000000000 +0200
-+++ mysql-5.1.48/scripts/mysql_config.sh	2011-01-21 00:32:53.596454498 +0100
-@@ -119,7 +119,7 @@ if [ -r "$pkglibdir/libmygcc.a" ]; then
-   embedded_libs="$embedded_libs -lmygcc "
- fi
- 
--cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
-+cflags="-I$pkgincludedir" #note: end space!
- include="-I$pkgincludedir"
- 
- # Remove some options that a client doesn't have to care about

+ 0 - 15
package/mysql/patches/patch-sql_sql_builtin_cc

@@ -1,15 +0,0 @@
---- mysql-5.1.48.orig/sql/sql_builtin.cc	2010-06-03 17:57:58.000000000 +0200
-+++ mysql-5.1.48/sql/sql_builtin.cc	2010-07-12 22:52:33.577118523 +0200
-@@ -18,10 +18,10 @@
- typedef struct st_mysql_plugin builtin_plugin[];
- 
- extern builtin_plugin 
--  builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, builtin_ndbcluster_plugin;
-+  builtin_binlog_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin;
- 
- struct st_mysql_plugin *mysqld_builtins[]=
- {
--  builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, builtin_ndbcluster_plugin,(struct st_mysql_plugin *)0
-+  builtin_binlog_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin,(struct st_mysql_plugin *)0
- };
- 

+ 2 - 2
package/nasm/Makefile

@@ -4,9 +4,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		nasm
-PKG_VERSION:=		2.11
+PKG_VERSION:=		2.11.02
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		a884450ee65201473af4d270bdc132f8
+PKG_MD5SUM:=		7d5408bf18aa1699ad6c17e5017f12c3
 PKG_DESCR:=		the netwide assembler
 PKG_SECTION:=		lang
 PKG_BUILDDEP:=		nasm-host

+ 2 - 2
package/openldap/Makefile

@@ -4,9 +4,9 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		openldap
-PKG_VERSION:=		2.4.36
+PKG_VERSION:=		2.4.39
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		744701405d396b1fb9de6cb7a453c6e9
+PKG_MD5SUM:=		b0d5ee4b252c841dec6b332d679cf943
 PKG_DESCR:=		OpenLDAP client libraries
 PKG_SECTION:=		libs
 PKG_DEPENDS:=		libopenssl libsasl2 libdb libpthread libuuid

+ 1 - 0
package/pkgconf/Makefile

@@ -22,6 +22,7 @@ HOST_STYLE:=		auto
 
 hostpost-install:
 	(cd $(STAGING_HOST_DIR)/usr/bin && ln -sf pkgconf pkg-config)
+	(cd $(STAGING_HOST_DIR)/usr/bin && ln -sf pkgconf $(GNU_TARGET_NAME)-pkg-config)
 
 pkgconf-install:
 	$(INSTALL_DIR) $(IDIR_PKGCONF)/usr/bin

+ 4 - 4
package/postgresql/Makefile

@@ -4,14 +4,14 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		postgresql
-PKG_VERSION:=		9.1.1
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		93b293bd735bb99258c1bad7bc9b8f6c
+PKG_VERSION:=		9.3.4
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		d9be740a612f8a0b9ea61dd524abfa4c
 PKG_DESCR:=		PostgreSQL database library
 PKG_SECTION:=		db
 PKG_BUILDDEP:=		zlib
 PKG_URL:=		http://www.postgresql.org/
-PKG_SITES:=		http://ftp.postgresql.org/pub/source/v9.1.1/
+PKG_SITES:=		http://ftp.postgresql.org/pub/source/v9.3.4/
 PKG_LIBNAME:=		libpq
 PKG_OPTS:=		dev
 

+ 20 - 13
package/qemu/Makefile

@@ -4,13 +4,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		qemu
-PKG_VERSION:=		1.7.0
-PKG_RELEASE:=		1
-PKG_MD5SUM:=		32893941d40d052a5e649efcf06aca06
+PKG_VERSION:=		1.7.1
+PKG_RELEASE:=		2
+PKG_MD5SUM:=		9541063d999cf9659ed7fdce71314f31
 PKG_DESCR:=		cpu and system emulator
 PKG_SECTION:=		misc
-PKG_DEPENDS:=		zlib libsdl libpng
-PKG_BUILDDEP:=		gettext-tiny libiconv-tiny glib-host qemu-host zlib sdl libpng
+PKG_DEPENDS:=		zlib glib
+PKG_BUILDDEP:=		gettext-tiny libiconv-tiny
+PKG_BUILDDEP+=		zlib glib
+HOST_BUILDDEP:=		glib-host
 PKG_URL:=		http://wwww.qemu.org/
 PKG_SITES:=		http://wiki.qemu.org/download/
 
@@ -24,18 +26,23 @@ include $(TOPDIR)/mk/package.mk
 $(eval $(call HOST_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE}))
 $(eval $(call PKG_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
-TARGET_LDFLAGS+=	-pthread -lm -lrt
+ifeq ($(ADK_TARGET_LIB_MUSL),y)
+TARGET_CFLAGS+=		-DF_EXLCK=4 -DF_SHLCK=8 -D__SIGRTMIN=32 -D__SIGRTMAX=\(NSIG-1\)
+endif
 CONFIG_STYLE:=		minimal
 CONFIGURE_ARGS+=	--host-cc=$(CC_FOR_BUILD) \
+			--cross-prefix=$(GNU_TARGET_NAME)- \
 			--prefix=/usr \
 			--sysconfdir=/etc \
 			--enable-kvm \
 			--disable-docs \
+			--disable-sdl \
 			--bindir=/usr/bin
 
+CFLAGS_FOR_BUILD+=	-DNATIVE
 HOST_STYLE:=		manual
 HOST_CONFIGURE_ARGS+=	--host-cc=$(CC_FOR_BUILD) \
+			--prefix=${STAGING_HOST_DIR}/usr \
 			--disable-docs \
 			--disable-werror \
 			--disable-system \
@@ -43,17 +50,17 @@ HOST_CONFIGURE_ARGS+=	--host-cc=$(CC_FOR_BUILD) \
 
 host-configure:
 	cd ${WRKBUILD}; rm -f config.{cache,status}; \
-	    env ${HOST_CONFIGURE_ENV} \
-	    ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
-	    ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
+		env ${HOST_CONFIGURE_ENV} \
+		${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
+		${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
 
 host-build:
 	cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
-	    ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
-	
+		${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
+       
 qemu-hostinstall:
 	cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
-	    DESTDIR='$(STAGING_HOST_DIR)' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
+		${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
 
 qemu-install:
 	$(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu

+ 19 - 6
package/qemu/patches/patch-linux-user_syscall_c

@@ -1,22 +1,35 @@
---- qemu-1.7.0.orig/linux-user/syscall.c	2013-11-27 23:15:55.000000000 +0100
-+++ qemu-1.7.0/linux-user/syscall.c	2014-01-31 09:51:34.051058876 +0100
-@@ -64,6 +64,7 @@ int __clone2(int (*fn)(void *), void *ch
+--- qemu-1.7.1.orig/linux-user/syscall.c	2014-03-25 15:01:10.000000000 +0100
++++ qemu-1.7.1/linux-user/syscall.c	2014-04-04 16:51:08.292546548 +0200
+@@ -63,6 +63,7 @@ int __clone2(int (*fn)(void *), void *ch
+ //#include <sys/user.h>
  #include <netinet/ip.h>
  #include <netinet/tcp.h>
- #include <linux/wireless.h>
 +#include <linux/version.h>
+ #include <linux/wireless.h>
  #include <linux/icmp.h>
  #include "qemu-common.h"
- #ifdef TARGET_GPROF
-@@ -94,7 +95,11 @@ int __clone2(int (*fn)(void *), void *ch
+@@ -94,7 +95,15 @@ int __clone2(int (*fn)(void *), void *ch
  #include <linux/utsname.h>
  #include <linux/cdrom.h>
  #include <linux/hdreg.h>
++#ifdef NATIVE
 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0)
  #include <linux/soundcard.h>
 +#else
 +#include <linux/soundcard.h.oss3>
++#endif
++#else
++#include <linux/soundcard.h>
 +#endif
  #include <linux/kd.h>
  #include <linux/mtio.h>
  #include <linux/fs.h>
+@@ -400,7 +409,7 @@ static int sys_inotify_init1(int flags)
+ #endif
+ #define __NR_sys_ppoll __NR_ppoll
+ _syscall5(int, sys_ppoll, struct pollfd *, fds, nfds_t, nfds,
+-          struct timespec *, timeout, const __sigset_t *, sigmask,
++          struct timespec *, timeout, const sigset_t *, sigmask,
+           size_t, sigsetsize)
+ #endif
+ 

+ 11 - 0
package/qemu/patches/patch-util_qemu-openpty_c

@@ -0,0 +1,11 @@
+--- qemu-1.7.0.orig/util/qemu-openpty.c	2013-11-27 23:15:55.000000000 +0100
++++ qemu-1.7.0/util/qemu-openpty.c	2014-03-14 09:05:17.280258135 +0100
+@@ -35,7 +35,7 @@
+ #include "config-host.h"
+ #include "qemu-common.h"
+ 
+-#if defined(__GLIBC__)
++#if defined(__linux__)
+ # include <pty.h>
+ #elif defined CONFIG_BSD
+ # include <termios.h>

+ 1 - 1
package/rdate/Makefile

@@ -7,7 +7,7 @@ PKG_NAME:=		rdate
 PKG_VERSION:=		20070817
 PKG_RELEASE:=		4
 PKG_MD5SUM:=		9a6489d7de4311678a3fab001bb503df
-PKG_DESCR:=		A small rdate and NTP client
+PKG_DESCR:=		small rdate and NTP client
 PKG_SECTION:=		ntp
 PKG_SITES:=		${MASTER_SITE_MIRBSD:distfiles/=dist/mir/rdate/}
 

+ 25 - 3
package/samba/Makefile

@@ -20,6 +20,14 @@ PKGSS_SAMBA_CLIENT:=	libreadline samba-lib
 PKGSD_SAMBA_PASSWD:=	SMB password utility
 PKGSD_SAMBA_LIB:=	SMB libraries
 
+PKG_FLAVOURS_SAMBA:=	WITH_WINBIND WITH_LDAP
+PKGFD_WITH_WINBIND:=	enable winbind support
+PKGFS_WITH_WINBIND:=	libkrb5
+PKGFB_WITH_WINBIND:=	krb5
+PKGFD_WITH_LDAP:=	enable LDAP support
+PKGFS_WITH_LDAP:=	libopenldap
+PKGFB_WITH_LDAP:=	openldap
+
 WRKSRC=			${WRKDIST}/source3
 
 include ${TOPDIR}/mk/package.mk
@@ -29,9 +37,25 @@ $(eval $(call PKG_template,SAMBA_CLIENT,samba-client,${PKG_VERSION}-${PKG_RELEAS
 $(eval $(call PKG_template,SAMBA_PASSWD,samba-passwd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_SAMBA_PASSWD},${PKG_SECTION}))
 $(eval $(call PKG_template,SAMBA_LIB,samba-lib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_SAMBA_LIB},${PKG_SECTION}))
 
-#TARGET_LDFLAGS+=	-Wl,-rpath -Wl,/usr/lib/samba
+ifneq ($(ADK_PACKAGE_SAMBA_WITH_WINBIND),)
+CONFIGURE_ARGS+=	--with-winbind \
+			--with-krb5="$(STAGING_TARGET_DIR)/usr"
+else
+CONFIGURE_ARGS+=	--without-winbind
+endif
+
+ifneq ($(ADK_PACKAGE_SAMBA_WITH_LDAP),)
+CONFIGURE_ARGS+=	--with-ldap
+else
+CONFIGURE_ARGS+=	--with-ldap=no
+endif
+
 CONFIGURE_ENV+=		samba_cv_CC_NEGATIVE_ENUM_VALUES=no \
 			samba_cv_USE_SETRESUID=no \
+			samba_cv_HAVE_WRFILE_KEYTAB=yes \
+			ac_cv_func_ext_krb5_enctype_to_string=yes \
+			smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes \
+			smb_krb5_cv_enctype_to_string_takes_size_t_arg=no \
 			ac_cv_lib_ext_nsl_connect=no \
 			ac_cv_search_yp_get_default_domain=no \
 			ac_cv_lib_ext_nsl_gethostbyname=no \
@@ -44,12 +68,10 @@ CONFIGURE_ARGS+=	--libdir=/usr/lib \
 			--with-privatedir=/etc/samba \
 			--with-libiconv=/dev/null \
 			--with-syslog \
-			--without-winbind \
 			--disable-cups \
 			--disable-swat \
 			--disable-avahi \
 			--with-utmp=no \
-			--with-ldap=no \
 			--without-cluster-support \
 			--without-sendfile-support
 

+ 1 - 0
package/squashfs/Makefile

@@ -8,6 +8,7 @@ PKG_VERSION:=		4.2
 PKG_RELEASE:=		1
 PKG_MD5SUM:=		1b7a781fb4cf8938842279bd3e8ee852
 PKG_DESCR:=		squashfs filesystem utilities
+HOST_BUILDDEP:=		xz-host
 PKG_SECTION:=		fs
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=squashfs/}
 

+ 48 - 72
scripts/install-rpi.sh

@@ -3,125 +3,101 @@
 # material, please see the LICENCE file in the top-level directory.
 
 if [ $(id -u) -ne 0 ];then
-	printf "Installation is only possible as root\n"
+	echo "Installation is only possible as root"
 	exit 1
 fi
 
-printf "Checking if parted is installed"
-parted=$(which parted)
-
-if [ ! -z $parted -a -x $parted ];then
-	printf "...okay\n"
-else
-	printf "...failed\n"
-	exit 1
-fi
-
-printf "Checking if sfdisk is installed"
-sfdisk=$(which sfdisk)
-
-if [ ! -z $sfdisk -a -x $sfdisk ];then
-	printf "...okay\n"
-else
-	printf "...failed\n"
-	exit 1
-fi
-
-printf "Checking if mke2fs is installed"
-mke2fs=$(which mke2fs)
-
-if [ ! -z $mke2fs -a -x $mke2fs ];then
-	printf "...okay\n"
-else
-	printf "...failed\n"
-	exit 1
-fi
+for tool in parted sfdisk mkfs.vfat mkfs.ext4;do
+	if ! which $tool >/dev/null; then
+		echo "Checking if $tool is installed... failed"
+		f=1
+	fi
+done
+[[ $f -eq 1 ]] && exit 1
 
 if [ -z $1 ];then
-	printf "Please give your SD card device as first parameter\n"
+	echo "Please give your SD card device as first parameter"
 	exit 1
 else
 	if [ -z $2 ];then
-		printf "Please give your install tar archive as second parameter\n"
-		exit 2
+		echo "Please give your install tar archive as second parameter"
+		exit 1
 	fi
 	if [ -f $2 ];then
-		printf "Installing $2 on $1\n"
+		echo "Installing $2 on $1"
 	else
-		printf "$2 is not a file, Exiting\n"
+		echo "$2 is not a file, exiting"
 		exit 1
 	fi
 	if [ -b $1 ];then
-		printf "Using $1 as SD card disk for installation\n"
-		printf "This will destroy all data on $1, are you sure?\n"
-		printf "Type "y" to continue\n"
+		echo "Using $1 as SD card disk for installation"
+		echo "WARNING: This will destroy all data on $1 - type Yes to continue!"
 		read y
-		if [ "$y" = "y" ];then
+		if [ "$y" = "Yes" ];then
 			$sfdisk -l $1 2>&1 |grep 'No medium'
 			if [ $? -eq 0 ];then
+				echo "No medium found"
 				exit 1
 			else
-				printf "Starting with installation\n"
+				echo "Starting with installation"
 			fi
 		else
-			printf "Exiting.\n"
+			echo "Exiting."
 			exit 1
 		fi
 	else
-		printf "Sorry $1 is not a block device\n"
+		echo "Sorry $1 is not a block device"
 		exit 1
 	fi
 fi
 	
 
 if [ $(mount | grep $1| wc -l) -ne 0 ];then
-	printf "Block device $1 is in use, please umount first.\n"
+	echo "Block device $1 is in use, please umount first"
 	exit 1
 fi
 
+echo "Wiping existing partitions"
+dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1
+sync
 
-if [ $($sfdisk -l $1 2>/dev/null|grep Empty|wc -l) -ne 4 ];then
-	printf "Partitions already exist, should I wipe them?\n"
-	printf "Type y to continue\n"
-	read y
-	if [ $y = "y" ];then
-		printf "Wiping existing partitions\n"
-		dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1
-	else
-		printf "Exiting.\n"
-		exit 1
-	fi
-fi
-
-printf "Create partition and filesystem for raspberry pi\n"
+echo "Create partition and filesystem for raspberry pi"
 rootpart=${1}2
-$parted -s $1 mklabel msdos
+parted -s $1 mklabel msdos
 sleep 2
-maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
-rootsize=$(($maxsize-16))
+maxsize=$(env LC_ALL=C parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
+rootsize=$(($maxsize-34))
+datasize=$(($maxsize-2))
 
-$parted -s $1 unit cyl mkpart primary fat32 -- 0 16
-$parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize
-$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
-$parted -s $1 set 1 boot on
-$sfdisk --change-id $1 3 88
+parted -s $1 unit cyl mkpart primary fat32 -- 0 16
+parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize
+parted -s $1 unit cyl mkpart primary ext2 $rootsize $datasize
+parted -s $1 unit cyl mkpart primary fat32 $datasize $maxsize
+parted -s $1 set 1 boot on
+sfdisk --change-id $1 4 88
 sleep 2
-mkfs.vfat ${1}1
-$mke2fs ${1}2
+mkfs.vfat ${1}1 >/dev/null
+mkfs.ext4 -q -O ^huge_file ${1}2
+mkfs.ext4 -q -O ^huge_file ${1}3
 sync
 sleep 2
 
 tmp=$(mktemp -d)
-mount -t ext2 ${rootpart} $tmp
+mount -t ext4 ${rootpart} $tmp
 mkdir $tmp/boot
+mkdir $tmp/data
+mount -t ext4 ${1}3 $tmp/data
+mkdir $tmp/data/mpd $tmp/data/xbmc
 mount -t vfat ${1}1 $tmp/boot
-sleep 2
-printf "Extracting install archive\n"
+sleep 1
+echo "Extracting install archive"
 tar -C $tmp -xzpf $2 
-printf "Fixing permissions\n"
+echo "Fixing permissions"
 chmod 1777 $tmp/tmp
 chmod 4755 $tmp/bin/busybox
+echo "/dev/mmcblk0p3	/data	ext4	rw	0	0" >>$tmp/etc/fstab
+umount $tmp/data
 umount $tmp/boot
 umount $tmp
-printf "Successfully installed.\n"
+echo "Successfully installed."
 exit 0

+ 13 - 0
scripts/scan-tools.sh

@@ -271,6 +271,12 @@ if ! which xz >/dev/null 2>&1; then
 fi
 
 # optional
+host_build_cdrtools=0
+if ! which mkisofs >/dev/null 2>&1; then
+	echo "No mkisofs found, will build one when required."
+	host_build_cdrtools=1
+fi
+
 host_build_ccache=0
 if ! which ccache >/dev/null 2>&1; then
 	echo "No ccache found, will build one when required."
@@ -295,6 +301,11 @@ if ! which lzop >/dev/null 2>&1; then
 	host_build_lzop=1
 fi
 
+host_build_qemu=0
+if ! which qemu-img >/dev/null 2>&1; then
+	echo "No qemu found, will build one when required."
+	host_build_qemu=1
+fi
 
 echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target/config/Config.in.prereq
 printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq
@@ -311,9 +322,11 @@ if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_F
 if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi
 # optional
 if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_cdrtools -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CDRTOOLS if ADK_HOST_NEED_CDRTOOLS" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_genext2fs -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_lzma -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_lzop -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_qemu -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_QEMU if ADK_HOST_NEED_QEMU" >> $topdir/target/config/Config.in.prereq ;fi
 
 cd $topdir
 rm -rf tmp

+ 10 - 0
scripts/toolchain.cmake.in

@@ -0,0 +1,10 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_C_COMPILER @@TARGET_CC@@)
+set(CMAKE_CXX_COMPILER @@TARGET_CXX@@)
+set(CMAKE_INSTALL_SO_NO_EXE 0)
+set(CMAKE_PROGRAM_PATH \"@@STAGING_HOST_DIR@@/usr/bin\")
+set(CMAKE_FIND_ROOT_PATH \"@@STAGING_TARGET_DIR@@\")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(ENV{PKG_CONFIG_SYSROOT_DIR} \"@@STAGING_TARGET_DIR@@\")

+ 2 - 2
target/config/Config.in

@@ -210,6 +210,7 @@ config ADK_TARGET_KERNEL_MINICONFIG
 	default "raspberry-pi" if ADK_TARGET_SYSTEM_RASPBERRY_PI
 	default "sharp-zaurus" if ADK_TARGET_SYSTEM_SHARP_ZAURUS
 	default "lemote-yeelong" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
+	default "generic-pc" if ADK_TARGET_SYSTEM_GENERIC_PC
 
 config ADK_QEMU_ARGS
 	string
@@ -270,8 +271,6 @@ config ADK_TARGET_QEMU_WITH_BLOCK
 	select ADK_KERNEL_SCSI_IBMVSCSI if ADK_TARGET_SYSTEM_QEMU_PPC64
 	select ADK_KERNEL_SCSI_SUNESP if ADK_TARGET_SYSTEM_QEMU_SPARC
 	select ADK_KERNEL_PATA_PLATFORM if ADK_LINUX_SH
-	select ADK_HOST_NEED_JFFS2 if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 || ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
-	select ADK_HOST_NEED_SQUASHFS if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 || ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
 
 endchoice
 
@@ -773,6 +772,7 @@ config ADK_TARGET_ROOTFS_SQUASHFS
 	bool "Compressed read-only root filesystem (squashfs)"
 	select ADK_KERNEL_SQUASHFS
 	select ADK_HOST_NEED_SQUASHFS
+	select ADK_HOST_NEED_QEMU if ADK_HARDWARE_QEMU
 	select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
 	depends on ADK_TARGET_WITH_MTD
 	help

+ 7 - 0
target/config/Config.in.adk

@@ -33,6 +33,13 @@ config ADK_DEBUG
 	  All packages and libc will be compiled and packaged with debug information.
 	  Mostly useful for NFS root or big USB/CF or hard disk setups.
 
+config ADK_DEBUG_OPTS
+	bool "use optimization cflags"
+	depends on ADK_DEBUG
+	default n
+	help
+	  All packages and libc will be compiled with debug information and optimization flags on.
+
 config ADK_DEBUG_STRIP
 	bool "strip target binaries/libraries for gdbserver usage"
 	depends on ADK_DEBUG

+ 27 - 3
target/config/Config.in.tools

@@ -97,25 +97,49 @@ config ADK_HOST_BUILD_MKSH
 	boolean
 	default n
 
-config ADK_HOST_NEED_SYSLINUX
+config ADK_HOST_NEED_QEMU
 	boolean
 	default n
 
-config ADK_HOST_BUILD_SYSLINUX
+config ADK_HOST_BUILD_QEMU
 	boolean
 	default n
 
 # optional, must be used from OpenADK
+config ADK_HOST_NEED_MKIMAGE
+	boolean
+	default n
+
+config ADK_HOST_BUILD_MKIMAGE
+	boolean
+	default y if ADK_HOST_NEED_MKIMAGE
+	default n
+
+config ADK_HOST_NEED_MTD_UTILS
+	boolean
+	default n
+
 config ADK_HOST_BUILD_MTD_UTILS
+	boolean
+	default y if ADK_HOST_NEED_MTD_UTILS
+	default n
+
+config ADK_HOST_NEED_SQUASHFS
 	boolean
 	default n
 
 config ADK_HOST_BUILD_SQUASHFS
 	boolean
+	default y if ADK_HOST_NEED_SQUASHFS
 	default n
 
-config ADK_HOST_BUILD_MKIMAGE
+config ADK_HOST_NEED_SYSLINUX
+	boolean
+	default n
+
+config ADK_HOST_BUILD_SYSLINUX
 	boolean
+	default y if ADK_HOST_NEED_SYSLINUX
 	default n
 
 config ADK_HOST_BUILD_PCRE

+ 1 - 1
target/linux/config/Config.in.audio

@@ -124,7 +124,7 @@ config ADK_KPACKAGE_KMOD_SND_BCM2708_SOC_I2S
 	select ADK_KPACKAGE_KMOD_SND
 	select ADK_KERNEL_SND_ARM
 	select ADK_KPACKAGE_KMOD_SND_SOC
-	select ADK_KPACKAGE_KMOD_SND_PCM_DMAENGINE
+	select ADK_KPACKAGE_KMOD_SND_PCM_DMAENGINE if !ADK_KERNEL_VERSION_3_10_34
 	select ADK_KPACKAGE_KMOD_SND_COMPRESS
 	depends on ADK_TARGET_SYSTEM_RASPBERRY_PI
 	default n

+ 1 - 1
target/microblaze/Makefile

@@ -18,7 +18,7 @@ endif
 
 ifeq ($(ADK_TARGET_FS),squashfs)
 imageinstall: $(BUILD_DIR)/root.squashfs
-	qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
+	env PATH=$(HOST_PATH) qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
 	dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS)
 	@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
 ifneq ($(ADK_HARDWARE_QEMU),)

+ 1 - 0
target/packages/pkg-available/mpdbox

@@ -49,6 +49,7 @@ config ADK_PKG_MPDBOX
 	select ADK_PACKAGE_PHP_FASTCGI
 	select ADK_PACKAGE_SCREEN
 	select ADK_PACKAGE_VIM
+	select ADK_PACKAGE_E2FSCK
 	select ADK_PACKAGE_ALSA_UTILS
 	select ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER
 	select ADK_KPACKAGE_KMOD_SND_INTEL8X0 if ADK_TARGET_SYSTEM_QEMU_I686

+ 1 - 0
target/packages/pkg-available/test

@@ -5,6 +5,7 @@ config ADK_PKG_TEST
 	select ADK_PACKAGE_SOCAT
 	select ADK_PACKAGE_MAKE
 	select ADK_PACKAGE_FILE
+	select ADK_PACKAGE_RDATE
 	select ADK_KERNEL_BLK_DEV_INITRD
 	select ADK_KERNEL_COMP_XZ
 	select ADK_KERNEL_INITRAMFS_COMPRESSION_XZ

+ 11 - 0
target/sh/sys-available/toolchain-sh4

@@ -0,0 +1,11 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_SH4
+	bool "Toolchain only (little endian)"
+	select ADK_sh
+	select ADK_little
+	select ADK_toolchain_sh
+	select ADK_CPU_SH4
+	select ADK_TOOLCHAIN
+	select ADK_TARGET_PACKAGE_TXZ
+	help
+	  Build a superh toolchain (sh4).
+

+ 11 - 0
target/sh/sys-available/toolchain-sh4eb

@@ -0,0 +1,11 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_SH4EB
+	bool "Toolchain only (big endian)"
+	select ADK_sh
+	select ADK_big
+	select ADK_toolchain_sheb
+	select ADK_CPU_SH4
+	select ADK_TOOLCHAIN
+	select ADK_TARGET_PACKAGE_TXZ
+	help
+	  Build a superh toolchain (sh4 big endian).
+

+ 19 - 0
target/x86/kernel/generic-pc

@@ -0,0 +1,19 @@
+CONFIG_X86=y
+CONFIG_X86_32=y
+CONFIG_PCI=y
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_NET_VENDOR_NATSEMI=y
+CONFIG_NET_VENDOR_8390=y
+CONFIG_NE2K_PCI=y
+CONFIG_PCNET32=y
+CONFIG_NET_VENDOR_REALTEK=y
+CONFIG_RTL8139CP=y
+CONFIG_8139TOO=y
+CONFIG_NET_VENDOR_INTEL=y
+CONFIG_E100=y
+CONFIG_E1000=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y

+ 9 - 0
target/x86/sys-available/generic-pc

@@ -0,0 +1,9 @@
+config ADK_TARGET_SYSTEM_GENERIC_PC
+	bool "Generic PC (486)"
+	select ADK_x86
+	select ADK_generic_pc
+	select ADK_CPU_I486
+	select ADK_TARGET_KERNEL_BZIMAGE
+	help
+	 Support for generic PC (i486).
+

+ 0 - 5
toolchain/gcc/Makefile.inc

@@ -2,12 +2,7 @@
 # material, please see the LICENCE file in the top-level directory.
 
 PKG_NAME:=		gcc
-ifeq ($(ADK_LINUX_SPARC),y)
-PKG_VERSION:=		4.7.3
-PKG_MD5SUM:=		86f428a30379bdee0224e353ee2f999e
-else
 PKG_VERSION:=		4.8.2
 PKG_MD5SUM:=		deca88241c1135e2ff9fa5486ab5957b
-endif
 PKG_RELEASE:=		1
 PKG_SITES:=		${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/}

+ 154 - 0
toolchain/gcc/patches/4.8.2/sparc-miscompile.patch

@@ -0,0 +1,154 @@
+diff -Nur gcc-4.8.2.orig/gcc/tree-ssa-forwprop.c gcc-4.8.2/gcc/tree-ssa-forwprop.c
+--- gcc-4.8.2.orig/gcc/tree-ssa-forwprop.c	2013-02-25 16:31:31.000000000 +0100
++++ gcc-4.8.2/gcc/tree-ssa-forwprop.c	2014-03-22 19:37:04.797991879 +0100
+@@ -688,6 +688,130 @@
+      recompute_tree_invariant_for_addr_expr (gimple_assign_rhs1 (stmt));
+ }
+ 
++ /* DEF_RHS contains the address of the 0th element in an array.	 
++    USE_STMT uses type of DEF_RHS to compute the address of an	 
++    arbitrary element within the array.  The (variable) byte offset	 
++    of the element is contained in OFFSET.	 
++ 	 
++    We walk back through the use-def chains of OFFSET to verify that	 
++    it is indeed computing the offset of an element within the array	 
++    and extract the index corresponding to the given byte offset.	 
++ 	 
++    We then try to fold the entire address expression into a form	 
++    &array[index].	 
++ 	 
++    If we are successful, we replace the right hand side of USE_STMT	 
++    with the new address computation.  */	 
++ 	 
++ static bool	 
++ forward_propagate_addr_into_variable_array_index (tree offset,	 
++                                                   tree def_rhs,	 
++                                                   gimple_stmt_iterator *use_stmt_gsi)	 
++ {	 
++   tree index, tunit;	 
++   gimple offset_def, use_stmt = gsi_stmt (*use_stmt_gsi);	 
++   tree new_rhs, tmp;	 
++ 	 
++   if (TREE_CODE (TREE_OPERAND (def_rhs, 0)) == ARRAY_REF)	 
++     tunit = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (def_rhs)));	 
++   else if (TREE_CODE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))) == ARRAY_TYPE)	 
++     tunit = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (TREE_TYPE (def_rhs))));	 
++   else	 
++     return false;	 
++   if (!host_integerp (tunit, 1))	 
++     return false;	 
++ 	 
++   /* Get the offset's defining statement.  */	 
++   offset_def = SSA_NAME_DEF_STMT (offset);	 
++ 	 
++   /* Try to find an expression for a proper index.  This is either a	 
++      multiplication expression by the element size or just the ssa name we came	 
++      along in case the element size is one. In that case, however, we do not	 
++      allow multiplications because they can be computing index to a higher	 
++      level dimension (PR 37861). */	 
++   if (integer_onep (tunit))	 
++     {	 
++       if (is_gimple_assign (offset_def)	 
++           && gimple_assign_rhs_code (offset_def) == MULT_EXPR)	 
++         return false;	 
++ 	 
++       index = offset;	 
++     }	 
++   else	 
++     {	 
++       /* The statement which defines OFFSET before type conversion	 
++          must be a simple GIMPLE_ASSIGN.  */	 
++       if (!is_gimple_assign (offset_def))	 
++         return false;	 
++ 	 
++       /* The RHS of the statement which defines OFFSET must be a	 
++          multiplication of an object by the size of the array elements.	 
++          This implicitly verifies that the size of the array elements	 
++          is constant.  */	 
++      if (gimple_assign_rhs_code (offset_def) == MULT_EXPR	 
++          && TREE_CODE (gimple_assign_rhs2 (offset_def)) == INTEGER_CST	 
++          && tree_int_cst_equal (gimple_assign_rhs2 (offset_def), tunit))	 
++        {	 
++          /* The first operand to the MULT_EXPR is the desired index.  */	 
++          index = gimple_assign_rhs1 (offset_def);	 
++        }	 
++      /* If we have idx * tunit + CST * tunit re-associate that.  */	 
++      else if ((gimple_assign_rhs_code (offset_def) == PLUS_EXPR	 
++                || gimple_assign_rhs_code (offset_def) == MINUS_EXPR)	 
++               && TREE_CODE (gimple_assign_rhs1 (offset_def)) == SSA_NAME	 
++               && TREE_CODE (gimple_assign_rhs2 (offset_def)) == INTEGER_CST	 
++               && (tmp = div_if_zero_remainder (EXACT_DIV_EXPR,	 
++                                                gimple_assign_rhs2 (offset_def),	 
++                                                tunit)) != NULL_TREE)	 
++        {	 
++          gimple offset_def2 = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (offset_def));	 
++          if (is_gimple_assign (offset_def2)	 
++              && gimple_assign_rhs_code (offset_def2) == MULT_EXPR	 
++              && TREE_CODE (gimple_assign_rhs2 (offset_def2)) == INTEGER_CST	 
++              && tree_int_cst_equal (gimple_assign_rhs2 (offset_def2), tunit))	 
++            {	 
++              index = fold_build2 (gimple_assign_rhs_code (offset_def),	 
++                                   TREE_TYPE (offset),	 
++                                   gimple_assign_rhs1 (offset_def2), tmp);	 
++            }	 
++          else	 
++            return false;	 
++        }	 
++      else	 
++         return false;	 
++     }	 
++ 	 
++   /* Replace the pointer addition with array indexing.  */	 
++   index = force_gimple_operand_gsi (use_stmt_gsi, index, true, NULL_TREE,	 
++                                     true, GSI_SAME_STMT);	 
++   if (TREE_CODE (TREE_OPERAND (def_rhs, 0)) == ARRAY_REF)	 
++     {	 
++       new_rhs = unshare_expr (def_rhs);	 
++       TREE_OPERAND (TREE_OPERAND (new_rhs, 0), 1) = index;	 
++     }	 
++   else	 
++     {	 
++       new_rhs = build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (TREE_TYPE (def_rhs))),	 
++                         unshare_expr (TREE_OPERAND (def_rhs, 0)),	 
++                         index, integer_zero_node, NULL_TREE);	 
++       new_rhs = build_fold_addr_expr (new_rhs);	 
++       if (!useless_type_conversion_p (TREE_TYPE (gimple_assign_lhs (use_stmt)),	 
++                                       TREE_TYPE (new_rhs)))	 
++         {	 
++           new_rhs = force_gimple_operand_gsi (use_stmt_gsi, new_rhs, true,	 
++                                               NULL_TREE, true, GSI_SAME_STMT);	 
++           new_rhs = fold_convert (TREE_TYPE (gimple_assign_lhs (use_stmt)),	 
++                                   new_rhs);	 
++         }	 
++     }	 
++   gimple_assign_set_rhs_from_tree (use_stmt_gsi, new_rhs);	 
++   fold_stmt (use_stmt_gsi);	 
++   tidy_after_forward_propagate_addr (gsi_stmt (*use_stmt_gsi));	 
++   return true;	 
++ }	 
++
++
++
+ /* NAME is a SSA_NAME representing DEF_RHS which is of the form
+    ADDR_EXPR <whatever>.
+ 
+@@ -977,6 +1101,19 @@
+       tidy_after_forward_propagate_addr (use_stmt);
+       return true;
+     }
++   /* Try to optimize &x[0] p+ OFFSET where OFFSET is defined by	 
++      converting a multiplication of an index by the size of the	 
++      array elements, then the result is converted into the proper	 
++      type for the arithmetic.  */	 
++   if (TREE_CODE (rhs2) == SSA_NAME	 
++       && (TREE_CODE (array_ref) != ARRAY_REF	 
++           || integer_zerop (TREE_OPERAND (array_ref, 1)))	 
++       && useless_type_conversion_p (TREE_TYPE (name), TREE_TYPE (def_rhs))	 
++       /* Avoid problems with IVopts creating PLUS_EXPRs with a	 
++          different type than their operands.  */	 
++       && useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (def_rhs)))	 
++     return forward_propagate_addr_into_variable_array_index (rhs2, def_rhs,	 
++                                                              use_stmt_gsi);	 
+ 
+   return false;
+ }