diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | mk/build.mk | 19 | ||||
-rw-r--r-- | mk/vars.mk | 12 | ||||
-rw-r--r-- | package/Makefile | 6 | ||||
-rw-r--r-- | package/busybox/Makefile | 25 | ||||
-rwxr-xr-x | scripts/cpio | 5 |
7 files changed, 38 insertions, 33 deletions
diff --git a/.gitignore b/.gitignore index aec87fdd9..7e27e221d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,13 +15,14 @@ toolchain_build_*/ .tmpconfig.h .prereq_done .config* +.busyboxcfg .defconfig all.config .cfg/ .cfg.*/ cross_*/ root_*/ -bin_*/ +bin/ build_*/ config/*.o config/lxdialog/*.o @@ -12,7 +12,6 @@ - use LZMA kernels for MIPS targets - package drbd - new packages for openais and pacemaker -- realize parallel build for target-libc combinations - continuos build via hudson or sth. like that - implement rpm package backend - implement dpkg package backend diff --git a/mk/build.mk b/mk/build.mk index e7d1f0ae0..5c26ea4c9 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -57,10 +57,7 @@ noconfig_targets:= menuconfig \ distclean \ tags -MAKECLEANDIR_SYMBOLS= ADK_TARGET_LIB_UCLIBC \ - ADK_TARGET_LIB_GLIBC \ - ADK_TARGET_LIB_ECLIBC \ - ADK_DEBUG +MAKECLEANDIR_SYMBOLS= ADK_DEBUG MAKECLEAN_SYMBOLS= ADK_TARGET_PACKAGE_IPKG \ ADK_TARGET_PACKAGE_RPM \ @@ -89,11 +86,7 @@ POSTCONFIG= -@ \ "$$what' might be required!"; \ break; \ done; \ - fi; \ - if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \ - if [ -f build_*/w-busybox*/busybox*/.configure_done ];then \ - rm build_*/w-busybox*/busybox*/.configure_done; \ - fi; \ + if [ -f .busyboxcfg ];then rm .busyboxcfg;fi; \ fi; \ fi @@ -238,14 +231,15 @@ cleandir: rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) \ $(TOOLS_BUILD_DIR) rm -f .menu .tmpconfig.h ${TOPDIR}/package/*/info.mk \ - ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk + ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk \ + .busyboxcfg cleantarget: @$(TRACE) cleantarget @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT) all.config .defconfig - rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk + rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk .busyboxcfg distclean: @$(TRACE) distclean @@ -254,7 +248,8 @@ distclean: ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d $(TOPDIR)/bulkdir @rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR) @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ - .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk + .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk \ + .busyboxcfg else # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) diff --git a/mk/vars.mk b/mk/vars.mk index cba312e2d..53755266e 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -18,20 +18,20 @@ TARGET_CFLAGS:= $(TARGET_OPTIMIZATION) $(TARGET_CFLAGS_ARCH) $(TARGET_DEBUGGING BASE_DIR:= $(TOPDIR) DISTDIR?= ${BASE_DIR}/dl -BUILD_DIR:= ${BASE_DIR}/build_${CPU_ARCH} +BUILD_DIR:= ${BASE_DIR}/build_${ADK_TARGET}_${ADK_LIBC} BUILD_DIR_PFX:= $(BASE_DIR)/build_* -STAGING_PARENT:= ${BASE_DIR}/cross_${CPU_ARCH} +STAGING_PARENT:= ${BASE_DIR}/cross_${ADK_TARGET}_${ADK_LIBC} STAGING_PARENT_PFX:= ${BASE_DIR}/cross_* STAGING_TOOLS:= ${STAGING_PARENT}/host STAGING_DIR:= ${STAGING_PARENT}/target -TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH} +TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${ADK_TARGET}_${ADK_LIBC} TOOLCHAIN_BUILD_DIR_PFX=$(BASE_DIR)/toolchain_build_* TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build SCRIPT_DIR:= $(BASE_DIR)/scripts -BIN_DIR:= $(BASE_DIR)/bin_${ADK_TARGET} -BIN_DIR_PFX:= $(BASE_DIR)/bin_* +BIN_DIR:= $(BASE_DIR)/bin/${ADK_TARGET}_${ADK_LIBC} +BIN_DIR_PFX:= $(BASE_DIR)/bin PACKAGE_DIR:= $(BIN_DIR)/packages -TARGET_DIR:= $(BASE_DIR)/root_${ADK_TARGET} +TARGET_DIR:= $(BASE_DIR)/root_${ADK_TARGET}_${ADK_LIBC} TARGET_DIR_PFX:= $(BASE_DIR)/root_* TARGET_PATH= ${SCRIPT_DIR}:${STAGING_TOOLS}/bin:${STAGING_DIR}/scripts:${_PATH} REAL_GNU_TARGET_NAME= $(CPU_ARCH)-linux-$(ADK_TARGET_SUFFIX) diff --git a/package/Makefile b/package/Makefile index 2e83a0799..0f8c43a92 100644 --- a/package/Makefile +++ b/package/Makefile @@ -41,9 +41,6 @@ compile: base-files-compile $(COMPILE_PACKAGES) install: base-files-install $(INSTALL_PACKAGES) endif -#$(COMPILE_PACKAGES): base-files-compile -#$(INSTALL_PACKAGES): base-files-install - $(TARGET_DIR): mkdir -p $(TARGET_DIR) @@ -59,7 +56,8 @@ $(TARGET_DIR): $(CMD_TRACE) " done" $(END_TRACE) -%-install: %-compile +#%-install: %-compile +%-install: @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: " @$(MAKE) -C $(patsubst %-install,%,$@) install @$(CMD_TRACE) " done" diff --git a/package/busybox/Makefile b/package/busybox/Makefile index b2509c937..7779226a7 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -18,23 +18,28 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,BUSYBOX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -do-configure: +${TOPDIR}/.busyboxcfg: ${TOPDIR}/.config grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \ - ${WRKBUILD}/.config - $(SED) 's@IDIR@${WRKINST}' ${WRKBUILD}/.config + ${TOPDIR}/.busyboxcfg + +${WRKBUILD}/.config: ${TOPDIR}/.busyboxcfg + cp $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config + $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config + +do-configure: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config ifeq ($(ADK_NATIVE),y) yes '' | \ $(MAKE) V=1 \ IPKG_ARCH="$(ARCH)" \ - ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig + ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE) else yes '' | \ $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \ - ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig + ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE) endif -do-build: +do-build: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config ifeq ($(ADK_NATIVE),y) $(MAKE) V=1 \ IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox @@ -43,13 +48,13 @@ else IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox endif -do-install: ${TOPDIR}/.config +do-install: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config ifeq ($(ADK_NATIVE),y) $(MAKE) V=1 \ - IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE) else $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ - IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE) endif ifeq ($(ADK_DEBUG),y) ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \ @@ -57,4 +62,6 @@ ifeq ($(ADK_DEBUG),y) endif $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/ +fake: $(TOPDIR)/.busyboxcfg do-configure do-install + include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/scripts/cpio b/scripts/cpio new file mode 100755 index 000000000..2a12d4ffe --- /dev/null +++ b/scripts/cpio @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +/bin/cpio --quiet "$@" |