Permalink
Browse files

scripts: if uImage/zImage isnt built exit

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
1 parent bbabb1f commit 473f4b5df64318da2ff918d34fe917ed70a14e13 @RobertCNelson committed Mar 19, 2012
Showing with 38 additions and 18 deletions.
  1. +19 −9 build_kernel.sh
  2. +19 −9 tools/rebuild.sh
View
@@ -168,17 +168,27 @@ function make_zImage_modules {
echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" ${CONFIG_DEBUG_SECTION} zImage modules"
time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" ${CONFIG_DEBUG_SECTION} zImage modules
KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
- cp arch/arm/boot/zImage ${DIR}/deploy/${KERNEL_UTS}.zImage
+ if [ -f ./arch/arm/boot/zImage ] ; then
+ cp arch/arm/boot/zImage ${DIR}/deploy/${KERNEL_UTS}.zImage
+ else
+ echo "Error: make zImage modules failed"
+ exit
+ fi
cd ${DIR}/
}
function make_uImage {
- cd ${DIR}/KERNEL/
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" ${CONFIG_DEBUG_SECTION} uImage"
- time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" ${CONFIG_DEBUG_SECTION} uImage
- KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
- cp arch/arm/boot/uImage ${DIR}/deploy/${KERNEL_UTS}.uImage
- cd ${DIR}/
+ cd ${DIR}/KERNEL/
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" ${CONFIG_DEBUG_SECTION} uImage"
+ time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" ${CONFIG_DEBUG_SECTION} uImage
+ KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
+ if [ -f ./arch/arm/boot/uImage ] ; then
+ cp arch/arm/boot/uImage ${DIR}/deploy/${KERNEL_UTS}.uImage
+ else
+ echo "Error: make zImage modules failed"
+ exit
+ fi
+ cd ${DIR}/
}
function make_modules_pkg {
@@ -228,7 +238,7 @@ if [ "${LATEST_GIT}" ] ; then
echo ""
fi
- unset CONFIG_DEBUG_SECTION
+unset CONFIG_DEBUG_SECTION
if [ "${DEBUG_SECTION}" ] ; then
CONFIG_DEBUG_SECTION="CONFIG_DEBUG_SECTION_MISMATCH=y"
fi
@@ -240,7 +250,7 @@ fi
make_menuconfig
make_zImage_modules
if [ "${BUILD_UIMAGE}" ] ; then
- make_uImage
+ make_uImage
else
echo ""
echo "NOTE: If you'd like to build a uImage, make sure to enable BUILD_UIMAGE variables in system.sh"
View
@@ -158,17 +158,27 @@ function make_zImage_modules {
echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" ${CONFIG_DEBUG_SECTION} zImage modules"
time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" ${CONFIG_DEBUG_SECTION} zImage modules
KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
- cp arch/arm/boot/zImage ${DIR}/deploy/${KERNEL_UTS}.zImage
+ if [ -f ./arch/arm/boot/zImage ] ; then
+ cp arch/arm/boot/zImage ${DIR}/deploy/${KERNEL_UTS}.zImage
+ else
+ echo "Error: make zImage modules failed"
+ exit
+ fi
cd ${DIR}/
}
function make_uImage {
- cd ${DIR}/KERNEL/
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" ${CONFIG_DEBUG_SECTION} uImage"
- time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" ${CONFIG_DEBUG_SECTION} uImage
- KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
- cp arch/arm/boot/uImage ${DIR}/deploy/${KERNEL_UTS}.uImage
- cd ${DIR}/
+ cd ${DIR}/KERNEL/
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" ${CONFIG_DEBUG_SECTION} uImage"
+ time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" ${CONFIG_DEBUG_SECTION} uImage
+ KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
+ if [ -f ./arch/arm/boot/uImage ] ; then
+ cp arch/arm/boot/uImage ${DIR}/deploy/${KERNEL_UTS}.uImage
+ else
+ echo "Error: make zImage modules failed"
+ exit
+ fi
+ cd ${DIR}/
}
function make_modules_pkg {
@@ -218,7 +228,7 @@ if [ "${LATEST_GIT}" ] ; then
echo ""
fi
- unset CONFIG_DEBUG_SECTION
+unset CONFIG_DEBUG_SECTION
if [ "${DEBUG_SECTION}" ] ; then
CONFIG_DEBUG_SECTION="CONFIG_DEBUG_SECTION_MISMATCH=y"
fi
@@ -229,7 +239,7 @@ fi
make_menuconfig
make_zImage_modules
if [ "${BUILD_UIMAGE}" ] ; then
- make_uImage
+ make_uImage
else
echo ""
echo "NOTE: If you'd like to build a uImage, make sure to enable BUILD_UIMAGE variables in system.sh"

0 comments on commit 473f4b5

Please sign in to comment.