[oe-commits] Ulf Samuelsson : Build boards under the 'boards' directory

git version control git at git.openembedded.org
Thu Aug 13 08:20:07 UTC 2009


Module: openembedded.git
Branch: ulf/linux-2.6.30.2
Commit: 5b95b24f46c2af13ecb4e011e8520f9457783e8b
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5b95b24f46c2af13ecb4e011e8520f9457783e8b

Author: Ulf Samuelsson <ulf.samuelsson at atmel.com>
Date:   Thu Aug 13 10:19:47 2009 +0200

Build boards under the 'boards' directory

---

 scripts/MAKEALL            |   31 ++++++++++--------
 scripts/board_list.sh      |   11 +++++++
 scripts/environment.sh     |    2 +-
 scripts/make-local.conf.sh |   72 +++++++++++++++++++++++++-------------------
 4 files changed, 70 insertions(+), 46 deletions(-)

diff --git a/scripts/MAKEALL b/scripts/MAKEALL
index 457c45d..d76552b 100755
--- a/scripts/MAKEALL
+++ b/scripts/MAKEALL
@@ -2,48 +2,50 @@
 TOPDIR=`pwd`
 LOGFILE=build.log
 OLDLOG=old.log
-METHOD=do_rebuild
+#METHOD=do_rebuild
+METHOD=do_build
 
 
 function log_time()
 {
-	printf	"%-50s\n" $1					| tee -a ${LOGFILE}	| tee -a $2.log
+	printf	"%-50s" "$1"					| tee -a ${LOGFILE}	| tee -a $2.log
 	printf "%-10s\n" "`date +%T`"				| tee -a ${LOGFILE}	| tee -a $2.log
-	if test -e ${TOPDIR}/build-$1/FAIL ; then
-		printf "%-10s\n"  "[FAIL]"			| tee -a ${LOGFILE}	| tee -a $2.log
-	else
-		printf "%-10s\n"  "[OK]"			| tee -a ${LOGFILE}	| tee -a $2.log
-	fi
 }
 
 function log_time_sts()
 {
-	printf	"%-50s\n" $1					| tee -a ${LOGFILE}	| tee -a $2.log
+	printf	"%-50s" "$1"					| tee -a ${LOGFILE}	| tee -a $2.log
 	printf "%-10s" "`date +%T`"				| tee -a ${LOGFILE}	| tee -a $2.log
+	if test -e ${TOPDIR}/build/FAIL ; then
+		printf "%-10s\n"  "[FAIL]"			| tee -a ${LOGFILE}	| tee -a $2.log
+	else
+		printf "%-10s\n"  "[OK]"			| tee -a ${LOGFILE}	| tee -a $2.log
+	fi
 }
 
 function prepare ()
 {
 	cd ${TOPDIR}
 	rm -f build
-	ln -s build-$1 build
+	ln -s boards/build-$1 build
 	cd build
 }
 
 function action ()
 {
-	printf	"%-40s\n" "$1 running from build-$1"		| tee -a ${LOGFILE}	| tee -a $2.log
+	printf	"%-40s\n" "$1 using boards/build-$1/conf/local.conf"		| tee -a ${LOGFILE}	| tee -a $2.log
 
 #	printf	"%-50s\n" "Start building $2 at"		| tee -a ${LOGFILE}	| tee -a $2.log
 	log_time	"$1 start building $2 at"	$2
-	bitbake $2	> build.log	2>&1	|| touch FAIL
+#	bitbake $2	> build.log	2>&1	|| touch FAIL
+
+#	printf	"%-50s\n" "Stop  building $2 at"		| tee -a ${LOGFILE}	| tee -a $2.log
+	log_time	"$1 stop  building $2 at"	$2
 
 #	printf	"%-50s\n" "Start building u-boot at"		| tee -a ${LOGFILE}	| tee -a $2.log
 	log_time	"$1 start building u-boot at"	$2
-	bitbake u-boot	> u-boot.log	2>&1	|| touch FAIL
+#	bitbake u-boot	> u-boot.log	2>&1	|| touch FAIL
 
-#	printf	"%-50s\n" "Stop  building $2 at"		| tee -a ${LOGFILE}	| tee -a $2.log
-	log_time	"$1 stop  building $2 at"	$2
 }
 
 function remove_tmp ()
