All of lore.kernel.org
 help / color / mirror / Atom feed
* CONFIG_DEFAULT_ENV_FILE Question
@ 2022-09-28 20:14 Jonathan DeNoon
  2022-09-29 23:55 ` Simon Glass
  2022-09-30  6:16 ` Rasmus Villemoes
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan DeNoon @ 2022-09-28 20:14 UTC (permalink / raw)
  To: u-boot

Hello, I want to define my own default environment, so I have enabled CONFIG_USE_DEFAULT_ENV_FILE. The next step appears to be setting the path to the default environment file via CONFIG_DEFAULT_ENV_FILE. My questions are as follows:

  *   Am I expected to provide an absolute path to the file, or is it a relative path with respect to the cloned U-Boot repo?
  *   Is there a specific directory that you advise to store a default environment file in?
  *   Are there any example default environment files and corresponding default environment file paths that I could reference?

Thank you,
Jonathan DeNoon

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

* Re: CONFIG_DEFAULT_ENV_FILE Question
  2022-09-28 20:14 CONFIG_DEFAULT_ENV_FILE Question Jonathan DeNoon
@ 2022-09-29 23:55 ` Simon Glass
  2022-09-30  6:16 ` Rasmus Villemoes
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-09-29 23:55 UTC (permalink / raw)
  To: Jonathan DeNoon; +Cc: u-boot

Hi Jonathan,

On Wed, 28 Sept 2022 at 18:44, Jonathan DeNoon
<Jonathan.DeNoon@daktronics.com> wrote:
>
> Hello, I want to define my own default environment, so I have enabled CONFIG_USE_DEFAULT_ENV_FILE. The next step appears to be setting the path to the default environment file via CONFIG_DEFAULT_ENV_FILE. My questions are as follows:
>
>   *   Am I expected to provide an absolute path to the file, or is it a relative path with respect to the cloned U-Boot repo?
>   *   Is there a specific directory that you advise to store a default environment file in?
>   *   Are there any example default environment files and corresponding default environment file paths that I could reference?

Does this help?

https://u-boot.readthedocs.io/en/latest/usage/environment.html#text-based-environment

Regards,
Simon

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

* Re: CONFIG_DEFAULT_ENV_FILE Question
  2022-09-28 20:14 CONFIG_DEFAULT_ENV_FILE Question Jonathan DeNoon
  2022-09-29 23:55 ` Simon Glass
@ 2022-09-30  6:16 ` Rasmus Villemoes
  1 sibling, 0 replies; 3+ messages in thread
From: Rasmus Villemoes @ 2022-09-30  6:16 UTC (permalink / raw)
  To: Jonathan DeNoon, u-boot

On 28/09/2022 22.14, Jonathan DeNoon wrote:
> Hello, I want to define my own default environment, so I have enabled CONFIG_USE_DEFAULT_ENV_FILE. The next step appears to be setting the path to the default environment file via CONFIG_DEFAULT_ENV_FILE. My questions are as follows:
> 
>   *   Am I expected to provide an absolute path to the file, or is it a relative path with respect to the cloned U-Boot repo?

It can either be an absolute path or a path relative to your _build_
directory (which need not be the source directory, in case you build
with 'make O=...').

>   *   Is there a specific directory that you advise to store a default environment file in?

Well, it doesn't really matter. If you plan to maintain the file in the
U-Boot repository itself (i.e. in some private branch with stuff that is
not intended for upstream), I suggest you create a vendor-specific
directory somewhere - that way you reduce the risk of any conflicts when
rebasing to a newer upstream release.

We maintain the default environment file as part of our yocto/bitbake
repositories (that also allows us to generate parts of it using bitbake
variables), and then put a copy of it into the build directory as part
of do_configure, with the CONFIG path then just set to the basename.

>   *   Are there any example default environment files and corresponding default environment file paths that I could reference?

Well, what I do for bringup of a new board is to start without
CONFIG_DEFAULT_ENV_FILE and see whatever env gets generated (it somewhat
depends on whether you're starting from an existing eval board or trying
to do something from scratch), then extract that environment and strip
away all the gunk that won't be needed for this particular
board/project. You can use scripts/get_default_envs.sh.

Rasmus

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

end of thread, other threads:[~2022-09-30  6:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 20:14 CONFIG_DEFAULT_ENV_FILE Question Jonathan DeNoon
2022-09-29 23:55 ` Simon Glass
2022-09-30  6:16 ` Rasmus Villemoes

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.