Permalink
Browse files

scripts: make CONFIG_DEBUG_SECTION_MISMATCH=y a system.sh option

Ubuntu 11.10: with gcc-4.6-arm-linux-gnueabi needs this disabled, with 2.6.35

Reported-by: Mike Thompson <mpthompson@gmail.com>
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
1 parent 3cc2269 commit 0687fc2e681b3a960c62e996f2bd9d42aa8ce640 @RobertCNelson committed Mar 12, 2012
Showing with 26 additions and 9 deletions.
  1. +10 −4 build_kernel.sh
  2. +5 −0 system.sh.sample
  3. +11 −5 tools/rebuild.sh
View
@@ -28,6 +28,7 @@ unset BUILD
unset CC
unset LINUX_GIT
unset LATEST_GIT
+unset DEBUG_SECTION
unset LOCAL_PATCH_DIR
@@ -164,17 +165,17 @@ function make_menuconfig {
function make_zImage_modules {
cd ${DIR}/KERNEL/
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" CONFIG_DEBUG_SECTION_MISMATCH=y zImage modules"
- time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" CONFIG_DEBUG_SECTION_MISMATCH=y 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
cd ${DIR}/
}
function make_uImage {
cd ${DIR}/KERNEL/
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" CONFIG_DEBUG_SECTION_MISMATCH=y uImage"
- time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" CONFIG_DEBUG_SECTION_MISMATCH=y uImage
+ 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}/
@@ -227,6 +228,11 @@ if [ "${LATEST_GIT}" ] ; then
echo ""
fi
+ unset CONFIG_DEBUG_SECTION
+if [ "${DEBUG_SECTION}" ] ; then
+ CONFIG_DEBUG_SECTION="CONFIG_DEBUG_SECTION_MISMATCH=y"
+fi
+
git_kernel
patch_kernel
# bisect_kernel
View
@@ -92,3 +92,8 @@ LINUX_GIT=~/linux-stable/
#This is very useful during an intial 'rc0' merge.
#It is never supported... Enable at your own risk
#LATEST_GIT=1
+
+###ADVANCED: enable DEBUG_SECTION_MISMATCH
+#http://cateee.net/lkddb/web-lkddb/DEBUG_SECTION_MISMATCH.html
+#DEBUG_SECTION=1
+
View
@@ -28,10 +28,11 @@ unset BUILD
unset CC
unset LINUX_GIT
unset LATEST_GIT
+unset DEBUG_SECTION
unset LOCAL_PATCH_DIR
-config="omap2plus_defconfig"
+config="mx5_defconfig"
ARCH=$(uname -m)
CCACHE=ccache
@@ -154,17 +155,17 @@ function make_menuconfig {
function make_zImage_modules {
cd ${DIR}/KERNEL/
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" CONFIG_DEBUG_SECTION_MISMATCH=y zImage modules"
- time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" CONFIG_DEBUG_SECTION_MISMATCH=y 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
cd ${DIR}/
}
function make_uImage {
cd ${DIR}/KERNEL/
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CCACHE} ${CC}\" CONFIG_DEBUG_SECTION_MISMATCH=y uImage"
- time make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CCACHE} ${CC}" CONFIG_DEBUG_SECTION_MISMATCH=y uImage
+ 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}/
@@ -217,6 +218,11 @@ if [ "${LATEST_GIT}" ] ; then
echo ""
fi
+ unset CONFIG_DEBUG_SECTION
+if [ "${DEBUG_SECTION}" ] ; then
+ CONFIG_DEBUG_SECTION="CONFIG_DEBUG_SECTION_MISMATCH=y"
+fi
+
# git_kernel
# patch_kernel
# copy_defconfig

0 comments on commit 0687fc2

Please sign in to comment.