From: Sascha Hauer <s.hauer@pengutronix.de>
To: Thibaut Dambry <tdambry@atysmedical.com>
Cc: barebox@lists.infradead.org
Subject: Re: redirect stdout
Date: Thu, 5 Jun 2014 07:47:21 +0200 [thread overview]
Message-ID: <20140605054721.GI15686@pengutronix.de> (raw)
In-Reply-To: <538F4514.7050501@atysmedical.com>
On Wed, Jun 04, 2014 at 06:11:00PM +0200, Thibaut Dambry wrote:
> Thank you for your answer
>
> I would use the eeprom to change linux bootargs parameters.
> So the best way is to create a command isUsbDevice (where I read
> eeprom value and return 0 if OK )
> and add this in a boot shell script:
>
> #!/bin/sh
> isUsbDevice
> if [ $? -ne 0 ]; then
> bootargs="$bootargs pcm043_otg_mode=host"
> else
> bootargs="$bootargs pcm043_otg_mode=device"
> fi
I would use a variable instead of a command. Then you don't have to
create a new command for each piece of information from the EEPROM.
See globalvar_add_simple() and friends.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2014-06-05 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 9:25 Thibaut Dambry
2014-06-04 10:19 ` Sascha Hauer
2014-06-04 16:11 ` Thibaut Dambry
2014-06-05 5:47 ` Sascha Hauer [this message]
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=20140605054721.GI15686@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=tdambry@atysmedical.com \
/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