Commit Graph

1983 Commits (ef867ecccad5464690c4fa342946fa2c7a4eac3d)

Author SHA1 Message Date
Leah Rowe bdc39ffcc7 haswell: only use txtmod seabios configuration
i found that with libre mrc, usb was broken in grub

however, it worked nicely in seabios

for our purposes, doing seabios-only roms in text mode
is best for now

i'm going to re-add mrc.bin, but for t440p_12mb_mrc
and w541_12mb_mrc, as new config names. the regular
t440p_12mb and w541_12mb will continue to use libre
mrc, but the _mrc ones will use mrc.bin and retain the
grub payload in board.cfg
2023-03-18 12:15:35 +00:00
Leah Rowe df6b9e2840 remove t440p_12mb_cbfs4mb (retain t440_12mb) 2023-03-18 12:13:28 +00:00
Leah Rowe 04f1fe1751 remove x220_16mb (x220 with 16MB flash)
untested. removing.
2023-03-18 07:59:25 +00:00
Leah Rowe 548872ce8e haswell boards: use libre mrc.bin replacement
courtesy of Angel Pons from the coreboot project

this uses the following patch set from gerrit, as yet
unmerged (in coreboot master) on this date:

    https://review.coreboot.org/c/coreboot/+/64198/5

logic for downloading mrc blobs has been deleted from
lbmk, as this is now completely obsolete (for haswell
boards)

if other platforms are added later that need mrc.bin,
then logic will be re-added again for that
2023-03-18 00:55:10 +00:00
Leah Rowe a942bd6590 move download/gitmodule script to root directory
this fixes the build error:

Error: name not set
Usage: ./download gitmodule [name]

when running:

./download all

running "all" runs all scripts under downloads,
one of which was the gitmodule script itself, therefore
being run without argument
2023-03-17 23:13:20 +00:00
Leah Rowe 59540530bc nuke p2b_ls/p3b_f boards
they don't even boot in pcbox properly, and the real
hardware is not much to talk about

useless port

delete
2023-03-17 21:54:01 +00:00
Leah Rowe ebd9ec96c4 debian/ubuntu dependencies scripts: add gettext 2023-03-16 23:55:05 +00:00
Leah Rowe f9e20b8a1d util/nvmutil: optimise rhex() further
reduce the number of calls to read() by using
bit shifts. when rnum is zero, read again. in
most cases, a nibble will not be zero, so this
will usually result in about 13-15 of of 16
nibbles being used. this is in comparison to
8 nibbles being used before, which means that
the number of calls to read() are roughly
halved. at the same time, the extra amount of
logic is minimal (and probably less) when
compiled, outside of calls to read(), because
shifting is better optimised (on 64-bit machines,
the uint64_t will be shifted with just a single
instruction, if the compiler is decent), whereas
the alternative would be to always precisely use
exactly 16 nibbles by counting up to 16, which
would involve the use of an and mask and still
need a shift, plus...

