From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: [PATCH 5/6] eukrea-cpuimx25: enable dfu sequence conditionaly
Date: Fri, 25 Sep 2015 17:48:51 +0200 [thread overview]
Message-ID: <1443196132-573-5-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1443196132-573-1-git-send-email-eric@eukrea.com>
this can be useful on the evaluation board but we don't want
the sequence to launch on custom board when there is not the
switch button on gpio 82
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx25/env/bin/init_board | 26 ++++++++++++----------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
index 58e07e0..8f4151c 100644
--- a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
+++ b/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
@@ -9,24 +9,26 @@ elif [ -f /env/logo.bmp.lzo ]; then
fb0.enable=1
fi
-gpio_get_value 82
-if [ $? -eq 0 ]; then
- gpio_set_value 83 0
- usbserial
- timeout -s -a 2
+if [ ! -z $use_dfu ]; then
gpio_get_value 82
if [ $? -eq 0 ]; then
- usbserial -d
- dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r
+ gpio_set_value 83 0
+ usbserial
+ timeout -s -a 2
gpio_get_value 82
if [ $? -eq 0 ]; then
- usbserial
- autoboot_timeout=60
+ usbserial -d
+ dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r
+ gpio_get_value 82
+ if [ $? -eq 0 ]; then
+ usbserial
+ autoboot_timeout=60
+ else
+ reset
+ fi
else
- reset
+ autoboot_timeout=28
fi
- else
- autoboot_timeout=28
fi
fi
--
2.4.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-09-25 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 15:48 [PATCH 1/6] eukrea-cpuimx25: fix boot Eric Bénard
2015-09-25 15:48 ` [PATCH 2/6] chipidea-imx: allow phymode configuration in pdata Eric Bénard
2015-09-25 15:48 ` [PATCH 3/6] imx25: register usb-misc by default Eric Bénard
2015-09-25 15:48 ` [PATCH 4/6] eukrea-cpuimx25: setup usb through chipidea-imx driver Eric Bénard
2015-09-25 15:48 ` Eric Bénard [this message]
2015-09-25 15:48 ` [PATCH 6/6] eukrea-cpuimx25: update defconfig Eric Bénard
2015-09-29 6:48 ` [PATCH 1/6] eukrea-cpuimx25: fix boot 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=1443196132-573-5-git-send-email-eric@eukrea.com \
--to=eric@eukrea.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