[PATCH] Call boot_board from boot, not from init.

Guillermo Rodriguez guille.rodriguez at gmail.com
Mon Aug 22 06:45:34 PDT 2016


From: grodriguez <guille.rodriguez at gmail.com>

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 at gmail.com>
---
 defaultenv/defaultenv-1/bin/boot |    4 ++++
 defaultenv/defaultenv-1/bin/init |    5 ++---
 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
-- 
1.7.9.5




More information about the barebox mailing list