summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-14build/release/src: don't delete .gitcheck20221214lbmkplaceholder
2022-12-14correct a faulty if statement in build/release/srcLeah Rowe
2022-12-14disable grub and memtest on 1MB ROM configslbmkplaceholder
due to upstream bloat, these no longer fit. it will have to be fixed in the next libreboot release
2022-12-14util/nvmutil: only mask random unicast/local macslbmkplaceholder
Without this change, arbitrary MAC addresses will always be masked. This change restores the intended behaviour.
2022-12-14update the readmelbmkplaceholder
2022-12-14fix ./build boot roms alllbmkplaceholder
2022-12-11p2b_ls/p3b_f boards: Disable memtest payloadLeah Rowe
memtest can't fit in such tiny space alongside SeaBIOS
2022-12-11build/boot roms: add exits for failing commandsLeah Rowe
2022-12-11p2b_ls/p3b_f boards: no payload and no vga initLeah Rowe
The configs were enabling SeaBIOS payload, but this is to be handled by lbmk, not coreboot. Further, they were enabling VGA ROM execution in coreboot, but this should be handled by SeaBIOS. This board should not have a GRUB payload enabled either; this will be checked and fixed if necessary in the next commit.
2022-12-11Merge branch 'master' of qeeg/lbmk into masterLeah Rowe
2022-12-11Merge branch 'cros-postmerge-fixes' of alpernebbi/lbmk into masterLeah Rowe
2022-12-10Add P2B-LS and P3B-F configsqeeg
2022-12-10build/release/src: Include U-Boot sources in source archiveAlper Nebi Yasak
Add U-Boot to the source release script's modules list so that it is included in source release tarballs. Don't include the unused upstream source and .git directories. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/clean: Add helper script to clean U-Boot buildsAlper Nebi Yasak
Copy the resources/scripts/build/clean/crossgcc script and adapt it to run "make distclean" on U-Boot build trees. Some build artifacts persist after the run, so also run "git clean -fdx" if we can. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10dependencies/debian: Install dependencies for U-BootAlper Nebi Yasak
U-Boot build dependencies are listed on their online documentation [1], but the listed Debian packages also include test-only dependencies. While installing dependencies, install the packages necessary to build U-Boot, except for the test-only ones I could identify. [1] https://u-boot.readthedocs.io/en/latest/build/gcc.html Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10coreboot: Add qemu_arm64_12mb boardAlper Nebi Yasak
Add a build for QEMU AArch64 virtual machine using U-Boot as payload. Coreboot config is based on the following defconfig: CONFIG_CBFS_SIZE=0x00c00000 CONFIG_BOARD_EMULATION_QEMU_AARCH64=y CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000 CONFIG_COREBOOT_ROMSIZE_KB_12288=y CONFIG_UART_PCI_ADDR=0x0 The resulting ROM can be booted with a command line like: qemu-system-aarch64 \ -machine virt,secure=on,virtualization=on \ -cpu cortex-a53 -m 1G \ -vga none -display none -serial stdio \ -bios bin/qemu_arm64_12mb/uboot_*.rom However, this is little more than a proof of concept because U-Boot upstream is missing coreboot integration on non-x86 boards, which could have been useful for e.g. a framebuffer. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10u-boot: Add qemu_arm64_12mb boardAlper Nebi Yasak
Add a U-Boot payload build for the QEMU AArch64 virtual machine. The config is same as upstream "qemu-arm64" defconfig, but SYS_TEXT_BASE is set to 0x50000000 so that it doesn't conflict with coreboot. QEMU auto-generates and passes a device-tree file to U-Boot at runtime, there's no compile-time canonical version, so there's no need to set REMAKE_ELF or OF_EMBED. It's not immediately obvious if QEMU-specific drivers are available to support display output, but most coreboot integration is unavailable (depends on x86) and entire video subsystem is disabled in the U-Boot upstream defconfig. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10coreboot: qemu_x86_12mb: Enable DRIVERS_UART_8250IOAlper Nebi Yasak
U-Boot doesn't run on this board when this SuperIO serial driver is disabled. Enable it. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10u-boot: Add qemu_x86_12mb buildAlper Nebi Yasak
Add a U-Boot build for the qemu_x86_12mb board. The config is a copy of the upstream "coreboot" defconfig, but with OF_EMBED=y. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/roms: Support using "u-boot" ELF file as U-Boot payloadAlper Nebi Yasak
U-Boot runtime configuration is done with a device-tree file, which is built alongside the executable in the upstream build system, and must be available to U-Boot at runtime. This device-tree is normally not linked into the default "u-boot" ELF file. So far we have been handling it by re-creating a "u-boot.elf" from the raw binary parts by setting REMAKE_ELF, and using that as the coreboot payload. Unfortunately, that fails to build for x86 boards, more specificly the "coreboot" boards upstream. It's also possible (but discouraged) to set OF_EMBED to embed the device-tree file into the U-Boot itself, in which case we could use the "u-boot" file as the payload on the "coreboot" boards. Add support for using the "u-boot" file as the payload if "u-boot.elf" doesn't exist. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10u-boot: Add video damage tracking patch seriesAlper Nebi Yasak
Add a series posted to upstream mailing lists that makes the GRUB text-mode console faster by implementing video damage tracking [1]. Refresh the config files to include its new VIDEO_DAMAGE Kconfig. Patch 7/7 upstream has a tiny conflict with "Improve UEFI experience" series we already have, but it's only in the diff context. No changes other than fixing that. [1] https://lore.kernel.org/u-boot/20220609225921.62462-1-agraf@csgraf.de/ Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10u-boot: Set default revision to v2022.10Alper Nebi Yasak
Set revision to the commit hash of the v2022.10 release, and run "make olddefconfig" for all boards to refresh the configs. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10u-boot: Use a common treeAlper Nebi Yasak
Merge all boards into a common "default" tree, currently for v2022.07. This ends up applying the "Improve UEFI experience on DM_VIDEO" series to everything, so refresh the configs for the new options. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/roms: Don't rebuild crossgcc if it was already builtAlper Nebi Yasak
The roms_helper script skips building crossgcc-i386 if its target directory exists. Skip it for other architectures as well. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/roms: Make coreboot crossgcc usable for payloads and modulesAlper Nebi Yasak
Add the coreboot-built cross-architecture toolchains to the PATH so that modules and payloads can use them. When building for a foreign-arch board, also export CROSS_COMPILE pointing to the appropriate prefix. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/roms: Build 32-bit crossgcc for AArch64 as wellAlper Nebi Yasak
This re-applies commit a69855f7e448 ("Build 32-bit crossgcc for AArch64 as well") which was inexplicably reverted along with unrelated changes. Mention in a comment that building crossgcc-arm is necessary for AArch64. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/roms: Don't build Memtest86+ when not specified by cmdlineAlper Nebi Yasak
When overriding which payloads will be built with the -p command line argument, the roms_helper script builds the Memtest86+ payload before checking if it should be disabled. Move the build command after the command line override. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-10build/roms: Disable U-Boot when not in payloads specified by cmdlineAlper Nebi Yasak
When overriding which payloads will be built with the -p command line argument, the roms_helper script doesn't disable the U-Boot payload. Disable it in this case. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-09download/u-boot: Change to download target before running extra.shAlper Nebi Yasak
The U-Boot download script does its work from the repository root instead going into the newly created dirs, unlike the coreboot counterpart. It should run the board-specific extra.sh files with the downloaded paths as their working directory. Do so by a subshell. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-09download/u-boot: Re-add usage text for no-argument formAlper Nebi Yasak
The no-argument form of the U-Boot download script prepare trees for all boards when run with no arguments, like the corresponding script for coreboot. The usage text for this case was removed without any changes to the corresponding code, assume it was by mistake and add it back. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-09download/u-boot: Remove support for deleting git foldersAlper Nebi Yasak
Removing the git dirs was part of deblobbing, which Libreboot no longer cares about. The variable that triggers it is no more. Remove the dead code. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-08util/nvmutil: consistent parentheses on comparisonLeah Rowe
2022-12-08util/nvmutil file reads: skip reading if errno!=0Leah Rowe
*This condition will probably never be met, but it is theoretically possible that the code could still fail at this point. Catch all errors, and exit, ruthlessly.
2022-12-08util/nvmutil: return error when fstat() is -1Leah Rowe
Another oversight in my error handling.
2022-12-07util/nvmutil: rhex(): fail if errno not zeroLeah Rowe
The code was only checking whether all of the bytes were read, but there are other errors that can be caught via errno. Enforce strict errno handling, when generating random numbers for command `setmac`.
2022-12-05util/nvmutil: minor code formatting cleanupLeah Rowe
2022-12-05build/release/roms: delete ME/MRC firmware in ROMsLeah Rowe
2022-12-05build/boot/roms: remove errant codeLeah Rowe
2022-12-05remove errant detail from commentLeah Rowe
2022-12-05delete build/release/u-boot-libreLeah Rowe
this is a hangover from pre-osboot-merge libreboot. the idea was to distribute fsdg uboot archives lbmk has uboot support, and releases will simply include uboot in the main src archive like with everything else
2022-12-05remove logic for avoiding nonredistributable blobsLeah Rowe
the --nuke option in ifdtool will be used instead, to nuke the ME regions in specific rom sets (and cbfstool will be used to delete mrc.bin files from rom sets) the new method being implemented is heavier on disk io, but simplifies lbmk, and disk io could still be optimised in the following ways: * when copying roms from boards with ME in them, use ifdtool --nuke to get filename.rom.new, and *move* (not copy) filename.rom.new to the new destination (for use with tar) * possibly modify ifdtool to make efficient use of mmap for disk i/o; it currently loads entire roms into an allocated buffer in memory
2022-12-04coreboot/default: add --nuke flag to ifdtoolLeah Rowe
e.g. ./ifdtool --nuke me coreboot.rom this will be used by rom release build scripts, to scrub stuff like intel me from the rom
2022-12-03util/nvmutil: remove errant line breakLeah Rowe
2022-12-03util/nvmutil: missing paretheses on if statementLeah Rowe
2022-12-03util/nvmutil: don't initialise rbuf unless neededLeah Rowe
previously, it was always initialised, but now it's only initialised if '?' is used on a mac address character in command `setmac` this is done by simply moving mac address character randomisation to a separate function
2022-12-03util/nvmutil: rename variable in hextonumLeah Rowe
2022-12-03util/nvmutil: don't reallocate memory in hextonumLeah Rowe
2022-12-03util/nvmutil: dont report bad size if /dev/urandomLeah Rowe
2022-12-03util/nvmutil: rename variables in hextonumLeah Rowe
2022-12-03util/nvmutil: use BUFSIZ for rmac size in hextonumLeah Rowe
I will be using this function elsewhere, and in general I want this to be usable for lots of programs.