diff options
-rw-r--r-- | Config.in | 1 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | mk/build.mk | 34 | ||||
-rw-r--r-- | scripts/rstrip.sh | 14 | ||||
-rw-r--r-- | target/config/Config.in | 15 | ||||
-rw-r--r-- | target/sparc/kernel/qemu-sparc | 2 | ||||
-rw-r--r-- | toolchain/eglibc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.8.2/musl-sh.patch | 11 | ||||
-rw-r--r-- | toolchain/glibc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/musl/Makefile | 4 | ||||
-rw-r--r-- | toolchain/uClibc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/uClibc/patches/xxx-sparc-wait4.patch | 12 |
12 files changed, 89 insertions, 22 deletions
@@ -152,7 +152,6 @@ config ADK_KERNEL_COMP_XZ select ADK_KERNEL_RD_XZ select ADK_KERNEL_KERNEL_XZ select ADK_KERNEL_INITRAMFS_COMPRESSION_XZ - depends on !ADK_LINUX_MIPS config ADK_KERNEL_COMP_LZMA prompt "use LZMA compression" @@ -104,6 +104,9 @@ cleantarget targetclean: .prereq_done -@${GMAKE_INV} cleantarget @-rm -f make.log +cleantoolchain toolchainclean: .prereq_done + -@${GMAKE_INV} cleantoolchain + distclean cleandist: -@${GMAKE_INV} distclean @-rm -f make.log .prereq_done @@ -146,6 +149,9 @@ allmodconfig: .prereq_done package_index: .prereq_done @${GMAKE_INV} package_index +test-framework: .prereq_done + @${GMAKE_INV} test-framework + release: .prereq_done @${GMAKE_INV} release diff --git a/mk/build.mk b/mk/build.mk index 3108ec064..c0f05556f 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -141,7 +141,7 @@ ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/M $(STAGING_HOST_DIR)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk .NOTPARALLEL: -.PHONY: all world clean cleantarget cleandir distclean image_clean +.PHONY: all world clean cleantarget cleandir cleantoolchain distclean image_clean world: mkdir -p $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \ @@ -252,10 +252,8 @@ clean: $(MAKE) -C $(CONFIG) clean for f in $$(ls ${STAGING_PKG_DIR}/ 2>/dev/null |grep -v [A-Z]|grep -v stamps 2>/dev/null); do \ while read file ; do \ - echo ${STAGING_DIR}/$$file ;\ rm ${STAGING_DIR}/$$file 2>/dev/null;\ - done < $$f ; \ - echo ${STAGING_PKG_DIR}/$$f ;\ + done < ${STAGING_PKG_DIR}/$$f ; \ rm ${STAGING_PKG_DIR}/$$f ; \ done rm -rf $(BUILD_DIR) $(FW_DIR) $(TARGET_DIR) \ @@ -275,6 +273,15 @@ cleandir: rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk +cleantoolchain: + @$(TRACE) cleantoolchain + @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) + rm -rf $(BUILD_DIR_PFX) $(TARGET_DIR_PFX) \ + ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d + rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) + rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk + cleantarget: @$(TRACE) cleantarget @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) @@ -535,7 +542,8 @@ bulktoolchain: $(GMAKE) prereq && \ $(GMAKE) ARCH=$$tarch SYSTEM=toolchain-$$arch LIBC=$$libc defconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit;fi; \ - tar -cvJf ${TOPDIR}/firmware/toolchain_$${arch}_$${libc}.tar.xz host_$${arch}_*_$${libc} target_$${arch}_*_$${libc}; \ + tar -cvJf ${TOPDIR}/firmware/toolchain_$${arch}_$${libc}.tar.xz host_* target_$${arch}_$${libc}_*; \ + $(GMAKE) cleantoolchain; \ rm .config; \ ) 2>&1 | tee $(TOPDIR)/firmware/toolchain_$${arch}_$${libc}/build.log; \ if [ -f .exit ];then break;fi \ @@ -543,6 +551,22 @@ bulktoolchain: if [ -f .exit ];then echo "Bulk build failed!"; rm .exit; exit 1;fi \ done +test-framework: + for libc in uclibc eglibc glibc musl;do \ + mkdir -p $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc; \ + ( \ + for arch in arm mips mipsel x86 x86_64;do \ + echo === building qemu-$$arch for $$libc on $$(date); \ + $(GMAKE) prereq && \ + $(GMAKE) ARCH=$$arch SYSTEM=qemu-$$arch LIBC=$$libc FS=archive defconfig; \ + $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ + rm .config; \ + done; \ + ) 2>&1 | tee $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc/build.log; \ + if [ -f .exit ];then echo "Bulk build failed!"; break;fi \ + done + if [ -f .exit ];then rm .exit;exit 1;fi + release: for libc in uclibc eglibc glibc musl;do \ mkdir -p $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc; \ diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index e676dea82..bacf25ca7 100644 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -5,6 +5,10 @@ SELF=${0##*/} +if [[ -z $debug ]];then + debug=1 +fi + if [[ -z $prefix ]]; then echo >&2 "$SELF: strip command not defined ('prefix' variable not set)" exit 1 @@ -60,9 +64,13 @@ find $TARGETS -type f -a -exec file {} \; | \ echo "$SELF: $V:$S" echo "-> $T $F" eval "chmod u+w $F" - eval "mkdir -p $D/usr/lib/debug/$Q" - eval "$O --only-keep-debug $F $D/usr/lib/debug/$P.debug" + if [[ $debug -eq 1 ]];then + eval "mkdir -p $D/usr/lib/debug/$Q" + eval "$O --only-keep-debug $F $D/usr/lib/debug/$P.debug" + fi eval "$T $F" - eval "cd $D/usr/lib/debug/$Q && $O --add-gnu-debuglink=$R.debug $F" + if [[ $debug -eq 1 ]];then + eval "cd $D/usr/lib/debug/$Q && $O --add-gnu-debuglink=$R.debug $F" + fi done exit 0 diff --git a/target/config/Config.in b/target/config/Config.in index bd1a65cac..44c9a8d20 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -127,6 +127,7 @@ config ADK_TARGET_ABI default "eabihf" if ADK_EABIHF config ADK_TARGET_MIPS_ABI + depends on ADK_TARGET_KERNEL64 && ADK_LINUX_MIPS string default "32" if ADK_o32 default "n32" if ADK_n32 @@ -652,7 +653,6 @@ config ADK_TARGET_LIB_UCLIBC select ADK_uclibc depends on \ !ADK_LINUX_MICROBLAZE && \ - !ADK_LINUX_SPARC && \ !ADK_LINUX_SPARC64 && \ !ADK_LINUX_PPC64 && \ !ADK_LINUX_NATIVE @@ -727,15 +727,22 @@ config ADK_TARGET_SUFFIX string default "gnueabihf" if (ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC) && ADK_EABIHF default "gnueabi" if (ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC) && ADK_EABI + default "gnuabi64" if (ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC) && ADK_n64 + default "gnuabin32" if (ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC) && ADK_n32 + default "gnuabi32" if (ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC) && ADK_o32 default "gnu" if (ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC) && !ADK_EABI default "uclibcgnueabihf" if ADK_TARGET_LIB_UCLIBC && ADK_EABIHF default "uclibcgnueabi" if ADK_TARGET_LIB_UCLIBC && ADK_EABI + default "uclibcabi64" if ADK_TARGET_LIB_UCLIBC && ADK_n64 + default "uclibcabin32" if ADK_TARGET_LIB_UCLIBC && ADK_n32 + default "uclibcabi32" if ADK_TARGET_LIB_UCLIBC && ADK_o32 default "uclibc" if ADK_TARGET_LIB_UCLIBC && !ADK_EABI default "muslgnueabihf" if ADK_TARGET_LIB_MUSL && ADK_EABIHF default "muslgnueabi" if ADK_TARGET_LIB_MUSL && ADK_EABI - default "musl" if ADK_TARGET_LIB_MUSL && !ADK_EABI - default "n64" if ADK_n64 - default "n32" if ADK_n32 + default "muslabi64" if ADK_TARGET_LIB_MUSL && ADK_n64 + default "muslabin32" if ADK_TARGET_LIB_MUSL && ADK_n32 + default "muslabi32" if ADK_TARGET_LIB_MUSL && ADK_o32 + default "musl" if ADK_TARGET_LIB_MUSL default "32" if ADK_32 default "x32" if ADK_x32 default "gnu" diff --git a/target/sparc/kernel/qemu-sparc b/target/sparc/kernel/qemu-sparc index e88151194..26bd9a29e 100644 --- a/target/sparc/kernel/qemu-sparc +++ b/target/sparc/kernel/qemu-sparc @@ -1,6 +1,5 @@ CONFIG_SPARC=y CONFIG_SPARC32=y -CONFIG_SERIAL_CONSOLE=y CONFIG_SBUS=y CONFIG_SBUSCHAR=y CONFIG_PCI=y @@ -17,6 +16,7 @@ CONFIG_NET_CORE=y CONFIG_ETHERNET=y CONFIG_NET_VENDOR_AMD=y CONFIG_SUNLANCE=y +CONFIG_SERIAL_CONSOLE=y CONFIG_SERIAL_SUNCORE=y CONFIG_SERIAL_SUNZILOG=y CONFIG_SERIAL_SUNZILOG_CONSOLE=y diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index 66c326a93..e2028dcd4 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -92,8 +92,8 @@ $(WRKBUILD)/.fixup: -find $(STAGING_TARGET_DIR) -type -f -name \*_pic\* -delete rm -rf $(STAGING_TARGET_DIR)/usr/share/locale $(STAGING_TARGET_DIR)/usr/share/i18n rm -rf $(STAGING_TARGET_DIR)/usr/lib/gconv - PATH="$(TARGET_PATH)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) - prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) + PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) + debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) touch $@ include ${TOPDIR}/mk/toolchain.mk diff --git a/toolchain/gcc/patches/4.8.2/musl-sh.patch b/toolchain/gcc/patches/4.8.2/musl-sh.patch new file mode 100644 index 000000000..237f76f63 --- /dev/null +++ b/toolchain/gcc/patches/4.8.2/musl-sh.patch @@ -0,0 +1,11 @@ +diff -Nur gcc-4.8.2.orig/gcc/config/sh/linux.h gcc-4.8.2/gcc/config/sh/linux.h +--- gcc-4.8.2.orig/gcc/config/sh/linux.h 2013-03-14 04:01:53.000000000 +0100 ++++ gcc-4.8.2/gcc/config/sh/linux.h 2014-03-01 11:33:10.000000000 +0100 +@@ -44,6 +44,7 @@ + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.so.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 7f304330c..00bd67cbc 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -73,8 +73,8 @@ $(WRKBUILD)/.fixup: -find $(STAGING_TARGET_DIR) -type f -name \*_pic\* -delete rm -rf $(STAGING_TARGET_DIR)/usr/share/locale $(STAGING_TARGET_DIR)/usr/share/i18n rm -rf $(STAGING_TARGET_DIR)/usr/lib/gconv - PATH="$(TARGET_PATH)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) - prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) + PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) + debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)/bin $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/ touch $@ include ${TOPDIR}/mk/toolchain.mk diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile index 726a036c3..b94c4e916 100644 --- a/toolchain/musl/Makefile +++ b/toolchain/musl/Makefile @@ -59,8 +59,8 @@ $(WRKBUILD)/.fixup: $(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install # cleanup toolchain -find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete - PATH="$(TARGET_PATH)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) - prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) + PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) + debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) touch $@ include ${TOPDIR}/mk/toolchain.mk diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile index 232c3944e..7e53b5d21 100644 --- a/toolchain/uClibc/Makefile +++ b/toolchain/uClibc/Makefile @@ -120,8 +120,8 @@ endif ln -s libc.so.0 $(STAGING_TARGET_DIR)/lib/libc.so # cleanup toolchain -find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete - PATH="$(TARGET_PATH)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) - prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) + PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR) + debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR) touch $@ include ${TOPDIR}/mk/toolchain.mk diff --git a/toolchain/uClibc/patches/xxx-sparc-wait4.patch b/toolchain/uClibc/patches/xxx-sparc-wait4.patch new file mode 100644 index 000000000..e219ed773 --- /dev/null +++ b/toolchain/uClibc/patches/xxx-sparc-wait4.patch @@ -0,0 +1,12 @@ +diff -Nur uClibc-0.9.33.2.orig/include/sys/wait.h uClibc-0.9.33.2/include/sys/wait.h +--- uClibc-0.9.33.2.orig/include/sys/wait.h 2014-03-01 19:15:53.000000000 +0100 ++++ uClibc-0.9.33.2/include/sys/wait.h 2014-03-01 19:16:42.000000000 +0100 +@@ -176,7 +176,7 @@ + #endif /* Use BSD. */ + + #ifdef _LIBC +-extern __pid_t __wait4_nocancel(__pid_t, __WAIT_STATUS, int, struct rusage *) attribute_hidden; ++extern __pid_t __wait4_nocancel(__pid_t, __WAIT_STATUS, int, struct rusage *); + #endif + + |