diff options
author | Gregory Hermant <gregory.hermant@calao-systems.com> | 2013-05-17 16:28:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-20 16:02:08 +0200 |
commit | ce9f633d8903b08eac82fa9a287b661956381c5e (patch) | |
tree | 0e84c6ca26642660b2211927482ee4391ef35e34 /arch/arm/boards/qil-a926x/env | |
parent | 19bc427e44ba098b420a29de92cc010927793554 (diff) | |
download | barebox-ce9f633d8903b08eac82fa9a287b661956381c5e.tar.gz barebox-ce9f633d8903b08eac82fa9a287b661956381c5e.tar.xz |
at91: add Calao QIL-A9G20
Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/qil-a926x/env')
-rw-r--r-- | arch/arm/boards/qil-a926x/env/bin/init_board | 49 | ||||
-rw-r--r-- | arch/arm/boards/qil-a926x/env/config | 40 |
2 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm/boards/qil-a926x/env/bin/init_board b/arch/arm/boards/qil-a926x/env/bin/init_board new file mode 100644 index 0000000000..0a6baf722b --- /dev/null +++ b/arch/arm/boards/qil-a926x/env/bin/init_board @@ -0,0 +1,49 @@ +#!/bin/sh + +button_name="dfu_bp" +button_wait=5 + +product_id=0x1234 +vendor_id=0x4321 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +dfu ${dfu_config} -P ${product_id} -V ${vendor_id} diff --git a/arch/arm/boards/qil-a926x/env/config b/arch/arm/boards/qil-a926x/env/config new file mode 100644 index 0000000000..793a73f11e --- /dev/null +++ b/arch/arm/boards/qil-a926x/env/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 +[ x$armlinux_architecture = x1711 ] && global.dhcp.vendor_id=barebox-qil-a9260 +[ x$armlinux_architecture = x1844 ] && global.dhcp.vendor_id=barebox-qil-a9g20 + +# 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', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=none + +# 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=ttyS1,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " |