Browse Source

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

Waldemar Brodkorb 15 years ago
parent
commit
adcaca7253

+ 1 - 1
.gitignore

@@ -19,7 +19,7 @@ toolchain_build_*/
 .defconfig
 all.config
 .cfg/
-.cfg.*/
+.cfg_*/
 cross_*/
 root_*/
 bin/

+ 6 - 0
Makefile

@@ -144,6 +144,12 @@ package_index: .prereq_done
 bulk: .prereq_done
 	@${GMAKE_INV} bulk
 
+bulkall: .prereq_done
+	@${GMAKE_INV} bulkall
+
+bulkallmod: .prereq_done
+	@${GMAKE_INV} bulkallmod
+
 menu: .prereq_done
 	@${GMAKE_INV} menu
 

+ 76 - 28
mk/build.mk

@@ -55,6 +55,7 @@ noconfig_targets:=	menuconfig \
 			_config \
 			_mconfig \
 			distclean \
+			defconfig \
 			tags
 
 MAKECLEANDIR_SYMBOLS=	ADK_DEBUG
@@ -101,16 +102,13 @@ include ${TOPDIR}/mk/split-cfg.mk
 
 all: world
 
-allcopy: all
-	$(CP) $(BIN_DIR) $(TOPDIR)/bulkdir/${targetdir}/
-
 ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile)
 	mksh ${TOPDIR}/package/depmaker
 
 .NOTPARALLEL:
 .PHONY: all world clean cleantarget cleandir distclean image_clean
 
-world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG
+world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG
 	${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
 ifeq ($(ADK_NATIVE),y)
 	$(MAKE) -f mk/build.mk toolchain/kernel-headers-prepare target/config-prepare target/compile package/compile root_clean package/install package_index target/install
@@ -150,10 +148,10 @@ ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
 	echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf
 endif
 
-package/%: ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk
+package/%: ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk
 	$(MAKE) -C package $(patsubst package/%,%,$@)
 
-target/%: ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG
+target/%: ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG
 	$(MAKE) -C target $(patsubst target/%,%,$@)
 
 toolchain/%: ${STAGING_DIR}
@@ -215,8 +213,9 @@ clean:
 			rm $$f ; \
 		done \
 	done
-	rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg \
-	    ${TOPDIR}/package/pkglist.d
+	rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) \
+		${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC} \
+	    	${TOPDIR}/package/pkglist.d
 	rm -f ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk
 
 cleankernel:
@@ -237,16 +236,19 @@ cleandir:
 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 .busyboxcfg
+	rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) \
+		${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}
+	rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT)
+	rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk \
+		.busyboxcfg all.config .defconfig
 
 distclean:
 	@$(TRACE) distclean
 	@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
 	@rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
-	    ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d $(TOPDIR)/bulkdir
-	@rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR)
+	    ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
+	@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 \
 	    .busyboxcfg
@@ -303,7 +305,25 @@ endif
 			echo $$symbol >> $(TOPDIR)/.defconfig; \
 		done; \
 	fi
-ifneq (,$(filter qemu%,${TARGET}))
+	@if [ ! -z "$(FS)" ];then \
+		grep "^config" target/Config.in \
+			|grep -i "$(FS)" \
+			|sed -e "s#^config \(.*\)#\1=y#" \
+			>> $(TOPDIR)/.defconfig; \
+	fi
+	@if [ ! -z "$(PKG)" ];then \
+		grep "^config" target/Config.in \
+			|grep -i "$(PKG)" \
+			|sed -e "s#^config \(.*\)#\1=y#" \
+			>> $(TOPDIR)/.defconfig; \
+	fi
+	@if [ ! -z "$(LIBC)" ];then \
+		grep "^config" target/Config.in \
+			|grep -i "$(LIBC)" \
+			|sed -e "s#^config \(.*\)#\1=y#" \
+			>> $(TOPDIR)/.defconfig; \
+	fi
+ifneq (,$(filter %_qemu,${TARGET}))
 	@echo ADK_LINUX_QEMU=y >> $(TOPDIR)/.defconfig
 endif
 ifneq (,$(filter rescue%,${TARGET}))
@@ -311,6 +331,12 @@ ifneq (,$(filter rescue%,${TARGET}))
 endif
 ifneq (,$(filter rb%,${TARGET}))
 	@echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/.defconfig
+endif
+ifneq (,$(filter alix%,${TARGET}))
+	@echo ADK_LINUX_ALIX=y >> $(TOPDIR)/.defconfig
+endif
+ifneq (,$(filter wrap%,${TARGET}))
+	@echo ADK_LINUX_ALIX=y >> $(TOPDIR)/.defconfig
 endif
 	@if [ ! -z "$(TARGET)" ];then \
 		$(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
@@ -371,6 +397,12 @@ endif
 ifneq (,$(filter rb%,${TARGET}))
 	@echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/all.config
 endif
+ifneq (,$(filter alix%,${TARGET}))
+	@echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config
+endif
+ifneq (,$(filter wrap%,${TARGET}))
+	@echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config
+endif
 
 menuconfig: $(CONFIG)/mconf defconfig .menu
 	@if [ ! -f .config ];then \
@@ -392,7 +424,7 @@ _mconfig2: ${CONFIG}/conf modconfig .menu
 distclean:
 	@$(MAKE) -C $(CONFIG) clean
 	@rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
-	    ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d $(TOPDIR)/bulkdir
+	    ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d 
 	@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
@@ -401,23 +433,39 @@ endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
 
 # build all targets and combinations
 bulk:
-	while read target libc fs p; do \
-		mkdir -p $(TOPDIR)/bulkdir/$$target-$$libc-$$fs; \
+	while read target libc fs; do \
+		mkdir -p $(TOPDIR)/bin/$$target_$$libc; \
+	    ( \
+		echo === building $$target $$libc $$fs on $$(date); \
+		$(GMAKE) prereq && \
+			$(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs defconfig; \
+			$(GMAKE) VERBOSE=1 all; \
+		rm .config; \
+	    ) 2>&1 | tee $(TOPDIR)/bin/$$target_$$libc/$$target-$$libc-$$fs.log; \
+	done <${TOPDIR}/target/bulk.lst
+
+bulkall:
+	while read target libc fs; do \
+		mkdir -p $(TOPDIR)/bin/$$target_$$libc; \
+	    ( \
+		echo === building $$target $$libc $$fs on $$(date); \
+		$(GMAKE) prereq && \
+			$(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs allconfig; \
+			$(GMAKE) VERBOSE=1 all; \
+		rm .config; \
+	    ) 2>&1 | tee $(TOPDIR)/bin/$$target_$$libc/$$target-$$libc-$$fs.log; \
+	done <${TOPDIR}/target/bulk.lst
+
+bulkallmod:
+	while read target libc fs; do \
+		mkdir -p $(TOPDIR)/bin/$$target_$$libc; \
 	    ( \
 		echo === building $$target $$libc $$fs on $$(date); \
 		$(GMAKE) prereq && \
-		if [ "x$$p" = xy ];then \
-			$(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs \
-				allmodconfig; \
-		else \
-			$(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs \
-				defconfig; \
-		fi && \
-		$(GMAKE) VERBOSE=1 -f mk/build.mk allcopy \
-		    targetdir=$$target-$$libc-$$fs; \
-		$(GMAKE) cleantarget; \
+			$(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs allmodconfig; \
+			$(GMAKE) VERBOSE=1 all; \
 		rm .config; \
-	    ) 2>&1 | tee $(TOPDIR)/bulkdir/$$target-$$libc-$$fs/log; \
+	    ) 2>&1 | tee $(TOPDIR)/bin/$$target_$$libc/$$target-$$libc-$$fs.log; \
 	done <${TOPDIR}/target/bulk.lst
 
 menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile)

+ 4 - 3
mk/split-cfg.mk

@@ -2,6 +2,7 @@
 # material, please see the LICENCE file in the top-level directory.
 # must work with both BSD and GNU make
 
-${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG: ${TOPDIR}/.config \
-    ${TOPDIR}/mk/split-cfg.mk ${TOPDIR}/scripts/split-cfg.sh
-	mksh ${TOPDIR}/scripts/split-cfg.sh '${TOPDIR}'
+${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG: \
+	${TOPDIR}/.config ${TOPDIR}/mk/split-cfg.mk \
+	${TOPDIR}/scripts/split-cfg.sh
+	mksh ${TOPDIR}/scripts/split-cfg.sh '${TOPDIR}' '${ADK_TARGET}' '${ADK_LIBC}'

+ 6 - 4
scripts/split-cfg.sh

@@ -4,13 +4,15 @@
 # ses the slow-down.
 
 TOPDIR=$1
+TARGET=$2
+LIBC=$3
 (( x_cols = (COLUMNS > 10) ? COLUMNS - 2 : 80 ))
 typeset -L$x_cols pbar
 
 grep -v '^BUSYBOX\|^# BUSYBOX' $TOPDIR/.config > $TOPDIR/.config.split
 
-mkdir -p $TOPDIR/.cfg
-cd $TOPDIR/.cfg
+mkdir -p $TOPDIR/.cfg_${TARGET}_${LIBC}
+cd $TOPDIR/.cfg_${TARGET}_${LIBC}
 
 oldfiles=$(print -r -- *)
 newfiles=:
@@ -66,7 +68,7 @@ print -nu2 '\r'
 # and the entire Config.in will be auto-generated anyway,
 # so we're better off placing it here
 #XXX this is too slow @868 configure options
-cd $TOPDIR/.cfg
+cd $TOPDIR/.cfg_${TARGET}_${LIBC}
 rm -f $TOPDIR/package/*/info.mk
 for option in *; do
 	pbar="$option ..."
@@ -78,7 +80,7 @@ for option in *; do
 	done | while read fname; do
 		[[ $ao = *:$fname:* ]] && continue
 		ao=$ao$fname:
-		echo "\${_IPKGS_COOKIE}: \${TOPDIR}/.cfg/$option" >>$fname
+		echo "\${_IPKGS_COOKIE}: \${TOPDIR}/.cfg_${TARGET}_${LIBC}/$option" >>$fname
 	done
 done
 pbar=done

+ 3 - 2
target/Config.in

@@ -195,7 +195,6 @@ config ADK_LINUX_ALIX
 	  Support for Alix and Wrap boards.
 	  http://www.pcengines.ch
 
-
 config ADK_LINUX_CRIS_FOXBOARD
 	bool "Foxboard (ETRAX LX100)"
 	select ADK_foxboard
@@ -400,6 +399,7 @@ config ADK_LINUX_MIPS64_QEMU
 	bool "mips64 (big endian)"
 	select ADK_mips64_qemu
 	select ADK_LINUX_64
+	depends on ADK_BROKEN
 	help
 	 Qemu support for MIPS64 BE architecture.
 	 Status: development
@@ -408,6 +408,7 @@ config ADK_LINUX_MIPS64EL_QEMU
 	bool "mips64 (little endian)"
 	select ADK_mips64el_qemu
 	select ADK_LINUX_64
+	depends on ADK_BROKEN
 	help
 	 Qemu support for MIPS64 LE architecture.
 	 Status: development
@@ -608,7 +609,7 @@ depends on ! ADK_NATIVE
 config ADK_TARGET_LIB_UCLIBC
 	bool "uClibc embedded C library"
 	# broken, because of 16kB pagesize
-	depends on !ADK_LINUX_MIPS64_LEMOTE
+	#depends on !ADK_LINUX_MIPS64_LEMOTE
 	select ADK_uclibc
 	help
  	 http://uclibc.org

+ 4 - 6
target/ag241/kernel.config

@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32
-# Tue Dec 15 19:52:06 2009
+# Sun Jan 31 19:36:46 2010
 #
 CONFIG_MIPS=y
 
@@ -398,8 +398,9 @@ CONFIG_CFG80211_DEFAULT_PS_VALUE=0
 # Generic Driver Options
 #
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_DEVTMPFS is not set
-CONFIG_STANDALONE=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_SYS_HYPERVISOR is not set
@@ -434,9 +435,6 @@ CONFIG_MTD_CFI=y
 # CONFIG_MTD_JEDECPROBE is not set
 CONFIG_MTD_GEN_PROBE=y
 # CONFIG_MTD_CFI_ADV_OPTIONS is not set
-# CONFIG_MTD_CFI_NOSWAP is not set
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 CONFIG_MTD_MAP_BANK_WIDTH_1=y
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
 CONFIG_MTD_MAP_BANK_WIDTH_4=y

+ 3 - 7
target/alix1c/kernel.config

@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32
-# Tue Jan 19 19:49:54 2010
+# Mon Feb  1 19:22:02 2010
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
@@ -311,11 +311,6 @@ CONFIG_PHYSICAL_ALIGN=0x100000
 # CPU Frequency scaling
 #
 # CONFIG_CPU_FREQ is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
 # CONFIG_CPU_IDLE is not set
 
 #
@@ -430,7 +425,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # Generic Driver Options
 #
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_DEVTMPFS is not set
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set

+ 3 - 2
target/alix2d13/kernel.config

@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32
-# Fri Jan  8 11:29:58 2010
+# Mon Feb  1 19:22:34 2010
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
@@ -427,7 +427,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # Generic Driver Options
 #
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_DEVTMPFS is not set
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set

+ 27 - 2
target/bulk.lst

@@ -1,2 +1,27 @@
-ag241		uclibc		nfsroot		y
-foxboard	uclibc		nfsroot		y
+ag241		uclibc		nfsroot
+foxboard	uclibc		nfsroot
+rb532		uclibc		nfsroot
+rb532		eglibc		nfsroot
+alix1c		uclibc		nfsroot
+alix1c		eglibc		nfsroot
+alix1c		glibc		nfsroot
+alix2d		uclibc		nfsroot
+alix2d		eglibc		nfsroot
+alix2d		glibc		nfsroot
+alix2d13	uclibc		nfsroot
+alix2d13	eglibc		nfsroot
+alix2d13	glibc		nfsroot
+wrap		uclibc		nfsroot
+wrap		eglibc		nfsroot
+wrap		glibc		nfsroot
+arm_qemu	uclibc		archive
+arm_qemu	eglibc		archive
+mips_qemu	uclibc		archive
+mips_qemu	eglibc		archive
+mipsel_qemu	uclibc		archive
+mipsel_qemu	eglibc		archive
+x86_qemu	uclibc		archive
+x86_qemu	eglibc		archive
+x86_qemu	glibc		archive
+x86_64_qemu	uclibc		archive
+x86_64_qemu	eglibc		archive

+ 3 - 2
target/foxboard/kernel.config

@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32
-# Tue Jan 19 21:38:01 2010
+# Mon Feb  1 19:21:16 2010
 #
 CONFIG_MMU=y
 CONFIG_ZONE_DMA=y
@@ -325,7 +325,8 @@ CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_IN=y
 # Generic Driver Options
 #
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_DEVTMPFS is not set
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set

+ 1 - 1
target/lemote/Makefile

@@ -28,7 +28,7 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 	@echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
 	@echo 'Boot your lemote and type following commands in PMON:'
 	@echo 'PMON> ifaddr rtl0 <ip-address-client>'
-	@echo 'PMON> load tftp://<ip-address-server>/lemote-mips-kernel'
+	@echo 'PMON> load tftp://<ip-address-server>/${ADK_TARGET}-${FS}-kernel'
 	@echo 'PMON> g no_auto_cmd root=/dev/nfs ip=dhcp init=/init'
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif

+ 22 - 0
toolchain/uClibc/patches/mips64.patch

@@ -0,0 +1,22 @@
+diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/getdents.c uClibc-0.9.30.2/libc/sysdeps/linux/common/getdents.c
+--- uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/getdents.c	2010-01-13 22:22:31.000000000 +0100
++++ uClibc-0.9.30.2/libc/sysdeps/linux/common/getdents.c	2010-02-03 20:21:34.000000000 +0100
+@@ -136,9 +136,6 @@
+     return (char *) dp - buf;
+ }
+ 
+-#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
+-attribute_hidden strong_alias(__getdents,__getdents64)
+-#endif
+ 
+ #elif __WORDSIZE == 32
+ 
+@@ -171,4 +168,8 @@
+ }
+ #endif
+ 
++#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
++attribute_hidden strong_alias(__getdents,__getdents64)
++#endif
++
+ #endif