Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

scripts: sync with master of: git://github.com/RobertCNelson/stable-k…

…ernel.git

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
commit 22fc98584a1b6e4acd3eb1f322c7ff2f361f994a 1 parent 03acbe8
@RobertCNelson authored
View
8 README
@@ -13,15 +13,15 @@ http://www.angstrom-distribution.org/simplified-development-setup
Dependencies: Linux Kernel Source
This git repo contains just scripts/patches to build a specific kernel for these
-ARM devices. It doesn't any of the mainline kernel source, so it must clone a
-local tree for use.
+ARM devices. The kernel source will be downloaded when you run any of the build
+scripts.
-By default this script will clone the linux-stable tree, to ${HOME}/linux-src:
+By default this script will clone the linux-stable tree, to ${DIR}/ignore/linux-src:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
If you've already cloned torvalds tree and would like to save some hard drive
space, just modify the LINUX_GIT variable in system.sh to point to your current
-git clone.
+git clone directory.
Build Kernel Image:
View
10 build_deb.sh
@@ -31,7 +31,7 @@ patch_kernel () {
/bin/sh -e ${DIR}/patch.sh || { git add . ; exit 1 ; }
if [ ! "${RUN_BISECT}" ] ; then
- git add .
+ git add --all
git commit --allow-empty -a -m "${KERNEL_TAG}-${BUILD} patchset"
fi
@@ -57,18 +57,18 @@ make_menuconfig () {
make_deb () {
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg"
+ echo "make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg"
echo "-----------------------------"
- fakeroot make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg
+ fakeroot make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg
mv ${DIR}/*.deb ${DIR}/deploy/
unset DTBS
cat ${DIR}/KERNEL/arch/arm/Makefile | grep "dtbs:" >/dev/null 2>&1 && DTBS=1
if [ "x${DTBS}" != "x" ] ; then
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" dtbs"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" dtbs
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs
ls arch/arm/boot/* | grep dtb >/dev/null 2>&1 || unset DTBS
fi
View
32 build_kernel.sh
@@ -31,7 +31,7 @@ patch_kernel () {
/bin/sh -e ${DIR}/patch.sh || { git add . ; exit 1 ; }
if [ ! "${RUN_BISECT}" ] ; then
- git add .
+ git add --all
git commit --allow-empty -a -m "${KERNEL_TAG}-${BUILD} patchset"
fi
@@ -55,42 +55,48 @@ make_menuconfig () {
}
make_kernel () {
+ image="zImage"
+ unset address
+
+ #uImage, if you really really want a uImage, zreladdr needs to be defined on the build line going forward...
+ #image="uImage"
+ #address="LOADADDR=${ZRELADDR}"
+
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" zImage modules"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} ${address} ${image} modules"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" zImage modules
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} ${address} ${image} modules
unset DTBS
cat ${DIR}/KERNEL/arch/arm/Makefile | grep "dtbs:" >/dev/null 2>&1 && DTBS=1
if [ "x${DTBS}" != "x" ] ; then
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" dtbs"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" dtbs
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs
ls arch/arm/boot/* | grep dtb >/dev/null 2>&1 || unset DTBS
fi
KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
- deployfile=".zImage"
- if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
+ if [ -f "${DIR}/deploy/${KERNEL_UTS}.${image}" ] ; then
+ rm -rf "${DIR}/deploy/${KERNEL_UTS}.${image}" || true
rm -rf "${DIR}/deploy/${KERNEL_UTS}.config" || true
fi
- if [ -f ./arch/arm/boot/zImage ] ; then
- cp -v arch/arm/boot/zImage "${DIR}/deploy/${KERNEL_UTS}.zImage"
+ if [ -f ./arch/arm/boot/${image} ] ; then
+ cp -v arch/arm/boot/${image} "${DIR}/deploy/${KERNEL_UTS}.${image}"
cp -v .config "${DIR}/deploy/${KERNEL_UTS}.config"
fi
cd ${DIR}/
- if [ ! -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}${deployfile}]"
+ if [ ! -f "${DIR}/deploy/${KERNEL_UTS}.${image}" ] ; then
+ export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}.${image}]"
/bin/sh -e "${DIR}/scripts/error.sh" && { exit 1 ; }
else
- ls -lh "${DIR}/deploy/${KERNEL_UTS}${deployfile}"
+ ls -lh "${DIR}/deploy/${KERNEL_UTS}.${image}"
fi
}
View
2  system.sh.sample
@@ -12,7 +12,7 @@ fi
###REQUIRED:
#ARM GCC CROSS Compiler:
-#if CC is not set, a known working linaro compiler (ubuntu, or the one you installed via apt-get) will be used.
+#if CC is not set, a known working linaro based gcc compiler will be downloaded and utilized.
#CC=<enter full path>/bin/arm-none-eabi-
#CC=<enter full path>/bin/arm-linux-gnueabi-
#CC=<enter full path>/bin/arm-linux-gnueabihf-
View
32 tools/rebuild.sh
@@ -31,7 +31,7 @@ patch_kernel () {
/bin/sh -e ${DIR}/patch.sh || { git add . ; exit 1 ; }
if [ ! "${RUN_BISECT}" ] ; then
- git add .
+ git add --all
git commit --allow-empty -a -m "${KERNEL_TAG}-${BUILD} patchset"
fi
@@ -55,42 +55,48 @@ make_menuconfig () {
}
make_kernel () {
+ image="zImage"
+ unset address
+
+ #uImage, if you really really want a uImage, zreladdr needs to be defined on the build line going forward...
+ #image="uImage"
+ #address="LOADADDR=${ZRELADDR}"
+
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" zImage modules"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} ${address} ${image} modules"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" zImage modules
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} ${address} ${image} modules
unset DTBS
cat ${DIR}/KERNEL/arch/arm/Makefile | grep "dtbs:" >/dev/null 2>&1 && DTBS=1
if [ "x${DTBS}" != "x" ] ; then
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" dtbs"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" dtbs
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs
ls arch/arm/boot/* | grep dtb >/dev/null 2>&1 || unset DTBS
fi
KERNEL_UTS=$(cat ${DIR}/KERNEL/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
- deployfile=".zImage"
- if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
+ if [ -f "${DIR}/deploy/${KERNEL_UTS}.${image}" ] ; then
+ rm -rf "${DIR}/deploy/${KERNEL_UTS}.${image}" || true
rm -rf "${DIR}/deploy/${KERNEL_UTS}.config" || true
fi
- if [ -f ./arch/arm/boot/zImage ] ; then
- cp -v arch/arm/boot/zImage "${DIR}/deploy/${KERNEL_UTS}.zImage"
+ if [ -f ./arch/arm/boot/${image} ] ; then
+ cp -v arch/arm/boot/${image} "${DIR}/deploy/${KERNEL_UTS}.${image}"
cp -v .config "${DIR}/deploy/${KERNEL_UTS}.config"
fi
cd ${DIR}/
- if [ ! -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}${deployfile}]"
+ if [ ! -f "${DIR}/deploy/${KERNEL_UTS}.${image}" ] ; then
+ export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}.${image}]"
/bin/sh -e "${DIR}/scripts/error.sh" && { exit 1 ; }
else
- ls -lh "${DIR}/deploy/${KERNEL_UTS}${deployfile}"
+ ls -lh "${DIR}/deploy/${KERNEL_UTS}.${image}"
fi
}
View
10 tools/rebuild_deb.sh
@@ -31,7 +31,7 @@ patch_kernel () {
/bin/sh -e ${DIR}/patch.sh || { git add . ; exit 1 ; }
if [ ! "${RUN_BISECT}" ] ; then
- git add .
+ git add --all
git commit --allow-empty -a -m "${KERNEL_TAG}-${BUILD} patchset"
fi
@@ -57,18 +57,18 @@ make_menuconfig () {
make_deb () {
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg"
+ echo "make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg"
echo "-----------------------------"
- fakeroot make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg
+ fakeroot make -j${CORES} ARCH=arm KBUILD_DEBARCH=${DEBARCH} LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} KDEB_PKGVERSION=${BUILDREV}${DISTRO} deb-pkg
mv ${DIR}/*.deb ${DIR}/deploy/
unset DTBS
cat ${DIR}/KERNEL/arch/arm/Makefile | grep "dtbs:" >/dev/null 2>&1 && DTBS=1
if [ "x${DTBS}" != "x" ] ; then
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" dtbs"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" dtbs
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=${CC} dtbs
ls arch/arm/boot/* | grep dtb >/dev/null 2>&1 || unset DTBS
fi
Please sign in to comment.
Something went wrong with that request. Please try again.