Re: redirect stdout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux