| Age | Commit message (Collapse) | Author |
|
this solves all remaining problems. defscan is set
reliably now, and real builds are done. configless
builds are skipped, but mkhelpers are still executed.
lbmk should hopefully be stable now. at the very
least, it won't escape your work directory now.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
right now, the base dir for configs isn't being
initialised properly, leading to traversal of
the user's / directory
whoops indeed. fixed now.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
this implements the previous reverted fix, but
only for coreboot.
it's done tree-wide, but individual projects must
handle it in their mkhelpers, via if_not_skip_build
if_not_skip_build *does* universally control whether
make is executed, but not make-clean.
now we can do:
./mk -b coreboot default
this will effectively do the same thing as -d,
because no config is available there. otherwise,
we try to do -b with a config, where none exists.
if noconfig is set, then we ignore this, because
no config will ever be used.
when noconfig isn't set, it is assumed that we must
always have a config for building.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
this introduced too many bugs. i have a better way.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
otherwise, -d coreboot default dosen't work for
example, which prevents building coreboot utils.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
this is where i put it before. it only needs
to be here.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
This reverts commit 8c50373d5977d630626b14719977dc51a3ae2bdf.
|
|
this removes stale .config files in coreboot src
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
only do if config=y. this reintroduces a hack that
i accidentally removed in the recent redesign.
grub has been changed to noconfig=y, and the files
for memdisk are now source from config/data/grub
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
otherwise, fetching won't work!
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
don't execute mkhelpers either
skip is fetched. this means that if a given
target says release=n, the corresponding source
won't be downloaded. if no targets specify that
source, then none will be.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
otherwise, dry builds are conducted, which pollutes
src tarballs.
this was a regression introduced by the recent
multi-tree-only design change. this should hopefully
be the only regression.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
we currently distinguish, by virtue of logic, multi-
and single-tree projects. this introduces a lot of
complexity, so the following patch has removed this
distinction. all single-tree projects are now multi
tree, but with only one tree.
other design changes:
config/git removed. rev/tree now handled with mkhelper
and target configs. this allows per-tree remote handling,
so we could (for example) add the mrchromebox coreboot
fork easily, for specific chromebook models.
config/project is now config/module/project. this
cleans up the main config/ directory.
cfgname variable: .config no longer hardcoded when
doing configs in projects. it is configurable with
this variable. if unset, the previous .cfg is used
noconfig variable: set this in target/mkhelper
configs, and config/module/project/tree/config/ is
unused; instead, make is called without config copying.
a "noconfig" placeholder is used. this enables cleaner
usage of previously single-tree projects in the new
multi-tree-only structure.
cfgvars: variables reinitialised in project config are
cleaned more reliably. in particular, several variables
e.g. autogenargs were not being reset between projects,
although the autogenargs variable is currently unused.
general cleanup has been conducted across the build
system, as part of this redesign. several parts of the
build system more over-engineered as a result of the
previous design, and the new design enabled a severe
reduction in sloccount (75 lines reduced in lbmk).
yes, this change *adds features* but there are fewer
lines of code than before. this is the best kind of
change. way better than the 3-line-diff. yes.
rev= and tree= are set more centrally in configs. the
mkhelper config can be used to set url/url_bkup, but
individual trees can override them.
configs have been cleaned up, with several variables
now much more heavily centralised. config/git/ was
used before to first download the bare repository, and
then the real clone was made with patches. this allows
git repositories to be cached for future re-builds.
with config/git/ gone, the download logic for projects
is more centrally implemented. a separate call to ./mk -f
is no longer performed, and in fact ./mk -f never needs
to be used anymore as a result. ./mk -f now is basically
the same thing as -b, just without any action performed.
this change will allow rapid expansion of the libreboot
project. i want to add hundreds of chromebooks to the
project, using mrchromebox, but the previous design did
not permit this. this change means that i can easily have
unlimited upstreams per project. coreboot will, in some
follow-up changes, have the following upstreams:
coreboot/default: coreboot.org
coreboot/fam15h: 15h.org fork
coreboot/chromebook: mrchromebox fork
this can now be done freely without massive changes to
the build system. under the previous design, i worked on
a now-abandoned patch to do N remotes per project, reading
repo links from a file. this meant that i'd have coreboot.org
first (main and backup), then mrchromebox. this meant that
lbmk would failover through to mrchromebox, wasting time
for the user.
this new design is much cleaner, and will enable the
project to be maintained much more easily.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
sh macros are cool
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
note: mecleaner check removed in vendor.sh, because
it's already guaranteed to be fetched. the check will
never indicate failure, so we can just assume that
the me cleaner python script exists.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
very unlikely not to have it, but we deal in
certainty, not rm -Rf /
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
defconfig file test unnecessary in check_defconfig
because it's already checked in handle_defconfig
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
merge check_cmake with run_make_command_real
tidied up some redundant checks
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
when calling ./mk, or from PATH, an absolute path
is created to ./mk
this will likely be different than mk, but it might
be a different script. perhaps the operator is making
a copy of the mk script temporarily - obviously not
advised, no, but here we have a problem because then
lbmk is still running ./mk everywhere
run arg0 instead, now called "mk"
./mk is still hardcoded in release.sh, because we
do need to make sure we're using the right script
there
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
really pointless doing it here. do it in the loop.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
e.g. biosutilities
the subshell screws up error handling. this
patch changes it to old behaviour.
some projects don't have makefiles. the
non-zero exit also prevents further call
to copy_elf when no binaries are created,
as in this example.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
the user never runs these. it's not needed. the design
of lbmk already cleans everything, or caches everything,
between builds. everything cached out of tree.
it's not expected to ever need to clean manually, so just
remove the option. knobs are for nobs.
releases don't need it either, because we tar everything
before building, thus eliminating all build artifacts.
we do this on a fresh copy of lbmk on ./mk release
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
this was the previous behaviour, and prevents
single-tree builds from proceeding with
use of copy_elf
otherwise you get a bunch of build errors
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
no point using distclean, because the context there
is providing clean sources for distribution, but we
use ./mk release which tars everything up before ever
running any build commands.
make-clean is enough
distclean is a stupid gnuism anyway, and most makefiles
that have it will just do the same as clean anyway
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
tidy it all the way up
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
yeah, this reverses the last change
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
only check makefiles if if_not_make_clean is set
this avoids unnecessary disk usage
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
on dry builds, if_not_make_clean will also be empty
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
just the right amount of absurd
this is why i don't need to use python
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
in practise, it was always correct because on projects
that used coreboot xgcc, the tree would always be called
default.
however, this is a bug. the logic uses a correct directory
name for coreboot in src/, but not elf/
this patch makes the two consistent, programattically.
this is therefore a preventative bugfix.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
libreboot's policy is to thoroughly clean sources per
build, because we cache builds out of tree and avoid
re-builds if they exist; these and the sources are
deleted if metadata in config/ changes per project,
tree and/or target.
the problem is that this change only affects lbmk.git
it doesn't affect release archives, where project sources
do not have git-init applied to them. this will be
addressed.
can't use it on coreboot, because it will delete xgcc
tarballs in a way currently not handled, and handling
it will mean adding a project-specific hack.
the xgcc tarballs could be built out-of-tree, and this
will have to be done, otherwise coreboot will have to be
made gitclean="y" for now.
everything else is fair game.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
yes, make it generalised. use a new variable in
mkhelper.cfg, gitclean and gitcleanargs
not enabled by default, but u-boot enables it. i'm
considering whether to use this by default, as it
is the general policy of lbmk to clean everything
just after a build, as builds are cached out of
tree. this way, we can do re-builds safely for each
project. there are probably a lot of subtle bugs that
might be fixed if we used this
the problem is that this is currently only used on
lbmk.git, but not on libreboot release archives which
lack .git directories; the main one is initialised in
lbmk, but not in upstream sources. we could just initialise
those.
in fact, that is probably what i'm going to do.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
totally worthless
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
i had this before. forgot to add it in the new
design. oops.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
i love eval, printf and awk
eval, printf and awk are the best things ever
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
yes, just awk everything, double-quoted
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|