@@ -85,6 +87,7 @@ function do_build ()
 function build_board ()
 {
 
+	printf "******************************************************************\n"
 #	printf	"%-50s" "$1 started at"				| tee -a ${LOGFILE}	| tee -a $2.log
 	log_time 	"$1 started at"	$2
 	${METHOD} $1 $2
diff --git a/scripts/board_list.sh b/scripts/board_list.sh
new file mode 100644
index 0000000..53f43aa
--- /dev/null
+++ b/scripts/board_list.sh
@@ -0,0 +1,11 @@
+#/bin/sh
+
+# build_board	at91sam9263dfc	x11-gpe-image	# Builds OK
+build_board	at91sam9g45ek	opie-image
+#build_board	at91sam9g20dfc	console-image	# Builds OK
+#build_board	at91sam9260dfc	console-image	# Builds OK
+build_board	at91sam9261df	x11-image
+build_board	at91sam9g10df	x11-gpe-image
+#build_board	at91sam9xedfc	console-image
+
+
diff --git a/scripts/environment.sh b/scripts/environment.sh
index c30b501..74df92c 100755
--- a/scripts/environment.sh
+++ b/scripts/environment.sh
@@ -2,7 +2,7 @@
 # Example environment.sh
 
 DOWNLOAD=/usr/local/install/downloads
-MAKEJOBS=4
+MAKEJOBS=6
 THREADS=4
 KERNEL=2.6.30
 
diff --git a/scripts/make-local.conf.sh b/scripts/make-local.conf.sh
index bad5c69..50c72f1 100755
--- a/scripts/make-local.conf.sh
+++ b/scripts/make-local.conf.sh
@@ -1,45 +1,55 @@
 #!/bin/sh
-MACHINE=$1
+
 TOPDIR=`pwd`
+
+SED="sed -i"
+CONF_FILE=local.conf.sample
+OE_CONF_DIR=${TOPDIR}/openembedded/conf
+
 source	environment.sh
 
 OE_CONF_DIR=${TOPDIR}/openembedded/conf
-CONF_DIR=${TOPDIR}/build-$1/conf
+CONF_DIR=${TOPDIR}/boards/build-$1/conf
 SED="sed -i"
 CONF_FILE=local.conf.sample
 CONF_SRC=${OE_CONF_DIR}/${CONF_FILE}
 CONF_PATCH=${OE_CONF_DIR}/${CONF_FILE}.patch
 
 
-function edit ()
+function edit_conf ()
 {
-	sed -r -i -e $2 $1
+	echo MACHINE=${MACHINE}
+	${SED}	"s#MYMACHINE#${MACHINE}#g" $1.conf
+	echo KERNEL=${KERNEL}
+	${SED} 	"s#MYKERNEL#${KERNEL}#g" $1.conf
+	echo TOPDIR=${TOPDIR}
+	${SED} 	"s#MYCURDIR#${TOPDIR}#g" $1.conf
+	echo DOWNLOAD=${DOWNLOAD}
+	${SED} 	"s#MYDOWNLOAD#${DOWNLOAD}#g" $1.conf
+	echo MAKEJOBS=${MAKEJOBS}
+	${SED} 	"s#MYMAKEJOBS#${MAKEJOBS}#g" $1.conf
+	echo THREADS=${THREADS}
+	${SED} 	"s#MYTHREADS#${THREADS}#g" $1.conf
 }
 
-mkdir	-p	${CONF_DIR}
-cp		${CONF_SRC} ${CONF_DIR}
-cd		${CONF_DIR}
-cat		${CONF_PATCH}	| patch
-mv		${CONF_FILE} $1.conf
-ln	-s 	$1.conf local.conf
-
-
-echo MACHINE=${MACHINE}
-${SED}	"s#MYMACHINE#${MACHINE}#g" $1.conf
-echo KERNEL=${KERNEL}
-${SED} 	"s#MYKERNEL#${KERNEL}#g" $1.conf
-echo TOPDIR=${TOPDIR}
-${SED} 	"s#MYCURDIR#${TOPDIR}#g" $1.conf
-echo DOWNLOAD=${DOWNLOAD}
-${SED} 	"s#MYDOWNLOAD#${DOWNLOAD}#g" $1.conf
-echo MAKEJOBS=${MAKEJOBS}
-${SED} 	"s#MYMAKEJOBS#${MAKEJOBS}#g" $1.conf
-echo THREADS=${THREADS}
-${SED} 	"s#MYTHREADS#${THREADS}#g" $1.conf
-
-# Example local.conf
-
-# DOWNLOAD=/usr/local/install/downloads
-# MAKEJOBS=4
-# THREADS=4
-# KERNEL=2.6.30
+
+
+function	build_board ()
+{
+	MACHINE=$1
+	CONF_DIR=${TOPDIR}/boards/build-$1/conf
+	CONF_SRC=${OE_CONF_DIR}/${CONF_FILE}
+	CONF_PATCH=${OE_CONF_DIR}/${CONF_FILE}.patch
+	mkdir	-p	${CONF_DIR}
+
+	cp		${CONF_SRC} ${CONF_DIR}
+	cd		${CONF_DIR}
+	cat		${CONF_PATCH}	| patch
+	mv		${CONF_FILE} ${MACHINE}.conf
+	ln	-s 	$1.conf local.conf
+
+	edit_conf ${MACHINE}
+}
+
+source board_list.sh
+





More information about the Openembedded-commits mailing list