summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
32 hoursMerge branch 'master' into 25.06_branch25.06_branchLeah Rowe
38 hoursinit.sh: merge xbmk_lock() with xbmk_set_env()Leah Rowe
it's just two lines, and we want much more granular control of where the lock is enforced. it should be JUST after confirming that the instance is a parent. it is at this moment that we should bail if a lock file exists, because this signals that another instance of xbmk is running. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: move xbmk_set_versionLeah Rowe
it's called before set_pyver, so move it above that Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: set pyver from set_envLeah Rowe
it's related to this function, no point calling from main Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: merge xbmk_mkdirs with set_envLeah Rowe
it's just two lines, and they relate. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: check version/versiondate once readLeah Rowe
once again, we are being stricter in child instances. we must ensure that these variables are set by xbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: error if version not readLeah Rowe
we no longer rely on the .git version being read by child instances, so we MUST ensure that it is being read. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: only update version files on parentLeah Rowe
don't update them on child instances, since it's a waste of time; the lock file prevents further execution, so we are just wasting time writing to disk. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hoursinit.sh: simplify unknown version creationLeah Rowe
we don't need to read or write a file at all, in that case. we only then need to generate one if running ./mk release. the scenario in which no .git and no version files exist is when someone grabs the build system from a snapshot generated by e.g. forgejo instances. it's ill advised, so we advise against it, but it is mitigated in code. Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hoursinit.sh: only set xbmk version on parent instanceLeah Rowe
On child instances, we need only read. Apply the principle of least privilege. Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hoursinit.sh: initialise variables AFTER pathLeah Rowe
That way, unnecessary work is avoided on child instances. Of course, the current check assumes that TMPDIR wasn't already set by a wily user before running lbmk, but then those sorts of users probably know what they're doing. If they don't know, they will soon find out. Therefore, I have added additional checks on child instances, preventing the build system from running if XBMK_CACHE is not set; if it isn't, then that could very easy lead to certain system files being overwritten. The user must never know what happens if XBMK_CACHE is unset. We simply will not allow it. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: merge create_pathdirs with set_pyverLeah Rowe
all this function does now is create the python symlink, based on work that was already performed in set_pyver Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: Set python version only on parentLeah Rowe
Do it after the creation of xbmkpath. This avoids performing an unnecessary check, since PATH will have already been corrected for child instances; Python will already be correct there. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: remove useless commandLeah Rowe
we mkdir -p xbmklocal, only to remkdir it immediately afterward, which is the intended behaviour; on parent instances, xbmklocal is to be re-created fresh. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: remove useless commentLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: xbmk_create_tmpdir to xbmk_mkdirsLeah Rowe
this function now simply creates directories that lbmk will use, rather than creating specific directories. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: move gnupath creation to create_tmpdirLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: move PATH init to set_envLeah Rowe
we must only set this in the parent instance, not child instances. this prevents the variable from being over-populated with repeated entries. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: check the lock file BEFORE git initLeah Rowe
this way, initialisation will not be performed erroneously while another parent instance of lbmk is running. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: return from child in set_env insteadLeah Rowe
This is earlier than the current check, thus preventing the initialisation of a git repository and/or the recreation of xbmktmp and xbmklocal by erroneous parent executions of lbmk while another parent is running - the latter of which could have caused a massively unpredictable build failure, so this is also a pre-emptive bug fix, fixing all kinds of weird bugs. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinject.sh: shorten the nukemode variable nameLeah Rowe
just call it "nuke". this is what tells whether to remove vendor files from an archive. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursvendor.sh: simplify mksha512sum()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursvendor.sh: Remove _dest if it's badLeah Rowe
Also, provide more ample warning to the user Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursrelease.sh: rename relsrc to rsrcLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
41 hoursrelease.sh: tidy up nuke()Leah Rowe
i wasn't ok having that variable initialisation and then the commands on the same line. it looks messy. having the commands on a separate line makes the code nice to read, so let's separate them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysget.sh: remove useless messageLeah Rowe
the user doesn't care where the temporary git repo is git shows that information anyway, in the git clone command Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysget.sh: simplify bad_checksum()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysrelease.sh: simplify nuke() EVEN MORE, yet againLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysrelease.sh: use x_ on find command for nuke()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysrelease.sh: simplify nuke() EVEN MORELeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysget.sh: move nuke() to release.shLeah Rowe
we really only need it there, because the context is for release archives. normal use of the git repository doesn't matter in the context of deletions, because that will not be distributed. only the result of ./mk release will be distributed. the builds produced will not change as a result of this, for people using the normal git repository, because the files in question are never used anyway, in our configs. this is being done to make working on local repos easier. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysrelease.sh: simplify prep_release_bin()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysmrc.sh: merge extract_mrc with extract_shellballLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysrelease.sh: don't move src/docs/Leah Rowe
otherwise, ./mk -b (without argument) will fail, on release archives. also, perhaps i should add an mkhelper to build it? Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysget.sh: FURTHER simplify nuke()Leah Rowe
this is getting almost comical now Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysMerge branch 'master' into 25.06_branchLeah Rowe
3 daysget.sh: simplify tmpclone()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 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>
4 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>
4 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>
4 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>
5 daysMerge branch 'master' into 25.06_branchLeah Rowe
5 daysget.sh: add missing eval to dx_ in nuke()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 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>
5 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>
5 daysMerge branch 'master' into 25.06_branchLeah Rowe
5 daysget.sh: fix broken printf statementLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 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>
5 daysget.sh: simplify try_copy()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 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>