Commit Graph

1048 Commits (62cc895c3c293011c256bb8c45cc4c07797cbf36)

Author SHA1 Message Date
Leah Rowe 62cc895c3c rename blob/ to vendor/
in the future, we may start downloading files that aren't
blobs, such as mxm port configs (on mainboards that use
MXM graphics)

this directory will contain all of those files

generally change the language used, across lbmk, to make
use of "vendorfile" instead of "blob"

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 01:23:11 +01:00
Leah Rowe 3c7e37b15d update/blobs: correct utils paths check
some utils were being needlessly re-downloaded.
fix that!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 00:47:42 +01:00
Leah Rowe 5e81024e97 update/blobs: don't hardcode kbc1126 util check
use the variable that is set up in blobutil.sh

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 00:46:38 +01:00
Leah Rowe 9f8f230b61 update/blobs: don't needlessly re-build uefitool
during the switch to src/ for all downloads, i
overlooked that the path check was hardcoded.

now the check for this binary is corrected.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 00:45:34 +01:00
Leah Rowe fe502da944 Rename blobs/ to blob/
We don't have a directory names "srces", just "src".

Ditto ecs, mrcs <-- it's just ec and mrc

When referring to a file, e.g. blob/t1650/me.bin, that
makes much more sense, because it's a single blob, not
multiple blobs.

Don't pluralise what isn't plural

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 00:22:09 +01:00
Leah Rowe 4e39d5a5a8 put all src downloads under src/
build/release/src was partly re-written to accomodate this

memtest86plus was patched to have a central Makefile, and
lbmk modified to use that, rather than mess with build32
and build64. the central Makefile just builds both targets
or cleans both targets

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 00:11:21 +01:00
Leah Rowe 965b6a7ed7 rename build/firmware/ to build/fw/
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 03:32:38 +01:00
Leah Rowe 5494ffb3d1 build/firmware/coreboot: confirm compiled roms
return with error status if no images were compiled

if a rom image fails to compile, then it will also
exit with error status, but sometimes you can pass
argument "cros" or "default", and it would not give
you rom images due to no target.cfg files, but these
are also ignored because of that.

