[PATCH 1/4] defaultenv: add support for custom board boot

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Apr 6 23:14:58 EDT 2012


This will allow a board to have a custom boot choice with a boot menu as
example.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 defaultenv/bin/init |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/defaultenv/bin/init b/defaultenv/bin/init
index b371c42..7452bb6 100644
--- a/defaultenv/bin/init
+++ b/defaultenv/bin/init
@@ -24,11 +24,15 @@ if [ -f /env/bin/init_board ]; then
 	. /env/bin/init_board
 fi
 
-echo
-echo -n "Hit any key to stop autoboot: "
-timeout -a $autoboot_timeout
-if [ $? != 0 ]; then
-	exit
+if [ -f /env/bin/boot_board ]; then
+	. /env/bin/boot_board
+else
+	echo
+	echo -n "Hit any key to stop autoboot: "
+	timeout -a $autoboot_timeout
+	if [ $? != 0 ]; then
+		exit
+	fi
+
+	boot
 fi
-
-boot
-- 
1.7.9.1




More information about the barebox mailing list