35 Commits

Author SHA1 Message Date
Tim Crawford
1d973574fe
scripts: Version EC separately from SBIOS
The original rationale for having the EC version match the SBIOS version
was to ensure that compatible versions of each were installed. So we set
the EC version to the SBIOS version and always flash both of them, even
if only one actually changed.

At some point, a mechanism should be implemented that checks for a
minimum supported/compatible version. This would be comparable to the
LVFS MetaInfo's "requires" field.

Ref: f4f4d5b61dbe ("Build EC as a submodule, specifying version")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-02-28 18:36:04 -07:00
Tim Crawford
3812485a04 scripts: Make FIRMWARE_OPEN_MODEL_DIR relative
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>
2024-02-05 11:02:11 -07:00
Tim Crawford
968a612824 scripts: Address shellcheck issues
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>
2023-10-19 14:45:22 -06:00
Tim Crawford
5fb1624187 Set and use XGCCPATH
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>
2023-10-19 08:07:39 -06:00
Tim Crawford
fcd8132165 Remove MinPlatform support
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>
2023-08-04 11:41:26 -06:00
Tim Crawford
c90cf2f0f1 Remove firmware-smmstore
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>
2023-08-03 12:04:47 -06:00
Tim Crawford
f903877cfb scripts: Disable showing signature when getting date
Fixes building when `log.showSignature` is enabled.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-08 11:06:44 -06:00
Tim Crawford
239e2cbaed build.sh: Set git-describe length
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>
2022-01-18 11:57:12 -07:00
Tim Crawford
99e0b46092 Fix building on Debian
Debian does not export /usr/bin in PATH for users like every other
distro so builds fail to find mkfs and parted.
2021-03-05 11:29:53 -07:00
Jeremy Soller
d70b7856bb Support edk2.config file 2021-01-19 15:41:51 -07:00
Tim Crawford
e5abb6529b Update rust-toolchain to 2020-07-27 2020-10-19 13:32:03 -06:00
Jeremy Soller
62130a2160
Always copy uecflash.efi if it exists 2020-07-17 09:17:43 -06:00
Jeremy Soller
3eefdb9619
Rename coreboot.rom to firmware.rom, easier to read path for usb basedir 2020-04-08 12:56:46 -06:00
Jeremy Soller
d11dcd4c2a
Copy ec.rom to usb.img if flashing open EC 2020-04-07 13:18:25 -06:00
Tim Crawford
f4f4d5b61d Build EC as a submodule, specifying version
For models that use System76 EC, we want to have the board version and
the EC version matich.

Ref: https://github.com/system76/firmware-open/issues/75
2020-04-07 13:08:51 -06:00
Jeremy Soller
5a56365221
Do not use HPET 2019-11-04 16:17:32 -07:00
Jeremy Soller
2efdeda500
Integrate smmstore driver 2019-10-28 14:17:12 -06:00
Jeremy Soller
59afded4e8
Use version from firmware-open repository 2019-10-03 11:06:38 -06:00
Jeremy Soller
921f96dd1c
Update edk2 and remove internal shell 2019-10-03 10:26:56 -06:00
Jeremy Soller
2cb5fa405f
Do not build updater when using QEMU model 2019-09-20 14:21:49 -06:00
Jeremy Soller
42bad6730e
Add support for running QEMU version of System76 firmware 2019-09-20 14:19:57 -06:00
Jeremy Soller
50de0f5589
Update coreboot, add uecflash binary 2019-08-30 10:00:10 -06:00
Jeremy Soller
92dc372a00
Copy EC binary 2019-08-28 14:46:42 -06:00
Jeremy Soller
9dd1530cfb
Add SOURCE_DEBUG_ENABLE support 2019-06-18 12:48:56 -06:00
Jeremy Soller
71dbd04b0c
Disable edk2 debugging 2019-06-10 14:01:18 -06:00
Jeremy Soller
2c430dae0d
Undo changes to build script 2019-06-10 13:16:39 -06:00
Jeremy Soller
6a0e76d5d6
Add udk gdb script 2019-06-06 14:47:24 -06:00
Jeremy Soller
fd8dab3a15
Add gop policy 2019-05-03 13:55:13 -06:00
Jeremy Soller
6ac93f8158
Disable GOP inclusion temporarily, add scripts for spipi 2019-05-03 12:32:53 -06:00
Jeremy Soller
d8d589268d
Fix build script when build directory is missing 2019-05-02 19:59:24 -06:00
Jeremy Soller
a95b76e3ef
Add GOP driver to EDK2 build 2019-05-02 19:43:10 -06:00
Jeremy Soller
9d872b8a8a
Rename USB file 2019-05-02 16:10:29 -06:00
Jeremy Soller
203e148e38
Build update USB image 2019-05-02 16:08:54 -06:00
Jeremy Soller
c9e444edf4
Update EDK2 build config 2019-05-02 15:11:07 -06:00
Jeremy Soller
37f650fc67
Support building images from outside of coreboot tree 2019-05-02 14:42:31 -06:00