Permalink
Browse files

scripts: sync with master

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
RobertCNelson committed Aug 1, 2013
1 parent f052c0d commit 19b8dab4c655a7402c35d291e599f605add3ec11
View
20 LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2009-2013 Robert Nelson <robertcnelson@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -35,14 +35,6 @@ patch_kernel () {
git commit --allow-empty -a -m "${KERNEL_TAG}-${BUILD} patchset"
fi
-#Test Patches:
-#exit
-
- if [ "${LOCAL_PATCH_DIR}" ] ; then
- for i in ${LOCAL_PATCH_DIR}/*.patch ; do patch -s -p1 < $i ; done
- BUILD="${BUILD}+"
- fi
-
cd ${DIR}/
}
@@ -65,16 +57,16 @@ 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} ${CONFIG_DEBUG_SECTION} 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} ${CONFIG_DEBUG_SECTION} 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 "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" ${CONFIG_DEBUG_SECTION} dtbs"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" ${CONFIG_DEBUG_SECTION} 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
@@ -83,14 +75,14 @@ make_deb () {
cd ${DIR}/
}
-make_firmware_pkg () {
+make_pkg () {
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "Building Firmware Archive"
+ echo "Building ${pkg} Archive"
echo "-----------------------------"
- deployfile="-firmware.tar.gz"
+ deployfile="-${pkg}.tar.gz"
if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
fi
@@ -100,7 +92,17 @@ make_firmware_pkg () {
fi
mkdir -p ${DIR}/deploy/tmp
- make ARCH=arm CROSS_COMPILE=${CC} firmware_install INSTALL_FW_PATH=${DIR}/deploy/tmp
+ case "${pkg}" in
+ modules)
+ make ARCH=arm CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH=${DIR}/deploy/tmp
+ ;;
+ firmware)
+ make ARCH=arm CROSS_COMPILE=${CC} firmware_install INSTALL_FW_PATH=${DIR}/deploy/tmp
+ ;;
+ dtbs)
+ find ./arch/arm/boot/ -iname "*.dtb" -exec cp -v '{}' ${DIR}/deploy/tmp/ \;
+ ;;
+ esac
cd ${DIR}/deploy/tmp
echo "-----------------------------"
@@ -119,40 +121,14 @@ make_firmware_pkg () {
fi
}
-make_dtbs_pkg () {
- cd ${DIR}/KERNEL/
-
- echo "-----------------------------"
- echo "Building DTBS Archive"
- echo "-----------------------------"
-
- deployfile="-dtbs.tar.gz"
- if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
- fi
-
- if [ -d ${DIR}/deploy/tmp ] ; then
- rm -rf ${DIR}/deploy/tmp || true
- fi
- mkdir -p ${DIR}/deploy/tmp
-
- find ./arch/arm/boot/ -iname "*.dtb" -exec cp -v '{}' ${DIR}/deploy/tmp/ \;
-
- cd ${DIR}/deploy/tmp
- echo "-----------------------------"
- echo "Building ${KERNEL_UTS}${deployfile}"
- tar czf ../${KERNEL_UTS}${deployfile} *
- echo "-----------------------------"
-
- cd ${DIR}/
- rm -rf ${DIR}/deploy/tmp || true
+make_firmware_pkg () {
+ pkg="firmware"
+ make_pkg
+}
- if [ ! -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}${deployfile}]"
- /bin/sh -e "${DIR}/scripts/error.sh" && { exit 1 ; }
- else
- ls -lh "${DIR}/deploy/${KERNEL_UTS}${deployfile}"
- fi
+make_dtbs_pkg () {
+ pkg="dtbs"
+ make_pkg
}
/bin/sh -e ${DIR}/tools/host_det.sh || { exit 1 ; }
@@ -187,9 +163,7 @@ if [ -f "${DIR}/branch.expired" ] ; then
fi
unset CC
-unset DEBUG_SECTION
unset LINUX_GIT
-unset LOCAL_PATCH_DIR
. ${DIR}/system.sh
/bin/sh -e "${DIR}/scripts/gcc.sh" || { exit 1 ; }
. ${DIR}/.CC
@@ -198,11 +172,6 @@ echo "debug: CC=${CC}"
. ${DIR}/version.sh
export LINUX_GIT
-unset CONFIG_DEBUG_SECTION
-if [ "${DEBUG_SECTION}" ] ; then
- CONFIG_DEBUG_SECTION="CONFIG_DEBUG_SECTION_MISMATCH=y"
-fi
-
#unset FULL_REBUILD
FULL_REBUILD=1
if [ "${FULL_REBUILD}" ] ; then
View
@@ -35,14 +35,6 @@ patch_kernel () {
git commit --allow-empty -a -m "${KERNEL_TAG}-${BUILD} patchset"
fi
-#Test Patches:
-#exit
-
- if [ "${LOCAL_PATCH_DIR}" ] ; then
- for i in ${LOCAL_PATCH_DIR}/*.patch ; do patch -s -p1 < $i ; done
- BUILD="${BUILD}+"
- fi
-
cd ${DIR}/
}
@@ -65,15 +57,15 @@ make_menuconfig () {
make_kernel () {
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" ${CONFIG_DEBUG_SECTION} zImage modules"
+ echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" zImage modules"
echo "-----------------------------"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" ${CONFIG_DEBUG_SECTION} zImage modules
+ make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" zImage modules
unset DTBS
cat ${DIR}/KERNEL/arch/arm/Makefile | grep "dtbs:" >/dev/null 2>&1 && DTBS=1
if [ "x${DTBS}" != "x" ] ; then
- echo "make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE=\"${CC}\" ${CONFIG_DEBUG_SECTION} dtbs"
- make -j${CORES} ARCH=arm LOCALVERSION=-${BUILD} CROSS_COMPILE="${CC}" ${CONFIG_DEBUG_SECTION} 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
@@ -101,14 +93,14 @@ make_kernel () {
fi
}
-make_modules_pkg () {
+make_pkg () {
cd ${DIR}/KERNEL/
echo "-----------------------------"
- echo "Building Module Archive"
+ echo "Building ${pkg} Archive"
echo "-----------------------------"
- deployfile="-modules.tar.gz"
+ deployfile="-${pkg}.tar.gz"
if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
fi
@@ -118,7 +110,17 @@ make_modules_pkg () {
fi
mkdir -p ${DIR}/deploy/tmp
- make ARCH=arm CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH=${DIR}/deploy/tmp
+ case "${pkg}" in
+ modules)
+ make ARCH=arm CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH=${DIR}/deploy/tmp
+ ;;
+ firmware)
+ make ARCH=arm CROSS_COMPILE=${CC} firmware_install INSTALL_FW_PATH=${DIR}/deploy/tmp
+ ;;
+ dtbs)
+ find ./arch/arm/boot/ -iname "*.dtb" -exec cp -v '{}' ${DIR}/deploy/tmp/ \;
+ ;;
+ esac
cd ${DIR}/deploy/tmp
echo "-----------------------------"
@@ -137,76 +139,19 @@ make_modules_pkg () {
fi
}
-make_firmware_pkg () {
- cd ${DIR}/KERNEL/
-
- echo "-----------------------------"
- echo "Building Firmware Archive"
- echo "-----------------------------"
-
- deployfile="-firmware.tar.gz"
- if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
- fi
-
- if [ -d ${DIR}/deploy/tmp ] ; then
- rm -rf ${DIR}/deploy/tmp || true
- fi
- mkdir -p ${DIR}/deploy/tmp
-
- make ARCH=arm CROSS_COMPILE=${CC} firmware_install INSTALL_FW_PATH=${DIR}/deploy/tmp
-
- cd ${DIR}/deploy/tmp
- echo "-----------------------------"
- echo "Building ${KERNEL_UTS}${deployfile}"
- tar czf ../${KERNEL_UTS}${deployfile} *
- echo "-----------------------------"
-
- cd ${DIR}/
- rm -rf ${DIR}/deploy/tmp || true
+make_modules_pkg () {
+ pkg="modules"
+ make_pkg
+}
- if [ ! -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}${deployfile}]"
- /bin/sh -e "${DIR}/scripts/error.sh" && { exit 1 ; }
- else
- ls -lh "${DIR}/deploy/${KERNEL_UTS}${deployfile}"
- fi
+make_firmware_pkg () {
+ pkg="firmware"
+ make_pkg
}
make_dtbs_pkg () {
- cd ${DIR}/KERNEL/
-
- echo "-----------------------------"
- echo "Building DTBS Archive"
- echo "-----------------------------"
-
- deployfile="-dtbs.tar.gz"
- if [ -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- rm -rf "${DIR}/deploy/${KERNEL_UTS}${deployfile}" || true
- fi
-
- if [ -d ${DIR}/deploy/tmp ] ; then
- rm -rf ${DIR}/deploy/tmp || true
- fi
- mkdir -p ${DIR}/deploy/tmp
-
- find ./arch/arm/boot/ -iname "*.dtb" -exec cp -v '{}' ${DIR}/deploy/tmp/ \;
-
- cd ${DIR}/deploy/tmp
- echo "-----------------------------"
- echo "Building ${KERNEL_UTS}${deployfile}"
- tar czf ../${KERNEL_UTS}${deployfile} *
- echo "-----------------------------"
-
- cd ${DIR}/
- rm -rf ${DIR}/deploy/tmp || true
-
- if [ ! -f "${DIR}/deploy/${KERNEL_UTS}${deployfile}" ] ; then
- export ERROR_MSG="File Generation Failure: [${KERNEL_UTS}${deployfile}]"
- /bin/sh -e "${DIR}/scripts/error.sh" && { exit 1 ; }
- else
- ls -lh "${DIR}/deploy/${KERNEL_UTS}${deployfile}"
- fi
+ pkg="dtbs"
+ make_pkg
}
/bin/sh -e ${DIR}/tools/host_det.sh || { exit 1 ; }
@@ -241,9 +186,7 @@ if [ -f "${DIR}/branch.expired" ] ; then
fi
unset CC
-unset DEBUG_SECTION
unset LINUX_GIT
-unset LOCAL_PATCH_DIR
. ${DIR}/system.sh
/bin/sh -e "${DIR}/scripts/gcc.sh" || { exit 1 ; }
. ${DIR}/.CC
@@ -252,11 +195,6 @@ echo "debug: CC=${CC}"
. ${DIR}/version.sh
export LINUX_GIT
-unset CONFIG_DEBUG_SECTION
-if [ "${DEBUG_SECTION}" ] ; then
- CONFIG_DEBUG_SECTION="CONFIG_DEBUG_SECTION_MISMATCH=y"
-fi
-
#unset FULL_REBUILD
FULL_REBUILD=1
if [ "${FULL_REBUILD}" ] ; then
View
@@ -44,7 +44,9 @@ start_cleanup () {
}
cleanup () {
- git format-patch -${number} -o ${DIR}/patches/
+ if [ "${number}" ] ; then
+ git format-patch -${number} -o ${DIR}/patches/
+ fi
exit
}
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+DIR=$PWD
+
+if [ -e ${DIR}/version.sh ]; then
+ unset BRANCH
+ unset KERNEL_TAG
+ . ${DIR}/version.sh
+
+ if [ ! "${BRANCH}" ] ; then
+ BRANCH="master"
+ fi
+
+ if [ ! "${KERNEL_TAG}" ] ; then
+ echo 'KERNEL_TAG undefined'
+ exit
+ fi
+
+ git commit -a -m "kernel bump: v${KERNEL_TAG}" -s
+ git push origin ${BRANCH}
+fi
+
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+DIR=$PWD
+repo="https://github.com/RobertCNelson/linux/commit"
+
+if [ -e ${DIR}/version.sh ]; then
+ unset BRANCH
+ unset KERNEL_SHA
+ . ${DIR}/version.sh
+
+ if [ ! "${BRANCH}" ] ; then
+ BRANCH="master"
+ fi
+
+ git commit -a -m "merge to: ${repo}/${KERNEL_SHA}" -s
+ git push origin ${BRANCH}
+fi
+
File renamed without changes.
Oops, something went wrong.

0 comments on commit 19b8dab

Please sign in to comment.