Add binaries for models, generate README.md from README.md.in
This commit is contained in:
parent
73e4fedd68
commit
d5ab76f9db
13
README.md
13
README.md
@ -2,7 +2,12 @@
|
||||
|
||||
System76 Open Source Firmware
|
||||
|
||||
- [Applications](./apps)
|
||||
- [Libraries](./libs)
|
||||
- [Models](./models)
|
||||
- [Tools](./tools)
|
||||
## Contents
|
||||
- [Applications](./apps/)
|
||||
- [coreboot README](./coreboot/)
|
||||
- [edk2](./edk2/)
|
||||
- [edk2-platforms](./edk2-platforms/)
|
||||
- [Libraries](./libs/)
|
||||
- [Models](./models/)
|
||||
- [scripts](./scripts/)
|
||||
- [Tools](./tools/)
|
||||
|
3
README.md.in
Normal file
3
README.md.in
Normal file
@ -0,0 +1,3 @@
|
||||
# firmware-open
|
||||
|
||||
System76 Open Source Firmware
|
@ -1,3 +1,5 @@
|
||||
# Applications
|
||||
- [System76 Firmware Setup](https://github.com/system76/firmware-setup.git)
|
||||
- [System76 Firmware Update](https://github.com/system76/firmware-update.git)
|
||||
|
||||
## Contents
|
||||
- [System76 Firmware Setup](./firmware-setup/)
|
||||
- [System76 Firmware Update](./firmware-update/)
|
||||
|
1
apps/README.md.in
Normal file
1
apps/README.md.in
Normal file
@ -0,0 +1 @@
|
||||
# Applications
|
@ -1,6 +1,10 @@
|
||||
# Libraries
|
||||
- [coreboot-table](https://gitlab.redox-os.org/redox-os/coreboot-table.git)
|
||||
- [ecflash](https://github.com/system76/ecflash.git)
|
||||
- [intelflash](https://gitlab.redox-os.org/redox-os/intelflash.git)
|
||||
- [intel-spi](https://github.com/system76/intel-spi.git)
|
||||
- [uefi_std](https://gitlab.redox-os.org/redox-os/uefi_std.git)
|
||||
|
||||
## Contents
|
||||
- [coreboot-table](./coreboot-table/)
|
||||
- [ecflash](./ecflash/)
|
||||
- [intelflash](./intelflash/)
|
||||
- [intel-spi](./intel-spi/)
|
||||
- [uefi](./uefi/)
|
||||
- [uefi_alloc](./uefi_alloc/)
|
||||
- [uefi_std](./uefi_std/)
|
||||
|
1
libs/README.md.in
Normal file
1
libs/README.md.in
Normal file
@ -0,0 +1 @@
|
||||
# Libraries
|
@ -1,6 +1,8 @@
|
||||
# Models
|
||||
- [System76 Darter Pro (darp5)](./darp5)
|
||||
- [System76 Galago Pro (galp2)](./galp2)
|
||||
- [System76 Galago Pro (galp3-b)](./galp3-b)
|
||||
- [System76 Galago Pro (galp3-c)](./galp3-c)
|
||||
- [System76 Galago Pro (galp3)](./galp3)
|
||||
|
||||
## Contents
|
||||
- [System76 Darter Pro (darp5)](./darp5/)
|
||||
- [System76 Galago Pro (galp2)](./galp2/)
|
||||
- [System76 Galago Pro (galp3)](./galp3/)
|
||||
- [System76 Galago Pro (galp3-b)](./galp3-b/)
|
||||
- [System76 Galago Pro (galp3-c)](./galp3-c/)
|
||||
|
1
models/README.md.in
Normal file
1
models/README.md.in
Normal file
@ -0,0 +1 @@
|
||||
# Models
|
@ -1,3 +1,15 @@
|
||||
# System76 Darter Pro (darp5)
|
||||
|
||||
https://system76.com/guides/darp5
|
||||
|
||||
## Contents
|
||||
- [EC](./ec.rom)
|
||||
- Size: 128 KB
|
||||
- Model: N150ZU
|
||||
- Version: 1.07.04
|
||||
- [FD](./fd.rom)
|
||||
- Size: 4 KB
|
||||
- HAP: false
|
||||
- [ME](./me.rom)
|
||||
- Size: 6140 KB
|
||||
- Version: 12.0.8.1123
|
||||
|
3
models/darp5/README.md.in
Normal file
3
models/darp5/README.md.in
Normal file
@ -0,0 +1,3 @@
|
||||
# System76 Darter Pro (darp5)
|
||||
|
||||
https://system76.com/guides/darp5
|
BIN
models/darp5/ec.rom
(Stored with Git LFS)
Normal file
BIN
models/darp5/ec.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/darp5/fd.rom
(Stored with Git LFS)
Normal file
BIN
models/darp5/fd.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/darp5/me.rom
(Stored with Git LFS)
Normal file
BIN
models/darp5/me.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/darp5/microcode.rom
(Stored with Git LFS)
Normal file
BIN
models/darp5/microcode.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/darp5/vbt.rom
(Stored with Git LFS)
Normal file
BIN
models/darp5/vbt.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,15 @@
|
||||
# System76 Galago Pro (galp2)
|
||||
|
||||
https://system76.com/guides/galp2
|
||||
|
||||
## Contents
|
||||
- [EC](./ec.rom)
|
||||
- Size: 128 KB
|
||||
- Model: N130BU
|
||||
- Version: 1.05.06
|
||||
- [FD](./fd.rom)
|
||||
- Size: 4 KB
|
||||
- HAP: false
|
||||
- [ME](./me.rom)
|
||||
- Size: 2044 KB
|
||||
- Version: 11.8.50.3434
|
||||
|
3
models/galp2/README.md.in
Normal file
3
models/galp2/README.md.in
Normal file
@ -0,0 +1,3 @@
|
||||
# System76 Galago Pro (galp2)
|
||||
|
||||
https://system76.com/guides/galp2
|
BIN
models/galp2/ec.rom
(Stored with Git LFS)
Executable file
BIN
models/galp2/ec.rom
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
models/galp2/fd.rom
(Stored with Git LFS)
Normal file
BIN
models/galp2/fd.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp2/me.rom
(Stored with Git LFS)
Normal file
BIN
models/galp2/me.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp2/vbt.rom
(Stored with Git LFS)
Normal file
BIN
models/galp2/vbt.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,15 @@
|
||||
# System76 Galago Pro (galp3-b)
|
||||
|
||||
https://system76.com/guides/galp3
|
||||
|
||||
## Contents
|
||||
- [EC](./ec.rom)
|
||||
- Size: 128 KB
|
||||
- Model: N140WU
|
||||
- Version: 1.07.03
|
||||
- [FD](./fd.rom)
|
||||
- Size: 4 KB
|
||||
- HAP: false
|
||||
- [ME](./me.rom)
|
||||
- Size: 2044 KB
|
||||
- Version: 11.8.50.3434
|
||||
|
3
models/galp3-b/README.md.in
Normal file
3
models/galp3-b/README.md.in
Normal file
@ -0,0 +1,3 @@
|
||||
# System76 Galago Pro (galp3-b)
|
||||
|
||||
https://system76.com/guides/galp3
|
BIN
models/galp3-b/ec.rom
(Stored with Git LFS)
Executable file
BIN
models/galp3-b/ec.rom
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
models/galp3-b/fd.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-b/fd.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3-b/me.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-b/me.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3-b/vbt.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-b/vbt.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,15 @@
|
||||
# System76 Galago Pro (galp3-c)
|
||||
|
||||
https://system76.com/guides/galp3
|
||||
|
||||
## Contents
|
||||
- [EC](./ec.rom)
|
||||
- Size: 128 KB
|
||||
- Model: N130ZU
|
||||
- Version: 1.07.02
|
||||
- [FD](./fd.rom)
|
||||
- Size: 4 KB
|
||||
- HAP: false
|
||||
- [ME](./me.rom)
|
||||
- Size: 6140 KB
|
||||
- Version: 12.0.8.1123
|
||||
|
3
models/galp3-c/README.md.in
Normal file
3
models/galp3-c/README.md.in
Normal file
@ -0,0 +1,3 @@
|
||||
# System76 Galago Pro (galp3-c)
|
||||
|
||||
https://system76.com/guides/galp3
|
BIN
models/galp3-c/ec.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-c/ec.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3-c/fd.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-c/fd.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3-c/me.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-c/me.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3-c/microcode.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-c/microcode.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3-c/vbt.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3-c/vbt.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,15 @@
|
||||
# System76 Galago Pro (galp3)
|
||||
|
||||
https://system76.com/guides/galp3
|
||||
|
||||
## Contents
|
||||
- [EC](./ec.rom)
|
||||
- Size: 128 KB
|
||||
- Model: N130WU
|
||||
- Version: 1.05.03MI1
|
||||
- [FD](./fd.rom)
|
||||
- Size: 4 KB
|
||||
- HAP: false
|
||||
- [ME](./me.rom)
|
||||
- Size: 2044 KB
|
||||
- Version: 11.8.50.3399
|
||||
|
3
models/galp3/README.md.in
Normal file
3
models/galp3/README.md.in
Normal file
@ -0,0 +1,3 @@
|
||||
# System76 Galago Pro (galp3)
|
||||
|
||||
https://system76.com/guides/galp3
|
BIN
models/galp3/ec.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3/ec.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3/fd.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3/fd.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3/me.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3/me.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
models/galp3/vbt.rom
(Stored with Git LFS)
Normal file
BIN
models/galp3/vbt.rom
(Stored with Git LFS)
Normal file
Binary file not shown.
35
readmes.sh
35
readmes.sh
@ -1,35 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
READMES=(
|
||||
"apps Applications"
|
||||
"libs Libraries"
|
||||
"models Models"
|
||||
"tools Tools"
|
||||
)
|
||||
|
||||
function recursive_readme {
|
||||
pushd "$1" > /dev/null
|
||||
echo -e "\x1B[1m$1\x1B[0m"
|
||||
echo "# $2" > README.md
|
||||
for readme in */README.md
|
||||
do
|
||||
# Get first line, removing the trailing pounds and spaces
|
||||
description="$(head -n 1 "$readme" | sed -e 's/^[#[:space:]]*//')"
|
||||
# Get submodule, if applicable
|
||||
dir="$(dirname "$readme")"
|
||||
submodule="$(git submodule status "$dir" | cut -d ' ' -f 3)"
|
||||
if [ "$submodule" == "$dir" ]
|
||||
then
|
||||
origin="$(git -C "$dir" remote get-url origin)"
|
||||
echo "- [$description]($origin)" >> README.md
|
||||
else
|
||||
echo "- [$description](./$dir)" >> README.md
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
for readme in "${READMES[@]}"
|
||||
do
|
||||
recursive_readme $readme
|
||||
done
|
18
scripts/models.sh
Executable file
18
scripts/models.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cargo build --manifest-path "scripts/modeltool/Cargo.toml" --release
|
||||
|
||||
MODELTOOL="$(realpath "scripts/modeltool/target/release/modeltool")"
|
||||
|
||||
for dir in models/*/
|
||||
do
|
||||
pushd "$dir" > /dev/null
|
||||
model="$(basename "$dir")"
|
||||
echo -e "\x1B[1m$model\x1B[0m"
|
||||
cp README.md.in README.md
|
||||
echo "## Firmware Versions" >> README.md
|
||||
"$MODELTOOL" . | tee -a README.md
|
||||
popd > /dev/null
|
||||
done
|
1
scripts/modeltool/.gitignore
vendored
Normal file
1
scripts/modeltool/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
target
|
44
scripts/modeltool/Cargo.lock
generated
Normal file
44
scripts/modeltool/Cargo.lock
generated
Normal file
@ -0,0 +1,44 @@
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "modeltool"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"redox_intelflash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"system76_ecflash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "plain"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "redox_intelflash"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_uefi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_uefi"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "system76_ecflash"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||
"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
|
||||
"checksum redox_intelflash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49e6f45d8c070090589005869e0b776f52c735f9b5411fca369229135fa1dbd8"
|
||||
"checksum redox_uefi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dafc50645c27c55ca19d27645a6d91e2a8cbc7aabb2ed024ce914512c75e1217"
|
||||
"checksum system76_ecflash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2a81b23cd826ce944029420978cce3be94363188ed87ff8cc0778f80adac547"
|
9
scripts/modeltool/Cargo.toml
Normal file
9
scripts/modeltool/Cargo.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "modeltool"
|
||||
version = "0.1.0"
|
||||
authors = ["Jeremy Soller <jeremy@system76.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
redox_intelflash = "0.1.0"
|
||||
system76_ecflash = "0.1.0"
|
86
scripts/modeltool/src/main.rs
Normal file
86
scripts/modeltool/src/main.rs
Normal file
@ -0,0 +1,86 @@
|
||||
use ecflash::{Ec, EcFile};
|
||||
use intelflash::{Me, Rom};
|
||||
use std::{env, fs, process};
|
||||
use std::path::Path;
|
||||
|
||||
fn ec(path: &Path) {
|
||||
println!("- [EC]({})", path.display());
|
||||
match fs::read(path) {
|
||||
Ok(data) => {
|
||||
println!(" - Size: {} KB", data.len() / 1024);
|
||||
{
|
||||
let mut ec = EcFile::new(data);
|
||||
println!(" - Model: {}", ec.project());
|
||||
println!(" - Version: {}", ec.version());
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
println!(" - *Read Error: {}*", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn fd(path: &Path) {
|
||||
println!("- [FD]({})", path.display());
|
||||
match fs::read(path) {
|
||||
Ok(data) => {
|
||||
println!(" - Size: {} KB", data.len() / 1024);
|
||||
match Rom::new(&data) {
|
||||
Ok(rom) => {
|
||||
match rom.high_assurance_platform() {
|
||||
Ok(hap) => {
|
||||
println!(" - HAP: {}", hap);
|
||||
},
|
||||
Err(err) => {
|
||||
println!(" - *HAP Error: {}*", err);
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
println!(" - *Parse Error: {}*", err);
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
println!(" - *Read Error: {}*", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn me(path: &Path) {
|
||||
println!("- [ME]({})", path.display());
|
||||
match fs::read(path) {
|
||||
Ok(data) => {
|
||||
println!(" - Size: {} KB", data.len() / 1024);
|
||||
match Me::new(&data) {
|
||||
Ok(me) => {
|
||||
if let Some(version) = me.version() {
|
||||
println!(" - Version: {}", version);
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
println!(" - *Parse Error: {}*", err);
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
println!(" - *Read Error: {}*", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = env::args().skip(1).collect();
|
||||
if args.is_empty() {
|
||||
println!("modeltool [model directory]...");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
for arg in args {
|
||||
let path = Path::new(&arg);
|
||||
|
||||
ec(&path.join("ec.rom"));
|
||||
fd(&path.join("fd.rom"));
|
||||
me(&path.join("me.rom"));
|
||||
}
|
||||
}
|
76
scripts/readmes.sh
Executable file
76
scripts/readmes.sh
Executable file
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
README_DIRS=(
|
||||
apps
|
||||
libs
|
||||
models
|
||||
tools
|
||||
.
|
||||
)
|
||||
|
||||
set -e
|
||||
|
||||
cargo build --manifest-path "scripts/modeltool/Cargo.toml" --release
|
||||
|
||||
MODELTOOL="$(realpath "scripts/modeltool/target/release/modeltool")"
|
||||
|
||||
function readme_model {
|
||||
echo -e "\x1B[1m$1\x1B[0m" >&2
|
||||
|
||||
pushd "$1" > /dev/null
|
||||
cp README.md.in README.md
|
||||
|
||||
echo >> README.md
|
||||
echo "## Contents" >> README.md
|
||||
"$MODELTOOL" . >> README.md
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
for dir in models/*/
|
||||
do
|
||||
readme_model "${dir%/}"
|
||||
done
|
||||
|
||||
function readme_line {
|
||||
echo -e " \x1B[1m$1\x1B[0m" >&2
|
||||
|
||||
if [ -f "$1/README.md" ]
|
||||
then
|
||||
# Get first line, removing the trailing pounds and spaces
|
||||
description="$(head -n 1 "$1/README.md" | sed -e 's/^[#[:space:]]*//')"
|
||||
else
|
||||
# Use the directory name as the description
|
||||
description="$(basename "$1")"
|
||||
fi
|
||||
|
||||
submodule="$(git submodule status "$1" 2> /dev/null | cut -d ' ' -f 3 || true)"
|
||||
if [ "$submodule" == "$dir" ]
|
||||
then
|
||||
# Link to submodule URL
|
||||
origin="$(git -C "$dir" remote get-url origin)"
|
||||
echo "- [$description]($origin)"
|
||||
else
|
||||
# Link to directory
|
||||
echo "- [$description](./$dir)"
|
||||
fi
|
||||
}
|
||||
|
||||
function readme_dir {
|
||||
echo -e "\x1B[1m$1\x1B[0m" >&2
|
||||
|
||||
pushd "$1" > /dev/null
|
||||
cp README.md.in README.md
|
||||
|
||||
echo >> README.md
|
||||
echo "## Contents" >> README.md
|
||||
for dir in */
|
||||
do
|
||||
readme_line "${dir%/}" >> README.md
|
||||
done
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
for dir in "${README_DIRS[@]}"
|
||||
do
|
||||
readme_dir "$dir"
|
||||
done
|
@ -1,6 +1,8 @@
|
||||
# Tools
|
||||
- [coreboot-collector](https://github.com/system76/coreboot-collector.git)
|
||||
- [ME Analyzer](https://github.com/platomav/MEAnalyzer.git)
|
||||
- [UEFITool](https://github.com/LongSoft/UEFITool.git)
|
||||
- [Intel ME 11.x Firmware Images Unpacker](https://github.com/ptresearch/unME11.git)
|
||||
- [Intel ME 12.x Firmware Images Unpacker](https://github.com/ptresearch/unME12.git)
|
||||
|
||||
## Contents
|
||||
- [coreboot-collector](./coreboot-collector/)
|
||||
- [ME Analyzer](./MEAnalyzer/)
|
||||
- [UEFITool](./UEFITool/)
|
||||
- [Intel ME 11.x Firmware Images Unpacker](./unME11/)
|
||||
- [Intel ME 12.x Firmware Images Unpacker](./unME12/)
|
||||
|
1
tools/README.md.in
Normal file
1
tools/README.md.in
Normal file
@ -0,0 +1 @@
|
||||
# Tools
|
Loading…
x
Reference in New Issue
Block a user