aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2014-08-13 16:29:15 -0500
committerDavid Barksdale <amatus@amatus.name>2014-08-13 16:29:15 -0500
commit205ac4d83fc388c1e2d0bb590a2a36e9a4c2fd78 (patch)
tree1dbd529848c396058dfc9c8a4f402dcbe3546317 /build.sh
parentace6c6d243016e272050787c14e27a83ecd94a25 (diff)
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh48
1 files changed, 24 insertions, 24 deletions
diff --git a/build.sh b/build.sh
index 6497ca2b509..f4fd4da618d 100755
--- a/build.sh
+++ b/build.sh
@@ -1,44 +1,44 @@
#!/bin/sh
-
#
-# build support for apollo3g
+# kernel build script for apollo3g
#
-local _CROSS_COMPILE=${1:-"ppc_4xxFP-"}
-local _ARCH=${2:-"powerpc"}
-
-if [ ! -z ${3} ]; then
- if [ ! -d ${3} ]; then
- mkdir -p "${3}"
- fi
- OUTPREFIX="${3}/"
- OUTLOC="O=${3}"
+# Usage: 'sh build.sh' to just use defaults (need to have the ELDK installed)
+# 'sh build.sh CROSS_COMPILE ARCH OUTLOC' to specifiy all parameters
+#
+_CROSS_COMPILE=${1:-ppc_4xxFP-}
+_ARCH=${2:-powerpc}
+OUTLOC=${3:-_BuildOutput}
+if [ ! -d ${OUTLOC} ]; then
+ mkdir -p "${OUTLOC}"
fi
-#echo "CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} OUTLOC=${OUTLOC}"
-
echo =========== Building Linux ===============
make distclean
make mrproper
-make ${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} 44x/apollo_3G_nas_defconfig
-make ${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 uImage
+make O=${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} 44x/apollo_3G_nas_defconfig
+make O=${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 uImage
echo
echo =========== Building device tree ===========
-make ${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 apollo3g.dtb
+make O=${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 apollo3g.dtb
echo
-echo =========== Combining images ===============
-dd if=/dev/zero of=apollo3g_boot.img bs=1 count=5M
-dd if=${OUTPREFIX}arch/powerpc/boot/uImage of=apollo3g_boot.img conv=notrunc bs=1
-dd if=${OUTPREFIX}arch/powerpc/boot/apollo3g.dtb of=apollo3g_boot.img conv=notrunc bs=1 seek=4M
+echo "=========== Copying images to directory $(pwd) ==============="
+cp -v ${OUTLOC}/arch/powerpc/boot/uImage .
+cp -v ${OUTLOC}/arch/powerpc/boot/apollo3g.dtb .
+ls -ll *.dtb uImage
+
+# We don't use the combined image
+#echo
+#echo =========== Combining images ===============
+#dd if=/dev/zero of=apollo3g_boot.img bs=1 count=5M
+#dd if=${OUTLOC}/arch/powerpc/boot/uImage of=apollo3g_boot.img conv=notrunc bs=1
+#dd if=${OUTLOC}/arch/powerpc/boot/apollo3g.dtb of=apollo3g_boot.img conv=notrunc bs=1 seek=4M
-echo
-ls -ll apollo3g_boot.img
#
-# beech ?
+# original beech script...
#
-
#echo =========== Building Linux ===============
#make distclean
#make 44x/beech_nas_optimized_defconfig