this restores the same behaviour that existed before,
for this final error check.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 03:03:31 +01:00
Leah Rowe ce10c1b38c build/firmware/coreboot: support "all" without all
with no argument specified, it is now possible to build
every rom image.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 02:53:37 +01:00
Leah Rowe 2d483d2f5c move build/release/* to update/release
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 02:33:53 +01:00
Leah Rowe 315d0c4572 mv build/fw/serprog,build/boot/roms build/firmware
./build boot roms is now: ./build firmware coreboot

./build fw serprog is now: ./build firmware serprog

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 02:26:18 +01:00
Leah Rowe 863081c369 remove build symlink, rename lbmk to build
re-link update to build

build/update are the only two build modes now

i'm on a crusade to reduce the number
of files and directories, and reduce the number
of source lines, while not reducing functionality

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 02:12:52 +01:00
Leah Rowe 2d16e1ee47 rename build/project/trees to update/project/build
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 01:59:13 +01:00
Leah Rowe 1c2de7f962 unify build/grub/* to build/coreboot/grub
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 01:34:14 +01:00
Leah Rowe 176722a841 unify handle/make/* into build/project/trees
Just one script.

Just one.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 01:16:39 +01:00
Leah Rowe 9d419e77a0 handle/make/*: unified main() function
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-05 22:51:05 +01:00
Leah Rowe 106841024a general code cleanup in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-05 22:16:07 +01:00
Leah Rowe cad7648a26 build/boot/*: merge all logic into one script
for the first time ever, this is a single script.
with recent simplifications in how variables are
handled, and techniques i've developed during
auditing, it's now feasible design-wise for this
to be a single script, without a helper script.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-05 03:48:05 +01:00
Leah Rowe 923a96c18e check git/version: properly call err()
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-04 10:02:59 +01:00
Leah Rowe 1223bfaeef check_git: call fail() first (fallback to err)
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-04 10:00:12 +01:00
Leah Rowe 727dc7ff2f more verbosely print git config error
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-04 09:57:42 +01:00
Leah Rowe fbd464b4f7 include/err.sh: checkgit,checkversion
call these as functions, instead of executing scripts

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-04 08:06:10 +01:00
Leah Rowe e638c3e411 update/project/trees: remove errant assignments
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03 13:36:48 +01:00
Leah Rowe 68e1787cec update/project/trees: split up main()
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03 13:21:30 +01:00
Leah Rowe 5de8eda21c general code cleanup in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03 12:59:49 +01:00
Leah Rowe 334aa1f7c9 handle/make/config: fix formatting on variables
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03 03:10:40 +01:00
Leah Rowe 8097baa0bd handle/make/file: check for all default makefiles
Previously, this script only checked for "Makefile",
but "makefile" is another valid name; additionally, if
GNU Make is used, "GNUmakefile" is an accepted default.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 23:46:20 +01:00
Leah Rowe 0db6c0a4a8 update/blobs/download: remove errant comment
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 22:39:25 +01:00
Leah Rowe 3af63fb8b7 handle/make/file: exit 0 if no makefile
There is no reason to err if no Makefile exists.

Just exit with zero status. This makes the following
command work:

./handle make file -c util/*

Within util/, there is me7 update parser which does
not have a makefile (it's a python script).

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 22:37:09 +01:00
Leah Rowe ad74b4c281 handle/make/file: run extra arg before, not after
The previous patch to the file was correct, except for
off by one at the end, resulting in no argument being
passed for project names.

Now the extra commands are run *before* handle_dependencies,
instead of running at the end of main. This prevents error.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 22:21:42 +01:00
Leah Rowe 2e60e11798 grub.cfg: disable the pager
The pager causes trouble in some cases, where the user has
to press enter at boot time depending on the configuration.

Interactive use is one thing, but we should leave this
disabled for smoother experience. If the user *wishes* to
use the shell, they can always just enable the pager
themselves by doing:

set pager=1

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 22:03:10 +01:00
Leah Rowe d9719cae49 handle/make/file: do multiple project arguments
At the end of the function, this script will now
run itself again if there are more arguments. This
enables the following:

./handle make file -c project1 project2 project3

Whereas previously, it could only do this:

./handle make file -c project1

Substitude -b and it's the same.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 22:00:59 +01:00
Leah Rowe cb29c96c74 lbmk: simplify/correct exit commands / cleanup
general code cleanup, but a few exit commands were also
wrong. for example, relying on listitems to always return
zero status and then calling lbmk_exit 1

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 09:03:10 +01:00
Leah Rowe 9dce8236ef update/project/trees: fix error handling on mkdir
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 05:56:14 +01:00
Leah Rowe 0f86a393ac update/project/trees: optimise error handling
some x_ calls are made that aren't needed. this is now
corrected. additionally, some x_ calls were being made
that are quite error-prone, like ones that use $PWD.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 05:47:49 +01:00
Leah Rowe 67ac799d49 update/project/trees: simplified error handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 05:21:20 +01:00
Leah Rowe d38b958d7a include/err x_(): more verbose error message
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:57:51 +01:00
Leah Rowe 8886f9958f include/err: remove unused variable
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:56:53 +01:00
Leah Rowe cd2caecb73 update/project/trees: general code cleanup
reduced sloccount, without reducing functionality

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:53:22 +01:00
Leah Rowe bcbd3734b3 update/project/trees: rm yet another rm line
good lord, redundancy is indeed redundant.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:43:18 +01:00
Leah Rowe 0a63dce35e update/project/trees: remove one more rm line
the one at the end of main is unnecessary, because
it's handled inside the for loop.

this file isn't used anywhere else, so it's OK.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:41:48 +01:00
Leah Rowe 91c0f942f3 update/project/trees: remove redundant rm command
as it turns out, i delete "seen" inside the for loop,
which is a more thorough way to do it.

thus, the first rm command is unnecessary.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:40:11 +01:00
Leah Rowe 7bead4f55a update/project/trees: remove unnecessary linebreak
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:38:55 +01:00
Leah Rowe 1dd97470e7 update/project/trees: rm "seen" in the right place
it must be done *after* setting cfgsdir

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:37:29 +01:00
Leah Rowe a3b3196d6c build/grub/payload: remove unnecessary linebreaks
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:32:50 +01:00
Leah Rowe 3fcad603b2 build/coreboot/utils: remove unnecessary check
the file check is sufficient (target.cfg)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:17:50 +01:00
Leah Rowe 0a711ebc66 build/coreboot/utils: simplify argument handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 04:16:43 +01:00
Leah Rowe 7ce3f93e44 build/boot/*: unify more logic in main()
slight sloccount reduction. light renaming of
functions between the two scripts, placing more
logic in main() under include/boot.sh

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 03:54:39 +01:00
Leah Rowe 7b02bb9aa6 do not handle errors on mktemp in shell scripts
errors are not defined for mktemp, and the /tmp file
system should be assumed reliable.

if /tmp is *unreliable*, then this is not something that
lbmk either can or should fix; the user clearly has
bigger problems.

manpages for mktemp do not define errors. it is assumed
to be completely reliable.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02 03:39:10 +01:00
Leah Rowe 8c03b886c4 Greatly simplify error handling in shell scripts
Instead of having detailed error messages, run most
commands through a function that calls err() under
fault conditions.

Where detail is still required, err() is still called
manually. Where it isn't, the error message is simply
whatever command was executed to cause the error.

This results in a massive sloccount reduction for lbmk;
specifically, 178 sloc reduction, or a 8.1% reduction.
The total sloccount is now 2022, for shell scripts.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-01 22:47:02 +01:00