As somewhat of a hack, allow flashing only the EC by deleting the
`firmware.rom` file before running `flash.sh`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Commit 7d6a15e63c95 ("Convert toolchain file to TOML syntax") switched
from the bare toolchain file to the TOML-based one for better management
of the toolchain and components used.
Commit cf7fc2c540d5 ("scripts: Update rustup or inform user of env
vars") added an explicit `rustup self update` because there were still
cases, a year later, of people not having a rustup new enough to support
the TOML-based toolchain file.
Now 2 years after that, it should be safe to drop the explicit self
update. The TOML format has widespread adoption and rustup now self
updates by default. This should allow distro-provided rustup, which
disables the self update feature, to work if it is already installed in
place of the one downloaded from https://rustup.rs.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Since 4.19-based releases took so long, we are already at the next
coreboot release. Update to this release for the slew of MTL fixes.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
I always add HDA reset to the coreboot file when upstreaming, so just
have the script do it.
- Proprietary firmware does it
- It fixed audio init on oryp5
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This script is stale. It hasn't worked since TGL and only produced a few
useful values. The format of devicetree.cb also continues to change with
each SoC generation.
The removal of devmem2 should also fix setup on Debian, which does not
package it.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
coreboot expects paths to be relative to it, and vboot breaks include
paths that are absolute. Fixes compilation failing due to the addition
of `-Wmissing-include-dirs`.
Ref: https://review.coreboot.org/c/coreboot/+/70251
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Report issues by shell files with:
git ls-files '*.sh' | xargs shellcheck --exclude=SC2162
Address the following:
- SC1087: Use braces when expanding arrays
- SC1091: Not following
- SC2004: `$`/`${}` is unnecessary on arithmetic variables
- SC2024: `sudo` doesn't affect redirects
- SC2034: foo appears unused. Verify it or export it
- SC2086: Double quote to prevent globbing and word splitting
- SC2087: Quote `EOF`
- SC2115: Use `"${var:?}"` to ensure this never expands to `/*`
- SC2148: Add a shebang
Addresses (at least partially) some POSIX/dash issues:
- SC2113: `function` keyword is non-standard
- SC3010: In POSIX sh, `[[` `]]` is undefined
- SC3014: In POSIX sh, `==` in place of `=` is undefined
- SC3020: In POSIX sh, `&>` is undefined
- SC3046: In POSIX sh, `source` in place of `.` is undefined
Does not address:
- SC2162: `read` without `-r` will mangle backslashes
- Any other POSIX/dash-specific issues
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Specify dependencies specifically for building coreboot toolchains in
the file, so they are not conflated with the dependencies required for
building firmware-open.
Remove building the toolchain when building firmware, so that the new
script is the single source for building coreboot toolchains.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Allow overriding the coreboot toolchain location with `XGCCPATH` so
that xgcc can be installed to a separate location, such as `/opt`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Building EC was broken as the build output from the previous board was
not being cleaned. `BUILD` is now always set, defaulting to "build",
instead of only when `BOARD` is specified. For good measure, add it
to the clean command in case a custom path is used.
Fixes: 569321f9ac79 ("scripts: Set EC build dir")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Specify the EC build directory so that it does not require the model or
version to be determined in the script.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
The `deps.sh` script needs to be run to set up a new Jenkins workspace.
The git-lfs commands fail with:
mkdir /dev/null: not a directory
To resolve this, either:
1: run `git lfs update --manual` for instructions on how to merge hooks.
2: run `git lfs update --force` to overwrite your hook.
Just don't run them, since Jenkins is configured to perform the LFS pull
when fetching the repo.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
These are at best a convenience for working on them. They are not used
directly by firmware-open, only as dependencies in other projects.
- coreboot-table: Dependency of apps/firmware-setup
- coreboot-fs: Dependency of apps/firmware-update and libs/intel-spi
- intel-spi: Dependency of apps/firmware-update
- intelfash: Dependency of apps/firmware-update and scripts/modeltool
- uefi: Dependency of a lot of stuff
Signed-off-by: Tim Crawford <tcrawford@system76.com>
MinPlatform was only ever used for the KBL boards, and they no longer
build from this repo.
It is still possible to build coreboot-based firmware for KBL boards.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
firmware-smmstore is a Rust-based application for compacting SMMSTOREv1,
which we no longer use. After commit af955613e09d ("models: Enable
SMMSTOREv2 in coreboot") it is no longer needed.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
commit af955613e09d ("models: Enable SMMSTOREv2 in coreboot") switched
us from SMMSTOREv1 to SMMSTOREv2. This script is no longer useful.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Some coreboot submodules have their update strategy set to "none". They
will not be cloned/updated unless `--checkout` is specified.
Fixes building after cloning firmware-open and running `deps.sh`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Rebase on coreboot/coreboot@decbf7b4d9.
The following boards have been upstreamed:
- darp8
- galp6
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This makes `dep.sh` usable from CI. Also update the package lists before
installing on debian/ubuntu.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
The trick of using `show` to install components requires a default
toolchain be set. Assume users with Rust installed already have one set,
and use stable for new installs.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Front load building the toolchain binaries when installing deps instead
of during the first board build.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Ensure rustup is up-to-date to avoid users having a version that is too
old to support the TOML format.
If rustup was just installed, tell the user to source the new env vars
to use the correct version of the toolchain.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
`kvm` is a symlink to the `qemu-system-x86_64`. Use this name instead so
the script can be used on other distros without modification.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Specify `abbrev` to ensure the length of the commit hash is always the
same, in case `core.abbrev` is set or the default changes.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
- The generated "Contents" section isn't useful
- Non-standard, causing confusion on how to update README.md
- It's already out of sync
Remove galp3-c and darp5, as we never released the firmware due to
issues with the touchpad and keyboard. Add gaze16-3060-b variant.
Make "Schematics" a subsection of "Supported models".
Remove directory from list of paths to update in `scripts/readmes.sh`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Update the toolchain to the version used by Redox.
Update a lot of the submodules, which have been updated to build on the
new toolchain.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Set options in edk2.config for each board.
PCIE_BASE is no longer an edk2 option. The value is expected to be in
AcpiBoardInfo HOB, generated from the bootloader's ACPI table.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
coreboot requires python2 explicitly when using the FSP submodule as the
source for FSP binaries.
python2 3rdparty/fsp/Tools/SplitFspBin.py ...
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Install `python-is-python3` to provide the `/usr/bin/python` symlink.
Fixes installing dependencies on Pop!_OS 21.10.
Signed-off-by: Tim Crawford <tcrawford@system76.com>