Commit Graph

41 Commits (abe33ce0ba1839f0bfa2d0cbfedca816c476fb86)

Author SHA1 Message Date
Leah Rowe abe33ce0ba support making u-boot-only tarballs in releases
./update release -m u-boot

if someone just wants to make u-boot, they can
use this and it tars up all the trees.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-02-07 03:12:24 +00:00
Leah Rowe 7f0ca5455a Libreboot 20240126
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-26 11:16:01 +00:00
Leah Rowe 435441d04b update/release: generate changelogs
use the git log, as follows:

git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' --abbrev-commit

this creates a nice, uniform list of changes.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 22:05:41 +00:00
Leah Rowe 09bed9a4c3 REMOVE MAINBOARD: lenovo x201
with neutered ME, fan control fails. while there are
ways to mitigate it, many users will not, and will
likely see their system overheat, which is very
dangerous.

this bug (failed fan control on neutered ME) only
affects arrandale machines such as lenovo x201.
the newer machines are not affected by this.

other arrandale machines will probably not be added
to libreboot because of this, or they will be subject
to further testing.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-12 16:08:56 +00:00
Leah Rowe 34ded35fa6 lbmk scripts: general code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-28 16:34:45 +00:00
Leah Rowe 0aca6332ee lbmk scripts: shorter code lines
while seemingly pedantic, this does actually make code
easier to read. mostly just switching to shorthand for
variable names, where no expansions or patterns are used

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-24 09:04:36 +00:00
Leah Rowe b4ab30577f lbmk scripts: general code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-24 06:32:19 +00:00
Leah Rowe 9d5d98ebae set version/projectname properly
lbmk used to set version/versiondate directly in
err.sh, but now it's handled there by a function,
which is called by the main script.

script/update/release hadn't yet been adapted. the
only change necessary is to call check_project()

script/update/trees also makes use of it

script/build/roms is using "projectname"

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23 08:54:45 +00:00
Leah Rowe f44b99c808 don't delete microcode updates in rom images
at present, lbmk can remove microcode updates on images for
a given target, if the target specifies
microcode_required="n" in target.cfg

lbmk then provides images with microcode, and images without,
in a given release. although the user can also remove them
manually, this just makes it a bit more convenient, for those
users who do wish to run without the updates. this functionality
is provided only on those platforms where no-microcode is tested.

well, this behaviour implements a compromise on libreboot policy,
which is to always include microcode updates by default. see:
Binary Blob Reduction Policy

the *canoeboot* project now exists, developed in parallel with
libreboot, and it ships without microcode updates, on the same
targets where lbmk also handled this.

running without microcode updates is foolish, and should not
be encouraged. clean up lbmk by not providing this kludge.

the libreboot documentation will be updated, telling such users
to try canoeboot instead, or to remove the update from a given
libreboot rom - this is still possible, and mitigations such as
PECI disablement on GM45 are still in place (and will be kept),
so that this continues to work well.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23 06:59:48 +00:00
Leah Rowe 72cd169ee5 update/release: don't test ./vendor inject
the purpose of script/update/release is not to test the
build system, but to build release archives.

testing of lbmk is done during the course of development.

remove this bloat from the release script. we run the nuke
mode anyway, to scrub blobs from releases, which will more
or less test the logic in that script (the only difference
is that it runs e.g. ifdtool --nuke instead of -i).

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23 04:41:25 +00:00
Leah Rowe e8eb52f8d7 update/release: don't insert crossgcc tarballs
why are we distributing gcc at all?

the coreboot build system downloads it at build time,
and the GNU rsync mirrors aren't going anywhere.

simplify script/update/release by not handling gcc.
this means: release archives will no longer contain gcc.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23 04:29:50 +00:00
Leah Rowe ab65ea4c99 general code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-22 10:24:00 +00:00
Leah Rowe 9c00746ba9 update/release: minor cleanup
remove unnecessary "continue" command. it's written
at the end of a for loop, where it'll continue anyway

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-19 02:45:41 +00:00
Leah Rowe 39a3de574a remove DEBUG handling in lbmk (not needed)
all it did was set -v in the shell, which doesn't yield
very useful results. this is a relic of very old design
in the libreboot build system, that is no longer needed.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-16 07:58:13 +00:00
Leah Rowe 1eb4df6748 fix several shellcheck warnings
lbmk didn't quote certain arguments in commands, or
used ! -z instead of -n, things like that. simple fixes.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-16 07:56:26 +00:00
Leah Rowe 2e779a5495 handle errors on exits from subshells
most of these are probably redundant, and will never
be called, but lbmk needs to be as safe as possible
under fault conditions. fail early, fail hard.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-11 05:21:27 +00:00
Leah Rowe 931d646df7 Libreboot 20231106
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-11-06 00:55:49 +00:00
Leah Rowe d5a3abdb80 put docs under docs/ in releases (not src/docs/)
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-11-06 00:04:13 +00:00
Leah Rowe 1f1498be74 Libreboot 20231101
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-11-01 16:36:16 +00:00
Leah Rowe 42fde8e574 update/release: insert fake x201 me.bin
this makes the build work, for releases.

this is not done during regular builds, only releases.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-31 20:13:35 +00:00
Leah Rowe e86af9a60a 20231021hotfix: replace x_ with err in some places
keymaps weren't being set in keymay.cfg of cbfs, due
to use of x_ in the rom script, and x_ doesn't handle
quotes or spaces in arguments well.

i'm going to remove use of x_ and xx_ (it's in my todo),
for next release.

for now, hot patch the release. i've gone through and
replaced use of x_ with || err, in some places.

not just the keymap.cfg command, but others too. in case
there are more issues we missed.

this commit is being tagged "20231021fix" and i'm using
this tag to re-build the 20231021 release. i'll just
replace the tarballs in rsync and add errata to the news
page announcing the release. all i did was break peoples
umlauts, i didn't brick their machines fortunately!

very minor bug. anyway, x_/xx_ is a great idea, but sh
isn't really designed for that style of programming. i'll
go back to using just || err in the next release.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-22 12:34:45 +01:00
Leah Rowe 23958f4eae Libreboot 20231021
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-21 02:08:12 +01:00
Leah Rowe 5162b912b2 update/release: clean up temporary crossgcc dir
clean it up after copying the tarballs

i really hate how this logic is written, it's clunky
but it should work; the only issue is that it's quite
slow, and inefficient on use of disk space.

however, i've not yet figured out how to reproducible
add files to a tarball, once the tarball has been created,
and i rely on sorting (of file names) when creating them.

it's really not a problem because normal people won't
use this script, only i or anyone who wants to test out
the libreboot release infrastructure. this script is
largely intended to *work*

but i'm still annoyed by how crappy it is. i'll fix it
after the Libreboot 20231021 release.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 21:55:57 +01:00
Leah Rowe c7e764a3f0 update/release: confirm vdir path on exit
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 12:09:31 +01:00
Leah Rowe 1c8b2114cc update/release: copy crossgcc to archive
everything downloaded, then tarballed, then built,
now crossgcc is downloaded by coreboot.

now extract, copy crossgcc tarballs, re-compress.

TODO: simply add files to the archive, without re-
compressing the whole thing.

this is still more efficient than the old way: build
everything, then clean and compress, making another
build test on the release archive necessary; with this,
there is still only one build test per release.

with this, and the previous revisions dealing with
submodules, the source archives should now be complete.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 12:08:36 +01:00
Leah Rowe 54a05fc167 always re-generate .git in lbmk
in release archives, .git is excluded but the version
and versiondate files are included. from these, the
git history is re-created with the exact date (but not
taking into account timezone, at present).

in this way, lbmk will have git history in a release
archive. some build systems, like coreboot, prefer that
there be git history available, so this is a nice
workaround on those build systems.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 11:16:25 +01:00
Leah Rowe 782371a59c update/release: delete *all* .git and .gitmodules
do it using find -exec

this is more robust, and it will never need to be
maintained over time (famous last words).

this is done because now we download submodules
for all git projects, so it's hard to predict.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 09:27:27 +01:00
Leah Rowe 0c32c1d643 update/release .git/*: delete one more level up
it couldn't hurt

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 07:44:27 +01:00
Leah Rowe 0375cfaf1c update/release: don't hardcode project names
config/git has been re-arranged in a prior revision,
ensuring that each file only refers to a main source
tree defined within those files.

the erstwhile "./build clean all" functionality is now
once again possible in lbmk

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 07:37:51 +01:00
Leah Rowe d245e0b1b4 consistent naming for src/pico-serprog
don't ever name it rpi-pico-serprog

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 06:49:59 +01:00
Leah Rowe 4e54a051ef another code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 03:29:55 +01:00
Leah Rowe 8d9aeef3de lbmk: use 2-level directory structure in script/
as opposed to the current 3-level structure.

recent build system simplifications have enabled
this change, thus:

./build fw coreboot -> ./build roms
./build fw grub -> ./build grub
./build fw serprog -> ./build serprog
./update project release -> ./update release
./update project trees -> ./update trees
./update vendor download -> ./vendor download
./update vendor inject -> ./vendor inject

alper criticised that the commands were too long,
so i made them shorter!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20 01:00:38 +01:00
Leah Rowe d1ba94ea08 update/release/*: merge to update/project/release
The logic has been re-written, where source archives are
concerned. This clones the current repository, and starts
a new build from scratch. A custom release directory is
possible, by passing -d

This eliminates a step during build-testing, saving hours
of time, because it builds the release archive *inside* the
release archive, with git files removed, thus replicating
the same setup that the user would have.

This also makes everything a bit more consistent, because
it's guaranteed that a release archive will always have
the same files; previously, the release build script would
only copy what was already built, without building anything.

Now, this script builds everything itself.
The script also builds serprog images, not just coreboot.

Usage:

./update project release

If -d is not passed, release/ is used inside lbmk.

Otherwise, you could do:

./update project release -d /path/to/directory

If the directory exists, this script will exit (error).

Other minor fixes: build/fw/coreboot: make version in
coreboot-version (file) not contain hyphens, to work
around a quirk in coreboot's build system when not building
on regular libreboot releases. this quirk only appears
when lbmk is not being compiled under git.

The other main benefit of this change is that the new
script will probably require a lot less maintenance.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-08 08:08:39 +01:00
Leah Rowe 92abbb25fe update/release/roms: copy license files to archive
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 11:10:39 +01:00
Leah Rowe 1e89264ce3 update/project/*: merge to update/project/trees
Just one script.

Just one!

Well, two, but the 2nd one already existed:
logic in update/project/trees and
update/project/repo was merged into
include/git.sh and update/project/build
was renamed to update/project/trees; an -f
option was added, which calls the functions
under git.sh

so git clones are now handled by the main build
script (for handling makefiles and defconfigs)
but the logic there is a stub, where git.sh
does all the actual heavy lifting

this cuts the file count down by two, and reduces
sloccount a reasonable amount because much of
the logic already exists in the build script, when
it comes to handling targets. git.sh was adjusted
to integrate with this, rather than act standalone

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 10:26:11 +01:00
Leah Rowe 4708da2ca9 use quotes when checking empty strings in scripts
this is far less error-prone

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 05:37:11 +01:00
Leah Rowe 0ed2ec294b build/coreboot/util: merge to update/project/build
The benefit now is that it can be cleaned. E.g.

./update project build -b coreboot utils
./update project build -b coreboot utils default
./update project build -c coreboot utils
./update project build -c coreboot utils default

the update/project/build script checks when arguments
are provided after the project name. if the first one
is "utils", then it acts in the same way as the old
build/coreboot/util script

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 05:04:55 +01:00
Leah Rowe fa8e204f14 unified projectname/version/versiondate handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07 02:46:47 +01:00
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 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 2d483d2f5c move build/release/* to update/release
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06 02:33:53 +01:00