summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrodriguez <guille.rodriguez@gmail.com>2016-08-22 15:45:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-08-24 12:32:54 +0200
commit1dff49274b823379c5a06e8fcd337c73c0e4e24b (patch)
treec519b9fc2ab2867a65593228a1f2b0f4c3951f25
parent6b40ff8c7e96c1284e8261cebcb21403f2e8e5ac (diff)
downloadbarebox-1dff49274b823379c5a06e8fcd337c73c0e4e24b.tar.gz
Call boot_board from boot, not from init.
This ensures that any board-specific code that must be run at boot time will be run both when autobooting and when manually running the 'boot' command from the console. Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--defaultenv/defaultenv-1/bin/boot4
-rw-r--r--defaultenv/defaultenv-1/bin/init5
2 files changed, 6 insertions, 3 deletions
diff --git a/defaultenv/defaultenv-1/bin/boot b/defaultenv/defaultenv-1/bin/boot
index c17ccdb..a5d6596 100644
--- a/defaultenv/defaultenv-1/bin/boot
+++ b/defaultenv/defaultenv-1/bin/boot
@@ -2,6 +2,10 @@
. /env/config
+if [ -f /env/bin/boot_board ]; then
+ . /env/bin/boot_board
+fi
+
if [ x$kernel_loc = xnet ]; then
kernel_loc=tftp
fi
diff --git a/defaultenv/defaultenv-1/bin/init b/defaultenv/defaultenv-1/bin/init
index a55d293..2dcddbe 100644
--- a/defaultenv/defaultenv-1/bin/init
+++ b/defaultenv/defaultenv-1/bin/init
@@ -23,9 +23,8 @@ if [ -f /env/bin/init_board ]; then
fi
echo -e "\e[?25h"
-if [ -f /env/bin/boot_board ]; then
- . /env/bin/boot_board
-elif [ -n $autoboot_timeout ]; then
+
+if [ -n $autoboot_timeout ]; then
echo -n "Hit any key to stop autoboot: "
timeout -a $autoboot_timeout
if [ $? != 0 ]; then