All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Can I load uEnv.txt conditionally, based on the boot source?
@ 2015-02-11  1:18 Brian Smucker
  2015-02-11  8:09 ` Joe Hershberger
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Smucker @ 2015-02-11  1:18 UTC (permalink / raw)
  To: u-boot

Hello,

I was wondering if there is a way to tell what the boot source is?

My am335x SOC can boot to the mmc or the flash, based on the status of a 
digital line. I would like to load the uEnv.txt, only if booting from SD 
card (mmc).  I notice at least in some codebases that the automatic 
loading of uEnv.txt is based on whether the SD card is available, not 
whether we are currently booting from the SD card.

Is there a way to sense which we are booting from?

Thanks

Brian

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

* [U-Boot] Can I load uEnv.txt conditionally, based on the boot source?
  2015-02-11  1:18 [U-Boot] Can I load uEnv.txt conditionally, based on the boot source? Brian Smucker
@ 2015-02-11  8:09 ` Joe Hershberger
  2015-02-11 17:14   ` Brian Smucker
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Hershberger @ 2015-02-11  8:09 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 10, 2015 at 7:18 PM, Brian Smucker <bds@bsmucker.eu.org> wrote:
>
> Hello,
>
> I was wondering if there is a way to tell what the boot source is?
>
> My am335x SOC can boot to the mmc or the flash, based on the status of a
digital line. I would like to load the uEnv.txt, only if booting from SD
card (mmc).  I notice at least in some codebases that the automatic loading
of uEnv.txt is based on whether the SD card is available, not whether we
are currently booting from the SD card.
>
> Is there a way to sense which we are booting from?

Are you able to read the same digital line that the SoC is using to decide?

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

* [U-Boot] Can I load uEnv.txt conditionally, based on the boot source?
  2015-02-11  8:09 ` Joe Hershberger
@ 2015-02-11 17:14   ` Brian Smucker
  2015-02-11 18:57     ` Joe Hershberger
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Smucker @ 2015-02-11 17:14 UTC (permalink / raw)
  To: u-boot

Hello,

That would be the most obvious thing, wouldn't it.  I thought of that, 
but am not sure of the answer in u-boot.

Thanks,
Brian

On 2/11/2015 12:09 AM, Joe Hershberger wrote:
>
> On Tue, Feb 10, 2015 at 7:18 PM, Brian Smucker <bds@bsmucker.eu.org 
> <mailto:bds@bsmucker.eu.org>> wrote:
> >
> > Hello,
> >
> > I was wondering if there is a way to tell what the boot source is?
> >
> > My am335x SOC can boot to the mmc or the flash, based on the status 
> of a digital line. I would like to load the uEnv.txt, only if booting 
> from SD card (mmc).  I notice at least in some codebases that the 
> automatic loading of uEnv.txt is based on whether the SD card is 
> available, not whether we are currently booting from the SD card.
> >
> > Is there a way to sense which we are booting from?
>
> Are you able to read the same digital line that the SoC is using to 
> decide?

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

* [U-Boot] Can I load uEnv.txt conditionally, based on the boot source?
  2015-02-11 17:14   ` Brian Smucker
@ 2015-02-11 18:57     ` Joe Hershberger
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2015-02-11 18:57 UTC (permalink / raw)
  To: u-boot

Hi Brian,

On Wed, Feb 11, 2015 at 11:14 AM, Brian Smucker <bds@bsmucker.eu.org> wrote:
>
> Hello,
>
> That would be the most obvious thing, wouldn't it.  I thought of that,
but am not sure of the answer in u-boot.

Remember not to top post to the list.

Many devices have a GPIO driver available.  Sometimes it's not enabled by
the default config.  As long as the pin is a GPIO as well as a boot-mode
selector it should be easiest to just read the state of the line and load
the file or not based on that in a shell script.

Cheers,
-Joe

> Thanks,
> Brian
>
>
> On 2/11/2015 12:09 AM, Joe Hershberger wrote:
>
>
> On Tue, Feb 10, 2015 at 7:18 PM, Brian Smucker <bds@bsmucker.eu.org>
wrote:
> >
> > Hello,
> >
> > I was wondering if there is a way to tell what the boot source is?
> >
> > My am335x SOC can boot to the mmc or the flash, based on the status of
a digital line. I would like to load the uEnv.txt, only if booting from SD
card (mmc).  I notice at least in some codebases that the automatic loading
of uEnv.txt is based on whether the SD card is available, not whether we
are currently booting from the SD card.
> >
> > Is there a way to sense which we are booting from?
>
> Are you able to read the same digital line that the SoC is using to
decide?
>
>

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

end of thread, other threads:[~2015-02-11 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-11  1:18 [U-Boot] Can I load uEnv.txt conditionally, based on the boot source? Brian Smucker
2015-02-11  8:09 ` Joe Hershberger
2015-02-11 17:14   ` Brian Smucker
2015-02-11 18:57     ` Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.