Typo in the update script!

(1/1)

mgillespie:
http://www.xilka.com/sheeva/kernel/UPDATE-KERNEL.sh

The first line in the function has $Plaform   should be $Platform

This causes the flash to fail on my sheevaplug!

Code:

function CheckSize()
{
local uImageFile=$Plaform-$Device-$KVer-uImage
local mtd=$(grep uImage /proc/mtd | cut -d' ' -f1 | sed 's#:##')
local mtdHexSize=$(grep uImage /proc/mtd | cut -d' ' -f2)
local mtdSize=''
let mtdSize=0x$mtdHexSize
local uImageSize=$(stat -c%s "$uImageFile")
if (( uImageSize > mtdSize )); then
echo "uImage size $uImageSize exceeds $mtd size $mtdSize"
echo "You must resize your mtds before this kernel will fit!"
echo "The simplest way to do this is with the SheevaPlug installer"
exit 1
fi
}

apemberton:
Apart from the typo above, I also have a typo issue with the update script which could not be predicted if cbxbiker does not possess the hardware to test. In my case, both Guruplug and Tonidoplug 2 needed correction to install a device tree kernel. My script has been modified as:-
Code:

if [[ $Arch == armv5tel ]]; then
        Platform='kirkwood'
        if grep -qs 'SheevaPlug' /proc/cpuinfo || grep -qs 'SheevaPlug' /proc/device-tree/model; then
                AssumedDevice='sheevaplug'
                if grep -qs 'eSATA' /proc/device-tree/model; then
                        AssumedDevice='sheevaplug-esata'
                fi
                CHECK_PROGRAMS="$CHECK_PROGRAMS $MKIMAGE $FLASH_ERASEALL $FLASH_ERASE"
        elif grep -qs 'GuruPlug' /proc/cpuinfo || grep -qs 'GuruPlug' /proc/device-tree/model; then
                AssumedDevice='guruplug-server-plus'
                CHECK_PROGRAMS="$CHECK_PROGRAMS $MKIMAGE $FLASH_ERASEALL $FLASH_ERASE"
        elif grep -qs 'Tonido2' /proc/cpuinfo || grep -qs 'Topkick' /proc/device-tree/model; then
                AssumedDevice='topkick'
                CHECK_PROGRAMS="$CHECK_PROGRAMS $MKIMAGE $FLASH_ERASEALL $FLASH_ERASE"
        fi
elif [[ $Arch == armv7l ]]; then
        Platform='dove'
        if grep -qs 'CuBox' /proc/cpuinfo || grep -qs 'CuBox' /proc/device-tree/model; then
                AssumedDevice='cubox'
        fi
        CHECK_PROGRAMS="$CHECK_PROGRAMS $MKIMAGE"
elif [[ $Arch == armv6l ]] && grep -qs 'BCM2708' '/proc/cpuinfo'; then
        Platform='pi'
        AssumedDevice='pi'
else
        "Unknown architecture: $Arch"
        exit 1
fi

I have used the script to successfully install 3.10.9 to sheevaplugs (eSata and non-eSata), Cubox, Tonidoplg 2, guruplugs (albeit all have a common problem with the console during booting). Hope that helps!


Navigation

[0] Message Index