From 76eb481bf48dceae202d928d9a9d1b7c7bbcda79 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Wed, 13 Aug 2014 17:36:02 -0500 Subject: gpl-source-mybooklive-010406-update.zip --- build.sh | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index f4fd4da618d..a277eb23411 100755 --- a/build.sh +++ b/build.sh @@ -5,6 +5,11 @@ # 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 # +if [ "${1}" = "--copyroot" ]; then + shift + ROOTFS_PATH=${1} + shift +fi _CROSS_COMPILE=${1:-ppc_4xxFP-} _ARCH=${2:-powerpc} OUTLOC=${3:-_BuildOutput} @@ -23,11 +28,26 @@ echo =========== Building device tree =========== make O=${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 apollo3g.dtb echo -echo "=========== Copying images to directory $(pwd) ===============" +echo =========== Building modules =========== +make O=${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 modules +make INSTALL_MOD_PATH=$(pwd)/modules O=${OUTLOC} CROSS_COMPILE=${_CROSS_COMPILE} ARCH=${_ARCH} -j 5 modules_install + +echo +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 +if [ ! -z "${ROOTFS_PATH}" ]; then +echo +echo "=========== Copying images and modules to rootfs directory at ${ROOTFS_PATH} ============" + cp -v -r --remove-destination ${OUTLOC}/arch/powerpc/boot/uImage ${ROOTFS_PATH}/boot + cp -v -r --remove-destination ${OUTLOC}/arch/powerpc/boot/apollo3g.dtb ${ROOTFS_PATH}/boot + cp -v -p -r --remove-destination $(pwd)/modules/lib/modules/* ${ROOTFS_PATH}/lib/modules/ # */ +fi + +echo "=========== Done ============" + # We don't use the combined image #echo #echo =========== Combining images =============== @@ -35,20 +55,3 @@ ls -ll *.dtb uImage #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 - -# -# original beech script... -# -#echo =========== Building Linux =============== -#make distclean -#make 44x/beech_nas_optimized_defconfig -#make uImage -# -#echo =========== Building device tree =========== -#make beech.dtb -# -#echo =========== Combining images =============== -#dd if=/dev/zero of=beech_boot.img bs=1 count=5M -#dd if=arch/powerpc/boot/uImage of=beech_boot.img conv=notrunc bs=1 -#dd if=arch/powerpc/boot/beech.dtb of=beech_boot.img conv=notrunc bs=1 seek=4M - -- cgit v1.2.3-18-g5258