Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

scripts: sync with master

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
commit 19b8dab4c655a7402c35d291e599f605add3ec11 1 parent f052c0d
@RobertCNelson authored
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
81 build_deb.sh
@@ -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
116 build_kernel.sh
@@ -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
4 patch.sh
@@ -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
}
View
22 repo_maintenance/push-kernel-bump.sh
@@ -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
+
View
18 repo_maintenance/push-merge-to-sha.sh
@@ -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
+
View
0  tools/push-n-tag-release.sh → repo_maintenance/push-n-tag-release.sh 100644 → 100755
File renamed without changes
View
13 repo_maintenance/push-sync-with-master.sh
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+DIR=$PWD
+
+if [ -e ${DIR}/version.sh ]; then
+ unset BRANCH
+ . ${DIR}/version.sh
+
+ git commit -a -m "scripts: sync with master" -s
+
+ git push origin ${BRANCH}
+fi
+
View
18 scripts/gcc.sh
@@ -53,17 +53,16 @@ dl_gcc_generic () {
}
gcc_linaro_toolchain () {
- #https://launchpad.net/gcc-arm-embedded/+download
- #https://launchpad.net/linaro-toolchain-binaries/+download
case "${linaro_toolchain}" in
arm9_gcc_4_7)
- #https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q1-update/+download/gcc-arm-none-eabi-4_7-2013q1-20130313-linux.tar.bz2
+ #https://launchpad.net/gcc-arm-embedded/+download
+ #https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
toolchain_name="gcc-arm-none-eabi"
site="https://launchpad.net/gcc-arm-embedded"
- version="4.7/4.7-2013-q1-update"
- version_date="20130313"
- directory="${toolchain_name}-4_7-2013q1"
+ version="4.7/4.7-2013-q2-update"
+ version_date="20130614"
+ directory="${toolchain_name}-4_7-2013q2"
filename="${directory}-${version_date}-linux.tar.bz2"
datestamp="${version_date}-${toolchain_name}"
untar="tar -xjf"
@@ -71,6 +70,7 @@ gcc_linaro_toolchain () {
binary="bin/arm-none-eabi-"
;;
cortex_gcc_4_6)
+ #https://launchpad.net/linaro-toolchain-binaries/+download
#https://launchpad.net/linaro-toolchain-binaries/trunk/2012.03/+download/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux.tar.bz2
release="2012.03"
@@ -86,6 +86,7 @@ gcc_linaro_toolchain () {
binary="bin/arm-linux-gnueabi-"
;;
cortex_gcc_4_7)
+ #https://launchpad.net/linaro-toolchain-binaries/+download
#https://launchpad.net/linaro-toolchain-binaries/trunk/2013.04/+download/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz
gcc_version="4.7"
@@ -102,10 +103,11 @@ gcc_linaro_toolchain () {
binary="bin/arm-linux-gnueabihf-"
;;
cortex_gcc_4_8)
- #https://launchpad.net/linaro-toolchain-binaries/trunk/2013.05/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.05_linux.tar.xz
+ #https://launchpad.net/linaro-toolchain-binaries/+download
+ #https://launchpad.net/linaro-toolchain-binaries/trunk/2013.06/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.06_linux.tar.xz
gcc_version="4.8"
- release="2013.05"
+ release="2013.06"
toolchain_name="gcc-linaro-arm-linux-gnueabihf"
site="https://launchpad.net/linaro-toolchain-binaries"
version="trunk/${release}"
View
10 scripts/git.sh
@@ -114,16 +114,12 @@ git_kernel () {
git bisect reset || true
fi
- #So we are now going to assume the worst, and create a new master branch
git am --abort || echo "git tree is clean..."
- git add .
+ git add --all
git commit --allow-empty -a -m 'empty cleanup commit'
- git checkout origin/master -b tmp-master
- git branch -D master >/dev/null 2>&1 || true
-
- git checkout origin/master -b master
- git branch -D tmp-master >/dev/null 2>&1 || true
+ git reset --hard HEAD
+ git checkout master -f
git pull ${GIT_OPTS} || true
View
18 system.sh.sample
@@ -39,8 +39,11 @@ fi
##For Freescale: i.mx53:
#ZRELADDR=0x70008000
#
-##For Freescale: i.mx6:
+##For Freescale: i.mx6q/dl/solo:
#ZRELADDR=0x10008000
+#
+##For Freescale: i.mx6sl:
+#ZRELADDR=0x80008000
###OPTIONAL: MMC: (REQUIRED FOR RUNNING: tools/install_kernel.sh)
#Note: This operates on raw disks, NOT PARTITIONS..
@@ -55,23 +58,10 @@ fi
###ADVANCED:
-###ADVANCED: DEBUG_SECTION: enable DEBUG_SECTION_MISMATCH
-#http://cateee.net/lkddb/web-lkddb/DEBUG_SECTION_MISMATCH.html
-#
-#DEBUG_SECTION=1
-
###ADVANCED: RUN_BISECT: used with ./scripts/bisect.sh
#
#RUN_BISECT=1
-###ADVANCED: LOCAL_PATCH_DIR: Secret Sauce Patches:
-#Have some secret sauce, you dont want to share with the community??
-#
-#It'll look specifically for *.patch files... Doesn't care about order/etc..
-#And I don't care about enhancing it.. ;)
-#
-#LOCAL_PATCH_DIR=/full/path/to/dir/
-
###ADVANCED: AUTO_BUILD: Easier integration with Jenkins/Buildbot/etc..
#
#AUTO_BUILD=1
View
105 tools/host_det.sh
@@ -84,17 +84,33 @@ Missing mkimage command.
}
+check_dpkg () {
+ LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}" >/dev/null || deb_pkgs="${deb_pkgs}${pkg} "
+}
+
debian_regs () {
unset deb_pkgs
- dpkg -l | grep bc >/dev/null || deb_pkgs"${deb_pkgs}bc "
- dpkg -l | grep build-essential >/dev/null || deb_pkgs="${deb_pkgs}build-essential "
- dpkg -l | grep device-tree-compiler >/dev/null || deb_pkgs="${deb_pkgs}device-tree-compiler "
- dpkg -l | grep lsb-release >/dev/null || deb_pkgs="${deb_pkgs}lsb-release "
- dpkg -l | grep lzma >/dev/null || deb_pkgs="${deb_pkgs}lzma "
- dpkg -l | grep lzop >/dev/null || deb_pkgs="${deb_pkgs}lzop "
- dpkg -l | grep fakeroot >/dev/null || deb_pkgs="${deb_pkgs}fakeroot "
+ pkg="bc"
+ check_dpkg
+ pkg="build-essential"
+ check_dpkg
+ pkg="device-tree-compiler"
+ check_dpkg
+ pkg="fakeroot"
+ check_dpkg
+ pkg="man-db"
+ check_dpkg
+ pkg="libncurses5-dev"
+ check_dpkg
+ pkg="lsb-release"
+ check_dpkg
+ pkg="lzma"
+ check_dpkg
+ pkg="lzop"
+ check_dpkg
unset warn_dpkg_ia32
+ unset stop_pkg_search
#lsb_release might not be installed...
if [ $(which lsb_release) ] ; then
deb_distro=$(lsb_release -cs)
@@ -105,6 +121,18 @@ debian_regs () {
debian)
deb_distro="jessie"
;;
+ isadora)
+ deb_distro="lucid"
+ ;;
+ julia)
+ deb_distro="maverick"
+ ;;
+ katya)
+ deb_distro="natty"
+ ;;
+ lisa)
+ deb_distro="oneiric"
+ ;;
maya)
deb_distro="precise"
;;
@@ -125,59 +153,67 @@ debian_regs () {
unset error_unknown_deb_distro
unset warn_eol_distro
;;
- natty|oneiric)
+ maverick|natty|oneiric)
+ #lucid -> precise
+ #http://us.archive.ubuntu.com/ubuntu/dists/
+ #list: dists between LTS's...
+ unset error_unknown_deb_distro
+ warn_eol_distro=1
+ stop_pkg_search=1
+ ;;
+ hardy)
+ #Just old, but still on:
#http://us.archive.ubuntu.com/ubuntu/dists/
- #Still list the "prior" one as some people dont upgrade very fast...
unset error_unknown_deb_distro
warn_eol_distro=1
+ stop_pkg_search=1
;;
*)
error_unknown_deb_distro=1
unset warn_eol_distro
+ stop_pkg_search=1
;;
esac
+ fi
+
+ if [ $(which lsb_release) ] && [ ! "${stop_pkg_search}" ] ; then
+ deb_distro=$(lsb_release -cs)
#pkg: mkimage
case "${deb_distro}" in
squeeze|lucid)
- dpkg -l | grep uboot-mkimage >/dev/null || deb_pkgs="${deb_pkgs}uboot-mkimage"
- ;;
- wheezy|jessie|sid|precise|quantal|raring|saucy)
- dpkg -l | grep u-boot-tools >/dev/null || deb_pkgs="${deb_pkgs}u-boot-tools"
- ;;
- esac
-
- #pkg: libncurses5-dev
- case "${deb_distro}" in
- precise)
- #ii libncurses5-dev 5.9-4 developer's libraries for ncurses
- dpkg -l | grep libncurses5-dev >/dev/null || deb_pkgs="${deb_pkgs}libncurses5-dev "
+ pkg="uboot-mkimage"
+ check_dpkg
;;
*)
- #ii libncurses5-dev:amd64 5.9+20130504-1 amd64 developer's libraries for ncurses
- deb_arch=$(dpkg --print-architecture)
- dpkg -l | grep libncurses5-dev | grep ${deb_arch} >/dev/null || deb_pkgs="${deb_pkgs}libncurses5-dev "
+ pkg="u-boot-tools"
+ check_dpkg
;;
esac
#pkg: ia32-libs
- cpu_arch=$(uname -m)
- if [ "x${cpu_arch}" = "xx86_64" ] ; then
+ deb_arch=$(LC_ALL=C dpkg --print-architecture)
+ if [ "x${deb_arch}" = "xamd64" ] ; then
unset dpkg_multiarch
case "${deb_distro}" in
- squeeze|lucid|natty|oneiric|precise)
- dpkg -l | grep ia32-libs >/dev/null || deb_pkgs="${deb_pkgs}ia32-libs "
+ squeeze|lucid|precise)
+ pkg="ia32-libs"
+ check_dpkg
+ ;;
+ wheezy|jessie|sid|quantal|raring)
+ pkg="ia32-libs"
+ check_dpkg
+ LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}" >/dev/null || dpkg_multiarch=1
;;
- wheezy|jessie|sid|quantal|raring|saucy)
- dpkg -l | grep ia32-libs >/dev/null || deb_pkgs="${deb_pkgs}ia32-libs "
- dpkg -l | grep ia32-libs >/dev/null || dpkg_multiarch=1
+ saucy)
+ echo "todo.. ia32-libs is gone.."
;;
esac
if [ "${dpkg_multiarch}" ] ; then
unset check_foreign
check_foreign=$(LC_ALL=C dpkg --print-foreign-architectures)
- if [ "x" = "x${check_foreign}" ] ; then
+ if [ "x${check_foreign}" = "x" ] ; then
warn_dpkg_ia32=1
fi
fi
@@ -196,6 +232,7 @@ debian_regs () {
echo "-----------------------------"
echo "Please cut, paste and email to: bugs@rcn-ee.com"
echo "-----------------------------"
+ echo "git: `git rev-parse HEAD`"
echo "uname -m"
uname -m
echo "lsb_release -a"
@@ -220,8 +257,12 @@ debian_regs () {
BUILD_HOST=${BUILD_HOST:="$( detect_host )"}
if [ $(which lsb_release) ] ; then
info "Detected build host [`lsb_release -sd`]"
+ info "host: [`dpkg --print-architecture`]"
+ info "git HEAD commit: [`git rev-parse HEAD`]"
else
info "Detected build host [$BUILD_HOST]"
+ info "host: [`dpkg --print-architecture`]"
+ info "git HEAD commit: [`git rev-parse HEAD`]"
fi
case "$BUILD_HOST" in
redhat*)
View
118 tools/rebuild.sh
@@ -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 ; }
@@ -220,9 +165,7 @@ else
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
@@ -231,11 +174,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
@@ -260,4 +198,4 @@ fi
echo "-----------------------------"
echo "Script Complete"
echo "eewiki.net: [user@localhost:~$ export kernel_version=${KERNEL_UTS}]"
-echo "-----------------------------"
+echo "-----------------------------"
View
81 tools/rebuild_deb.sh
@@ -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 ; }
@@ -166,9 +142,7 @@ else
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
@@ -177,11 +151,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
9 version.sh
@@ -2,8 +2,13 @@
#
ARCH=$(uname -m)
-#Dual/Quad Core arms are now more prevalent, so don't just limit to x86:
-CORES=$(cat /proc/cpuinfo | grep processor | wc -l)
+#Dual/Quad Core arms are now more prevalent, so just don't limit it x86:
+check_cpuinfo=$(cat /proc/cpuinfo | grep "^processor" | awk '{print $1}' | head -n 1)
+if [ "x${check_cpuinfo}" = "xprocessor" ] ; then
+ CORES=$(cat /proc/cpuinfo | grep "^processor" | wc -l)
+else
+ CORES=1
+fi
unset GIT_OPTS
unset GIT_NOEDIT
Please sign in to comment.
Something went wrong with that request. Please try again.