Difference between revisions of "User:Collinjc"

From eLinux.org
Jump to: navigation, search
(Created page with 'I am majoring in computer engineering and pursuing a certificate in optical communications. I am currently enrolled in ECE597, h…')
 
Line 1: Line 1:
 
I am majoring in computer engineering and pursuing a certificate in optical communications. I am currently enrolled in [[ECE597 - 32-bit Embedded Linux, Rose-Hulman | ECE597]], hoping to explore the applications of Linux in an embedded environment as well as the necessary considerations that must be made in developing for such an environment. I have a keen interest and a great deal of experience with Linux and am a member of the [http://lug.rose-hulman.edu/wiki/Main_Page Rose-Hulman Linux Users' Group].
 
I am majoring in computer engineering and pursuing a certificate in optical communications. I am currently enrolled in [[ECE597 - 32-bit Embedded Linux, Rose-Hulman | ECE597]], hoping to explore the applications of Linux in an embedded environment as well as the necessary considerations that must be made in developing for such an environment. I have a keen interest and a great deal of experience with Linux and am a member of the [http://lug.rose-hulman.edu/wiki/Main_Page Rose-Hulman Linux Users' Group].
 +
 +
I am currently working on a script to automate the bitbake process with multiple cores. This is a copy of the script in its current form. Please note that it is a work in progress.
 +
<pre>
 +
#!/bin/sh
 +
# bitbake automation
 +
# J. Cody Collins
 +
 +
START=$(date +%s)
 +
 +
MAXTRIES=15
 +
COUNT=1
 +
 +
export OETREE="${HOME}/oe"
 +
 +
echo "set environment variables"
 +
cd ${OETREE}
 +
. ${OETREE}/sourceme.txt
 +
 +
echo "Go to the OE tree"
 +
cd ${OETREE}/openembedded
 +
 +
echo "Make sure it's up to date"
 +
git pull --rebase
 +
 +
echo "Start building"
 +
bitbake $1
 +
 +
while [ $? -ne 0 ]; do
 +
if [ $COUNT -lt $MAXTRIES ]; then
 +
((COUNT++))
 +
echo "re-running bitbake -- trial $COUNT"
 +
# Give the user a chance to kill the task
 +
sleep 5
 +
bitbake $1
 +
else
 +
echo "Maximum tries exceeded. Exiting..."
 +
break
 +
fi
 +
done
 +
 +
END=$(date +%s)
 +
DIFF=$(( $END - $START ))
 +
echo "Build took $DIFF seconds."
 +
echo "Completed after $COUNT attempts."
 +
</pre>
  
 
[[Category:ECE597]]
 
[[Category:ECE597]]

Revision as of 06:51, 11 March 2010

I am majoring in computer engineering and pursuing a certificate in optical communications. I am currently enrolled in ECE597, hoping to explore the applications of Linux in an embedded environment as well as the necessary considerations that must be made in developing for such an environment. I have a keen interest and a great deal of experience with Linux and am a member of the Rose-Hulman Linux Users' Group.

I am currently working on a script to automate the bitbake process with multiple cores. This is a copy of the script in its current form. Please note that it is a work in progress.

#!/bin/sh
# bitbake automation
# J. Cody Collins

START=$(date +%s)

MAXTRIES=15
COUNT=1

export OETREE="${HOME}/oe"

echo "set environment variables"
cd ${OETREE}
. ${OETREE}/sourceme.txt 

echo "Go to the OE tree"
cd ${OETREE}/openembedded 

echo "Make sure it's up to date"
git pull --rebase

echo "Start building"
bitbake $1

while [ $? -ne 0 ]; do
	if [ $COUNT -lt $MAXTRIES ]; then
		((COUNT++))
		echo "re-running bitbake -- trial $COUNT"
		# Give the user a chance to kill the task
		sleep 5
		bitbake $1
	else
		echo "Maximum tries exceeded. Exiting..."
		break
	fi
done

END=$(date +%s)
DIFF=$(( $END - $START ))
echo "Build took $DIFF seconds."
echo "Completed after $COUNT attempts."