diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-04-13 17:18:15 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-04-13 17:18:15 +0200 |
commit | 64d6047788b6201a9b026a6841dd25f8d0a0d00b (patch) | |
tree | 95aafc346b70447f7dd2829f83f59d8df15d4d58 /mk | |
parent | d5aed1c97f81f422af91c1bd4d7994dc54beabe1 (diff) | |
parent | 7297ef1c47935fb17e49cac8379908e631763566 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build.mk | 124 | ||||
-rw-r--r-- | mk/buildhlp.mk | 8 | ||||
-rw-r--r-- | mk/fetch.mk | 1 | ||||
-rw-r--r-- | mk/host-bottom.mk | 9 | ||||
-rw-r--r-- | mk/host.mk | 4 | ||||
-rw-r--r-- | mk/image.mk | 35 | ||||
-rw-r--r-- | mk/kernel-build.mk | 1 | ||||
-rw-r--r-- | mk/kernel-ver.mk | 28 | ||||
-rw-r--r-- | mk/package.mk | 7 | ||||
-rw-r--r-- | mk/pkg-bottom.mk | 2 | ||||
-rw-r--r-- | mk/rootfs.mk | 13 | ||||
-rw-r--r-- | mk/vars.mk | 46 |
12 files changed, 150 insertions, 128 deletions
diff --git a/mk/build.mk b/mk/build.mk index 4cdccd8fd..13e287d89 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -9,7 +9,7 @@ $(error your umask is not 022) endif CONFIG_CONFIG_IN = Config.in -CONFIG = config +CONFIG = adk/config DEFCONFIG= ADK_DEBUG=n \ ADK_STATIC=n \ ADK_WGET_TIMEOUT=180 \ @@ -18,6 +18,7 @@ DEFCONFIG= ADK_DEBUG=n \ ADK_LEAVE_ETC_ALONE=n \ ADK_SIMPLE_NETWORK_CONFIG=n \ ADK_USE_CCACHE=n \ + ADK_RUNTIME_START_SERVICES=n \ ADK_PACKAGE_BASE_FILES=y \ ADK_PACKAGE_E2FSCK_STATIC=n \ ADK_PACKAGE_KEXECINIT=n \ @@ -41,8 +42,10 @@ DEFCONFIG= ADK_DEBUG=n \ ADK_PKG_TEST=n \ ADK_PKG_MPDBOX=n \ ADK_PKG_DEVELOPMENT=n \ - ADK_TOOLCHAIN_GCC_USE_SSP=n \ - ADK_TOOLCHAIN_GCC_USE_LTO=n \ + ADK_TOOLCHAIN_USE_SSP=n \ + ADK_TOOLCHAIN_USE_LTO=n \ + ADK_TOOLCHAIN_GOLD=n \ + ADK_TOOLCHAIN_USE_GOLD=n \ BUSYBOX_IFPLUGD=n \ BUSYBOX_EXTRA_COMPAT=n \ BUSYBOX_FEATURE_IFCONFIG_SLIP=n \ @@ -79,6 +82,7 @@ DEFCONFIG= ADK_DEBUG=n \ BUSYBOX_FEATURE_VI_REGEX_SEARCH=n \ ADK_KERNEL_RT2X00_DEBUG=n \ ADK_KERNEL_ATH5K_DEBUG=n \ + ADK_KERNEL_BUG=n \ ADK_KERNEL_DEBUG_WITH_KGDB=n noconfig_targets:= menuconfig \ @@ -92,13 +96,13 @@ POSTCONFIG= -@\ if [ -f .adkinit ];then rm .adkinit;\ else \ if [ -f .config.old ];then \ - $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild;\ + $(TOPDIR)/adk/tools/pkgrebuild;\ rebuild=0; \ if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \ touch .rebuild.busybox;\ rebuild=1;\ fi; \ - for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_GETTY ADK_RUNTIME_SHELL;do \ + for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_CONSOLE ADK_RUNTIME_GETTY ADK_RUNTIME_SHELL;do \ if [ "$$(grep ^$$i .config|md5sum)" != "$$(grep ^$$i .config.old|md5sum)" ];then \ touch .rebuild.base-files;\ rebuild=1;\ @@ -138,27 +142,26 @@ include $(TOPDIR)/rules.mk all: world -${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) - $(STAGING_HOST_DIR)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk +${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/depmaker + $(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk .NOTPARALLEL: .PHONY: all world clean cleandir cleantoolchain distclean image_clean world: - mkdir -p $(DL_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \ - $(PACKAGE_DIR) $(TOOLS_BUILD_DIR) $(STAGING_HOST_DIR)/usr/bin \ - $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps + mkdir -p $(DL_DIR) $(HOST_BUILD_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \ + $(STAGING_HOST_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh ${BASH} ${TOPDIR}/scripts/update-sys ${BASH} ${TOPDIR}/scripts/update-pkg ifeq ($(ADK_TOOLCHAIN),y) ifeq ($(ADK_TOOLCHAIN_ONLY),y) - $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile + $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile else - $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile root_clean package/install + $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile root_clean package/install endif else - $(MAKE) -f mk/build.mk tools/install toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index + $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index endif package_index: @@ -169,9 +172,10 @@ endif ${STAGING_TARGET_DIR} ${STAGING_TARGET_DIR}/etc ${STAGING_HOST_DIR}: mkdir -p ${STAGING_TARGET_DIR}/{bin,etc,lib,usr/bin,usr/include,usr/lib/pkgconfig} \ - ${STAGING_HOST_DIR}/{bin,lib,usr/bin,usr/lib,usr/include} + ${STAGING_HOST_DIR}/{usr/bin,usr/lib,usr/include} for i in lib64 lib32 libx32;do \ cd ${STAGING_TARGET_DIR}/; ln -sf lib $$i; \ + cd ${STAGING_TARGET_DIR}/usr; ln -sf lib $$i; \ done ${STAGING_TARGET_DIR}/etc/ipkg.conf: ${STAGING_TARGET_DIR}/etc @@ -189,9 +193,6 @@ target/%: toolchain/%: ${STAGING_TARGET_DIR} $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -tools/%: - $(MAKE) -C tools $(patsubst tools/%,%,$@) - image: $(MAKE) -C target image @@ -236,6 +237,7 @@ root_clean: @$(TRACE) root_clean rm -rf $(TARGET_DIR) mkdir -p $(TARGET_DIR) + touch $(TARGET_DIR)/.adk # Do a per-package clean here, too. This way stale headers and # libraries from target_*/ get wiped away, which keeps @@ -264,7 +266,7 @@ cleandir: @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk @@ -272,7 +274,7 @@ cleantoolchain: @$(TRACE) cleantoolchain @rm -rf $(BUILD_DIR_PFX) $(TARGET_DIR_PFX) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) @rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) @rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk @@ -281,7 +283,7 @@ distclean: @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) @rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) @rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ .menu ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG .rebuild.* @@ -454,7 +456,7 @@ distclean: @$(MAKE) -C $(CONFIG) clean @rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(TOOLS_BUILD_DIR) + @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX) @rm -rf $(STAGING_HOST_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ .menu .rebuild.* ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG @@ -473,21 +475,21 @@ bulktoolchain: while read arch; do \ mkdir -p ${TOPDIR}/firmware; \ ( \ - echo === building $$arch $$libc toolchain-$$arch on $$(date); \ - tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##"); \ - if [ -f ${TOPDIR}/firmware/toolchain_$${arch}_$${libc}.tar.xz ];then exit;fi; \ - $(GMAKE) prereq && \ + 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) ARCH=$$tarch SYSTEM=toolchain-$$arch LIBC=$$libc defconfig; \ - $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; break;fi; \ - if [ $$arch = "armhf" ];then arch=arm; else arch=$$arch;fi; \ tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\ + if [ $$arch = "armhf" ];then arch=arm; else arch=$$arch;fi; \ if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \ - tar -cvJf ${TOPDIR}/firmware/toolchain_$${arch}_$${libc}$${abi}.tar.xz toolchain_${GNU_HOST_NAME} target_$${arch}_$${libc}$${abi}; \ + if [ -f ${TOPDIR}/firmware/toolchain_$${carch}_$${libc}$${abi}.tar.xz ];then exit;fi; \ + $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; break;fi; \ + tar -cvJf ${TOPDIR}/firmware/toolchain_$${carch}_$${libc}$${abi}.tar.xz toolchain_${GNU_HOST_NAME} target_$${carch}_$${libc}$${abi}; \ $(GMAKE) cleantoolchain; \ rm .config; \ - ) 2>&1 | tee $(TOPDIR)/firmware/toolchain_build.log; \ + ) 2>&1 | tee -a $(TOPDIR)/firmware/toolchain_build.log; \ if [ -f .exit ];then break;fi \ - done <${TOPDIR}/target/tarch.lst ;\ + done <${TOPDIR}/toolchain/$$libc/tarch.lst ;\ if [ -f .exit ];then echo "Bulk build failed!"; rm .exit; exit 1;fi \ done @@ -500,15 +502,15 @@ test-framework: for libc in $$libc;do \ ( \ mkdir -p $(TOPDIR)/firmware/; \ - for arch in arm armhf microblaze microblazeel mips mipsel mips64 mips64el ppc ppc64 sh4 sh4eb sparc sparc64 i686 x86_64;do \ - tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#i686#x86#" -e "s#sh4#sh#" -e "s#hf##"); \ + for arch in $$(grep -v m68k target/tarch.lst|xargs);do \ + tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#i686#x86#" -e "s#sh4#sh#" -e "s#hf##" -e "s#x86_64.*#x86_64#"); \ + arch=$$(echo $$arch|sed -e 's#x86$$#i686#'); \ echo === building qemu-$$arch for $$libc with $$tarch on $$(date); \ - $(GMAKE) prereq && \ $(GMAKE) ARCH=$$tarch SYSTEM=qemu-$$arch LIBC=$$libc FS=initramfsarchive COLLECTION=test defconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\ if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \ - if [ $$arch = "armhf" ];then qarch=arm; else qarch=$$arch;fi; \ + qarch=$$(echo $$arch|sed -e "s#armhf#arm#" -e 's#mips64n.*$$#mips64#' -e 's#mips64eln.*$$#mips64el#' -e "s#x86_64.*#x86_64#"); \ cp -a root_qemu_$${qarch}_$${libc}$${abi} root; \ mkdir -p $(TOPDIR)/firmware/qemu/$$arch; \ tar cJvf $(TOPDIR)/firmware/qemu/$$arch/root.tar.xz root; \ @@ -524,14 +526,13 @@ test-framework: release: for libc in uclibc glibc musl;do \ - mkdir -p $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc; \ ( \ echo === building $$libc on $$(date); \ $(GMAKE) prereq && \ $(GMAKE) ARCH=$(ARCH) SYSTEM=$(SYSTEM) LIBC=$$libc FS=archive allmodconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ rm .config; \ - ) 2>&1 | tee $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc/build.log; \ + ) 2>&1 | tee $(TOPDIR)/firmware/release-build.log; \ if [ -f .exit ];then echo "Bulk build failed!"; break;fi \ done if [ -f .exit ];then rm .exit;exit 1;fi @@ -542,14 +543,14 @@ bulk: while read arch; do \ systems=$$(./scripts/getsystems $$arch|grep -v toolchain); \ for system in $$systems;do \ - mkdir -p $(TOPDIR)/firmware/$${system}_$${arch}_$$libc; \ + mkdir -p $(TOPDIR)/firmware; \ ( \ echo === building $$arch $$system $$libc on $$(date); \ $(GMAKE) prereq && \ $(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive defconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ rm .config; \ - ) 2>&1 | tee $(TOPDIR)/firmware/$${system}_$${arch}_$$libc/build.log; \ + ) 2>&1 | tee $(TOPDIR)/firmware/bulkbuild.log; \ if [ -f .exit ]; then break;fi \ done; \ if [ -f .exit ]; then break;fi \ @@ -562,14 +563,14 @@ bulkall: while read arch; do \ systems=$$(./scripts/getsystems $$arch| grep -v toolchain); \ for system in $$systems;do \ - mkdir -p $(TOPDIR)/firmware/$${system}_$${arch}_$$libc; \ + mkdir -p $(TOPDIR)/firmware; \ ( \ echo === building $$arch $$system $$libc on $$(date); \ $(GMAKE) prereq && \ $(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive allconfig; \ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ rm .config; \ - ) 2>&1 | tee $(TOPDIR)/firmware/$${system}_$${arch}_$$libc/build.log; \ + ) 2>&1 | tee $(TOPDIR)/firmware/bulkallbuild.log; \ if [ -f .exit ]; then break;fi \ done; \ if [ -f .exit ]; then break;fi \ @@ -582,7 +583,7 @@ bulkallmod: while read arch; do \ systems=$$(./scripts/getsystems $$arch| grep -v toolchain); \ for system in $$systems;do \ - mkdir -p $(TOPDIR)/firmware/$${system}_$${arch}_$$libc; \ + mkdir -p $(TOPDIR)/firmware; \ ( \ echo === building $$arch $$system $$libc on $$(date); \ $(GMAKE) prereq && \ @@ -590,7 +591,7 @@ bulkallmod: $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then echo $$system-$$libc >.exit; exit 1;fi; \ $(GMAKE) clean; \ rm .config; \ - ) 2>&1 | tee $(TOPDIR)/firmware/$${system}_$${arch}_$$libc/build.log; \ + ) 2>&1 | tee $(TOPDIR)/firmware/bulkallmodbuild.log; \ if [ -f .exit ]; then break;fi \ done; \ if [ -f .exit ]; then break;fi \ @@ -598,45 +599,42 @@ bulkallmod: if [ -f .exit ];then echo "Bulk build failed!"; cat .exit;rm .exit; exit 1;fi \ done -$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker: $(TOPDIR)/tools/adk/pkgmaker.c $(TOPDIR)/tools/adk/sortfile.c $(TOPDIR)/tools/adk/strmap.c - @mkdir -p host_$(GNU_HOST_NAME)/usr/bin - @$(CC_FOR_BUILD) -g -o $@ tools/adk/pkgmaker.c tools/adk/sortfile.c tools/adk/strmap.c +$(TOPDIR)/adk/tools/pkgmaker: $(TOPDIR)/adk/tools/pkgmaker.c $(TOPDIR)/adk/tools/sortfile.c $(TOPDIR)/adk/tools/strmap.c + @$(CC_FOR_BUILD) -g -o $@ adk/tools/pkgmaker.c adk/tools/sortfile.c adk/tools/strmap.c -$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild: $(TOPDIR)/tools/adk/pkgrebuild.c $(TOPDIR)/tools/adk/strmap.c - @$(CC_FOR_BUILD) -g -o $@ tools/adk/pkgrebuild.c tools/adk/strmap.c +$(TOPDIR)/adk/tools/pkgrebuild: $(TOPDIR)/adk/tools/pkgrebuild.c $(TOPDIR)/adk/tools/strmap.c + @$(CC_FOR_BUILD) -g -o $@ adk/tools/pkgrebuild.c adk/tools/strmap.c -package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild +package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/pkgmaker $(TOPDIR)/adk/tools/pkgrebuild @echo "Generating menu structure ..." - @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker + @$(TOPDIR)/adk/tools/pkgmaker @:>.menu -$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker: $(TOPDIR)/tools/adk/depmaker.c - @mkdir -p host_$(GNU_HOST_NAME)/usr/bin - $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/tools/adk/depmaker.c +$(TOPDIR)/adk/tools/depmaker: $(TOPDIR)/adk/tools/depmaker.c + $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/adk/tools/depmaker.c -dep: $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker +dep: $(TOPDIR)/adk/tools/depmaker @echo "Generating dependencies ..." - @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk + @$(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk .PHONY: menu dep include $(TOPDIR)/toolchain/gcc/Makefile.inc check-dejagnu: - @-rm tests/adk.exp tests/master.exp >/dev/null 2>&1 - @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" tests/adk.exp.in > \ - tests/adk.exp.in.tmp - @sed -e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" tests/adk.exp.in.tmp > \ - tests/adk.exp - @sed -e "s#@TOPDIR@#$(TOPDIR)#" tests/master.exp.in > \ - tests/master.exp + @-rm adk/tests/adk.exp adk/tests/master.exp >/dev/null 2>&1 + @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" \ + -e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" \ + adk/tests/adk.exp.in > adk/tests/adk.exp + @sed -e "s#@TOPDIR@#$(TOPDIR)#" adk/tests/master.exp.in > \ + adk/tests/master.exp check-gcc: check-dejagnu - env DEJAGNU=$(TOPDIR)/tests/master.exp \ + env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \ $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-gcc check-g++: check-dejagnu - env DEJAGNU=$(TOPDIR)/tests/master.exp \ + env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \ $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-g++ check: check-gcc check-g++ diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk index 701f0f4a2..c8acd2ae6 100644 --- a/mk/buildhlp.mk +++ b/mk/buildhlp.mk @@ -72,16 +72,16 @@ ifeq ($(strip ${__use_generic_patch_target}),42) post-patch: ${WRKDIST}/.prepared: ${WRKDIST}/.extract_done [ ! -d ./patches/${PKG_VERSION} ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches/${PKG_VERSION} \ - '{patch-!(*.orig),*.patch}' $(MAKE_TRACE) + '{patch-!(*.orig),*.patch,*.${ARCH}}' $(MAKE_TRACE) [ ! -d ./patches ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches \ - '{patch-!(*.orig),*.patch}' $(MAKE_TRACE) + '{patch-!(*.orig),*.patch,*.${ARCH}}' $(MAKE_TRACE) [ ! -d ./src ] || (cd src; $(PREVENT_PATCH) cp -Rp . ${WRKDIST}/) \ $(MAKE_TRACE) @${MAKE} post-patch $(MAKE_TRACE) touch $@ endif -update-patches: +update-patches host-update-patches: @test ! -d ${WRKDIR}.orig || rm -rf ${WRKDIR}.orig @test ! -d ${WRKDIR}.orig ifeq ($(strip ${_IN_PACKAGE})$(strip ${_IN_CVTC}),1) @@ -115,4 +115,4 @@ endif rm -rf ${WRKDIR}.orig; \ [[ $$toedit != FAIL ]] -.PHONY: update-patches +.PHONY: update-patches host-update-patches diff --git a/mk/fetch.mk b/mk/fetch.mk index 6382571b3..ee24f0b60 100644 --- a/mk/fetch.mk +++ b/mk/fetch.mk @@ -26,7 +26,6 @@ refetch: -rm -f ${FULLDISTFILES} ${MAKE} fetch -# XXX for now _CHECKSUM_COOKIE?= ${WRKDIR}/.checksum_done checksum: ${_CHECKSUM_COOKIE} ifeq ($(strip ${NO_CHECKSUM}),) diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk index 43a622c0f..8ef4a868e 100644 --- a/mk/host-bottom.mk +++ b/mk/host-bottom.mk @@ -3,6 +3,7 @@ host-extract: ${_HOST_PATCH_COOKIE} +hostpre-configure: host-configure: ${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE} @mkdir -p ${WRKBUILD} @@ -25,6 +26,7 @@ endif ${CP} ${SCRIPT_DIR}/config.guess $$i; \ fi; \ done; + @${MAKE} hostpre-configure $(MAKE_TRACE) ifneq (${HOST_STYLE},manual) ifeq ($(strip ${HOST_STYLE}),) cd ${WRKBUILD}; rm -f config.{cache,status}; \ @@ -75,8 +77,7 @@ endif touch $@ hostpost-install: -hpkg-install: ${ALL_HOSTINST} -host-install: +host-install: ${ALL_HOSTINST} ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE} @$(CMD_TRACE) "host installing... " @mkdir -p ${HOST_WRKINST} @@ -84,13 +85,13 @@ ifneq (${HOST_STYLE},manual) ifeq ($(strip ${HOST_STYLE}),) cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ DESTDIR='${HOST_WRKINST}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) - env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE) + env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE) else cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) endif else - env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE) + env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE) endif env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE) @touch $@ diff --git a/mk/host.mk b/mk/host.mk index 5f9539aef..88f8d2e01 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -3,13 +3,14 @@ # This is where all package operation is done in ifneq (,$(findstring host,$(MAKECMDGOALS))) -WRKDIR?= ${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host +WRKDIR?= ${HOST_BUILD_DIR}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host endif HOST_CONFIGURE_ENV+= AUTOM4TE=${STAGING_HOST_DIR}/usr/bin/autom4te \ CONFIG_SHELL='$(strip ${SHELL})' \ PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \ PATH='${HOST_PATH}' \ + CC='$(strip ${CC_FOR_BUILD})' \ CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \ CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \ CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \ @@ -28,6 +29,7 @@ HOST_INSTALL_TARGET?= install HOST_MAKE_ENV+= PATH='${HOST_PATH}' \ PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \ + CC='$(strip ${CC_FOR_BUILD})' \ CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \ CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \ CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \ diff --git a/mk/image.mk b/mk/image.mk index ff95c5cb0..9f3fd5eef 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -34,6 +34,9 @@ imageprepare: image-prepare-post extra-install # if an extra directory exist in TOPDIR, copy all content over the # root directory, do the same if make extra=/dir/to/extra is used extra-install: + @-if [ -h ${TARGET_DIR}/etc/resolv.conf -a -f $(TOPDIR)/extra/etc/resolv.conf ];then \ + rm ${TARGET_DIR}/etc/resolv.conf;\ + fi @if [ -d $(TOPDIR)/extra ];then $(CP) $(TOPDIR)/extra/* ${TARGET_DIR};fi @if [ ! -z $(extra) ];then $(CP) $(extra)/* ${TARGET_DIR};fi @@ -51,22 +54,24 @@ image-prepare-post: -rm -f ${TARGET_DIR}/bin/sh ln -sf ${BINSH} ${TARGET_DIR}/bin/sh ifeq ($(ADK_LINUX_X86_64),y) +ifeq ($(ADK_TARGET_ABI_32),) # fixup lib dirs mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/lib/ ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} + -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif +endif ifeq ($(ADK_LINUX_PPC64),y) # fixup lib dirs mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/lib/ ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} + -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif @@ -76,7 +81,7 @@ ifeq ($(ADK_LINUX_SPARC64),y) rm -rf ${TARGET_DIR}/lib/ ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} + -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif @@ -86,7 +91,7 @@ ifeq ($(ADK_TARGET_ABI_N32),y) rm -rf ${TARGET_DIR}/lib/ ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} + -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif @@ -96,7 +101,7 @@ ifeq ($(ADK_TARGET_ABI_N64),y) rm -rf ${TARGET_DIR}/lib/ ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} + -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif @@ -122,7 +127,7 @@ ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGE ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-jffs2.img ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz -ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso +ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}.iso else TARGET_KERNEL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_FS}-kernel INITRAMFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS} @@ -130,34 +135,34 @@ ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-jffs2.img ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz -ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso +ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}.iso endif -${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} kernel-package +${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR}/.adk kernel-package cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \ sed "s#\(.*\)#:0:0::::::\1#" | sort | \ ${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | gzip -n9 >$@ -${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR} +${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}/.adk cd ${TARGET_DIR}; find . | grep -v ./boot/ | sed -n '/^\.\//s///p' | \ sed "s#\(.*\)#:0:0::::::\1#" | sort | \ ${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | gzip -n9 >$@ -${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR} - $(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \ +${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}/.adk + env PATH='${HOST_PATH}' $(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \ ${TARGET_DIR}/ >$@ ${FW_DIR}/${INITRAMFS}: ${STAGING_TARGET_DIR}/${INITRAMFS}_list ${LINUX_DIR}/usr/gen_init_cpio ${STAGING_TARGET_DIR}/${INITRAMFS}_list | \ ${ADK_COMPRESSION_TOOL} -c >$@ -${BUILD_DIR}/root.squashfs: ${TARGET_DIR} +${BUILD_DIR}/root.squashfs: ${TARGET_DIR}/.adk ${STAGING_HOST_DIR}/usr/bin/mksquashfs ${TARGET_DIR} \ ${BUILD_DIR}/root.squashfs -comp xz \ -nopad -noappend -root-owned $(MAKE_TRACE) ${FW_DIR}/${ROOTFSJFFS2}: ${TARGET_DIR} - ${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2 $(ADK_JFFS2_OPTS) -q -r ${TARGET_DIR} \ + ${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2 $(ADK_JFFS2_OPTS) -q -X zlib -r ${TARGET_DIR} \ --pad=$(ADK_TARGET_MTD_SIZE) -o ${FW_DIR}/${ROOTFSJFFS2} $(MAKE_TRACE) createinitramfs: ${STAGING_TARGET_DIR}/${INITRAMFS}_list @@ -231,9 +236,9 @@ ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package mkdir -p ${TARGET_DIR}/boot/syslinux cp ${STAGING_HOST_DIR}/usr/share/syslinux/{isolinux.bin,ldlinux.c32} \ ${TARGET_DIR}/boot/syslinux - echo 'DEFAULT /boot/kernel root=/dev/sr0 init=/init' > \ + 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} diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk index ffb612334..448c133c3 100644 --- a/mk/kernel-build.mk +++ b/mk/kernel-build.mk @@ -54,6 +54,7 @@ $(LINUX_BUILD_DIR)/modules: $(LINUX_DIR)/$(KERNEL_FILE) LOCALVERSION="" \ modules_install $(MAKE_TRACE) $(TRACE) target/$(ADK_TARGET_ARCH)-create-packages + @mkdir -p ${PACKAGE_DIR} ifneq ($(strip $(TARGETS)),) $(MAKE) $(TARGETS) endif diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk index 6355af1d8..7cfb5998b 100644 --- a/mk/kernel-ver.mk +++ b/mk/kernel-ver.mk @@ -1,20 +1,20 @@ ifeq ($(ADK_KERNEL_VERSION_TOOLCHAIN),y) -KERNEL_VERSION:= 3.13.6 +KERNEL_VERSION:= 3.13.7 KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 445aa27da818617409982f42902a6e41 +KERNEL_MD5SUM:= 370adced5e5c1cb1d0d621c2dae2723f endif -ifeq ($(ADK_KERNEL_VERSION_3_13_6),y) -KERNEL_VERSION:= 3.13.6 +ifeq ($(ADK_KERNEL_VERSION_3_13_7),y) +KERNEL_VERSION:= 3.13.7 KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 445aa27da818617409982f42902a6e41 +KERNEL_MD5SUM:= 370adced5e5c1cb1d0d621c2dae2723f endif -ifeq ($(ADK_KERNEL_VERSION_3_12_13),y) -KERNEL_VERSION:= 3.12.13 +ifeq ($(ADK_KERNEL_VERSION_3_12_14),y) +KERNEL_VERSION:= 3.12.14 KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 345f5883cfb906dac4aef87e303d3a2d +KERNEL_MD5SUM:= 5575e68e287605ad63d3a1444e9b701d endif ifeq ($(ADK_KERNEL_VERSION_3_11_10),y) KERNEL_VERSION:= 3.11.10 @@ -22,15 +22,15 @@ KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 KERNEL_MD5SUM:= 59f352d3f4e2cdf6755f79e09fa09176 endif -ifeq ($(ADK_KERNEL_VERSION_3_10_33),y) -KERNEL_VERSION:= 3.10.33 +ifeq ($(ADK_KERNEL_VERSION_3_10_34),y) +KERNEL_VERSION:= 3.10.34 KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 01865f9c129f3c7eee51e25b3781a364 +KERNEL_MD5SUM:= 30991b495a3d75196d5608072d2e62e6 endif -ifeq ($(ADK_KERNEL_VERSION_3_4_82),y) -KERNEL_VERSION:= 3.4.82 +ifeq ($(ADK_KERNEL_VERSION_3_4_84),y) +KERNEL_VERSION:= 3.4.84 KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 9ee57efa65417a7a9ac931122c2b7377 +KERNEL_MD5SUM:= b99f88ca356b5003ce44e952baa3e6a3 endif diff --git a/mk/package.mk b/mk/package.mk index ed94e3539..c23530e17 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -178,6 +178,9 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE} @for file in conffiles preinst postinst prerm postrm; do \ [ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \ done +ifeq ($(ADK_RUNTIME_START_$(1)),y) + $(SED) "s#NO#YES#" $$(IDIR_$(1))/CONTROL/postinst +endif ifneq ($(ADK_DEBUG),y) @echo "Package: $$(shell echo $(2) | tr '_' '-')-dbg" > $(WRKDIR)/.$(2)-dbg.control @echo "Section: debug" >> $(WRKDIR)/.$(2)-dbg.control @@ -195,10 +198,10 @@ endif $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $${_FAKE_COOKIE} ifeq ($(ADK_DEBUG),) - $${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE) + @$${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE) endif ifeq ($(ADK_DEBUG_STRIP),y) - $${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE) + @$${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE) endif ifeq (${ADK_LEAVE_ETC_ALONE}$(filter force_etc,$(7)),y) -rm -rf $${IDIR_$(1)}/etc diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 3e454ee5a..2ccc6ff1e 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -184,7 +184,7 @@ ifneq (,$(filter dev,${PKG_OPTS})) done endif @-cd ${WRKINST}; \ - if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" ];then \ + if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" -a "${PKG_NAME}" != "tzdata" ];then \ find lib \( -name lib\*.so\* -o -name lib\*.a \) \ -exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \ ' fix this!' >&2 \; -quit 2>/dev/null; fi;\ diff --git a/mk/rootfs.mk b/mk/rootfs.mk index 43cfaa821..3c434b038 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -42,18 +42,15 @@ else USB:= rootdelay=2 endif -$(eval $(call rootfs_template,genext2fs,GENEXT2FS,$(ROOTFS))) -$(eval $(call rootfs_template,cf,CF,$(ROOTFS))) -$(eval $(call rootfs_template,mmc,MMC,$(ROOTFS))) $(eval $(call rootfs_template,usb,USB,$(USB))) $(eval $(call rootfs_template,archive,ARCHIVE,$(ROOTFS))) -$(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE)) -$(eval $(call rootfs_template,initramfs,INITRAMFS)) -$(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK)) -$(eval $(call rootfs_template,squashfs,SQUASHFS,$(ROOTFS))) +$(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE,rootfstype=tmpfs)) +$(eval $(call rootfs_template,initramfs,INITRAMFS,rootfstype=tmpfs)) +$(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK,rootfstype=tmpfs)) +$(eval $(call rootfs_template,squashfs,SQUASHFS,$(MTDDEV) rootfstype=squashfs)) $(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3)) $(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2)) -$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp init=/init)) +$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp)) $(eval $(call rootfs_template,encrypted,ENCRYPTED)) $(eval $(call rootfs_template,iso,ISO)) diff --git a/mk/vars.mk b/mk/vars.mk index f22717c2e..f3911044f 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -17,10 +17,10 @@ DL_DIR?= $(BASE_DIR)/dl else DL_DIR?= $(ADK_DL_DIR) endif -TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build SCRIPT_DIR:= $(BASE_DIR)/scripts STAGING_HOST_DIR:= ${BASE_DIR}/host_${GNU_HOST_NAME} TOOLCHAIN_DIR:= ${BASE_DIR}/toolchain_${GNU_HOST_NAME} +HOST_BUILD_DIR:= ${BASE_DIR}/host_build_${GNU_HOST_NAME} # dirs for cleandir FW_DIR_PFX:= $(BASE_DIR)/firmware @@ -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),) @@ -71,7 +71,7 @@ CONFIGURE_TRIPLE:= --build=${GNU_HOST_NAME} \ --target=${GNU_TARGET_NAME} ifneq ($(strip ${ADK_USE_CCACHE}),) -TARGET_COMPILER_PREFIX=ccache ${TARGET_CROSS} +TARGET_COMPILER_PREFIX=$(STAGING_HOST_DIR)/usr/bin/ccache ${TARGET_CROSS} endif # target tools @@ -111,23 +111,38 @@ TARGET_LDFLAGS+= -Wl,--secure-plt endif endif -ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),) +ifeq ($(ADK_STATIC),y) +TARGET_CFLAGS+= -static +TARGET_CXXFLAGS+= -static +TARGET_LDFLAGS+= -static +endif + +ifneq ($(ADK_TOOLCHAIN_USE_SSP),) TARGET_CFLAGS+= -fstack-protector TARGET_CXXFLAGS+= -fstack-protector TARGET_LDFLAGS+= -fstack-protector endif -ifneq ($(ADK_TOOLCHAIN_GCC_USE_LTO),) +ifneq ($(ADK_TOOLCHAIN_USE_LTO),) TARGET_CFLAGS+= -flto 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),) -TARGET_CFLAGS+= -g3 -fno-omit-frame-pointer +ifeq ($(ADK_DEBUG_OPTS),y) +TARGET_CFLAGS+= -g3 -fno-omit-frame-pointer $(ADK_TARGET_CFLAGS_OPT) +else +TARGET_CFLAGS+= -O0 -g3 -fno-omit-frame-pointer +endif else TARGET_CPPFLAGS+= -DNDEBUG -TARGET_CFLAGS+= -fomit-frame-pointer $(TARGET_OPTIMIZATION) +TARGET_CFLAGS+= -fomit-frame-pointer $(ADK_TARGET_CFLAGS_OPT) # stop generating eh_frame stuff TARGET_CFLAGS+= -fno-unwind-tables -fno-asynchronous-unwind-tables # always add debug information @@ -178,9 +193,10 @@ TARGET_CONFIGURE_OPTS= PATH='${TARGET_PATH}' \ CROSS_COMPILE='$(TARGET_CROSS)' HOST_CONFIGURE_OPTS= CC_FOR_BUILD='${CC_FOR_BUILD}' \ - CPPFLAGS_FOR_BUILD='${CPPFLAGS_FOR_BUILD}' \ CXX_FOR_BUILD='${CXX_FOR_BUILD}' \ |