summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-27trees: don't hardcode use of mkpayload_grubLeah Rowe
instead, make it a helper function, defined in target.cfg this means that we can also do the same with other projects in the future, and it is expected that we will have to. these helper functions are used in cases where we want additional actions to be performed. actually, the helper could be anything. for example, you could write: mkhelper="./build foo bar" and it would do that (at the point of execution, PWD is the root directory of the build system) Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: simplify single/multi handling in main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: rename build_projects to build_projectLeah Rowe
the script used to support building multiple single-tree projects, but this behaviour was buggy and unused, so it was removed. rename the build_projects variable accordingly. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: err if target.cfg not given if multi-treeLeah Rowe
it was always by design that an error should occur, if a target.cfg file does not exist on multi-tree projects, but we previously did not support target.cfg files on single-tree projects. single-tree target.cfg support was later added, and it was done by making target.cfg optional there, but i accidentally made it optional on multi-tree projects. in practise, all multi-tree projects included target.cfg, but this was not being enforced in code. this patch should fix the issue. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: set btype if target.cfg doesn't existLeah Rowe
set it to "auto", because otherwise it'll be unset, which means that kconfig type is assumed. the build system is designed in such a way that multi-tree is assumed, if the target build system uses kconfig files. target.cfg is optional on single-tree but not multi-tree, so it's ok to set something here. basically, kconfig-type projects will never be single-tree. 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-27roms: remove unnecessary assignment to cbdirLeah Rowe
cbdir isn't used in this script Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: avoid kconfig make commands genericallyLeah Rowe
don't hardcode the check based on whether the current project is grub. instead, define "btype" in target.cfg if unset, we assume kconfig and permit kconfig commands e.g. make menuconfig, make silentoldconfig, etc this is to avoid the deadliest of sins: project-specific hacks 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-27trees: condense elfcheck() a bitLeah 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-27trees: shorten the final confirmation messageLeah Rowe
must stay below 80 characters per line 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-27build: don't rm TMPDIR if it's /tmpLeah Rowe
we override TMPDIR, setting it to /tmp/xbmk*C if it's just set to tmp, that means we didn't set it properly, which is a bug. this patch protects against deletion of /tmp under such a fault condition, if it were ever to occur in the future. 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-27trees: remove redundant space in printfLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: explicitly err if OPTARG is not setLeah Rowe
we currently rely on -e to make this happen Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: only permit one single-tree projectLeah Rowe
the current logic for handling multiple single-tree projects is quite error-prone, and uses recursion. since we don't actually use it this way, remove that feature. the most correct way to do it is with a for loop. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: call err if multiple flags are providedLeah Rowe
this script is designed to only run a single flag. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27trees: explicitly set mode for -bLeah Rowe
doing nothing means that if a flag is passed, and then another flag overriding it, the resulting action will not be correct; only one flag should be provided anyway, but some users may feel a bit more adventurous. mitigate it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-27roms: re-add compression of coreboot imagesLeah Rowe
i accidentally removed this feature, during prior cleanup. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-25roms: build coreboot *after* checking variablesLeah Rowe
otherwise, release=n is ignored and an image is built in the elf/ directory, even if it's still skipped for bin/ avoid doing unnecessary work per-release by checking the variables before building coreboot via script/trees 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-24roms main(): confirm what serprog images are builtLeah Rowe
just like we do for coreboot images, do it for serprog. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-24roms: remove unused variable nameLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-06-24roms: remove redundant printfLeah Rowe
we don't need this message here, because the final confirmation at the end of main() says which targets were built. saying what individual rom images were built is just needless bloat, especially with the new simplified lbmk design; we no longer provide lots of rom images with different keymaps, because we now expect the user to insert a gkb file themselves with cbfstool. Signed-off-by: Leah Rowe <leah@libreboot.org>