From: Trent Piepho <trent.piepho@igorinstitute.com>
To: barebox@lists.infradead.org
Subject: Board specific environments and broken configs
Date: Fri, 14 May 2021 23:46:38 -0700 [thread overview]
Message-ID: <CAMHeXxMH8E4ae3HvFtkckJAc_hk1xWBJxMyBxab_OdPRn3y1Vw@mail.gmail.com> (raw)
I wanted to add some additional commands to the env for a new board.
The barebox docs have this:
The default environment is composed from different directories during
compilation:
defaultenv/....
...
arch/$ARCH/boards/<board>/env -> board specific overlay
Which made me think that putting an "env" directory in the board
directory would automatically add it to the environment. It seemed
like a few boards I looked at did this and nothing more. But no, this
does not work.
I see two ways to add extra env. One is to reference a path in
CONFIG_DEFAULT_ENVIRONMENT_PATH. The other is to add a path to
bbenv-y in the board's Makefile and then defaultenv_append_directory()
that linked in data in the board code.
But it seems like some boards do neither! How do they work? AFAICT,
the answer is they don't work.
I tried to do an exhaustive survey of board envs. I found 98 env
directories used by 95 boards. 57 of those boards use a manual
defaultenv_append_directory(). There are 39 env directories not added
this way (efika-mx-smartbook has two env dirs, one in the makefile and
one not, thus 57 + 39 - 1 = 95).
Of the 39 env dirs not added in board code, 27 are referenced in a
defconfig file in CONFIG_DEFAULT_ENVIRONMENT_PATH.
And thus 12 env dirs appear to have no use in barebox. delphi-poc20
appears to not even be a board, having just an env file, no code, no
references I could, and added in a commit for another board. Mistake?
The 12 boards with apparently unused envs:
chumby_falconwing
crystalfontz-cfa10036
datamodul-edm-qmx6
delphi-poc20
dss11
efika-mx-smartbook
generic
karo-tx25
karo-tx51
mx31moboard
skov-imx6
technexion-wandboard
An issue with CONFIG_DEFAULT_ENVIRONMENT_PATH is that it applies to
all boards in a config. If multiple boards are built at once, e.g.
imx_v7_defconfig, then there is no way for each board to have a
different extra env this way.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2021-05-15 6:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 6:46 Trent Piepho [this message]
2021-05-17 7:38 ` Sascha Hauer
2021-05-17 20:57 ` Trent Piepho
2021-05-18 11:40 ` Sascha Hauer
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=CAMHeXxMH8E4ae3HvFtkckJAc_hk1xWBJxMyBxab_OdPRn3y1Vw@mail.gmail.com \
--to=trent.piepho@igorinstitute.com \
--cc=barebox@lists.infradead.org \
/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