2 Commits

Author SHA1 Message Date
dc6372708f Update ec 2023-08-17 14:34:02 -06:00
176f40020a lemp11-test 2023-08-17 13:05:42 -06:00
92 changed files with 157 additions and 446 deletions

View File

@ -8,42 +8,12 @@ features apply to your model and firmware version, see the
## unreleased ## unreleased
- tgl-u: Fixed CPU not going lower than C2 due to card reader LTR
- bonw15: Fixed speaker audio cutting in/out
- oryp11: Fixed speaker audio cutting in/out
## 2023-10-13
- tgl-u: Fixed potential EC lock up during opportunistic suspend
- galp5: Fixed CPU not going lower than C2 due to card reader LTR
## 2023-09-19
- rpl-hx: Added support for 5600 MHz RAM
## 2023-09-08
- adl: Updated CSME to 16.1.25.2124
- adl,rpl: Fixed SMMSTORE init sometimes failing
- Increased key debounce from 5ms to 10ms
## 2023-08-23
- rpl: Fixed RPL-S GPIO driver on Windows
## 2023-08-18
- cml-u: Fixed boot failing at FSP-S - cml-u: Fixed boot failing at FSP-S
- Added KBC reset on CPU reset to prevent keyboard from being locked - Added KBC reset on CPU reset to prevent keyboard from being locked
- Enabled power switch Watch Dog Timer with a timeout of 10 seconds - Enabled power switch Watch Dog Timer with a timeout of 10 seconds
- Fixed detecting if PECI is available on eSPI systems using S0ix - Fixed detecting if PECI is available on eSPI systems using S0ix
- Added support for a FnLock key - Added support for a FnLock key
- tgl: Fixed Bluetooth performance by enabling audio offload - tgl: Fixed Bluetooth performance by enabling audio offload
- gaze16: Fixed CPU not going lower than C2 due to card reader LTR
- adl: Fixed CPU not going lower than C2 due to card reader LTR
- rpl: Fixed CPU not going lower than C2 due to card reader LTR
- Changed battery charge start threshold to 90%
- Changed charger to disable when battery is full
## 2023-07-19 ## 2023-07-19

49
Jenkinsfile vendored
View File

