summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-06-28Revert "vendor.sh: remove unnecessary check"Leah Rowe
This reverts commit 8196ce6ddf4f0c2320cbb0f8ea378dfff0d639c4.
2024-06-28tidy up some setvars listsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28remove more unnecessary checks on trees commandsLeah Rowe
the trees script already performs these checks Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: remove unnecessary checksLeah Rowe
again: the trees script already checks binaries, and already checks sources. if they exist, the relevant action is skipped entirely. we don't need to check it in vendor.sh, because the trees script already performs the same check. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: remove unnecessary commandLeah Rowe
we don't need to download the entire coreboot tree here, because the next command after it builds utils from that tree, using the trees script which would then go and download that tree anyway; this is part of the design. if a given elf binary exists, it won't be re-built, but the missing sources will still be downloaded automatically. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: remove unnecesessary cbutils checkLeah Rowe
the trees script already does this same check, so don't do it in here. defer to the trees script. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: remove unnecessary checkLeah Rowe
mktemp will never return empty output, and the next command after it is an mkdir, which would throw an error anyway, if the string is empty. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: condense check_board() a bitLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor fetch(): condense variable initialisationLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: remove unnecessary cbfstool checkLeah Rowe
the trees script already performs this check Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: simplified cbfstoolref checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28lib.sh: keep versiondate check to 80 charactersLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28lib.sh: condense for loopLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28lib.sh: condense err_() a bitLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28lib.sh: add a return to the end of chkvars()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: rename release to vreleaseLeah Rowe
also remove inject_vendorfiles() and merge it into vendor_download() the "release" variable is included in some target.cfg files, which we put in config/coreboot/ and handle here, so they could conflict with the release variable used in vendor.sh, used for a different purpose. therefore, rename it to "vrelease". Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: unified reading of board configsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: simplify variable check in getcfg()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-28vendor.sh: remove unnecessary cbdir checkLeah Rowe
we don't need to check this, because the trees script already checks it. avoid unnecessary work. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27remove use of _xm variable in the build systemLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: remove unused cbdir variableLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27git.sh: remove unnecessary checkLeah Rowe
the trees script itself will check that the directory exists, and exit with zero status if it does, without doing anything else other than the return. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: move git_err() to buildLeah Rowe
it's only used in the main build script, so move it there. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: condense singletree() a bitLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: add a return to the end of check_defconfigLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: condense e() a bitLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: make elf/coreboot* a dot directoryLeah Rowe
we don't want the user to flash coreboot from elf/, because those images do not contain payloads. the user must flash from bin/ ample warning is given, at build time, but the warning is written in english. therefore, some people may not understand it, because they may not even speak english. hide the coreboot elf/ directory, to mitigate this possibility. in most cases, this will probably prevent the average user from flashing those images, since they likely won't see it. the "DO NOT FLASH" warning is still included in that directory name, while creating it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: simplified TMPDIR handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27lib.sh: condense setcfg() if/else logicLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-25lib.sh: introduce mandatory check of projectnameLeah Rowe
error out if it's not set. ditto projectsite. that way, if the files are accidentally deleted, or not added in a derivative of the build system, you'll know. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-25lib.sh: condense setvars() a bitLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-25simplified lock messageLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-25lib.sh: simplify reading of version filesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-25lib.sh: simplify use of environment variablesLeah Rowe
don't have a separate variable for them. just export them directly and use them directly. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-23lib.sh: fix error running ./build dependenciesLeah Rowe
the e() and setvars() functions need to be declared before the dependencies function. also: after calling install_packages, it was doing a return when it should have done an exit. this is all fixed now. i apologise to anyone who previously ran into trouble with this! Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-22use backticks on eval commands, not subshellsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-22lib.sh: remove badcmd()Leah Rowe
it's bloat. telling the user to rtfm is something that we already do on irc; they will still ask how to do everything, and ignore the message from badcmd(), or they will automatically know to rtfm. i'm on a massive purge, removing bloat from lbmk as part of Libreboot Build System Audit 6. all bloat must go. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-22lib.sh: more unified config handlingLeah Rowe
replace it with logic that simply uses "." to load files directly. for this, "vcfg" is added as a variable in coreboot target.cfg files, referring to a directory in config/vendor/ containing a file named pkg.cfg, and this file then contains the same variables as the erstwhile config/vendor/sources config/git files are now directories, also containing pkg.cfg files each with the same variables as before, such as repository link and commit hash this change results in a noticeable reduction in code complexity within the build system. unified reading of config files: new function setcfg() added to lib.sh setcfg checks if a config exists. if a 2nd argument is passed, it is used as a return value for eval, otherwise a string calling err is passed. setcfg output is passed through eval, to set strings based on config; eval must be used, so that the variables are set within the same scope, otherwise they'd be set within setcfg which could lead to some whacky results. there's still a bit more more to do, but this single change results in a substantial reduction in code complexity. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20vendor.sh: more cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20vendor.sh: correction (s/scancfg/scan_config)Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20git.sh: revert modification to for loopLeah Rowe
i tried to be clever with this one, but it just made the script exit with an error. revert back to the old check (check whether one of either repo or repo backup is set) Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20vendor.sh: minor code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20minor code cleanup in the build systemLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20git.sh: general code cleanup in fetch_submodule()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20git.sh: reduced indentation on repo/file checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-20git.sh: simplified repo/backup checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-17roms: remind the user about gkb filesLeah Rowe
nowadays, we don't insert GRUB keymaps automatically, for sake of efficiency; without one, the default is US QWERTY. a user will only want one keymap in particular, so this is more efficient. in practise, they're either building from source anyway, or using the inject scripts which compile cbfstool anyway, so the user will already have cbfstool. also output this message from the inject script. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-16unify coreboot elfdir (DO_NOT_FLASH)Leah Rowe
use a common string when setting this path Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-15roms: unify all add-payload commandsLeah Rowe
add a generic function that can insert payloads with lzma compression, or raw files without compression Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-14unified checks for variable initialisationLeah Rowe
new function chkvars() does the job Signed-off-by: Leah Rowe <leah@libreboot.org>