summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-05scripts: build cbutils, not specific utilsLeah Rowe
some checks check for specific utils, which are then used to indicate the existence of other utils, which means that building them singularly, as is currently done, may result in errors later if another tool doesn't exist compiled yet this is an obscure bug, fixed by this patch. more of a workaround really. a dirty hack. when checking for any of the coreboot utilities required, build all coreboot utilities that are possibly required the utilities are small enough that this does not add much extra time to build, and in most cases, all of them will be needed anyway
2023-03-05also fix data.vbt path for lenovo/w541Leah Rowe
using the same method as the previous patch for t440p
2023-03-05Fix CONFIG_INTEL_GMA_VBT_FILE for the t440p_12mb configKonstantinos Koukopoulos
2023-03-05update debian dependencies (for sid)Leah Rowe
2023-03-04ICH9M: default to 256MB VRAM, not 352MBLeah Rowe
352MB VRAM causes stability issues, according to some reports users can still set it to the higher level when building, if they wish to
2023-02-21bump seabios revisionLeah Rowe
2023-02-21bump grub revisionLeah Rowe
2023-02-19fix bad ifdtool patch from earlier commitLeah Rowe
2023-02-19build/dependencies/debian: add python3 dependencyLeah Rowe
2023-02-19build/boot/roms: fail when build cbutils failsLeah Rowe
2023-02-19coreboot: update revision of cbtree "default"Leah Rowe
2023-02-19Merge branch 'uboot-v2023.01' of alpernebbi/lbmk into masterLeah Rowe
2023-02-14u-boot: Disable environment storageAlper Nebi Yasak
U-Boot can be configured via environment variables which can be saved to various storage devices. This usually defaults to MMC or SPI depending on where it boots from, but assumes the device's layout is controlled by U-Boot. We should store the environment in SPI flash, but we also need to configure coreboot FMAPs to reserve the area U-Boot would use as its environment storage. For now, disable environment storage by setting ENV_IS_NOWHERE=y to avoid overwriting random regions of SPI or MMC if someone tries to save the variables. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-02-14u-boot: Update to v2023.01Alper Nebi Yasak
Set default U-Boot revision to v2023.01 and rebase patches on top of that. Upstream kconfig status is a bit unstable, so updating configs with `make oldconfig` would miss important upstream changes. For each board, run `make savedefconfig` and `diffconfig -m` at the old version to get a diff from upstream defconfigs. Fix those affected by upstream changes, like SYS_TEXT_BASE being renamed to TEXT_BASE. Then append those to the new version's defconfigs and run `make olddefconfig` to get updated configs. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-01-28util/nvmutil: tidy up variable declarationsLeah Rowe
2023-01-28util/nvmutil: setWord(): declare variables firstLeah Rowe
2023-01-28util/nvmutil: reset errno if any write attemptedLeah Rowe
the way nvmutil is designed, setWord() is only ever called under non-error conditions. however, if one part is valid but the other one isn't, and a command is run that touches both parts, errno is non-zero write writeGbeFile is called in situations where one part is valid, but the other isn't, AND the writes to gbe (in memory) results in a non-change, writeGbeFile is not called; in this situation, errno is not being reset, despite non-error condition this patch fixed the bug, resulting in zero status upon exit under such conditions
2023-01-28util/nvmutil: do not write non-changes to diskLeah Rowe
2023-01-28util/nvmutil: cmd_swap(): write sequentuallyLeah Rowe
the current code writes part 1 first, and part 0 next, on the disk, due to the way the swap works. with this change, swap still swaps the two parts of the file, on disk, but writes the new file sequentially. this change might speed up i/o on the file system, on HDDs. on SSDs, this change likely makes no difference at all.
2023-01-28util/nvmutil: don't use malloc()Leah Rowe
2023-01-28util/nvmutil: fix clang build errorsLeah Rowe
2023-01-28util/nvmutil: simplify rhex()Leah Rowe
don't use malloc(). instead, just load random bytes into a uint64_t
2023-01-27util/nvmutil: use gbe[] in word() and setword()Leah Rowe
this will make the code more flexible, if (when) i add changes that allow multiple commands to be used in a single run, on any given number of files
2023-01-27util/nvmutil: code cleanupLeah Rowe
2023-01-27util/nvmutil: call pledge() earlier, in main()Leah Rowe
2023-01-27util/nvmutil: remove unused #defineLeah Rowe
2023-01-27util/nvmutil: optimised disk readsLeah Rowe
only read the required number of bytes, per command
2023-01-27util/nvmutil: optimise cmd_swap()Leah Rowe
On many Lenovo GbE regions (in factory firmware), part 0 is invalid but part 1 is valid. This change means part 1 is checked first. If part 1 is valid, part 0 won't be checked at all (due to how most C compilers optimise). Most people are just going to extract the factory GbE file, modify it and re-insert it into the ROM image, so this causes a nice speedup.
2023-01-27util/nvmutil: optimise rhex() for speedLeah Rowe
don't constantly open/close the file: /dev/urandom only read 12 bytes at a time because of this change, the readFromFile() function now only handles gbe files
2023-01-27util/nvmutil: code cleanup in rhex()Leah Rowe
2023-01-26x230edp_12mb: Correct the path to data.vbtAlexei Sorokin
2023-01-17util/nvmutil: update copyright yearsLeah Rowe
2023-01-17util/nvmutil: limit bytes written per commandLeah Rowe
Massive reduction in number of bytes written, if copy/swap commands are not used.
2023-01-17util/nvmutil: make writeGbeFile more readableLeah Rowe
2023-01-17util/nvmutil: only write parts that are modifiedLeah Rowe
Old behaviour: always write both gbe sections. New behaviour: only write back what was changed.
2023-01-10blobs/inject: fix wrong nvmutil path for makeLeah Rowe
2023-01-10Merge branch 'veyron-uboot-dmreset' of alpernebbi/lbmk into masterLeah Rowe
2023-01-10Merge branch 'peach-uboot-usbehci' of alpernebbi/lbmk into masterLeah Rowe
2022-12-31u-boot: Enable USB_EHCI_EXYNOS on peach boardsAlper Nebi Yasak
The USB 2.0 ports on Exynos boards need the relevant driver enabled by USB_EHCI_EXYNOS. This is enabled by default depending on USB_EHCI_HCD. It's already enabled on snow and spring, but apparently not on peach boards, as discovered from other people's attempts to enable it [1][2]. Enable it also on the peach_pi and peach_pit. [1] https://gitlab.com/exynos5-mainline/u-boot/-/commit/8f12e43dbfdebbd29f49c2cb8bf6e9b6ea7e70c9 [2] https://gitlab.com/exynos5-mainline/u-boot/-/commit/11cacf55ad720dfca8799561a38b1da4732a3018 Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-31u-boot: Enable DM_RESET for veyron boardsAlper Nebi Yasak
The display driver on the veyron boards needs reset drivers, more specifically RESET_ROCKCHIP. This is enabled by default depending on DM_RESET, which an upstream commit enables for veyron_jerry claiming it fixes the display [1]. Enable it also in our configs, but for other veyrons as well. [1] https://lore.kernel.org/u-boot/20220928024046.2657593-1-sjg@chromium.org/ Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-28Do not rely on bashisms and behaviour undefined by the POSIX specification. ↵Ferass 'Vitali64' EL HAFIDI
Part 2 Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
2022-12-27Do not rely on bashisms and behaviour undefined by the POSIX specification.Ferass 'Vitali64' EL HAFIDI
By making lbmk fully POSIX-compliant, it will be easier to port lbmk to other systems implementing POSIX such as Alpine Linux and FreeBSD. Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
2022-12-24util/nvmutil: use err() more consistentlylbmkplaceholder
2022-12-24util/nvmutil: more robust pointer handlingLeah Rowe
i didn't like the previous commits, they felt really hacky running malloc and then changing the pointer directly just rubs me the wrong way fix that
2022-12-23util/nvmutil: optimise cmd_swap() furtherlbmkplaceholder
don't do xor swap. we know gbe2 is always 4KB higher than gbe in memory, so we can just set gbe2 to the value of gbe, and OR the size in bytes of 4KB into gbe2 this is only a marginal speed boost, negligible even, but it's done for the lulz
2022-12-23util/nvmutil: greatly optimise cmd_copy()lbmkplaceholder
similar to the last change by concept. we now write individual 4KB blocks per part 0 and 1, at the end of nvmutil, based on pointer values gbe and gbe2 instead of running memcpy, simply overwrite the pointer this results in less I/O, thus more speed
2022-12-23util/nvmutil: greatly optimise cmd_swap()lbmkplaceholder
instead of XOR-swapping every byte, have pointers to the two parts and *XOR swap the pointers*. at the end of the program execution, when writing, pwrite the two parts into the same file
2022-12-22scripts/blobs/inject: fix bad cbfstool build checklbmkplaceholder
2022-12-21util/nvmutil: simplified error handling in rhex()lbmkplaceholder
2022-12-21util/nvmutil: return errno when calling err()lbmkplaceholder