@ -9,7 +9,14 @@
def all_models = 'addw2 addw3 bonw14 bonw15 darp5 darp6 darp7 darp8 darp9 galp3-c galp4 galp5 galp6 galp7 gaze15 gaze16-3050 gaze16-3060 gaze16-3060-b gaze16-3050 gaze16-3060-b gaze17-3050 gaze17-3060-b gaze18 lemp9 lemp10 lemp11 lemp12 oryp5 oryp6 oryp7 oryp8 oryp9 oryp10 oryp11 serw13' def all_models = 'addw2 addw3 bonw14 bonw15 darp5 darp6 darp7 darp8 darp9 galp3-c galp4 galp5 galp6 galp7 gaze15 gaze16-3050 gaze16-3060 gaze16-3060-b gaze16-3050 gaze16-3060-b gaze17-3050 gaze17-3060-b gaze18 lemp9 lemp10 lemp11 lemp12 oryp5 oryp6 oryp7 oryp8 oryp9 oryp10 oryp11 serw13'
def getCommitSha() {
sh "git rev-parse HEAD > .git/current-commit"
return readFile(".git/current-commit").trim()
}
void setBuildStatus(String state, String message) { void setBuildStatus(String state, String message) {
commit = getCommitSha()
// FIXME: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#string-interpolation // FIXME: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#string-interpolation
sh """ sh """
curl \ curl \
@ -17,7 +24,7 @@ void setBuildStatus(String state, String message) {
-H \'Accept: application/vnd.github+json\' \ -H \'Accept: application/vnd.github+json\' \
-H \'Authorization: Bearer ${GITHUB_TOKEN}\' \ -H \'Authorization: Bearer ${GITHUB_TOKEN}\' \
-H \'X-GitHub-Api-Version: 2022-11-28\' \ -H \'X-GitHub-Api-Version: 2022-11-28\' \
https://api.github.com/repos/system76/firmware-open/statuses/${GIT_COMMIT} \ https://api.github.com/repos/system76/firmware-open/statuses/${commit} \
-d \'{\"state\": \"${state}\", \"target_url\": \"${BUILD_URL}\", \"description\": \"${message}\"}\' -d \'{\"state\": \"${state}\", \"target_url\": \"${BUILD_URL}\", \"description\": \"${message}\"}\'
""" """
} }
@ -41,7 +48,7 @@ pipeline {
parameters { parameters {
string(name: 'MODELS', defaultValue: "$all_models", description: 'Space separated list of models to build', trim: true) string(name: 'MODELS', defaultValue: "$all_models", description: 'Space separated list of models to build', trim: true)
string(name: 'SOURCE_BRANCH', defaultValue: 'master', description: 'Git branch or revision to build', trim: true) string(name: 'GIT_BRANCH', defaultValue: 'master', description: 'Git branch or revision to build', trim: true)
} }
triggers { triggers {
@ -51,28 +58,30 @@ pipeline {
stages { stages {
stage('Prepare') { stage('Prepare') {
steps { steps {
setBuildStatus("pending", "Pending") checkout([
slackSend(color: "good", message: "${env.JOB_NAME} - #${env.BUILD_ID} started (<${env.BUILD_URL}|Open>)") $class: 'GitSCM',
branches: [[name: "${GIT_BRANCH}"]],
// https://www.jenkins.io/doc/pipeline/steps/params/scmgit/
checkout scmGit(
branches: [[name: '${SOURCE_BRANCH}']],
extensions: [ extensions: [
lfs(), [
pruneStaleBranch(), $class: 'SubmoduleOption',
pruneTags(true), disableSubmodules: false,
submodule(
parentCredentials: true, parentCredentials: true,
recursiveSubmodules: true, recursiveSubmodules: true,
reference: '' reference: '',
), trackingSubmodules: false
],
[ $class: 'GitLFSPull' ],
[ $class: 'PruneStaleBranch' ],
], ],
userRemoteConfigs: [[url: 'https://github.com/system76/firmware-open.git']] userRemoteConfigs: [[url: 'https://github.com/system76/firmware-open']]
) ])
setBuildStatus("pending", "Pending")
slackSend(color: "good", message: "${JOB_NAME} - #${BUILD_ID} started (<${BUILD_URL}|Open>)")
sh """#!/bin/bash sh """#!/bin/bash
# Install dependencies # Install dependencies
#./scripts/install-deps.sh #./scripts/deps.sh
. "${HOME}/.cargo/env" . "${HOME}/.cargo/env"
# Reset # Reset
@ -115,15 +124,15 @@ pipeline {
} }
success { success {
setBuildStatus("success", "Successful") setBuildStatus("success", "Successful")
slackSend(color: "good", message: "${env.JOB_NAME} - #${env.BUILD_ID} successful after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)") slackSend(color: "good", message: "${JOB_NAME} - #${BUILD_ID} successful (<${BUILD_URL}|Open>)")
} }
failure { failure {
setBuildStatus("failure", "Failed") setBuildStatus("failure", "Failed")
slackSend(color: "danger", message: "${env.JOB_NAME} - #${env.BUILD_ID} failed after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)") slackSend(color: "danger", message: "${JOB_NAME} - #${BUILD_ID} failed (<${BUILD_URL}|Open>)")
} }
aborted { aborted {
setBuildStatus("failure", "Failed") setBuildStatus("failure", "Failed")
slackSend(color: "warning", message: "${env.JOB_NAME} - #${env.BUILD_ID} aborted after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)") slackSend(color: "warning", message: "${JOB_NAME} - #${BUILD_ID} aborted (<${BUILD_URL}|Open>)")
} }
} }
} }

View File

@ -32,8 +32,8 @@ For a list of important changes please see the [changelog](./CHANGELOG.md).
Dependencies can be installed with the provided script. Dependencies can be installed with the provided script.
```sh ```
./scripts/install-deps.sh ./scripts/deps.sh
``` ```
If rustup was installed for the first time, it will be required to source the If rustup was installed for the first time, it will be required to source the

View File

@ -27,34 +27,6 @@ A restart is required for the change to take effect. On the boot after changing
the value, the system will perform a global reset (power off again) to complete the value, the system will perform a global reset (power off again) to complete
the change and ensure the IME is operating in a valid state. the change and ensure the IME is operating in a valid state.
### Checking the state
coreboot will log some IME data to cbmem during startup. This can be used to
check if it is in the correct state.
```
make -C coreboot/util/cbmem
sudo ./coreboot/util/cbmem/cbmem -c
```
When disabled it will report:
```
ME: Current Working State : 4
ME: Current Operation State : 1
ME: Current Operation Mode : 3
ME: Error Code : 2
```
When enabled it will report:
```
ME: Current Working State : 5
ME: Current Operation State : 1
ME: Current Operation Mode : 0
ME: Error Code : 0
```
## Tiger Lake-U ## Tiger Lake-U
Models using TGL-U processors default to having the IME enabled. TGL-U removes Models using TGL-U processors default to having the IME enabled. TGL-U removes

2
ec

Submodule ec updated: 01be30f107...75ba6e3f85

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=230b1cbc-6df5-437a-a364-b61f9fa6a4f6
EC_FMP_UUID=45a6839a-1666-40e3-8e90-103de469f025

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=baaca94e-b8e8-4357-acb9-35819eeba12b
EC_FMP_UUID=3e21b09a-c90c-43b7-a9e9-07704264d44a

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=6f4bb433-7ba2-4665-8793-72583a11ca06
EC_FMP_UUID=7e1cd184-2ef7-490c-9201-c3229b9361b8

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=ddb89e07-21a5-4fc4-a489-a1dd805de663
EC_FMP_UUID=38bf32e8-d40d-47cd-9412-cd362779ad1b

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=2cf0f73c-f043-425a-a50e-111169eb6697
EC_FMP_UUID=50cb5c95-5618-49b9-a075-ce47d990daad

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=6b4f28e4-5042-4800-b8ed-c7eabca4cca0
EC_FMP_UUID=9fd9e876-faa4-4967-9bc4-1b2e4e9e82eb

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=66291ad4-79c0-4729-b500-fe86a622a171
EC_FMP_UUID=1b94f5e0-4e3e-4575-adec-dedab7ab9691

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=519360a8-111a-4279-b55c-fd7d62e24f1c
EC_FMP_UUID=d16d934a-68ac-4381-99ab-eb1dfdb97ada

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=8e9eebcd-21c7-4187-b0c8-b4aa11ab8152
EC_FMP_UUID=caa0f156-d2ef-4ed6-949e-322eff2f2c74

BIN
models/darp8/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/darp8/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=7119893e-9d2e-4664-8c6a-a0cba1943a11
EC_FMP_UUID=08a7e5c7-e04e-4968-a2db-cbc3d2392f0d

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=0a72c745-f2b5-47ee-9f06-596a10c6d91b
EC_FMP_UUID=6cc60ab6-68fe-4cd7-a2af-498ccea8f154

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=748a5cf7-5d6d-48aa-88ac-9a58a7707ad7
EC_FMP_UUID=5bbc4600-9f7b-424d-bc7a-f31528ad6887

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=f7ff804e-00d1-4879-9fbc-5d9e98aad921
EC_FMP_UUID=b4110dea-a9a5-4336-b3d2-1dda742f0755

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=0ba5d88e-b62e-424a-8a83-663668ff4319
EC_FMP_UUID=74b6d179-b96b-4ae3-8f68-38ffd421af36

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=35a5f4e2-697c-4789-887f-1f72180b4547
EC_FMP_UUID=b64c646c-f182-4601-bf4d-20857a8922d7

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=db152fa9-3a66-4071-92c5-3ee90990b7fb
EC_FMP_UUID=43bfc388-b206-4ba7-a4a3-690d28072837

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=58363716-8335-497f-975e-c08c0267f574
EC_FMP_UUID=68000e4c-4a53-449d-95d9-4ddacbf90704

BIN
models/galp6/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/galp6/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=8319b52f-25ca-4eba-a449-4873ba770983
EC_FMP_UUID=059d18e0-7e9e-444c-9f0b-53338775769d

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=9e6089d4-a7c3-4883-a183-baa05a178b9a
EC_FMP_UUID=d8dd8b0a-1e8a-4bb0-bbe6-3d7cc4ec55e0

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=fbf1ff7e-c73c-4a96-b736-c2f61a15ac11
EC_FMP_UUID=f9fb50d1-e096-41f4-b3f7-1c92cdc60f96

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=6f5ea998-26e4-460f-8253-4bc11dec9147
EC_FMP_UUID=171d941d-7945-4f93-991e-fbab63711a72

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=5b7a128a-be0e-4582-9369-2da230a0bfdc
EC_FMP_UUID=8fb07243-f361-4e86-9d3d-c8af04023ed9

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=49324634-74d5-45f8-8ff3-1d6cf55f0838
EC_FMP_UUID=19f88309-549b-4d41-b9d4-5109d4c7a43f

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=a5b63408-83c3-4286-b4b9-89dcb4dce2ab
EC_FMP_UUID=05db216c-9887-442c-83ad-def6976eaf2e

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=30a601c2-017a-40e5-b699-edfb12010a68
EC_FMP_UUID=1b906e64-5b6e-4118-9c9f-0c7675ac5bd0

BIN
models/gaze17-3050/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/gaze17-3050/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=466987a3-59f2-45b2-8f33-b91a51cb19bb
EC_FMP_UUID=b708506b-a265-4e99-aec5-18a2704f739a

BIN
models/gaze17-3060-b/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/gaze17-3060-b/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=c950bb89-fb68-4c77-802b-6634d986951f
EC_FMP_UUID=cdc7a1fb-eb74-44ae-b886-42e1410d4227

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=6ea0e16f-746e-4799-949c-f4eb087963bf
EC_FMP_UUID=a53fb0e2-1bb3-4844-955b-d6109273062e

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=eae9abe0-3ebe-4fa1-9a77-03d934196343
EC_FMP_UUID=e20fdee2-8f47-40fc-a53d-635b6834adc5

BIN
models/lemp11/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/lemp11/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=2ba3e971-8799-4709-ab2a-7bb28da045f9
EC_FMP_UUID=87f66db7-9f59-4985-80c0-f5db88556203

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=546cc02a-e435-4ba3-83c0-6fa96c348d79
EC_FMP_UUID=0b653180-a2a6-4703-8cc1-00de43b8a1fa

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=99c70651-493f-4516-9319-cf9b9c1ea26a
EC_FMP_UUID=1ec9ca56-ca05-448e-8362-5c78bb515246

BIN
models/oryp10/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/oryp10/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=f915bafe-7912-49c2-9052-076119a4165e
EC_FMP_UUID=963780ec-770e-4f9c-b8a2-50ff08be72d0

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=f17c6779-3053-4326-a176-1bfaac00f961
EC_FMP_UUID=392db467-b100-47e8-a2df-c12a5bd8256e

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=778469a7-ab6c-441c-86e0-af6ea763c451
EC_FMP_UUID=45432a47-7c45-4833-a05e-deed6556581d

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=d4d3b541-5e6a-4a66-ae93-aa832aa58802
EC_FMP_UUID=85db9eab-4df6-4ddf-ac96-d3fe58ec7f30

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=2d71caa4-f991-4cc8-835d-89985b1df0cb
EC_FMP_UUID=835b51bc-e0d0-4f31-b523-c1844056a6ce

View File

@ -9,4 +9,4 @@
- HAP: false - HAP: false
- [ME](./me.rom) - [ME](./me.rom)
- Size: 4824 KB - Size: 4824 KB
- Version: 16.1.25.2124 - Version: 16.0.15.1829

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=ab019fe3-5528-475c-b27f-f6add0e38dd3
EC_FMP_UUID=0116b87c-b7c8-4ec0-8b32-63d783d3f908

BIN
models/oryp9/fd.rom (Stored with Git LFS)

Binary file not shown.

BIN
models/oryp9/me.rom (Stored with Git LFS)

Binary file not shown.

View File

@ -7,7 +7,3 @@ SERIAL_DRIVER_ENABLE=FALSE
SHELL_TYPE=NONE SHELL_TYPE=NONE
TPM_ENABLE=TRUE TPM_ENABLE=TRUE
#SYSTEM76_EC_LOGGING=TRUE #SYSTEM76_EC_LOGGING=TRUE
# FMP UUIDs for ESRT
SYSTEM_FMP_UUID=7aa20a68-da5a-4232-9c6d-438e49804ff6
EC_FMP_UUID=4b03cb51-b3f8-4921-9e64-68998cb3f6ed

View File

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "nightly-2023-09-07" channel = "nightly-2023-01-21"
components = ["rust-src"] components = ["rust-src"]

View File

@ -2,7 +2,7 @@
set -e set -e
if [ -z "$1" ] || [ ! -e "$1" ] || [ -z "$2" ] if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
then then
echo "$0 [coreboot.config] [coreboot.rom]" >&2 echo "$0 [coreboot.config] [coreboot.rom]" >&2
exit 1 exit 1
@ -10,7 +10,7 @@ fi
CONFIG="$(realpath "$1")" CONFIG="$(realpath "$1")"
COREBOOT="$(realpath "$2")" COREBOOT="$(realpath "$2")"
check_configs() { function check_configs() {
local defconfig="$1" local defconfig="$1"
while read -r line; do while read -r line; do
@ -32,6 +32,10 @@ check_configs() {
} }
pushd coreboot >/dev/null pushd coreboot >/dev/null
if [ ! -d util/crossgcc/xgcc ]
then
make CPUS="$(nproc)" crossgcc-i386
fi
make distclean make distclean
make defconfig KBUILD_DEFCONFIG="${CONFIG}" make defconfig KBUILD_DEFCONFIG="${CONFIG}"
check_configs "${CONFIG}" check_configs "${CONFIG}"

View File

@ -1,10 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC1090
set -e set -e
if [ -z "$1" ] || [ ! -e "$1" ] || [ -z "$2" ] if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
then then
echo "$0 <config> <output>" >&2 echo "$0 <config> <output>" >&2
exit 1 exit 1
@ -17,8 +15,7 @@ while read line; do
fi fi
done < "$1" done < "$1"
BUILD_DIR="build" source "$1"
make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" clean
make -C ec BUILD="$BUILD_DIR" clean make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" -j "$(nproc)"
make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" BUILD="$BUILD_DIR" -j "$(nproc)" cp "ec/build/${BOARD}/${VERSION}/ec.rom" "$2"
cp "ec/$BUILD_DIR/ec.rom" "$2"

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC1091
set -e set -e
if [ -z "$1" ] if [ -z "$1" ]
@ -16,7 +14,12 @@ BUILD_TYPE=RELEASE
#BUILD_TYPE=DEBUG #BUILD_TYPE=DEBUG
TOOLCHAIN=COREBOOT TOOLCHAIN=COREBOOT
COREBOOT_TOOLS_DEF="$XGCCPATH/../share/edk2config/tools_def.txt" COREBOOT_TOOLS_DEF="${PWD}/coreboot/payloads/external/edk2/tools_def.txt"
export GCC_CC_x86_32="${PWD}/coreboot/util/crossgcc/xgcc/bin/i386-elf-gcc"
export GCC_CC_x86_64="${PWD}/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-gcc"
export OBJCOPY_x86_32="${PWD}/coreboot/util/crossgcc/xgcc/bin/i386-elf-objcopy"
export OBJCOPY_x86_64="${PWD}/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-objcopy"
export NASM_PREFIX="${PWD}/coreboot/util/crossgcc/xgcc/bin/"
# Force use of python3 # Force use of python3
export PYTHON_COMMAND=python3 export PYTHON_COMMAND=python3

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2034
if [ ! -d "models/${MODEL}" ] if [ ! -d "models/${MODEL}" ]
then then
echo "model '${MODEL}' not found" >&2 echo "model '${MODEL}' not found" >&2

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2034
SPIPI=${SPIPI:-"system76@spipi.local"} SPIPI=${SPIPI:-"system76@spipi.local"}
if [ ! -d "models/${MODEL}" ] if [ ! -d "models/${MODEL}" ]

View File

@ -2,8 +2,8 @@
set -e set -e
export XGCCPATH="${XGCCPATH:-$PWD/coreboot/util/crossgcc/xgcc/bin}" # TODO: Move this to build scripts that require it on Debian
export PATH="$XGCCPATH:$PATH:/usr/sbin" PATH="$PATH:/usr/sbin"
if [ -z "$1" ] if [ -z "$1" ]
then then
@ -24,9 +24,6 @@ REV="$(git describe --always --dirty --abbrev=7)"
VERSION="${DATE}_${REV}" VERSION="${DATE}_${REV}"
echo "Building '${VERSION}' for '${MODEL}'" echo "Building '${VERSION}' for '${MODEL}'"
# Path to edk2's Python script to generate UEFI capsules
GENERATE_CAPSULE="./edk2/BaseTools/BinWrappers/PosixLike/GenerateCapsule"
# Clean build directory # Clean build directory
mkdir -p build mkdir -p build
BUILD="$(realpath "build/${MODEL}")" BUILD="$(realpath "build/${MODEL}")"
@ -49,7 +46,7 @@ EDK2_ARGS+=(
) )
# Rebuild gop-policy (used by edk2) # Rebuild gop-policy (used by edk2)
if [ -e "${MODEL_DIR}/IntelGopDriver.inf" ] && [ -e "${MODEL_DIR}/vbt.rom" ] if [ -e "${MODEL_DIR}/IntelGopDriver.inf" -a -e "${MODEL_DIR}/vbt.rom" ]
then then
touch apps/gop-policy/Cargo.toml touch apps/gop-policy/Cargo.toml
FIRMWARE_OPEN_VBT="${MODEL_DIR}/vbt.rom" \ FIRMWARE_OPEN_VBT="${MODEL_DIR}/vbt.rom" \
@ -65,16 +62,13 @@ if [ -e "${MODEL_DIR}/edk2.config" ]
then then
while read line while read line
do do
if [ -n "$line" ] && [[ "$line" != "#"* ]] if [[ "$line" != "#"* ]]
then then
EDK2_ARGS+=(-D "$line") EDK2_ARGS+=(-D "$line")
fi fi
done < "${MODEL_DIR}/edk2.config" done < "${MODEL_DIR}/edk2.config"
fi fi
# Source edk2 config for FMP values
. "$MODEL_DIR/edk2.config"
# Rebuild UefiPayloadPkg using edk2 # Rebuild UefiPayloadPkg using edk2
PACKAGES_PATH="${MODEL_DIR}:$(realpath apps)" \ PACKAGES_PATH="${MODEL_DIR}:$(realpath apps)" \
./scripts/_build/edk2.sh \ ./scripts/_build/edk2.sh \
@ -89,33 +83,13 @@ KERNELVERSION="${VERSION}" \
"${MODEL_DIR}/coreboot.config" \ "${MODEL_DIR}/coreboot.config" \
"${COREBOOT}" "${COREBOOT}"
if [ "$MODEL" != "qemu" ]; then
# Generate system firmware capsule
SYSTEM_FMP_VERSION=1
$GENERATE_CAPSULE -e \
--guid "$SYSTEM_FMP_UUID" \
--fw-version "$SYSTEM_FMP_VERSION" \
--lsv 0 \
-o "$BUILD/firmware.cap" \
"$BUILD/firmware.rom"
fi
# Rebuild EC firmware for System76 EC models # Rebuild EC firmware for System76 EC models
if [ ! -e "${MODEL_DIR}/ec.rom" ] && [ -e "${MODEL_DIR}/ec.config" ] if [ ! -e "${MODEL_DIR}/ec.rom" -a -e "${MODEL_DIR}/ec.config" ]
then then
env VERSION="${VERSION}" \ env VERSION="${VERSION}" \
./scripts/_build/ec.sh \ ./scripts/_build/ec.sh \
"${MODEL_DIR}/ec.config" \ "${MODEL_DIR}/ec.config" \
"${BUILD}/ec.rom" "${BUILD}/ec.rom"
# Generate EC firmware capsule
EC_FMP_VERSION=1
$GENERATE_CAPSULE -e \
--guid "$EC_FMP_UUID" \
--fw-version "$EC_FMP_VERSION" \
--lsv 0 \
-o "$BUILD/ec.cap" \
"$BUILD/ec.rom"
fi fi
if [ "${MODEL}" != "qemu" ] if [ "${MODEL}" != "qemu" ]

View File

@ -9,7 +9,7 @@ then
fi fi
MODEL="$1" MODEL="$1"
. scripts/_ch341a.sh source scripts/_ch341a.sh
flashrom -p ch341a_spi -c "${CHIP}" -r build/dump.rom flashrom -p ch341a_spi -c "${CHIP}" -r build/dump.rom

View File

@ -9,6 +9,6 @@ then
fi fi
MODEL="$1" MODEL="$1"
. scripts/_ch341a.sh source scripts/_ch341a.sh
flashrom -p ch341a_spi -c "${CHIP}" -w "build/${MODEL}/firmware.rom" flashrom -p ch341a_spi -c "${CHIP}" -w "build/${MODEL}/firmware.rom"

View File

@ -33,8 +33,8 @@ do
do do
parts+=("$part") parts+=("$part")
done done
parts[1]="$(printf '0x%08x' "$((parts[1] & 0xfffffffd))")" parts[1]="$(printf '0x%08x' "$((${parts[1]} & 0xfffffffd))")"
parts[2]="$(printf '0x%04x' "$((parts[2] & 0x00003c00))")" parts[2]="$(printf '0x%04x' "$((${parts[2]} & 0x00003c00))")"
case "${parts[1]}" in case "${parts[1]}" in
0x0???????) 0x0???????)

View File

@ -1,63 +0,0 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only
# Build the coreboot toolchains
# shellcheck disable=SC1091
set -e
. /etc/os-release
if [ "$ID" = "arch" ] || [[ "$ID_LIKE" =~ "arch" ]]; then
sudo pacman -S --noconfirm \
bison \
bzip2 \
ca-certificates \
curl \
flex \
gcc \
gcc-ada \
make \
patch \
tar \
xz \
zlib
elif [ "$ID" = "fedora" ] || [[ "$ID_LIKE" =~ "fedora" ]]; then
sudo dnf install --assumeyes \
bison \
bzip2 \
ca-certificates \
curl \
flex \
gcc \
gcc-c++ \
gcc-gnat \
make \
patch \
tar \
xz \
zlib-devel
elif [ "$ID" = "ubuntu" ] || [[ "$ID_LIKE" =~ "debian" ]]; then
sudo apt-get --quiet update
sudo apt-get --quiet install --no-install-recommends --assume-yes \
bison \
bzip2 \
ca-certificates \
curl \
flex \
g++ \
gcc \
gnat \
make \
patch \
tar \
xz-utils \
zlib1g-dev
else
printf "\e[1;31munsupported host:\e[0m %s\n" "$ID"
exit 1
fi
make -C coreboot CPUS="$(nproc)" crossgcc-i386
make -C coreboot CPUS="$(nproc)" crossgcc-x64
make -C coreboot gitconfig

View File

@ -1,17 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only
# shellcheck disable=SC1091
set -eE set -eE
msg() { function msg {
echo -e "\x1B[1m$*\x1B[0m" >&2 echo -e "\x1B[1m$*\x1B[0m" >&2
} }
trap 'msg "\x1B[31mFailed to install dependencies!"' ERR trap 'msg "\x1B[31mFailed to install dependencies!"' ERR
. /etc/os-release source /etc/os-release
msg "Installing system build dependencies" msg "Installing system build dependencies"
if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then
@ -19,6 +17,7 @@ if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then
sudo apt-get --quiet install \ sudo apt-get --quiet install \
--no-install-recommends \ --no-install-recommends \
--assume-yes \ --assume-yes \
bison \
build-essential \ build-essential \
ccache \ ccache \
cmake \ cmake \
@ -26,7 +25,9 @@ if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then
devmem2 \ devmem2 \
dosfstools \ dosfstools \
flashrom \ flashrom \
flex \
git-lfs \ git-lfs \
gnat \
libncurses-dev \ libncurses-dev \
libudev-dev \ libudev-dev \
msr-tools \ msr-tools \
@ -45,6 +46,7 @@ elif [[ "${ID}" =~ "fedora" ]] || [[ "${ID_LIKE}" =~ "fedora" ]]; then
curl \ curl \
dosfstools \ dosfstools \
flashrom \ flashrom \
gcc-gnat \
git-lfs \ git-lfs \
libuuid-devel \ libuuid-devel \
msr-tools \ msr-tools \
@ -59,11 +61,14 @@ elif [[ "${ID}" =~ "fedora" ]] || [[ "${ID_LIKE}" =~ "fedora" ]]; then
elif [[ "${ID}" =~ "arch" ]] || [[ "${ID_LIKE}" =~ "arch" ]]; then elif [[ "${ID}" =~ "arch" ]] || [[ "${ID_LIKE}" =~ "arch" ]]; then
sudo pacman -S \ sudo pacman -S \
--noconfirm \ --noconfirm \
bison \
ccache \ ccache \
cmake \ cmake \
curl \ curl \
dosfstools \ dosfstools \
flashrom \ flashrom \
flex \
gcc-ada \
git-lfs \ git-lfs \
msr-tools \ msr-tools \
mtools \ mtools \
@ -91,16 +96,43 @@ fi
msg "Initializing submodules" msg "Initializing submodules"
git submodule update --init --recursive --checkout --progress git submodule update --init --recursive --checkout --progress
msg "Building coreboot toolchains" msg "Installing coreboot commit hook"
./scripts/coreboot-sdk.sh curl -sSf https://review.coreboot.org/tools/hooks/commit-msg \
-o .git/modules/coreboot/hooks/commit-msg && \
chmod +x .git/modules/coreboot/hooks/commit-msg
msg "Installing Rust toolchain and components" RUSTUP_NEW_INSTALL=0
./scripts/install-rust.sh if which rustup &> /dev/null; then
msg "Updating rustup"
rustup self update
else
RUSTUP_NEW_INSTALL=1
msg "Installing Rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain stable
msg "Loading Rust environment"
source "${HOME}/.cargo/env"
fi
msg "Installing pinned Rust toolchain and components"
rustup show
msg "Installing EC dependencies" msg "Installing EC dependencies"
pushd ec pushd ec
./scripts/deps.sh ./scripts/deps.sh
popd popd
msg "Building coreboot toolchains"
pushd coreboot
make CPUS="$(nproc)" crossgcc-i386
make CPUS="$(nproc)" crossgcc-x64
popd
if [[ $RUSTUP_NEW_INSTALL = 1 ]]; then
msg "\x1B[33m>> rustup was just installed. Ensure cargo is on the PATH with:"
echo -e " source ~/.cargo/env\n"
fi
msg "\x1B[32mSuccessfully installed dependencies" msg "\x1B[32mSuccessfully installed dependencies"
echo "Ready to run ./scripts/build.sh [model]" >&2 echo "Ready to run ./scripts/build.sh [model]" >&2

View File

@ -14,6 +14,7 @@ then
echo "model '${MODEL}' not found" >&2 echo "model '${MODEL}' not found" >&2
exit 1 exit 1
fi fi
MODEL_DIR="$(realpath "models/${MODEL}")"
DMI_MODEL="$(cat /sys/class/dmi/id/product_version)" DMI_MODEL="$(cat /sys/class/dmi/id/product_version)"
if [ "${DMI_MODEL}" != "${MODEL}" ] if [ "${DMI_MODEL}" != "${MODEL}" ]
@ -28,7 +29,7 @@ export BASEDIR="system76-firmware-update"
# Clean build directory # Clean build directory
mkdir -p build mkdir -p build
BUILD="$(realpath "build/${MODEL}")" BUILD="$(realpath "build/${MODEL}")"
rm -rf "${BUILD:?}/${BASEDIR}" rm -rf "${BUILD}/${BASEDIR}"
mkdir -p "${BUILD}/${BASEDIR}" mkdir -p "${BUILD}/${BASEDIR}"
# Rebuild and copy firmware-update # Rebuild and copy firmware-update
@ -49,7 +50,7 @@ fi
# Locate EFI partition mount path # Locate EFI partition mount path
EFI_PATH="$(bootctl --print-esp-path)" EFI_PATH="$(bootctl --print-esp-path)"
if [ -z "${EFI_PATH}" ] || [ ! -d "${EFI_PATH}" ] if [ -z "${EFI_PATH}" -o ! -d "${EFI_PATH}" ]
then then
echo "EFI system partition '${EFI_PATH}' not found" >&2 echo "EFI system partition '${EFI_PATH}' not found" >&2
exit 1 exit 1
@ -62,7 +63,7 @@ then
echo "EFI system partition name not found" >&2 echo "EFI system partition name not found" >&2
exit 1 exit 1
fi fi
EFI_PART="$(cat "/sys/class/block/${EFI_PART_NAME}/partition")" EFI_PART="$(cat /sys/class/block/${EFI_PART_NAME}/partition)"
# Locate EFI disk # Locate EFI disk
EFI_DISK="" EFI_DISK=""

View File

@ -28,9 +28,9 @@ do
count="$(echo "$line" | cut -d '[' -f2 | cut -d ']' -f1)" count="$(echo "$line" | cut -d '[' -f2 | cut -d ']' -f1)"
for i in $(seq 0 "$count") for i in $(seq 0 "$count")
do do
if [ "$i" != "$count" ] if [[ "$i" != "$count" ]]
then then
echo "DISPLAY_UPD(${var[$i]});" echo "DISPLAY_UPD($var[$i]);"
fi fi
done done
else else

View File

@ -2,8 +2,6 @@
# #
# Copyright 2020 System76 # Copyright 2020 System76
# shellcheck disable=SC2024
set -e set -e
SCRIPT_DIR=$(dirname "$0") SCRIPT_DIR=$(dirname "$0")
@ -56,8 +54,8 @@ cargo build --release
sudo target/release/coreboot-collector > "${MODEL_DIR}/coreboot-collector.txt" sudo target/release/coreboot-collector > "${MODEL_DIR}/coreboot-collector.txt"
popd popd
"${SCRIPT_DIR}/coreboot-gpio.sh" "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/gpio.h" ${SCRIPT_DIR}/coreboot-gpio.sh "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/gpio.h"
"${SCRIPT_DIR}/coreboot-hda.sh" "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/hda_verb.c" ${SCRIPT_DIR}/coreboot-hda.sh "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/hda_verb.c"
if [ -n "${BIOS_IMAGE}" ] if [ -n "${BIOS_IMAGE}" ]
then then
@ -110,4 +108,4 @@ then
fi fi
fi fi
"${SCRIPT_DIR}/readmes.sh" ${SCRIPT_DIR}/readmes.sh

View File

@ -1,31 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-only
# Install Rust via rustup, along with the pinned toolchain.
# shellcheck shell=dash
# shellcheck disable=SC1091
set -Ee
RUSTUP_NEW_INSTALL=0
# NOTE: rustup is used to allow multiple toolchain installations.
if command -v rustup >/dev/null 2>&1; then
rustup self update
else
RUSTUP_NEW_INSTALL=1
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain stable
. "${HOME}/.cargo/env"
fi
# XXX: rustup has no command to install a toolchain from a TOML file.
# Rely on the fact that `show` will install the default toolchain.
rustup show
if [ "$RUSTUP_NEW_INSTALL" = "1" ]; then
printf "\e[33m>> rustup was just installed. Ensure cargo is on the PATH with:\e[0m\n"
printf " source ~/.cargo/env\n\n"
fi

View File

@ -2,8 +2,21 @@
set -e set -e
# if [ -z "$1" ]
# then
# echo "$0 [model]" >&2
# exit 1
# fi
# MODEL="$1"
MODEL="qemu" MODEL="qemu"
if [ ! -d "models/${MODEL}" ]
then
echo "model '${MODEL}' not found" >&2
exit 1
fi
MODEL_DIR="$(realpath "models/${MODEL}")"
qemu-system-x86_64 \ qemu-system-x86_64 \
-enable-kvm \ -enable-kvm \
-M q35 \ -M q35 \

View File

@ -12,7 +12,7 @@ cargo build --manifest-path "scripts/modeltool/Cargo.toml" --release
MODELTOOL="$(realpath "scripts/modeltool/target/release/modeltool")" MODELTOOL="$(realpath "scripts/modeltool/target/release/modeltool")"
readme_model() { function readme_model {
echo -e "\x1B[1m$1\x1B[0m" >&2 echo -e "\x1B[1m$1\x1B[0m" >&2
pushd "$1" > /dev/null pushd "$1" > /dev/null
@ -28,7 +28,7 @@ do
readme_model "${dir%/}" readme_model "${dir%/}"
done done
readme_line() { function readme_line {
echo -e " \x1B[1m$1\x1B[0m" >&2 echo -e " \x1B[1m$1\x1B[0m" >&2
name="$(basename "$1")" name="$(basename "$1")"
@ -42,7 +42,7 @@ readme_line() {
fi fi
submodule="$(git submodule status "$1" 2> /dev/null | cut -d ' ' -f 3 || true)" submodule="$(git submodule status "$1" 2> /dev/null | cut -d ' ' -f 3 || true)"
if [ "$submodule" = "$1" ] if [ "$submodule" == "$1" ]
then then
# Link to submodule URL # Link to submodule URL
origin="$(git -C "$1" remote get-url origin)" origin="$(git -C "$1" remote get-url origin)"
@ -53,7 +53,7 @@ readme_line() {
fi fi
} }
readme_dir() { function readme_dir {
echo -e "\x1B[1m$1\x1B[0m" >&2 echo -e "\x1B[1m$1\x1B[0m" >&2
pushd "$1" > /dev/null pushd "$1" > /dev/null

View File

@ -13,7 +13,7 @@ do
codec_sys="/sys/class/sound/${codec_id}" codec_sys="/sys/class/sound/${codec_id}"
vendor="$(cat "${codec_sys}/vendor_name")" vendor="$(cat "${codec_sys}/vendor_name")"
chip="$(cat "${codec_sys}/chip_name")" chip="$(cat "${codec_sys}/chip_name")"
if [ "${vendor}" = "Realtek" ] if [ "${vendor}" == "Realtek" ]
then then
echo "# ${codec_id}: ${vendor} ${chip}" echo "# ${codec_id}: ${vendor} ${chip}"
@ -27,7 +27,7 @@ do
do do
# Set coefficient index # Set coefficient index
index_hex="$(printf "0x%02x\n" "${index}")" index_hex="$(printf "0x%02x\n" "${index}")"
hda-verb "${codec}" "${nid}" SET_COEF_INDEX "${index_hex}" >/dev/null 2>&1 hda-verb "${codec}" "${nid}" SET_COEF_INDEX "${index_hex}" &>/dev/null
# Get processing coefficient # Get processing coefficient
value="$(hda-verb "${codec}" "${nid}" GET_PROC_COEF 0 2>/dev/null | cut -d " " -f 3)" value="$(hda-verb "${codec}" "${nid}" GET_PROC_COEF 0 2>/dev/null | cut -d " " -f 3)"

View File

@ -8,7 +8,7 @@ REMOTES=(
set -e set -e
git_remote() { function git_remote {
echo -e "\x1B[1m$1\x1B[0m" echo -e "\x1B[1m$1\x1B[0m"
pushd "$1" > /dev/null pushd "$1" > /dev/null
if git remote | grep "^$2\$" if git remote | grep "^$2\$"
@ -23,5 +23,5 @@ git_remote() {
for remote in "${REMOTES[@]}" for remote in "${REMOTES[@]}"
do do
git_remote "$remote" git_remote $remote
done done

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2087
set -e set -e
if [ -z "$1" ] if [ -z "$1" ]
@ -11,7 +9,7 @@ then
fi fi
MODEL="$1" MODEL="$1"
. scripts/_spipi.sh source scripts/_spipi.sh
ssh -T "${SPIPI}" <<EOF ssh -T "${SPIPI}" <<EOF
cd firmware cd firmware

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2087
set -e set -e
if [ -z "$1" ] if [ -z "$1" ]
@ -11,7 +9,7 @@ then
fi fi
MODEL="$1" MODEL="$1"
. scripts/_spipi.sh source scripts/_spipi.sh
ssh -T "${SPIPI}" <<EOF ssh -T "${SPIPI}" <<EOF
cd firmware cd firmware

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2087
set -e set -e
if [ -z "$1" ] if [ -z "$1" ]
@ -11,7 +9,7 @@ then
fi fi
MODEL="$1" MODEL="$1"
. scripts/_spipi.sh source scripts/_spipi.sh
sftp "${SPIPI}" <<EOF sftp "${SPIPI}" <<EOF
cd firmware cd firmware

View File

@ -1,3 +1 @@
#!/bin/sh
sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=24000 "$@" sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=24000 "$@"