summaryrefslogtreecommitdiff
path: root/script/update
AgeCommit message (Collapse)Author
2023-09-25Update email address for Leah Rowe copyrightsLeah Rowe
also, some of them were out of date; years now updated. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25Use SPDX license headers on all scriptsLeah Rowe
This results in much cleaner copyright and license declarations. SPDX headers are legally recognised and make auditing easier. Also, remove descriptions of each script, from each script. Libreboot documentation at docs/maintain/ describes them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/repos: concatenate multiple revision filesLeah Rowe
With this change, it's still possible to have a single file at config/git/revisions, but this has been scrapped. Instead, multiple files now exist under config/git/ with the same modules declared, but the files are separated logically. List of files under config/git: * bios_extract * biosutilities * coreboot * flashrom * grub (gnulib also defined here) * me_cleaner * memtest86plus * seabios * serprog (multiple projects defined) * u-boot * uefitool The rationale behind this change is simple: in the future, we will stop relying on build systems within imported projects for the import of git submodules. Instead, we will handle them directly in lbmk. Additionally, a Linux payload is planned for Libreboot, made easier by the recent audit (script handle/make/config makes it easy to integrate Linux, and handle cross-compilers for userland utilities); a "linux" file under config/git/ could also define rules for each project besides linux, such as musl libc, busybox and other utilities. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/boot/roms stragglers: properly handle errorsLeah Rowe
there were a few missing err calls i actually went through all of lbmk and found no instances where err calls were missing except in build/boot/roms_helper Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09scripts: use printf, not echo, where appropriateLeah Rowe
printf has more universal behaviour, across various implementations of sh, so it's better to use this. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09update/blobs printf statements: use double quotesLeah Rowe
single quotes are not valid Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09scripts: better handling of printf: stdout/stderrLeah Rowe
in some cases, messages that should be considered errors or warnings, were being written to the standard output, rather than written as error messages. also: one or two printf statements should specifically avoid printing errors (to any file); in these cases, stdout has been redirected to /dev/null Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09update/project/*: remove redundant checksLeah Rowe
these scripts used to be in the main directory of lbmk, and thus needed to check for root user, and also git credentials. now they are called by the main lbmk script, which also runs the same checks. avoid waste of resources by not running the same check twice. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09blobs/download: don't use the -B option in makeLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09blobs/inject: add error condition on rm commandLeah Rowe
this was overlooked, earlier on in lbmk audit 2 Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09blobs/inject: fix checksum validation if no-ucodeLeah Rowe
on e6400_4mb, the release build scripts remove nvidia's vga rom which is used on dgpu models. however, microcode is also removed in separately copied rom images the inject script was inserting vgaroms directly into these no-microcode roms, but the microcode blob is bigger than the vga rom, and cbfstool inserts into the first available free spot within cbfs, so it was inserting into the spot where cpu microcode went. this caused the rom checksum to not match what was generated during build/release/roms being executed the only real fix is to guarantee offsets within cbfs for all files, by recording what offsets were used and then calculating that during insertion so this patch is a workaround, but fixes the issue. the workaround is: don't insert blobs directly on no-microcode roms, instead insert only on microcode-based roms, then re-copy those roms and remove microcode in aptly named copies it's a bit more convoluted, but works perfectly fine. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09use sha512sum to check downloads, not sha1sumLeah Rowe
sha-1 has known collision issues, which may not be readily exploitable yet (in our context), but we should ideally use a more secure method for checking file integrity. therefore, use sha-2 (sha512sum) for checking files. this is slower than sha-1, but checksum verification is only a minor part of what lbmk does, so the overall effect on build times is quite negligible. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-08Support multiple dependencies per projectRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-08Cleaner parent directory creationRiku Viitanen
My previous patch b0rked memtest and others because when making sure their parent directory (the project root) exists, it would instead create the project directory (memtest86lus). The later move would then put the git repo inside that (memtest86plus/memtest86plus_123456). We just need to make sure we don't create the target directory itself. This way, there's no need to hardcode any project names. Tested by ./updating rpi-pico-serprog, memtest86plus, grub and seabios. Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-05update/blobs/inject: use tmp/romdir, not TMPDIRLeah Rowe
we are copying large numbers of ROM images, and the host system may have /tmp under a tmpfs; that same host system may or may not have a lot of memory. respect the user's machine. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04curl/wget downloads: set re-try count to 3Leah Rowe
explicitly set the count to 3, so that a maximum of 3 attemps are made per download, barring fatal errors such as http 404. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04don't use /tmp/ for git clones. use tmp/ instead.Leah Rowe
the /tmp/ file system may be a tmpfs, with conservative memory limits, depending on host system. it's more likely that the user will have enough disk space under tmp/ within lbmk (if they don't, they can't use lbmk anyway). that is to say: more likely that they would have the disk space, but not the memory. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04update/blobs: unify global variablesLeah Rowe
they all more or less use the same variables, so put them all under include/blobutil.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04update/blobs/*: unify checking of defconfig filesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04update/blobs/extract: replace errant target codeLeah Rowe
check based on whether defconfigs are available, which are used extensively, rather than checking based on whether target.cfg is available, which is not used Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04update/blobs/inject: remove errant target handlingLeah Rowe
just like the last patch, target.cfg handling is not required in this script either. remove it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04update/blobs/download: remove errant codeLeah Rowe
the handling of target.cfg is *not* required, in this script. other mechanisms are also used for error checking. this script only uses defconfigs. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04move me7_update_parser.py to util/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04merge config/ and resources/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04blobs/download: don't handle ifd/gbe filesLeah Rowe
they weren't even handled at all, but they were referenced under coreboot configuration they don't need to be handled. lbmk simply includes these files. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-04move ifd/gbe configs into config/ifd/Leah Rowe
it doesn't really make sense for them to be under blobs/ - nominally, they are blobs, but they are well-understood data files containing config data, that is easily parsed by tools like ich9show or ifdtool (and tools like bincfg or nvmutil) blobs/ has been re-purposed: this directory no longer exists in lbmk, but it is created (and on .gitignore) when needed, by blobutil thus, the blobs/ directory shall only contain vendor files, and only those files that libreboot scrubs from releases. therefore, build/release/src can (and has been) simplified; it currently copies just the ifd and gbe files from blobs/, selectively, and this logic is quite error prone, requiring maintenance. now, the build/release/src script simply copies config/ (which only ever contains distributable files) and entirely ignores the blobs/ directory the blob download script already creates the required directory, except for the sch5545 download; this is now fixed lbmk code size is slightly smaller, due to this patch Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-03fix memtest86plus download/buildLeah Rowe
the mkdir command in update/project/repo, added for pico-pi integration, broke a bunch of other downloads. the fix is a bit of a hack but it should hold for now. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-03automate rpi-pico serprog buildsRiku Viitanen
./build rpi-pico serprog build bin/serprog/rpi-pico-serprog.uf2 Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-02coreboot/e6400: support nvidia modelsLeah Rowe
The same ROM images that you flash on Intel GPU variants, are now flashed on Nvidia models. The same ROM will work on both. If an Intel GPU variant is present, libgfxinit is used, and the VGA ROM is used if an Nvidia GPU variant; however, release ROMs will scrub the nvidia option ROM, so release ROMs will only work on Intel GPUs unless you run the blobutil inject command. I decided to no longer have this under WIP, but to put it in master. The issue with it pertains to video drivers, which is not Libreboot's problem. Nouveau crashes under Linux, so use "nomodeset" if it does. The "nv" drivers in BSD systems work very well. The nvidia model of E6400 isn't recommended for other reasons, namely: poor thermal cooling (thermal pad on the GPU) and that Nvidia GPU doesn't get very good performance on any libre drivers anyway. The Intel GPU variant is better, in terms of power efficiency and software support; the intel variant also works with native graphics initialisation in coreboot. This board port already only enables SeaBIOS, which will simply execute the VGA ROM. Blobutil already supports reading the config, detecting that a VGA ROM is needed, because that part of the WIP E6400 branch was already merged in lbmk master. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-01update the fetch scripts themselvesLeah Rowe
the fetch scripts call themselves, for dependencies Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-01handle project downloads in main lbmk scriptLeah Rowe
this means the unified /tmp handling is now provided for in both the former "fetch" and "fetch_trees" script, which are now (respectively): ./update project repo ./update project trees if the fetch scripts weren't cleaning /tmp before, they now are, because lbmk handles it Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-31re-add /dev/null redirect on . ${1}Leah Rowe
the error messages that it shows are benign, but users see them and worry that something went wrong this patch reduces the number of people asking pointless questions on irc Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-27move resources/scripts/ to script/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>