you get the point. this is probably the most
efficient code ever written, for generating
random numbers between the value of 0 and 15
2023-03-06 21:30:33 +00:00
Leah Rowe f04855c29d fix flashrom download error 2023-03-06 11:44:54 +00:00
Leah Rowe e2945f02b7 payload/grub: force terminal_output to console 2023-03-05 21:25:35 +00:00
Leah Rowe 909d3b31db grub.cfg: set default timeout to 5 seconds 2023-03-05 19:14:24 +00:00
Leah Rowe 544737c864 scripts: build cbutils, not specific utils
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-05 14:00:06 +00:00
Leah Rowe 9398ad08db also fix data.vbt path for lenovo/w541
using the same method as the previous patch for t440p
2023-03-05 13:50:09 +00:00
Konstantinos Koukopoulos d2465e8291 Fix CONFIG_INTEL_GMA_VBT_FILE for the t440p_12mb config 2023-03-05 13:46:33 +00:00
Leah Rowe 0e34d199fb update debian dependencies (for sid) 2023-03-05 13:42:06 +00:00
Leah Rowe a5aa5bca77 ICH9M: default to 256MB VRAM, not 352MB
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-03-04 23:58:17 +00:00
Leah Rowe 6421af5dcb bump seabios revision 2023-02-21 18:29:06 +00:00
Leah Rowe aba6307d13 bump grub revision 2023-02-21 07:39:07 +00:00
Leah Rowe 36982ab5f4 fix bad ifdtool patch from earlier commit 2023-02-19 23:21:37 +00:00
Leah Rowe 3857b4b65b build/dependencies/debian: add python3 dependency 2023-02-19 23:16:47 +00:00
Leah Rowe dac9ea86d3 build/boot/roms: fail when build cbutils fails 2023-02-19 23:16:01 +00:00
Leah Rowe 0d0f6cf3b8 coreboot: update revision of cbtree "default" 2023-02-19 19:24:01 +00:00
Leah Rowe dc1fedf920 Merge branch 'uboot-v2023.01' of alpernebbi/lbmk into master 2023-02-19 17:09:57 +00:00
Alper Nebi Yasak 7932d5fa95 u-boot: Disable environment storage
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-14 00:58:08 +03:00
Alper Nebi Yasak 8d57468ee5 u-boot: Update to v2023.01
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-02-14 00:58:08 +03:00
Leah Rowe 6b4a14ce4a util/nvmutil: tidy up variable declarations 2023-01-28 23:21:53 +00:00
Leah Rowe 031a0b553b util/nvmutil: setWord(): declare variables first 2023-01-28 22:40:01 +00:00
Leah Rowe 257eedca0c util/nvmutil: reset errno if any write attempted
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-28 22:14:35 +00:00
Leah Rowe adc76e3814 util/nvmutil: do not write non-changes to disk 2023-01-28 21:26:36 +00:00
Leah Rowe 3e150bf303 util/nvmutil: cmd_swap(): write sequentually
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-28 20:30:34 +00:00
Leah Rowe 7e3a73558e util/nvmutil: don't use malloc() 2023-01-28 19:39:34 +00:00
Leah Rowe a924d43bdd util/nvmutil: fix clang build errors 2023-01-28 14:11:17 +00:00
Leah Rowe c822033bee util/nvmutil: simplify rhex()
don't use malloc(). instead, just load random bytes
into a uint64_t
2023-01-28 12:24:50 +00:00
Leah Rowe 0f4852450c util/nvmutil: use gbe[] in word() and setword()
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-27 20:13:15 +00:00
Leah Rowe b1186968e8 util/nvmutil: code cleanup 2023-01-27 19:52:11 +00:00
Leah Rowe 7a98649764 util/nvmutil: call pledge() earlier, in main() 2023-01-27 15:34:09 +00:00
Leah Rowe bb6fe263e7 util/nvmutil: remove unused #define 2023-01-27 15:28:50 +00:00
Leah Rowe 5a5a8662a6 util/nvmutil: optimised disk reads
only read the required number of bytes, per command
2023-01-27 15:09:34 +00:00
Leah Rowe 24d5645676 util/nvmutil: optimise cmd_swap()
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-27 14:26:24 +00:00
Leah Rowe ef84329a81 util/nvmutil: optimise rhex() for speed
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-27 14:18:46 +00:00
Leah Rowe 88a51531cf util/nvmutil: code cleanup in rhex() 2023-01-27 13:54:01 +00:00
Alexei Sorokin ac1cab288d x230edp_12mb: Correct the path to data.vbt 2023-01-26 23:57:13 +00:00
Leah Rowe afc80b89ec util/nvmutil: update copyright years 2023-01-17 12:48:14 +00:00
Leah Rowe 8242dca57b util/nvmutil: limit bytes written per command
Massive reduction in number of bytes written, if copy/swap
commands are not used.
2023-01-17 11:03:55 +00:00
Leah Rowe e398331b38 util/nvmutil: make writeGbeFile more readable 2023-01-17 10:52:45 +00:00
Leah Rowe 8dea350a62 util/nvmutil: only write parts that are modified
Old behaviour: always write both gbe sections.

New behaviour: only write back what was changed.
2023-01-17 10:23:21 +00:00
Leah Rowe d0fa08d58d blobs/inject: fix wrong nvmutil path for make 2023-01-10 03:48:46 +00:00
Leah Rowe e8072934f2 Merge branch 'veyron-uboot-dmreset' of alpernebbi/lbmk into master 2023-01-10 03:26:49 +00:00
Leah Rowe 6b10454271 Merge branch 'peach-uboot-usbehci' of alpernebbi/lbmk into master 2023-01-10 03:26:40 +00:00
Alper Nebi Yasak 80bf54b2a7 u-boot: Enable USB_EHCI_EXYNOS on peach boards
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] 8f12e43dbf
[2] 11cacf55ad

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-12-31 21:34:01 +03:00