Improve readmes

This commit is contained in:
Jeremy Soller
2019-03-18 12:26:17 -06:00
parent d5ab76f9db
commit 1b1c3b87f2
12 changed files with 49 additions and 54 deletions

View File

@ -3,11 +3,12 @@
System76 Open Source Firmware
## Contents
- [Applications](./apps/)
- [coreboot README](./coreboot/)
- [edk2](./edk2/)
- [edk2-platforms](./edk2-platforms/)
- [Libraries](./libs/)
- [Models](./models/)
- [scripts](./scripts/)
- [Tools](./tools/)
- [apps](./apps) - Applications
- [coreboot](https://github.com/system76/coreboot.git) - coreboot README
- [edk2](https://github.com/system76/edk2.git) - EDK II Project
- [edk2-platforms](https://github.com/system76/edk2-platforms.git) - **EDK II Minimum Platform Firmware for Intel(R) Platforms**
- [libs](./libs) - Libraries
- [models](./models) - Models
- [scripts](./scripts)
- [tools](./tools) - Tools

View File

@ -1,5 +1,6 @@
# Applications
## Contents
- [System76 Firmware Setup](./firmware-setup/)
- [System76 Firmware Update](./firmware-update/)
- [firmware-setup](https://github.com/system76/firmware-setup.git) - System76 Firmware Setup
- [firmware-update](https://github.com/system76/firmware-update.git) - System76 Firmware Update

View File

@ -1,10 +1,11 @@
# Libraries
## Contents
- [coreboot-table](./coreboot-table/)
- [ecflash](./ecflash/)
- [intelflash](./intelflash/)
- [intel-spi](./intel-spi/)
- [uefi](./uefi/)
- [uefi_alloc](./uefi_alloc/)
- [uefi_std](./uefi_std/)
- [coreboot-table](https://gitlab.redox-os.org/redox-os/coreboot-table.git) - coreboot-table
- [ecflash](https://github.com/system76/ecflash.git) - ecflash
- [intelflash](https://gitlab.redox-os.org/redox-os/intelflash.git) - intelflash
- [intel-spi](https://github.com/system76/intel-spi.git) - intel-spi
- [uefi](https://gitlab.redox-os.org/redox-os/uefi.git)
- [uefi_alloc](https://gitlab.redox-os.org/redox-os/uefi_alloc.git)
- [uefi_std](https://gitlab.redox-os.org/redox-os/uefi_std.git) - uefi_std

View File

@ -1,8 +1,9 @@
# Models
## 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/)
- [darp5](./darp5) - System76 Darter Pro (darp5)
- [galp2](./galp2) - System76 Galago Pro (galp2)
- [galp3](./galp3) - System76 Galago Pro (galp3)
- [galp3-b](./galp3-b) - System76 Galago Pro (galp3-b)
- [galp3-c](./galp3-c) - System76 Galago Pro (galp3-c)

View File

@ -3,6 +3,7 @@
https://system76.com/guides/darp5
## Contents
- [EC](./ec.rom)
- Size: 128 KB
- Model: N150ZU

View File

@ -3,6 +3,7 @@
https://system76.com/guides/galp2
## Contents
- [EC](./ec.rom)
- Size: 128 KB
- Model: N130BU

View File

@ -3,6 +3,7 @@
https://system76.com/guides/galp3
## Contents
- [EC](./ec.rom)
- Size: 128 KB
- Model: N140WU

View File

@ -3,6 +3,7 @@
https://system76.com/guides/galp3
## Contents
- [EC](./ec.rom)
- Size: 128 KB
- Model: N130ZU

View File

@ -3,6 +3,7 @@
https://system76.com/guides/galp3
## Contents
- [EC](./ec.rom)
- Size: 128 KB
- Model: N130WU

View File

@ -1,18 +0,0 @@
#!/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

View File

@ -22,6 +22,7 @@ function readme_model {
echo >> README.md
echo "## Contents" >> README.md
echo >> README.md
"$MODELTOOL" . >> README.md
popd > /dev/null
}
@ -34,24 +35,25 @@ done
function readme_line {
echo -e " \x1B[1m$1\x1B[0m" >&2
if [ -f "$1/README.md" ]
name="$(basename "$1")"
description=""
readme="$(find "$1" -maxdepth 1 -iname README.md)"
if [ -n "$readme" ]
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")"
description=" - $(head -n 1 "$readme" | sed -e 's/^[#[:space:]]*//')"
fi
submodule="$(git submodule status "$1" 2> /dev/null | cut -d ' ' -f 3 || true)"
if [ "$submodule" == "$dir" ]
if [ "$submodule" == "$1" ]
then
# Link to submodule URL
origin="$(git -C "$dir" remote get-url origin)"
echo "- [$description]($origin)"
origin="$(git -C "$1" remote get-url origin)"
echo "- [$name]($origin)$description"
else
# Link to directory
echo "- [$description](./$dir)"
echo "- [$name](./$1)$description"
fi
}
@ -63,6 +65,7 @@ function readme_dir {
echo >> README.md
echo "## Contents" >> README.md
echo >> README.md
for dir in */
do
readme_line "${dir%/}" >> README.md

View File

@ -1,8 +1,9 @@
# Tools
## 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/)
- [coreboot-collector](https://github.com/system76/coreboot-collector.git) - coreboot-collector
- [MEAnalyzer](https://github.com/platomav/MEAnalyzer.git) - ME Analyzer
- [UEFITool](https://github.com/LongSoft/UEFITool.git) - UEFITool
- [unME11](https://github.com/ptresearch/unME11.git) - Intel ME 11.x Firmware Images Unpacker
- [unME12](https://github.com/ptresearch/unME12.git) - Intel ME 12.x Firmware Images Unpacker