Commit 1450aad7 authored by Alessandro Rubini's avatar Alessandro Rubini

build: updated at91boot compilation

parent 24266635
......@@ -6,8 +6,13 @@
# if the upstream is not valid any more, the script will get it from
# http://sources.buildroot.net/
# FIXME: barebox, at91boot and kernel are missing
# IPL
at91bootstrap-3-3.0.tar.gz 059a3e99cd93727c642ab7843c714887 \
http://repository.timesys.com/buildsources/a/at91bootstrap-3/at91bootstrap-3-3.0/at91bootstrap-3-3.0.tar.gz
# FIXME: barebox and kernel are missing
# buildroot core and packages
buildroot-2011.11.tar.bz2 7b852f4ef17c63857ca7b9388b782070 \
http://www.buildroot.org/downloads/buildroot-2011.11.tar.bz2
......
......@@ -11,28 +11,34 @@ fi
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR CROSS_COMPILE
wrs_echo "--- AT91Boot"
zipname="AT91Bootstrap1.11.zip"
wrs_download $zipname
dirname="at91bootstrap-3-3.0"
tarname="$dirname.tar.gz"
wrs_download $tarname
mkdir -p $WRS_OUTPUT_DIR/build || wrs_die "mkdir build"
mkdir -p $WRS_OUTPUT_DIR/images || wrs_die "mkdir images"
# go to the build dir and compile it
cd $WRS_OUTPUT_DIR/build
dirname="Bootstrap-v1.11"; #stupid zip: content doesn't match the container
rm -rf $dirname
unzip -q ${WRS_DOWNLOAD_DIR}/$zipname || wrs_die "unzip $zipname"
tar xzf $WRS_DOWNLOAD_DIR/$tarname || wrs_die "untar $tarname"
wrs_echo "Patching AT91Boot"
patch -t -p2 -d $dirname < \
"$WRS_BASE_DIR/../patches/at91boot/AT91Bootstrap1.11-patch-wr" \
|| wrs_die "patching at91boot"
wrs_echo "Building AT91Boot"; # stupid makefiles, I must force CROSS_COMPILE
make -C $dirname/board/whiterabbit-mch/dataflash CROSS_COMPILE=$CROSS_COMPILE \
|| wrs_die "compiling at91boot"
cp $dirname/board/whiterabbit-mch/dataflash/dataflash_whiterabbit-mch.bin \
$WRS_OUTPUT_DIR/images \
cd $dirname
for n in $WRS_BASE_DIR/../patches/at91boot/*patch; do
# the shell passes the "*" over if no matches are there, so check
if test -f "$n"; then
patch -p1 < $n || wrs_die "Apply $n"
fi
done
wrs_echo "Building AT91Boot"
yes "" | make at91sam9g45ek_defconfig > /dev/null
# the above command fails miserably for memory corruption...
test -f .config || wrs_die "configuring at91boot"
make || wrs_die "building at91boot"
cp ./binaries/at91sam9g45ek-dataflashcardboot-3.0.bin \
$WRS_OUTPUT_DIR/images/at91bootstrap.bin \
|| wrs_die "copying at91boot image"
exit 0
\ No newline at end of file
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment