these variables are initialised empty, then populated
by reading a configuration file.
it may be that in some cases, we want these variables
to be empty. besides that, the "setcfg" command before
it will throw an error if the module file is missing,
and it is assumed that the variables would be set there.
Signed-off-by: Leah Rowe <leah@libreboot.org>
testing +x is all well and good, but the variable string
may be empty, even if set. some of the checks in the build
system are relying on the latter, so handle it.
Signed-off-by: Leah Rowe <leah@libreboot.org>
the current check is flawed, because if u-boot doesn't
exist, but a given build would be the file verified by
the first check, the check would still fail even after
then building u-boot.
building it first will make this check pass, under such
a condition.
Signed-off-by: Leah Rowe <leah@libreboot.org>
instead, make it a helper function, defined in target.cfg
this means that we can also do the same with other projects
in the future, and it is expected that we will have to.
these helper functions are used in cases where we want
additional actions to be performed.
actually, the helper could be anything. for example, you
could write:
mkhelper="./build foo bar"
and it would do that (at the point of execution, PWD
is the root directory of the build system)
Signed-off-by: Leah Rowe <leah@libreboot.org>
the script used to support building multiple single-tree
projects, but this behaviour was buggy and unused, so it
was removed.
rename the build_projects variable accordingly.
Signed-off-by: Leah Rowe <leah@libreboot.org>
it was always by design that an error should occur, if a
target.cfg file does not exist on multi-tree projects,
but we previously did not support target.cfg files on
single-tree projects.
single-tree target.cfg support was later added, and it was
done by making target.cfg optional there, but i accidentally
made it optional on multi-tree projects.
in practise, all multi-tree projects included target.cfg,
but this was not being enforced in code.
this patch should fix the issue.
Signed-off-by: Leah Rowe <leah@libreboot.org>
set it to "auto", because otherwise it'll be unset,
which means that kconfig type is assumed.
the build system is designed in such a way that multi-tree
is assumed, if the target build system uses kconfig files.
target.cfg is optional on single-tree but not multi-tree,
so it's ok to set something here.
basically, kconfig-type projects will never be single-tree.
Signed-off-by: Leah Rowe <leah@libreboot.org>
don't hardcode the check based on whether the current
project is grub. instead, define "btype" in target.cfg
if unset, we assume kconfig and permit kconfig commands
e.g. make menuconfig, make silentoldconfig, etc
this is to avoid the deadliest of sins:
project-specific hacks
Signed-off-by: Leah Rowe <leah@libreboot.org>
the trees script itself will check that the directory
exists, and exit with zero status if it does, without
doing anything else other than the return.
Signed-off-by: Leah Rowe <leah@libreboot.org>
we don't want the user to flash coreboot from elf/, because
those images do not contain payloads. the user must flash from
bin/
ample warning is given, at build time, but the warning is written
in english. therefore, some people may not understand it, because
they may not even speak english.
hide the coreboot elf/ directory, to mitigate this possibility.
in most cases, this will probably prevent the average user from
flashing those images, since they likely won't see it.
the "DO NOT FLASH" warning is still included in that directory
name, while creating it.
Signed-off-by: Leah Rowe <leah@libreboot.org>
we override TMPDIR, setting it to /tmp/xbmk*C
if it's just set to tmp, that means we didn't set it properly,
which is a bug.
this patch protects against deletion of /tmp under such a
fault condition, if it were ever to occur in the future.
Signed-off-by: Leah Rowe <leah@libreboot.org>
the current logic for handling multiple single-tree projects
is quite error-prone, and uses recursion.
since we don't actually use it this way, remove that feature.
the most correct way to do it is with a for loop.
Signed-off-by: Leah Rowe <leah@libreboot.org>
doing nothing means that if a flag is passed, and then
another flag overriding it, the resulting action will
not be correct; only one flag should be provided anyway,
but some users may feel a bit more adventurous.
mitigate it.
Signed-off-by: Leah Rowe <leah@libreboot.org>
otherwise, release=n is ignored and an image is built in
the elf/ directory, even if it's still skipped for bin/
avoid doing unnecessary work per-release by checking the
variables before building coreboot via script/trees
Signed-off-by: Leah Rowe <leah@libreboot.org>
error out if it's not set. ditto projectsite.
that way, if the files are accidentally deleted, or not
added in a derivative of the build system, you'll know.
Signed-off-by: Leah Rowe <leah@libreboot.org>