From 1a48c868f90ad62117029ff8440946973d47ce3d Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Mon, 23 Aug 2010 10:00:14 -0500 Subject: [PATCH] add update kernel script --- mk_mmc.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/mk_mmc.sh b/mk_mmc.sh index d780602..5320a4d 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -330,6 +330,50 @@ fi fix_zippy2 +cat > /tmp/latest_kernel.sh < /dev/null + fi + + wget --no-verbose --directory-prefix=/tmp/ http://rcn-ee.net/deb/\${DIST}/LATEST + + KERNEL_DL=\$(cat /tmp/LATEST | grep "ABI:1 STABLE" | awk '{print \$3}') + + if [ "\$TESTING" ] ; then + KERNEL_DL=\$(cat /tmp/LATEST | grep "ABI:1 TESTING" | awk '{print \$3}') + fi + + KERNEL_DL_VER=\$(echo \${KERNEL_DL} | awk -F'/' '{print \$6}') + + CURRENT_KER="v\$(uname -r)" + + if [ \${CURRENT_KER} != \${KERNEL_DL_VER} ]; then + run_upgrade + fi +} + +check_latest + +latest_kernel + sudo mkdir -p ${DIR}/disk/tools sudo cp -v /tmp/rebuild_uinitrd.sh ${DIR}/disk/tools/rebuild_uinitrd.sh sudo chmod +x ${DIR}/disk/tools/rebuild_uinitrd.sh @@ -340,6 +384,9 @@ fix_zippy2 sudo cp -v /tmp/fix_zippy2.sh ${DIR}/disk/tools/fix_zippy2.sh sudo chmod +x ${DIR}/disk/tools/fix_zippy2.sh + sudo cp -v /tmp/latest_kernel.sh ${DIR}/disk/tools/latest_kernel.sh + sudo chmod +x ${DIR}/disk/tools/latest_kernel.sh + cd ${DIR}/disk sync cd ${DIR}/