summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-30git.sh multi-tree: grab submodules *after* patchesLeah Rowe
right now, if we want to patch a project such that certain submodules are no tdownloaded, or diffreent submodules are downloaded, or current ones are downloaded from other locations, we cannot do this, because we apply submodule updates *before* applying patches. therefore, we should change it so that they are applied *after* installing patches. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-30update/trees: clean up the coreboot-version checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-30update/trees: support custom make/autogen argumentLeah Rowe
this is now used in grub, for the FS_PAYLOAD_MODULES option in the make command lbmk should generalise as much logic as possible. in some parts of it, logic is hurrently hardcoded, specific to a given project that lbmk uses, but lbmk is essentially a source-based package manager, like what you might find on a small linux distro, so we need to try to be as generic as possible. lbmk is the "build system of build systems", so it has to work generically with as many of them as possible Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-30update/trees: generic cmake handlingLeah Rowe
it is no longer hardcoded just to be handled for uefiextract. it is now defined as cmakedir in target.cfg, for a single or multi tree project. if multi tree, it is applied to the specific tree, and has to be defined per tree the way it works is: as per cmakelist, a project will define which directory is to be built, and it will then generate a makefile in the main source tree (the build tree in cmake language, where the main CMakeLists.txt file exists) when the makefile has been generated, the project is then treated like any other project. the way cmake works, if a makefile has already been generated by it, in a given directory, running it again will fail and not affect anything; if it fails but the makefile doesn't exist, then something is wrong, but if the makefile does exist, then it's all fine and nothing happens at present, this is only used for uefiextract, which is part of src/uefitool Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-30update/trees: avoid namespace clash in functionLeah Rowe
the logic of the previous commit was correct, but one of the functions was named the same as another function used in this file, causing a namespace conflict, and a build error Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-30update/trees: dont hardcode autoconf/bootstrap argLeah Rowe
at present, the bootstrap and configure script is only directly executed for grub, because grub is the only project that uses them in lbmk however, when i start adding linuxboot support, i will have to start building a lot of projects, some of which make use autoconf and bootstrap scripts e.g. ./bootstrap --foo ./configure --bar the "bootstrap" script is often used on GNU programs, because they like to over-engineer absolutely everything 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-28lbmk scripts: general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-28disable u-boot on x86 qemuLeah Rowe
it's not well-tested and currently doesn't build this is for later remove for now 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-27build/serprog: err if basename failsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-27update/trees: further simplify crossgcc handlingLeah Rowe
arch no longer needs to be set, on multi-tree projects, and it has been renamed to xarch the new behaviour is: if xarch is set, treat it as a list of crossgcc targets and go through the list. set the first one as the target, for what lbmk builds, but build all of the defined crossgccc targets crossgcc_ada is now xlang, and defines which languages to build, rather than whether to build gcc-gnat Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-25coreboot: update hp elitebook configsLeah Rowe
i had to run make-oldconfig on all of them, because of the port that riku added the other day. lbmk doesn't use defconfigs, it uses full configs, so we have to make sure they're kept in sync this patch is the result of running the following command in a fresh clone of lbmk: ./update trees -u coreboot i should probably switch to defconfigs. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-24Merge pull request 'Add HP 8300 CMT port' (#173) from Riku_V/lbmk:hp8300cmt ↵Leah Rowe
into master Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/173
2023-12-24Add HP 8300 CMT portRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
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-24fix flashrom build error (implicit enum typecast)Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-24lbmk scripts: general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-24build/roms: rename two functions for clarityLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23build: remove test commandLeah Rowe
i left this in here during the last change Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23lbmk scripts: general code cleanup/optimisationLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23git/pico-serprog: update revision againLeah Rowe
riku committed a new patch, that fixes build errors when PICO_DEFAULT_LED_PIN is not defined, on a given board. in such cases, riku's new patch just disables handling of the status LED, but LEDs continue to work on boards where it is defined. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23git/pico-serprog: update revisionLeah Rowe
the new revision sets drive level to 12mA instead of the default 4mA. 16-20mA is the maximum tolerated level for data lines, on most flash ICs, so 12mA is relatively safe. riku did this a while ago, tested on pico pi. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23build/roms: improved error handling for romsLeah Rowe
the rom functions print a path to the rom they built, which is then used, but these are called inside what are essentially subshells, and we had no error handling Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23build/roms: remove redundant checkLeah Rowe
cros roms are always using libgfxinit, with a coreboot framebuffer, so the "normal" initmode is never used. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23dell/e6400nvidia_4mb: new configuration (nvidia)Leah Rowe
the e6400_4mb target has libgfxinit and (if seabios) vgarom initialisation, but has issues on the nvidia model, even when using nomodeset. with this target, e6400nvidia_4mb, only the vgarom initialisation is used, libgfxinit is disabled. on nvidia models, this one should work a little bit better. specifically: nouveau crashes on this machine, with libreboot installed, but you can use nomodeset. however, when libgfxinit is also enabled, nomodeset no longer works properly. so this target disables all video initialisation in coreboot. only seabios will initialise anything video-related, by executing the vga option rom. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23set version/projectname properlyLeah Rowe
lbmk used to set version/versiondate directly in err.sh, but now it's handled there by a function, which is called by the main script. script/update/release hadn't yet been adapted. the only change necessary is to call check_project() script/update/trees also makes use of it script/build/roms is using "projectname" Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23update/trees: fix infinite loopLeah Rowe
when make-all is being executed on a coreboot tree, the "./vendor download target" command is used, where target is the tree/board name. that script then checks whether cbfstool and ifdtool are built, and if they're not, they then call ./update trees -b coreboot utils bla bla bla in this scenario, project=coreboot and mode="", meaning make-all, and the same check that checks whether the vendor download script should be run, is executed, which in turn then checks cbutils again fix the infinite loop by checking whether it was coreboot utils, as opposed to *firmware*, that is to be built, before running ./vendor download Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23vendor/download: check whether configs exist firstLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23vendor/inject: fix dodgy error check (cd command)Leah Rowe
the x_ function doesn't handle arguments with spaces well, and this cd command is going to an asterisk, so it's unknown what the resultant string will be. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23don't delete microcode updates in rom imagesLeah Rowe
at present, lbmk can remove microcode updates on images for a given target, if the target specifies microcode_required="n" in target.cfg lbmk then provides images with microcode, and images without, in a given release. although the user can also remove them manually, this just makes it a bit more convenient, for those users who do wish to run without the updates. this functionality is provided only on those platforms where no-microcode is tested. well, this behaviour implements a compromise on libreboot policy, which is to always include microcode updates by default. see: Binary Blob Reduction Policy the *canoeboot* project now exists, developed in parallel with libreboot, and it ships without microcode updates, on the same targets where lbmk also handled this. running without microcode updates is foolish, and should not be encouraged. clean up lbmk by not providing this kludge. the libreboot documentation will be updated, telling such users to try canoeboot instead, or to remove the update from a given libreboot rom - this is still possible, and mitigations such as PECI disablement on GM45 are still in place (and will be kept), so that this continues to work well. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23update/release: don't test ./vendor injectLeah Rowe
the purpose of script/update/release is not to test the build system, but to build release archives. testing of lbmk is done during the course of development. remove this bloat from the release script. we run the nuke mode anyway, to scrub blobs from releases, which will more or less test the logic in that script (the only difference is that it runs e.g. ifdtool --nuke instead of -i). Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-23update/release: don't insert crossgcc tarballsLeah Rowe
why are we distributing gcc at all? the coreboot build system downloads it at build time, and the GNU rsync mirrors aren't going anywhere. simplify script/update/release by not handling gcc. this means: release archives will no longer contain gcc. 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-22build/serprog: general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-22build: simplified TMPDIR handlingLeah 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-22mrc.sh: run debugfs from extract_partitionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-22mrc.sh: general code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-21Merge pull request 'hp-ec-fw' (#172) from Riku_V/lbmk:hp-ec-fw into masterLeah Rowe
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/172
2023-12-21rename hp elitebook ec fw after rom familiesRiku Viitanen
this affects 8460p and 8470p only, as the others' updates aren't common across different boards Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-12-21document hp laptop rom familiesRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-12-21build/roms: remove modify_coreboot_rom()Leah Rowe
don't handle "romtype" at all, in board target.cfg files add /dev/null as pike2008 rom on amd boards. this serves the same purpose, adding them as empty vga roms, to add an empty rom in cbfs. pike2008 cards cause seabios to hang, when their oproms are executed, so we insert a fake rom on i945 thinkpads, use the coreboot config option: CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK when set, this enables the same bootblock copy, for use with bucts. these two cases, namely pike2008 roms and i945 bootblock copies, no longer need to be handled in code Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-21mrc.sh: remove redundant extraction logicLeah Rowe
the extract_archive function already provides use of unzip, and works just fine (for mrc.bin extraction) Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-21mrc.sh: don't run the shellball. use unzip.Leah Rowe
the shellball (for extracting the coreboot rom, to get at mrc.bin) contains lines that are not posix-friendly. specifically, the "local" command is used, and this is not defined for posix sh. the shellball is essentially just a bunch of shell functions that compress/decompress the zip file, containing the firmware update. you can modify the files and re-run the shellball to recompress, though lbmk just uses the decompress function. as pointed out by Nicholas Chin, it is possible to just run "unzip" directly on the update, to get at bios.bin. we don't really need all the extra checks performed by the shellball, so let's just bypass it altogether. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-21Merge pull request 'hp8460pintel: actually enable vbt' (#171) from ↵Leah Rowe
Riku_V/lbmk:vbt8460p into master Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/171
2023-12-21hp8460pintel: actually enable vbtRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-12-21update coreboot configsLeah Rowe
the x220 edp patch invalidated lots of configs, so i did: ./update trees -u coreboot this is the resulting patch Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-21update/trees crossgcc: call err if arch isn't setLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-12-21update/trees: simplified crossgcc handlingLeah Rowe
only call crossgcc for coreboot and u-boot, but use hostcc for everything else. simplify the checking of which architecture to compile for. "arch" in target.cfg files has been modified, to allow further simplification. without this patch, the logic currently only *barely* avoids using crossgcc on things like utils, and only works in practise because, in practise, lbmk only works on x86_64 anyway. the new logic, as per this patch, is simpler and more robust. Signed-off-by: Leah Rowe <leah@libreboot.org>