--- flash-kernel.orig 2011-04-22 18:21:11.000000000 +0200 +++ flash-kernel 2011-04-22 18:23:08.000000000 +0200 @@ -48,10 +48,18 @@ } check_subarch() { - if [ -n "$subarch" ] && [ "$subarch" != "$1" ]; then - echo "Kernel $kfile does not match your subarchitecture" >&2 - echo "$1, therefore not writing it to flash." >&2 - exit 0 + if [ -n "$subarch" ]; then + if [ "$subarch" = "linaro-omap" ]; then + [ "$1" = "omap" -o "$1" = "omap4" ] && return + fi + if [ "$1" = "linaro-omap" ]; then + [ "$subarch" = "omap" -o "$subarch" = "omap4" ] && return + fi + if [ "$subarch" != "$1" ]; then + echo "Kernel $kfile does not match your subarchitecture" >&2 + echo "$1, therefore not writing it to flash." >&2 + exit 0 + fi fi } @@ -301,7 +309,7 @@ machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//') fi -running_subarch=$(uname -r | sed -e 's/.*-//') +running_subarch=$(uname -r | sed -e 's/[0-9|.|-]*-//') if [ "x$1" = "x--supported" ]; then # if FLASH_KERNEL_SKIP is set, its always unsupported @@ -376,7 +384,7 @@ if [ -L "$kfile" ]; then kfile=$(readlink -e "$kfile") fi -subarch=$(echo "$kfile" | sed -e 's/.*-//') +subarch=$(basename "$kfile" | sed -e 's/vmlinuz[0-9|.|-]*//') case "$machine" in "ARM-Versatile Express CA9x4") @@ -840,7 +848,7 @@ ;; *) case "$running_subarch" in - "dove" | "omap" | "omap4") + "dove" | "omap" | "omap4" | "linaro-omap") echo "warning: using generic subarchitecture fallback for $running_subarch" check_subarch $running_subarch @@ -848,7 +856,7 @@ "dove") dove_flash_kernel ;; - "omap" | "omap4") + "omap" | "omap4" | "linaro-omap") omap_flash_kernel ;; esac