Skip to content

Commit

Permalink
scripts: sync with master of: git://github.com/RobertCNelson/stable-k…
Browse files Browse the repository at this point in the history
…ernel.git

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Sep 3, 2013
1 parent 21b32a2 commit 3546eeb
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 35 deletions.
4 changes: 4 additions & 0 deletions repo_maintenance/dpkg_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

lsb_release -cs
dpkg -l | grep libncurses5-dev
28 changes: 28 additions & 0 deletions repo_maintenance/push-linux-next-bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh -e

DIR=$PWD

if [ -e ${DIR}/version.sh ]; then
unset BRANCH
unset KERNEL_TAG
unset tag
. ${DIR}/version.sh

if [ ! "${BRANCH}" ] ; then
BRANCH="master"
fi

if [ ! "${KERNEL_TAG}" ] ; then
echo 'KERNEL_TAG undefined'
exit
fi

if [ ! "${tag}" ] ; then
echo 'tag undefined'
exit
fi

git commit -a -m "kernel bump: v${KERNEL_TAG} + ${tag}" -s
git push origin ${BRANCH}
fi

6 changes: 5 additions & 1 deletion repo_maintenance/push-sync-with-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ if [ -e ${DIR}/version.sh ]; then
unset BRANCH
. ${DIR}/version.sh

git commit -a -m "scripts: sync with master" -s
if [ ! "${BRANCH}" ] ; then
BRANCH="master"
fi

git commit -a -m "scripts: sync with master of: git://github.com/RobertCNelson/stable-kernel.git" -s

git push origin ${BRANCH}
fi
Expand Down
6 changes: 3 additions & 3 deletions scripts/gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ gcc_linaro_toolchain () {
;;
cortex_gcc_4_8)
#https://launchpad.net/linaro-toolchain-binaries/+download
#https://launchpad.net/linaro-toolchain-binaries/trunk/2013.07/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux.tar.xz
#https://launchpad.net/linaro-toolchain-binaries/trunk/2013.08/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux.tar.xz

gcc_version="4.8"
release="2013.07"
release="2013.08"
toolchain_name="gcc-linaro-arm-linux-gnueabihf"
site="https://launchpad.net/linaro-toolchain-binaries"
version="trunk/${release}"
directory="${toolchain_name}-${gcc_version}-${release}-1_linux"
directory="${toolchain_name}-${gcc_version}-${release}_linux"
filename="${directory}.tar.xz"
datestamp="${release}-${toolchain_name}"
untar="tar -xJf"
Expand Down
14 changes: 11 additions & 3 deletions scripts/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,17 @@ git_kernel () {
git_kernel_torvalds
fi

test_for_branch=$(git branch --list v${KERNEL_TAG}-${BUILD})
if [ "x${test_for_branch}" != "x" ] ; then
git branch v${KERNEL_TAG}-${BUILD} -D
#CentOS 6.4: git version 1.7.1 (no --list option)
unset git_branch_has_list
LC_ALL=C git help branch | grep -m 1 -e "--list" >/dev/null 2>&1 && git_branch_has_list=1
if [ "${git_branch_has_list}" ] ; then
test_for_branch=$(git branch --list v${KERNEL_TAG}-${BUILD})
if [ "x${test_for_branch}" != "x" ] ; then
git branch v${KERNEL_TAG}-${BUILD} -D
fi
else
echo "git: the following error: [error: branch 'v${KERNEL_TAG}-${BUILD}' not found.] is safe to ignore."
git branch v${KERNEL_TAG}-${BUILD} -D || true
fi

if [ ! "${KERNEL_SHA}" ] ; then
Expand Down
22 changes: 16 additions & 6 deletions tools/host_det.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ redhat_reqs () {
fi

if [ "${rpm_pkgs}" ] ; then
echo "Fedora: missing dependicies, please install:"
echo "Red Hat, or derivatives: missing dependicies, please install:"
echo "-----------------------------"
echo "yum install ${rpm_pkgs}"
echo "-----------------------------"
Expand Down Expand Up @@ -118,7 +118,7 @@ Missing mkimage command.
}

check_dpkg () {
LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}" >/dev/null || deb_pkgs="${deb_pkgs}${pkg} "
LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}$" >/dev/null || deb_pkgs="${deb_pkgs}${pkg} "
}

