mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Load environment variables earlier
@ 2017-09-15  2:33 zjh
  2017-09-15  4:47 ` Oleksij Rempel
  2017-09-18  7:18 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: zjh @ 2017-09-15  2:33 UTC (permalink / raw)
  To: barebox

 think the environment variables should be loaded before the device is registered,
 so when the device is registered, it can be initialized according to the environment variable.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Load environment variables earlier
  2017-09-15  2:33 Load environment variables earlier zjh
@ 2017-09-15  4:47 ` Oleksij Rempel
  2017-09-18  7:18 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2017-09-15  4:47 UTC (permalink / raw)
  To: barebox


[-- Attachment #1.1.1: Type: text/plain, Size: 316 bytes --]

Am 15.09.2017 um 04:33 schrieb zjh:
>  think the environment variables should be loaded before the device is registered,
>  so when the device is registered, it can be initialized according to the environment variable.

Please take look at drivers/usb/gadget/f_fastboot.c. it is already using
env variables.


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 220 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Load environment variables earlier
  2017-09-15  2:33 Load environment variables earlier zjh
  2017-09-15  4:47 ` Oleksij Rempel
@ 2017-09-18  7:18 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2017-09-18  7:18 UTC (permalink / raw)
  To: zjh; +Cc: barebox

On Fri, Sep 15, 2017 at 10:33:53AM +0800, zjh wrote:
>  think the environment variables should be loaded before the device is registered,
>  so when the device is registered, it can be initialized according to the environment variable.

When devices are influenced by environment variables they must be
prepared that these variables are changed *after* registration. Note
that environment variables are loaded from storage media that are
devices themselves, so that's a catch 22.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-18  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15  2:33 Load environment variables earlier zjh
2017-09-15  4:47 ` Oleksij Rempel
2017-09-18  7:18 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox