소스 검색

add support for bulk builds with different endianess

Waldemar Brodkorb 10 년 전
부모
커밋
e23746e37f
2개의 변경된 파일30개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 0
      mk/build.mk
  2. 24 3
      scripts/bulk-qemu.sh

+ 6 - 0
mk/build.mk

@@ -358,6 +358,12 @@ endif
 			|sed -e "s#^config \(.*\)#\1=y#" \
 			>> $(ADK_TOPDIR)/.defconfig; \
 	fi
+	if [ ! -z "$(ADK_TARGET_ENDIAN)" ];then \
+		grep "^config" target/config/Config.in.endian.choice \
+			|grep -i "$(ADK_TARGET_ENDIAN)" \
+			|sed -e "s#^config \(.*\)#\1=y#" \
+			>> $(ADK_TOPDIR)/.defconfig; \
+	fi
 	@if [ ! -z "$(ADK_TARGET_COLLECTION)" ];then \
 		grep -h "^config" target/collections/* \
 			|grep -i "$(ADK_TARGET_COLLECTION)" \

+ 24 - 3
scripts/bulk-qemu.sh

@@ -1,12 +1,33 @@
 #!/bin/sh
 
-for libc in glibc musl uclibc; do
+if [ ! -z $1 ];then
+	c=$1
+else
+	c="glibc musl uclibc"
+fi
+
+for libc in $c; do
 	for arch in $(cat toolchain/$libc/arch.lst);do
-		make VERBOSE=1 ADK_TARGET_ARCH=$arch ADK_TARGET_SYSTEM=qemu-$arch ADK_TARGET_LIBC=$libc ADK_TARGET_FS=initramfspiggyback defconfig all
+		echo "Cleaning old stuff"
+		make cleandir
+		echo "Building $libc for $arch"
+		DEFAULT="VERBOSE=1 ADK_TARGET_ARCH=$arch ADK_TARGET_SYSTEM=qemu-$arch ADK_TARGET_LIBC=$libc ADK_TARGET_FS=initramfspiggyback"
+		case $arch in
+		mips|microblaze)
+			for endian in little big;do
+				make $DEFAULT ADK_TARGET_ENDIAN=$endian defconfig all
+				cp -a firmware firmware.$arch.$endian
+			done
+			;;
+		*)
+			make $DEFAULT defconfig all
+			cp -a firmware firmware.$arch
+			;;
+		esac
 		if [ $? -ne 0 ];then
 			echo "build failed"
 			exit 1
 		fi
+		make cleandir
 	done
 done
-