summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
4 daysget.sh: simplify tmpclone()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysget.sh: fix bad mkdir commandLeah Rowe
this is the mkdir call that createsn the directory where a cached git repository is moved to, during creation. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: Fix broken KBC1126 insertionLeah Rowe
On release archives, I overlooked the previous change to downloads, during the recent implementation of extra safety checks. I previously checked there whether the variable named CONFIG_KBC1126_FIRMWARE was defined, and grabbed both; now I check CONFIG_KBC1126_FW1 and CONFIG_KBC1126_FW2 separately, grabbing each file separately. This patch replicates that change for insertions. Otherwise, hash verification on ROM images will fail, when running the inject script on release images. Downloading was being done, reliably, and the extracted files were correct, so there was no danger if the user was building from source and flashing that way. However, checksum verification on full images failed when inserting into archives. This is not because the files were wrong; they were *correct*. However, the EC firmware was not being inserted *at all* on HP EliteBooks, because of this oversight. The check is now based on whether the paths to the files themselves are defined, not whether EC firmware is enabled in the coreboot config; the latter is implied. With this patch, vendor file insertion once again works perfectly, without error, on every board. There was no real danger for users, just a minor inconvenience. Sorry! Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: additional safety checkLeah Rowe
the exit from mkdst can also be non-zero if mv or cp failed, but there's no way to handle that reliably. therefore, the checksum verification should be done one final time, to compensate. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: Properly verify SHA512SUM on extractionLeah Rowe
I currently check the downloaded files e.g. .exe file, but then I don't check - or even define - sha512sums for the files extracted from them e.g. me.bin This patch fixes that. It also caches the hashed files, so that extraction is faster on a re-run - this makes release builds go faster, when running ./mk release If a checksum is not defined, i.e. blank, then a warning is given, telling you to check a specific directory. This way, when adding new vendor files, you can add it first without specifying the checksum, e.g. me.bin checksum. Then you can manually inspect the files that were extracted, and define it, then test again. In a given pkg.cfg for config/vendor, the following variables are now available for use: FSPM_bin_hash for fsp m module FSPS_bin_hash for fsp s module EC_FW1_hash for KBC1126 EC firmware (1st file) EC_FW2_hash for KBC1126 EC firmware (2nd file) ME_bin_hash for me.bin MRC_bin_hash for mrc.bin (broadwell boards) REF_bin_hash for refcode (broadwell boards) SCH5545EC_bin_hash for sch5545 firmware (Dell Precision T1650) TBFW_bin_hash for Lenovo ThunderBolt firmware (e.g. T480/T480s) E6400_VGA_bin_hash for Dell E6400 Nvidia VGA ROM In practise, most people use release archives, and the inject script, so I knew those were reliable, because the ROM images were hashed prior to removing files. This patch benefits people using lbmk.git directly, without using release files, because now they know they have a valid file e.g. me.bin Previously, only the download was checked, not the extracted files, which meant that the only thing preventing a brick was the code not being buggy. Any number of bugs could pop up in the future, so this new level of integrity will protect against such a scenario, and provide early warning prompting bug fixes. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: add missing eval to dx_ in nuke()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysproperly exit 1 when calling fx_Leah Rowe
in a few places, we use the presence of a file found by fx_ to cause an exit, but the command that runs looks something like: exit 1 "string" this yields an error, and a non-zero exit, because of too many arguments to "exit", but we wanted a non-zero exit anyway. nevertheless, this is incorrect. to fix it, eval is used instead. if the never-going-to-exist condition one day exists where exit 1 actually returns, not, you know, exits, we will use err instead, with the string as argument. this should be fine. it's a bit hacky, but so is fx_, and it works. fx_ is used in several places to keep the sloccount down, providing a common way to perform while loops on the output of a command; that is its only purpose.. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: simplify nuke()Leah Rowe
more specifically, re-write it so that it can be called with fx_ this means that the single-tree check for nuke.list can be made much simpler Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: fix broken printf statementLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: use subshells on try_ functionsLeah Rowe
This way, we can use x_ which will then print the command that failed, if we need to debug future errors. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: simplify try_copy()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh submodules: Don't delete files recursivelyLeah Rowe
I overlooked this in a previous patch. It doesn't really matter, since we're operating on a file anyway, but it's not correct. Files should have rm -f on them, not rm -Rf, for deletion. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: simplify fetch_submodules() config checkLeah Rowe
We already do what the old code does in setcfg, by virtue of the fact that the st variable is later checked, after loading this config conditionally, where the st variable is otherwise blank. We can avoid the unnecessary work after loading the config, by returning if the config is absent. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: simplify fetch_submodules()Leah Rowe
We are calling xbmkget in the same way, whether it's a subfile or subrepo. Rename these variables to subcurl and subgit, so that we can call xbmkget unconditionally. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysget.sh: fix caching of crossgcc tarballsLeah Rowe
they were always re-downloading every time. i've basically re-written most of xbmkget. there was some erroneous conditions under which it wrongly deleted the cached file, resulting in it being downloaded again. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysrelease.sh: Don't run prep_release with fx_Leah Rowe
The result of the printf statement is sorted, making it do binaries first, which results in a lot of junk files then being present inside the source archive. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: rename to get.shLeah Rowe
it now handles more than just git, and i forsee it handling even more in the future, e.g. rsync, ftp, bittorrent. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: Only create destination repo on successLeah Rowe
Don't leave a broken cache laying around, which would otherwise break lbmk for the user. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: Re-implement redundant git downloadsLeah Rowe
And this time it works. I'm now calling xbmkget() which in turn calls tmpclone(), instead of me calling tmpclone() directly. The git-pull is done on both remotes, regardless of whether the first succeeds. This way, if I forgot to update a mirror, downloads would probably still work. This also fixes an issue people were having, for example where the gnulib repository of GRUB was always being downloaded every time. I'm using a new directory, XBMK_CACHE/clone, instead of XBMK_CACHE/repo (which I used before), in case people still have the old caches from before. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrom.sh: reduce indendation in check_coreboot_utilsLeah Rowe
call it via fx_, instead of using a for loop Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: simplify release()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: clean up the vdir after releaseLeah Rowe
do this after moving the version directory within it. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: remove src_dirname variableLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: build in tmp directory firstLeah Rowe
don't move to the real directory until the work is done. that way, a re-try can be done, while analysing the old files. it is created based on the tmpdir, under XBMK_CACHE/ Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: remove unnecessary mkdir commandLeah Rowe
the following git clone command creates that directory Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: split up build_release()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrelease.sh: delete tmp/cache from the tarballLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: remove rmgit()Leah Rowe
We don't need to call it from git.sh, because it's only being done when building a release anyway, and we already run rmgit when doing a release. The function itself is only two simple fx_ calls, so we can just do that from build_release(). Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: remove mk()Leah Rowe
i don't need it. i can use fx_ instead, on functions that previously called mk(). Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: move xbmkget() to git.shLeah Rowe
in cbmk, it's only used from there. in lbmk, it's also used from vendor.sh. however, i plan to further expand git.sh at some point, tidying it up so that git cloning is also done from xbmkget, with dlop=git and git.sh would then be renamed to get.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: move mksha512sum() to vendor.shLeah Rowe
this is unused in cbmk. it's only used from vendor.sh. therefore, lbmk shall have it in vendor.sh. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: split up try_file()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: move _ua to try_file()Leah Rowe
it's only used there Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmrc.sh: minor cleanupLeah Rowe
group the cbfs command to the extract command, since they are related. this makes it clearer that the following command to extract refcode is unrelated. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmrc.sh: update copyright year to include 2025Leah Rowe
I've made several modifications to the file, this year. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinject.sh: remove the hashfiles variableLeah Rowe
we only use it once, and it's a trivial string Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinject.sh: define xchanged here insteadLeah Rowe
this is used here, and also needed in cbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysvendor.sh: remove check_vcfg()Leah Rowe
We don't need it. The vfile variable is only used in one place, and only once, for use with setcfg. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysvendor.sh: simplify getvfile()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysvendor.sh: simplify setvfile()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: use fx_ in rmgit()Leah Rowe
with fx_, i have more much granular control over how errors are handled. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: split up xbmkget()Leah Rowe
it was too complicated. most of the logic has been moved to a new function, try_file() the for loop is handled by xbmkget(), whereas each try is now handled in try_file() Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinject.sh: only compile nvmutil if neededLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinject.sh: simplified serprog checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysvendor.sh: tidy up variablesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysvendor.sh: split up setvfile()Leah Rowe
split the actual bootstrapping to getvfile() setvfile only sets the config, but then it will call getvfile() to act on that config. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysremove another confusing messageLeah Rowe
the current message says the file name, and implies that the given file has already been updated. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinject.sh: Remove confusing path on tar creationLeah Rowe
The path is wrong. The correct path is printed afterward. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinject.sh: re-add mac address confirmationLeah Rowe
it just makes the script more user-friendly Signed-off-by: Leah Rowe <leah@libreboot.org>