debian_regs () {
Expand All @@ -131,8 +131,6 @@ debian_regs () {
check_dpkg
pkg="fakeroot"
check_dpkg
pkg="libncurses5-dev"
check_dpkg
pkg="lsb-release"
check_dpkg
pkg="lzma"
Expand Down Expand Up @@ -223,7 +221,8 @@ debian_regs () {

if [ $(which lsb_release) ] && [ ! "${stop_pkg_search}" ] ; then
deb_distro=$(lsb_release -cs)

deb_arch=$(LC_ALL=C dpkg --print-architecture)

#pkg: mkimage
case "${deb_distro}" in
squeeze|lucid)
Expand All @@ -236,8 +235,19 @@ debian_regs () {
;;
esac

#Libs; starting with jessie/sid/saucy, lib<pkg_name>-dev:<arch>
case "${deb_distro}" in
jessie|sid|saucy)
pkg="libncurses5-dev:${deb_arch}"
check_dpkg
;;
*)
pkg="libncurses5-dev"
check_dpkg
;;
esac

#pkg: ia32-libs
deb_arch=$(LC_ALL=C dpkg --print-architecture)
if [ "x${deb_arch}" = "xamd64" ] ; then
unset dpkg_multiarch
case "${deb_distro}" in
Expand Down
37 changes: 15 additions & 22 deletions tools/install_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,22 @@ unmount_partitions () {
mmc_detect_n_mount
}

list_mmc () {
echo "fdisk -l:"
LC_ALL=C sudo fdisk -l 2>/dev/null | grep "Disk /dev/" --color=never
echo ""
echo "lsblk:"
lsblk | grep -v sr0
echo "-----------------------------"
}

check_mmc () {
FDISK=$(LC_ALL=C sudo fdisk -l 2>/dev/null | grep "Disk ${MMC}" | awk '{print $2}')

if [ "x${FDISK}" = "x${MMC}:" ] ; then
echo ""
echo "I see..."
echo "fdisk -l:"
LC_ALL=C sudo fdisk -l 2>/dev/null | grep "Disk /dev/" --color=never
echo ""
if which lsblk > /dev/null ; then
echo "lsblk:"
lsblk | grep -v sr0
else
echo "mount:"
mount | grep -v none | grep "/dev/" --color=never
fi
echo ""
list_mmc
echo -n "Are you 100% sure, on selecting [${MMC}] (y/n)? "
read response
if [ "x${response}" = "xy" ] ; then
Expand All @@ -224,11 +223,7 @@ check_mmc () {
echo ""
echo "Are you sure? I Don't see [${MMC}], here is what I do see..."
echo ""
echo "fdisk -l:"
LC_ALL=C sudo fdisk -l 2>/dev/null | grep "Disk /dev/" --color=never
echo ""
echo "mount:"
mount | grep -v none | grep "/dev/" --color=never
list_mmc
echo "Please update MMC variable in system.sh"
fi
}
Expand All @@ -239,13 +234,11 @@ if [ -f "${DIR}/system.sh" ] ; then
if [ -f "${DIR}/KERNEL/arch/arm/boot/zImage" ] ; then
KERNEL_UTS=$(cat "${DIR}/KERNEL/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' )
if [ "x${MMC}" = "x" ] ; then
echo "-----------------------------"
echo "lsblk:"
lsblk | grep -v sr0
echo "-----------------------------"
echo "ERROR: MMC is not defined in system.sh"
if which lsblk > /dev/null ; then
echo "-----------------------------"
echo "lsblk:"
lsblk | grep -v sr0
echo "-----------------------------"
fi
else
unset PARTITION_PREFIX
echo ${MMC} | grep mmcblk >/dev/null && PARTITION_PREFIX="p"
Expand Down
1 change: 1 addition & 0 deletions version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ else
CORES=1
fi

#Debian 7 (Wheezy): git version 1.7.10.4 and later needs "--no-edit"
unset GIT_OPTS
unset GIT_NOEDIT
LC_ALL=C git help pull | grep -m 1 -e "--no-edit" >/dev/null 2>&1 && GIT_NOEDIT=1
Expand Down

0 comments on commit 3546eeb

Please sign in to comment.