6 Commits

Author SHA1 Message Date
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
c1dafbbfad scripts: Always set EC build dir
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>
2023-10-12 13:27:55 -06:00
Tim Crawford
569321f9ac scripts: Set EC build dir
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>
2023-10-11 19:05:16 -06:00
Tim Crawford
f527a7a273 scripts: Allow additional EC configs
Modify the build script to allow setting additional EC configs, similar
to how edk2 is done.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-24 08:58:28 -06:00
Jeremy Soller
48bf9dcfce
coreboot ec-acpi (#106)
* Add script for updating coreboot config

* Update coreboot and coreboot config

* Update coreboot and configs

* Pass board and version when running make clean in ec

* Add addw2 chip.txt

* Update coreboot

* Update coreboot
2020-07-18 13:49:56 -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