summaryrefslogtreecommitdiff
path: root/script/update/project/trees
AgeCommit message (Collapse)Author
2023-10-20lbmk: use 2-level directory structure in script/Leah Rowe
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-19minor code cleanup in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-15delete include/vendor.sh and merge elsewhereLeah Rowe
move it all to other files where items are used, and not used anywhere else. this reduces the size of vendor.sh. also remove a few redundant variables, or variables that are not meaningfully used. a few items have been moved to include/option.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-14coreboot: gru: Use default coreboot treeAlper Nebi Yasak
We don't really need a custom coreboot tree for Chromebooks. I had added one, because at a cursory glance to the available config/coreboot/board subdirectories I had the impression that I should. But upstreams have one tree for every board and I think we should move towards that too. Move the one important BL31 makefile patch into the default coreboot patches, update the gru boards' configs by running savedefconfig in the cros tree and then running olddefconfig in the default tree. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-10-14update/project/trees: Add flags for more kconfig actionsAlper Nebi Yasak
Add an "-s" flag for "make savedefconfig", "-l" for "make olddefconfig" and "-n" for "make nconfig" to the update script. The first two are mainly useful for U-Boot, to compare our configs to the upstream defconfigs and stay in sync with any upstream changes. The latter is because the ncurses one has a nice "Symbol Search" that can point out the menu entry for a config symbol we know. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-10-12coreboot/default bump: rev d862695f5f, 12 Oct 2023Leah Rowe
Riku's mSATA patch for HP8300USDT was merged upstream, so the patch has been dropped from lbmk because it is contained within this new coreboot revision. 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/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-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-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/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-30simplify initialising variables in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27move build/command/options to include/option.shLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25only update git submodules in project/treesLeah Rowe
do not update them in project/repos - despite what the previous commit message says, this behaviour is error prone and should be avoided. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/project/*: unified git reset handlingLeah Rowe
With this change, lbmk now also updates submodules on simple git clones, not just multi-tree clones. This is OK, because git does not return non-zero status when git submodule update is ran, where git submodules are not actually defined. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/project/*: unified patch handlingLeah Rowe
Handle patches by a function at include/git.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/project/trees: remove extra.sh handlingLeah Rowe
This functionality has never been used, except in the erstwhile osboot project, and even then only experimentally. It was intended for use with coreboot's gerrit site, but it became Libreboot project policy that this not be relied upon, instead preferring to include patches directly within lbmk. This functionality can be re-added, if necessary. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25Update email address for Leah Rowe copyrightsLeah Rowe
also, some of them were out of date; years now updated. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25Use SPDX license headers on all scriptsLeah Rowe
This results in much cleaner copyright and license declarations. SPDX headers are legally recognised and make auditing easier. Also, remove descriptions of each script, from each script. Libreboot documentation at docs/maintain/ describes them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09update/project/*: remove redundant checksLeah Rowe
these scripts used to be in the main directory of lbmk, and thus needed to check for root user, and also git credentials. now they are called by the main lbmk script, which also runs the same checks. avoid waste of resources by not running the same check twice. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04merge config/ and resources/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-01update the fetch scripts themselvesLeah Rowe
the fetch scripts call themselves, for dependencies Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-01handle project downloads in main lbmk scriptLeah Rowe
this means the unified /tmp handling is now provided for in both the former "fetch" and "fetch_trees" script, which are now (respectively): ./update project repo ./update project trees if the fetch scripts weren't cleaning /tmp before, they now are, because lbmk handles it Signed-off-by: Leah Rowe <leah@libreboot.org>