summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk18
-rw-r--r--mk/image.mk9
-rw-r--r--mk/vars.mk5
3 files changed, 24 insertions, 8 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 3108ec064..3bf9fb139 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 \
diff --git a/mk/image.mk b/mk/image.mk
index 571752eaf..3f199c9cc 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -51,6 +51,7 @@ image-prepare-post:
-rm -f ${TARGET_DIR}/bin/sh
ln -sf ${BINSH} ${TARGET_DIR}/bin/sh
ifeq ($(ADK_LINUX_X86_64),y)
+ifneq ($(ADK_TARGET_ABI_X32),y)
# fixup lib dirs
mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/lib/
@@ -60,6 +61,7 @@ ifeq ($(ADK_LINUX_X86_64),y)
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}
@@ -175,10 +177,11 @@ createinitramfs: ${FW_DIR}/${INITRAMFS}_list
${LINUX_DIR}/.config
( \
echo "CONFIG_BLK_DEV_INITRD=y"; \
+ echo "CONFIG_ACPI_INITRD_TABLE_OVERRIDE=n"; \
echo 'CONFIG_INITRAMFS_SOURCE="${FW_DIR}/${INITRAMFS}_list"'; \
- echo '# CONFIG_INITRAMFS_COMPRESSION_NONE is not set' >> ${LINUX_DIR}/.config; \
- echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> ${LINUX_DIR}/.config; \
- echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> ${LINUX_DIR}/.config; \
+ echo '# CONFIG_INITRAMFS_COMPRESSION_NONE is not set'; \
+ echo 'CONFIG_INITRAMFS_ROOT_UID=0'; \
+ echo 'CONFIG_INITRAMFS_ROOT_GID=0'; \
) >> ${LINUX_DIR}/.config
ifeq ($(ADK_KERNEL_COMP_XZ),y)
echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
diff --git a/mk/vars.mk b/mk/vars.mk
index a0898ae2d..ef50e59d8 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -48,8 +48,13 @@ TARGET_DIR_PFX:= $(BASE_DIR)/root_*
TARGET_PATH= ${SCRIPT_DIR}:${STAGING_TARGET_DIR}/scripts:${STAGING_HOST_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
HOST_PATH= ${SCRIPT_DIR}:${STAGING_HOST_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
AUTOTOOL_PATH= ${STAGING_HOST_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${STAGING_TARGET_DIR}/scripts:${_PATH}
+ifeq ($(ADK_TARGET_ABI_X32),y)
+REAL_GNU_TARGET_NAME= $(CPU_ARCH)-x32-linux-$(ADK_TARGET_SUFFIX)
+GNU_TARGET_NAME= $(CPU_ARCH)-x32-linux
+else
REAL_GNU_TARGET_NAME= $(CPU_ARCH)-$(ADK_VENDOR)-linux-$(ADK_TARGET_SUFFIX)
GNU_TARGET_NAME= $(CPU_ARCH)-$(ADK_VENDOR)-linux
+endif
ifeq ($(ADK_DISABLE_HONOUR_CFLAGS),)
GCC_CHECK:= GCC_HONOUR_COPTS=2