summaryrefslogtreecommitdiff
path: root/include/option.sh
AgeCommit message (Collapse)Author
2024-01-10NEW MAINBOARD: HP EliteBook 820 G2Leah Rowe
This is of Broadwell platform, one generation above Haswell. Of note: this uses HP Sure Start. Although the flash is 16MB, our CBFS section (and IFD configuration) assumes 12MB flash, so the final 4MB will be left unflashed on installation, after blanking the private flash. The coreboot documents have more information about this. Some minor design changes in lbmk were made, to accomodate this port: Support for extracting refcode binaries added (pulled from Google recovery images). The refcode file is an ELF that initialises the MRC and the PCH. It is also responsible for enabling or disabling the Intel GbE device, where Google does not enable it, but lbmk modifies it per the instructions on the coreboot documentation, so as to enable Intel GbE. Google's recovery image stores the refcode as a stage file, but coreboot changed the format (for CBFS files) after 4.13 so coreboot 4.13's cbfstool is used to extract refcode. This realisation made me also change the script logic to use a cbfstool and ifdtool version matching the coreboot tree, for all parts of lbmk, whereas lbmk previously used only the default tree for cbfstool/ifdtool, on insertion and deletion of vendor files - it was 81dc20e744 that broke extraction of refcode on google's recovery images, where google used an older version of cbfstool to insert the files in their coreboot ROMs. A further backported patch has been added, copying coreboot revision f22f408956 which is a build fix from Nico Huber. Iru Cai submitted an ACPI bugfix after the revision lbmk currently uses, for coreboot/default, and this fix is needed for rebooting to work on Linux 6.1 or higher. This patch has been backported to lbmk, while it still uses the same October 2023 revision of coreboot. Broadwell MRC is inserted at the same offset as Haswell, so I didn't need to tweak that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01add copyright 2024 leah rowe to edited filesLeah Rowe
i forgot to add 2024 on the copyright years, for my copyright files that i edited on 1 january 2024 Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01git.sh: unify am/submodule and tree copyingLeah Rowe
do it all in a single function! Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01git.sh: clean up handling of tmp_git_dirLeah Rowe
delete it once once, and delete it much sooner, right at the start of script/update/trees main() Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-30unify script/update/trees and script/build/grubLeah Rowe
the script can now also handle autoconf build systems, whereas this could previously only be done for grub. with this change, the overall sloccount is also lower Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-27lbmk scripts: general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-24lbmk scripts: shorter code linesLeah Rowe
while seemingly pedantic, this does actually make code easier to read. mostly just switching to shorthand for variable names, where no expansions or patterns are used Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23lbmk scripts: general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-22general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-19option.sh scan_config: clean up if/else blockLeah Rowe
the code wasn't very clear. make it clearer. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-19option.sh: print error on stderr, not stdoutLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-19option.sh: don't rely on zero status on printfLeah Rowe
this part of the code *must* return. the for loop afterwards must not be permitted to execute. it's unlikely that this would ever occur, unless perhaps the user is using a very buggy sh. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-25include/option.sh: fix i945 bootblock copyLeah Rowe
it wasn't being copied right the roms under elf/ were being copied, but not the ones under bin/ - i need to audit it further for now, i run modify_coreboot_roms from build/roms instead of update/trees so, the ones under elf/ no longer have bootblocks copied. it's only done in bin/ Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-2220231021hotfix: replace x_ with err in some places20231021fixLeah Rowe
keymaps weren't being set in keymay.cfg of cbfs, due to use of x_ in the rom script, and x_ doesn't handle quotes or spaces in arguments well. i'm going to remove use of x_ and xx_ (it's in my todo), for next release. for now, hot patch the release. i've gone through and replaced use of x_ with || err, in some places. not just the keymap.cfg command, but others too. in case there are more issues we missed. this commit is being tagged "20231021fix" and i'm using this tag to re-build the 20231021 release. i'll just replace the tarballs in rsync and add errata to the news page announcing the release. all i did was break peoples umlauts, i didn't brick their machines fortunately! very minor bug. anyway, x_/xx_ is a great idea, but sh isn't really designed for that style of programming. i'll go back to using just || err in the next release. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-10-20error handling code cleanup and fixesLeah Rowe
in some cases, use of x_ or xx_ can be error-prone, due to the way $@ is handled; commands requiring quotes, or with funny file names as arguments such as spaces in the file name, or other special characters, can make the x/xx functions break. in those cases, where x/xx must not be used, the commands use || err instead in other cases, use of x/xx is superfluous, and has been removed in some commands. Signed-off-by: Leah Rowe <leah@libreboot.org>
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-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-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-07update/project/build: move helpers to option.shLeah Rowe
certain functions are better placed there, rather than in the main script 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-02do not handle errors on mktemp in shell scriptsLeah Rowe
errors are not defined for mktemp, and the /tmp file system should be assumed reliable. if /tmp is *unreliable*, then this is not something that lbmk either can or should fix; the user clearly has bigger problems. manpages for mktemp do not define errors. it is assumed to be completely reliable. 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-30update/*/*: unified scanning of revisions/sourcesLeah Rowe
update/blobs/download and update/project/repo both use the same logic, for setting variables with awk and a specially formatted configuration file. unify this logic under include/option.sh, and use that. 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>