summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2012-05-15 23:21:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-16 19:22:01 +0200
commit7de8410a82461e74dec916259e4a97c3bf1b9db7 (patch)
tree2eb01415f9ddf639aedce9d874bdb618735aba2b /arch
parent574aa9cced45dfd3b97b0d93d738463fa601ee17 (diff)
downloadbarebox-7de8410a82461e74dec916259e4a97c3bf1b9db7.tar.gz
barebox-7de8410a82461e74dec916259e4a97c3bf1b9db7.tar.xz
arch/arm: mioa701 make autoboot of Linux work
Make the autoboot work : - if no USB cuable is plugged, continue directly to autoboot - if an USB cable is plugged, wait for 3 seconds for any input on the USB serial gadget, and if none happens, continue to autoboot linux kernel - else interrupt autoboot and interact on barebox console Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/mioa701/env/bin/init17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/boards/mioa701/env/bin/init b/arch/arm/boards/mioa701/env/bin/init
index 2e806b93b3..494d0674aa 100644
--- a/arch/arm/boards/mioa701/env/bin/init
+++ b/arch/arm/boards/mioa701/env/bin/init
@@ -22,12 +22,17 @@ if [ $? = 0 ]; then
fi
echo "No custom environment found"
-echo -n "Hit any key to stop autoboot: "
-timeout -a $autoboot_timeout
-if [ $? != 0 ]; then
- echo
- echo "Welcome to barebox console"
- exit
+
+gpio_get_value 22
+is_usb_connected=$?
+if [ $is_usb_connected != 0 ]; then
+ echo -n "Hit any key to stop autoboot: "
+ timeout -a $autoboot_timeout
+ if [ $? != 0 ]; then
+ echo
+ echo "Welcome to barebox console"
+ exit
+ fi
fi
echo "Booting linux kernel on docg3 chip ..."