diff options
Diffstat (limited to 'arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek')
3 files changed, 135 insertions, 0 deletions
diff --git a/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board new file mode 100644 index 0000000000..73daecc001 --- /dev/null +++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board @@ -0,0 +1,58 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +menu -r -m boot +menu -a -m boot -d "\e[1;36mWelcome on Barebox Boot Sequence\e[0m" +menu -e -a -m boot -c 'menu_boot' -d "boot (default) " +menu -e -a -m boot -c 'menu_boot -m nand' -d "boot from nand " +menu -e -a -m boot -c 'menu_boot -k nfs -r net' -d "boot from nfs (kernel nfs) " +menu -e -a -m boot -c 'menu_boot -k tftp -r net' -d "boot from nfs (kernel tftp)" +menu -e -a -m boot -c 'clear' -d "\e[2;33mshell \e[0m" +menu -e -a -m boot -u update -d "update " +menu -e -a -m boot -c reset -d "\e[1;31mreset \e[0m" + +# Submenu Update +menu -r -m update +menu -a -m update -d "\e[1;36mUpdate\e[0m" +menu -e -a -m update -u update_barebox -d "\e[2;33mbarebox\e[0m" +menu -e -a -m update -u update_kernel -d "kernel" +menu -e -a -m update -u update_rootfs -d "rootfs" +menu -e -a -m update -c 'true' -d "back " + +# submenu update barebox +menu -r -m update_barebox +menu -a -m update_barebox -d "\e[2;33mBarebox Update Methode\e[0m" +menu -e -a -m update_barebox -c 'update -t barebox -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " +menu -e -a -m update_barebox -c 'update -t barebox -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" +menu -e -a -m update_barebox -c 'update -t barebox -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " +menu -e -a -m update_barebox -c 'true' -d "back " + +# submenu update kernel +menu -r -m update_kernel +menu -a -m update_kernel -d "\e[1;36mKernel Update Methode\e[0m" +menu -e -a -m update_kernel -c 'update -t kernel -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " +menu -e -a -m update_kernel -c 'update -t kernel -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" +menu -e -a -m update_kernel -c 'update -t kernel -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " +menu -e -a -m update_kernel -c 'true' -d "back " + +# submenu update barebox +menu -r -m update_rootfs +menu -a -m update_rootfs -d "\e[1;36mRootfs Update Methode\e[0m" +menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " +menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" +menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " +menu -e -a -m update_rootfs -c 'true' -d "back " + +menu -s -m boot -A $autoboot_timeout +exit 1 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 diff --git a/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config new file mode 100644 index 0000000000..54ed2cb9df --- /dev/null +++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config @@ -0,0 +1,40 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-at91sam9m10g45ek + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200 console=tty0" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + |