summaryrefslogtreecommitdiff
path: root/script/update
AgeCommit message (Collapse)Author
2023-10-12use me_cleaner from coreboot instead of upstreamLeah Rowe
coreboot closely matches upstream, whose current release is version 1.2 from 2018, and coreboot has not changed it in any meaningful way. the upstream did add patches since, but they are documentation patches only. this means: we do not need to use the upstream version Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-10fix warning about coreboot elf/ vs bin/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-10build/fw/coreboot: warning about bin/ versus elf/Leah Rowe
also rename elf/coreboot to something scary some users were flashing roms built under elf/, which lack payloads. lbmk builds no-payload roms (and payloads) under elf/ then inserts them, creating full (flashable) images under bin/ Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-08update/release/*: merge to update/project/releaseLeah Rowe
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-07update/release/roms: copy license files to archiveLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07update/project/*: merge to update/project/treesLeah Rowe
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-07update/project/trees: handle seen in fetch_configLeah Rowe
I'm planning to re-use this function later, in other files, to unify handling of target.cfg files. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07use quotes when checking empty strings in scriptsLeah Rowe
this is far less error-prone Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07update/project/build: move helpers to option.shLeah Rowe
certain functions are better placed there, rather than in the main script Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07build/coreboot/util: merge to update/project/buildLeah Rowe
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-07unified projectname/version/versiondate handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07rename blob/ to vendor/Leah Rowe
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-07update/blobs: correct utils paths checkLeah Rowe
some utils were being needlessly re-downloaded. fix that! Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07update/blobs: don't hardcode kbc1126 util checkLeah Rowe
use the variable that is set up in blobutil.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-07update/blobs: don't needlessly re-build uefitoolLeah Rowe
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-07put all src downloads under src/Leah Rowe
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-06move build/release/* to update/releaseLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06rename build/project/trees to update/project/buildLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-06unify handle/make/* into build/project/treesLeah Rowe
Just one script. Just one. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03update/project/trees: remove errant assignmentsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03update/project/trees: split up main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-03general code cleanup in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/blobs/download: remove errant commentLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/project/trees: fix error handling on mkdirLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/project/trees: optimise error handlingLeah Rowe
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-02update/project/trees: simplified error handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/project/trees: general code cleanupLeah Rowe
reduced sloccount, without reducing functionality Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/project/trees: rm yet another rm lineLeah Rowe
good lord, redundancy is indeed redundant. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/project/trees: remove one more rm lineLeah Rowe
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-02update/project/trees: remove redundant rm commandLeah Rowe
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-02update/project/trees: remove unnecessary linebreakLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-02update/project/trees: rm "seen" in the right placeLeah Rowe
it must be done *after* setting cfgsdir Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-01Greatly simplify error handling in shell scriptsLeah Rowe
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-09-30general code formatting cleanup in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30simplify initialising variables in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30update/*/*: unified scanning of revisions/sourcesLeah Rowe
update/blobs/download and update/project/repo both use the same logic, for setting variables with awk and a specially formatted configuration file. unify this logic under include/option.sh, and use that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: move helpers to include/blobutilLeah Rowe
mkdirs() should be in include/blobutil.sh, as should extract_archive(), because that is primarily where they are used. script/update/blobs/download calls these functions aswell, but it sources include/blobutil.sh so it's OK. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29include/blobutil: try curl first, then wgetLeah Rowe
Don't use only wget. Some systems may only have curl. The user can always install wget anyway, but why not support both? I've added the right user agent string. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29include/blobutil: simplify check_defconfig()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: do IntelME extract in one functionLeah Rowe
Just one function. Just one. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: do final check of _dest in fetch()Leah Rowe
This way, the file is checked regardless of what type of blob is handled, not just Intel ME. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: don't pass dl_path as argumentLeah Rowe
Because fetch() is only called now from blobs/download, we can reliably know what dl_path should be. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blob scripts: unified handling of blob destinationLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29remove unused variables in blob scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29merge include/fetch.sh, blobutil.sh, defconfig.shLeah Rowe
They are only ever used by script/update/blobs/*, so put them all in blobutil.sh. This cuts down on the number of scripts in lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29update/blobs/*: simplify mrc.bin handlingLeah Rowe
mrc.bin is now handled by include/mrc.sh, adapted from now-deleted script/update/blobs/mrc much of the logic has been re-written or adapted for inside script/update/blobs/download mrc links/hashes now defined in config/blobs/sources the new code is simpler (and smaller). in addition, lbmk can now easily handle mrc.bin files for other platforms such as broadwell. watch this space. the full .zip download is now cached, like with other vendor downloads. this means it won't be re-downloaded if it was already downloaded before. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29update/blobs/*: unified download/checksum logicLeah Rowe
Use the same logic between blobs/download and blobs/mrc. The logic is taken from blobs/download. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: remove unnecessary linebreaksLeah Rowe
generally condense the code, but not in a way that makes the code unreadable. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: remove unnecessary messagesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: simplify downloading of filesLeah Rowe
individual functions for downloading each archive have been removed. instead, eval is used in fetch_update(), which is now renamed to fetch(). Signed-off-by: Leah Rowe <leah@libreboot.org>