diff options
Diffstat (limited to 'arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot')
-rw-r--r-- | arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot new file mode 100644 index 0000000000..d0b1396de9 --- /dev/null +++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot @@ -0,0 +1,37 @@ +#!/bin/sh + +. /env/config + +while getopt "k:r:i:m:" Option +do +if [ ${Option} = k ]; then + kernel_loc=${OPTARG} +elif [ ${Option} = r ]; then + rootfs_loc=${OPTARG} +elif [ ${Option} = i ]; then + ip=${OPTARG} +elif [ ${Option} = m ]; then + mode=${OPTARG} +else +fi +done + +boot_opt= + +if [ x$mode != x ]; then + boot_opt="-m ${mode}" +else + if [ x$kernel_loc != x ]; then + boot_opt="-k ${kernel_loc}" + fi + if [ x$kernel_loc != x ]; then + boot_opt="-r ${rootfs_loc}" + fi +fi + +boot ${boot_opt} -i ${ip} + +echo -n "boot error: Hit any key to return to the menu: " +timeout -a 3 +menu -s -m boot +exit 1 |