From: Guillermo Rodriguez <guille.rodriguez@gmail.com>
To: barebox@lists.infradead.org
Cc: grodriguez <guille.rodriguez@gmail.com>
Subject: [PATCH] Call boot_board from boot, not from init.
Date: Mon, 22 Aug 2016 15:45:34 +0200 [thread overview]
Message-ID: <1471873534-17014-1-git-send-email-guille.rodriguez@gmail.com> (raw)
In-Reply-To: <20160822054521.GU20657@pengutronix.de>
From: grodriguez <guille.rodriguez@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@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-08-22 13:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABDcavbrkt2q3cQ5Tzi3d0pU+Pm3v4S3OGzFo_aG_SNgmEgOnA@mail.gmail.com>
2016-08-16 8:42 ` Fwd: Shouldn't boot_board be called from boot instead of init? Guillermo Rodriguez Garcia
2016-08-18 6:31 ` Sascha Hauer
2016-08-18 8:02 ` Guillermo Rodriguez Garcia
2016-08-22 5:45 ` Sascha Hauer
2016-08-22 9:12 ` Guillermo Rodriguez Garcia
2016-08-22 9:46 ` Holger Schurig
2016-08-23 8:13 ` Sascha Hauer
2016-08-24 14:42 ` Guillermo Rodriguez Garcia
2016-08-29 7:06 ` Sascha Hauer
2016-08-22 13:45 ` Guillermo Rodriguez [this message]
2016-08-24 10:33 ` [PATCH] Call boot_board from boot, not from init Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471873534-17014-1-git-send-email-guille.rodriguez@gmail.com \
--to=guille.rodriguez@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox