Age | Commit message (Collapse) | Author |
|
don't use malloc(). instead, just load random bytes
into a uint64_t
|
|
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
|
|
|
|
|
|
|
|
only read the required number of bytes, per command
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
Massive reduction in number of bytes written, if copy/swap
commands are not used.
|
|
|
|
Old behaviour: always write both gbe sections.
New behaviour: only write back what was changed.
|
|
|
|
|
|
|
|
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>
|
|
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>
|
|
Part 2
Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
|
|
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>
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
due to upstream bloat, these no longer fit. it will have to be
fixed in the next libreboot release
|
|
Without this change, arbitrary MAC addresses will always be masked.
This change restores the intended behaviour.
|
|
|
|
|
|
memtest can't fit in such tiny space alongside SeaBIOS
|
|
|
|
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.
|
|
|
|
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|