diff --git a/README.md b/README.md index 013635c..3f11987 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,51 @@ System76 Open Source Firmware +## Dependencies + +### Install toolchain +``` +sudo apt-get install \ + build-essential \ + bison \ + ccache \ + flex \ + git-lfs \ + gnat \ + mtools \ + nasm \ + uuid-dev +``` + +### Install rust nightly +``` +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly +``` + +### Load cargo environment (or optionally reboot) +``` +source ~/.cargo/env +``` + +### Install cargo-xbuild +``` +cargo install cargo-xbuild +``` + +### Build firmware, replace darp5 with your model (look in the models directory for examples) +``` +./scripts/build.sh darp5 +``` + +### Flashing firmware manually is not recommended for the normal user. For the advanced user, there is a script flash.sh which takes the same arguments as build.sh + ## Contents - [apps](./apps) - Applications - [coreboot](https://github.com/system76/coreboot.git) - coreboot README -- [edk2](https://github.com/system76/edk2.git) - EDK II Project +- [edk2](https://github.com/system76/edk2.git) - EDK II Project - [edk2-non-osi](https://github.com/tianocore/edk2-non-osi.git) -- [edk2-platforms](https://github.com/system76/edk2-platforms.git) - **EDK II Minimum Platform Firmware for Intel(R) Platforms** +- [edk2-platforms](https://github.com/system76/edk2-platforms.git) - **EDK II Minimum Platform Firmware for Intel(R) Platforms** - [FSP](https://github.com/IntelFsp/FSP.git) - IntelĀ® Firmware Support Package (IntelĀ® FSP) Binaries - [libs](./libs) - Libraries - [models](./models) - Models diff --git a/README.md.in b/README.md.in index ce606b3..6559d43 100644 --- a/README.md.in +++ b/README.md.in @@ -1,3 +1,41 @@ # firmware-open System76 Open Source Firmware + +## Dependencies + +### Install toolchain +``` +sudo apt-get install \ + build-essential \ + bison \ + ccache \ + flex \ + git-lfs \ + gnat \ + mtools \ + nasm \ + uuid-dev +``` + +### Install rust nightly +``` +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly +``` + +### Load cargo environment (or optionally reboot) +``` +source ~/.cargo/env +``` + +### Install cargo-xbuild +``` +cargo install cargo-xbuild +``` + +### Build firmware, replace darp5 with your model (look in the models directory for examples) +``` +./scripts/build.sh darp5 +``` + +### Flashing firmware manually is not recommended for the normal user. For the advanced user, there is a script flash.sh which takes the same arguments as build.sh diff --git a/edk2 b/edk2 index 7098162..7113862 160000 --- a/edk2 +++ b/edk2 @@ -1 +1 @@ -Subproject commit 7098162de6947ea8dd5ca58ce4d62cc74b68fb25 +Subproject commit 7113862a14ecbc679d806ead04ce717f2bc73fcb diff --git a/libs/intel-spi b/libs/intel-spi index 0495f63..cc65d9b 160000 --- a/libs/intel-spi +++ b/libs/intel-spi @@ -1 +1 @@ -Subproject commit 0495f63572c5a5c03e0b76bb16ccc5e0d963d167 +Subproject commit cc65d9bba6151591db34d5c6207e9c4f269b8426 diff --git a/models/README.md b/models/README.md index 8070dac..5a3f0a3 100644 --- a/models/README.md +++ b/models/README.md @@ -2,11 +2,14 @@ ## Contents +- [addp1](./addp1) - System76 Adder Pro (addp1) - [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) - [gaze14_1650_15](./gaze14_1650_15) - System76 Gazelle (gaze14) +- [gaze14_1650_17](./gaze14_1650_17) - System76 Gazelle (gaze14) - [gaze14_1660ti_15](./gaze14_1660ti_15) - System76 Gazelle (gaze14) +- [gaze14_1660ti_17](./gaze14_1660ti_17) - System76 Gazelle (gaze14) - [thelio-b1](./thelio-b1) - System76 Thelio (thelio-b1) diff --git a/models/addp1/README.md b/models/addp1/README.md new file mode 100644 index 0000000..35f0e07 --- /dev/null +++ b/models/addp1/README.md @@ -0,0 +1,12 @@ +# System76 Adder Pro (addp1) + +https://system76.com/guides/addp1 + +## Contents + +- [EC](./ec.rom) + - *Read Error: No such file or directory (os error 2)* +- [FD](./fd.rom) + - *Read Error: No such file or directory (os error 2)* +- [ME](./me.rom) + - *Read Error: No such file or directory (os error 2)* diff --git a/models/addp1/README.md.in b/models/addp1/README.md.in new file mode 100644 index 0000000..4154ae0 --- /dev/null +++ b/models/addp1/README.md.in @@ -0,0 +1,3 @@ +# System76 Adder Pro (addp1) + +https://system76.com/guides/addp1 diff --git a/models/gaze14_1650_15/coreboot.config b/models/gaze14_1650_15/coreboot.config index 4510c3e..a2fa533 100644 --- a/models/gaze14_1650_15/coreboot.config +++ b/models/gaze14_1650_15/coreboot.config @@ -120,7 +120,6 @@ CONFIG_SPI_FLASH_WINBOND=y # CONFIG_DRIVERS_UART_8250IO is not set # CONFIG_VBOOT is not set CONFIG_DIMM_MAX=2 -CONFIG_TTYS0_LCS=3 CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="Gazelle" CONFIG_IFD_BIN_PATH="$(FIRMWARE_OPEN_MODEL_DIR)/fd.rom" CONFIG_ME_BIN_PATH="$(FIRMWARE_OPEN_MODEL_DIR)/me.rom" @@ -133,7 +132,7 @@ CONFIG_FSP_M_CBFS="fspm.bin" CONFIG_CPU_ADDR_BITS=36 CONFIG_DEFAULT_CONSOLE_LOGLEVEL=7 CONFIG_MAINBOARD_VERSION="gaze14" -CONFIG_DRIVERS_PS2_KEYBOARD=y +# CONFIG_DRIVERS_PS2_KEYBOARD is not set CONFIG_PCIEXP_L1_SUB_STATE=y CONFIG_SMBIOS_ENCLOSURE_TYPE=0x09 CONFIG_HEAP_SIZE=0x8000 @@ -226,7 +225,6 @@ CONFIG_IED_REGION_SIZE=0x400000 CONFIG_PCIEXP_ASPM=y CONFIG_PCIEXP_COMMON_CLOCK=y CONFIG_PCIEXP_CLK_PM=y -CONFIG_TTYS0_BASE=0x3e8 CONFIG_SOC_INTEL_CANNONLAKE=y CONFIG_SOC_INTEL_COMMON_CANNONLAKE_BASE=y CONFIG_SOC_INTEL_COFFEELAKE=y @@ -656,7 +654,7 @@ CONFIG_FSP_USE_REPO=y # CONFIG_DISPLAY_UPD_DATA is not set CONFIG_PLATFORM_USES_FSP2_0=y # CONFIG_PLATFORM_USES_FSP2_1 is not set -CONFIG_DISPLAY_FSP_CALLS_AND_STATUS=y +# CONFIG_DISPLAY_FSP_CALLS_AND_STATUS is not set # CONFIG_DISPLAY_FSP_HEADER is not set CONFIG_FSP_T_CBFS="fspt.bin" CONFIG_FSP_T_FILE="$(obj)/Fsp_T.fd" @@ -721,28 +719,12 @@ CONFIG_RTC=y CONFIG_BOOTBLOCK_CONSOLE=y CONFIG_POSTCAR_CONSOLE=y CONFIG_SQUELCH_EARLY_SMP=y -CONFIG_CONSOLE_SERIAL=y +# CONFIG_CONSOLE_SERIAL is not set CONFIG_FIXED_UART_FOR_CONSOLE=y - -# -# memory mapped, 8250-compatible -# - -# -# Serial port base address = 0x3e8 -# -# CONFIG_CONSOLE_SERIAL_921600 is not set -# CONFIG_CONSOLE_SERIAL_460800 is not set -# CONFIG_CONSOLE_SERIAL_230400 is not set -CONFIG_CONSOLE_SERIAL_115200=y -# CONFIG_CONSOLE_SERIAL_57600 is not set -# CONFIG_CONSOLE_SERIAL_38400 is not set -# CONFIG_CONSOLE_SERIAL_19200 is not set -# CONFIG_CONSOLE_SERIAL_9600 is not set -CONFIG_TTYS0_BAUD=115200 # CONFIG_SPKMODEM is not set # CONFIG_CONSOLE_NE2K is not set CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000 +# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set # CONFIG_CONSOLE_SPI_FLASH is not set # CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8 is not set CONFIG_DEFAULT_CONSOLE_LOGLEVEL_7=y @@ -836,7 +818,6 @@ CONFIG_HAVE_DISPLAY_MTRRS=y # # General Debug Settings # -# CONFIG_GDB_STUB is not set # CONFIG_FATAL_ASSERTS is not set CONFIG_HAVE_DEBUG_GPIO=y # CONFIG_DEBUG_GPIO is not set diff --git a/models/gaze14_1650_17/README.md b/models/gaze14_1650_17/README.md new file mode 100644 index 0000000..4ed6e9a --- /dev/null +++ b/models/gaze14_1650_17/README.md @@ -0,0 +1,12 @@ +# System76 Gazelle (gaze14) + +https://system76.com/guides/gaze14 + +## Contents + +- [EC](./ec.rom) + - *Read Error: No such file or directory (os error 2)* +- [FD](./fd.rom) + - *Read Error: No such file or directory (os error 2)* +- [ME](./me.rom) + - *Read Error: No such file or directory (os error 2)* diff --git a/models/gaze14_1650_17/README.md.in b/models/gaze14_1650_17/README.md.in new file mode 100644 index 0000000..a111029 --- /dev/null +++ b/models/gaze14_1650_17/README.md.in @@ -0,0 +1,3 @@ +# System76 Gazelle (gaze14) + +https://system76.com/guides/gaze14 diff --git a/models/gaze14_1660ti_17/README.md b/models/gaze14_1660ti_17/README.md new file mode 100644 index 0000000..4ed6e9a --- /dev/null +++ b/models/gaze14_1660ti_17/README.md @@ -0,0 +1,12 @@ +# System76 Gazelle (gaze14) + +https://system76.com/guides/gaze14 + +## Contents + +- [EC](./ec.rom) + - *Read Error: No such file or directory (os error 2)* +- [FD](./fd.rom) + - *Read Error: No such file or directory (os error 2)* +- [ME](./me.rom) + - *Read Error: No such file or directory (os error 2)* diff --git a/models/gaze14_1660ti_17/README.md.in b/models/gaze14_1660ti_17/README.md.in new file mode 100644 index 0000000..a111029 --- /dev/null +++ b/models/gaze14_1660ti_17/README.md.in @@ -0,0 +1,3 @@ +# System76 Gazelle (gaze14) + +https://system76.com/guides/gaze14 diff --git a/scripts/flash.sh b/scripts/flash.sh new file mode 100755 index 0000000..36f98a4 --- /dev/null +++ b/scripts/flash.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -e + +if [ -z "$1" ] +then + echo "$0 [model]" >&2 + exit 1 +fi +MODEL="$1" + +if [ ! -d "models/$1" ] +then + echo "model '$1' not found" >&2 + exit 1 +fi +MODEL_DIR="$(realpath "models/${MODEL}")" + +cargo build --release --manifest-path libs/intel-spi/Cargo.toml +sudo libs/intel-spi/target/release/intel-spi "build/${MODEL}/coreboot.rom"