Skip to content

Commit

Permalink
Merge pull request #1002 from SergiiDmytruk/openpower-talos-2
Browse files Browse the repository at this point in the history
Add Talos 2 board (OpenPower)
  • Loading branch information
tlaurion committed Sep 2, 2022
2 parents 9df4e48 + d0ef7e8 commit 493149b
Show file tree
Hide file tree
Showing 20 changed files with 2,704 additions and 5 deletions.
32 changes: 28 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ commands:
command: |
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
apt update
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg gawk iasl m4 nasm patch python python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract sudo
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg gawk iasl m4 nasm patch python python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract sudo libssl-dev device-tree-compiler u-boot-tools
- run:
name: Make Board
command: |
Expand Down Expand Up @@ -129,12 +129,15 @@ jobs:
at: ~/
- build_board:
arch: <<parameters.arch>>
target: <<parameters.target>>
target: <<parameters.target>>
subcommand: <<parameters.subcommand>>
- persist_to_workspace:
root: ~/
paths:
- .
- project/packages/<<parameters.arch>>
- project/build/<<parameters.arch>>
- project/crossgcc/<<parameters.arch>>
- project/install/<<parameters.arch>>

build:
docker:
Expand Down Expand Up @@ -170,6 +173,7 @@ jobs:
paths:
- crossgcc
- build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- build/ppc64/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- packages
- save_cache:
#Generate cache for the same coreboot mnd musl-cross-make modules definition if hash is not previously existing
Expand All @@ -178,11 +182,13 @@ jobs:
paths:
- crossgcc
- build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- build/ppc64/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- packages
- build/x86/coreboot-4.11
- build/x86/coreboot-4.13
- build/x86/coreboot-4.14
- build/x86/coreboot-4.15
- build/ppc64/coreboot-git
- save_cache:
#Generate cache for the exact same modules definitions if hash is not previously existing
key: heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
Expand Down Expand Up @@ -226,11 +232,21 @@ workflows:
# requires:
# - librem_14

# Coreboot for Talos
- build_and_persist:
name: talos-2_server
arch: ppc64
target: talos-2_server
subcommand: ""
requires:
- prep_env

#Cache one workspace per Coreboot version, ideally the boards including the highest number of modules, since not rebuilt across builds.
#Below, 4.11, 4.13, 4.15
- save_cache:
requires:
- librem_15v4
- librem_14
- talos-2_server

#
#
Expand Down Expand Up @@ -503,6 +519,14 @@ workflows:
# requires:
# - librem_14

- build:
name: talos-2_workstation
arch: ppc64
target: talos-2_workstation
subcommand: ""
requires:
- talos-2_server

########################
########################
### OLD STUFF ###
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ define define_module =
# this case, since we don't have a stable version to compare against.
$(build)/$($1_base_dir)/.canary:
git clone $($1_repo) "$(build)/$($1_base_dir)"
cd $(build)/$($1_base_dir) && git submodule update --init --checkout
cd $(build)/$($1_base_dir) && git reset --hard $($1_commit_hash) && git submodule update --init --checkout
if [ -r patches/$($1_patch_name).patch ]; then \
( cd $(build)/$($1_base_dir) ; patch -p1 ) \
< patches/$($1_patch_name).patch \
Expand Down Expand Up @@ -458,6 +458,7 @@ bin_modules-$(CONFIG_FBWHIPTAIL) += fbwhiptail
bin_modules-$(CONFIG_HOTPKEY) += hotp-verification
bin_modules-$(CONFIG_MSRTOOLS) += msrtools
bin_modules-$(CONFIG_NKSTORECLI) += nkstorecli
bin_modules-$(CONFIG_UTIL_LINUX) += util-linux

$(foreach m, $(bin_modules-y), \
$(call map,initrd_bin_add,$(call bins,$m)) \
Expand Down
47 changes: 47 additions & 0 deletions boards/talos-2_server/talos-2_server.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Configuration for a Talos 2 running Qubes and other OSes
# The board uses BE coreboot and LE Linux kernel and initrd
CONFIG_TARGET_ARCH=ppc64

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=talos_2
export CONFIG_LINUX_VERSION=5.5-openpower

CONFIG_COREBOOT_CONFIG=config/coreboot-talos-2.config
CONFIG_COREBOOT_ROM=coreboot.rom.signed.ecc
CONFIG_COREBOOT_BOOTBLOCK=bootblock.signed.ecc
CONFIG_LINUX_CONFIG=config/linux-talos-2_server.config

CONFIG_CRYPTSETUP=y
CONFIG_LVM2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_MBEDTLS=y
CONFIG_POPT=y
CONFIG_QRENCODE=y
CONFIG_TPMTOTP=y
CONFIG_GPG2=y
CONFIG_PCIUTILS=y

#Whiptail in console mode
CONFIG_SLANG=y
CONFIG_NEWT=y

CONFIG_LINUX_USB=y
CONFIG_LINUX_BUNDLED=y

#SSH client/server
CONFIG_DROPBEAR=y

# for OpenBMC VGA console
export CONFIG_USE_AGETTY=y
export CONFIG_USB_KEYBOARD=y
export CONFIG_BOOT_EXTRA_TTYS="tty0"

export CONFIG_TPM=y
export CONFIG_BOOTSCRIPT=/bin/gui-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_KERNEL_REMOVE="quiet"
export CONFIG_BOOT_KERNEL_ADD="console=tty0 console=hvc0 rootdelay=3 rootwait panic=10"
export CONFIG_BOOT_DEV="/dev/sda1"
export CONFIG_BOARD_NAME="Talos 2 Server"
47 changes: 47 additions & 0 deletions boards/talos-2_workstation/talos-2_workstation.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Configuration for a Talos 2 running Qubes and other OSes
# The board uses BE coreboot and LE Linux kernel and initrd
CONFIG_TARGET_ARCH=ppc64

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=talos_2
export CONFIG_LINUX_VERSION=5.5-openpower

CONFIG_COREBOOT_CONFIG=config/coreboot-talos-2.config
CONFIG_COREBOOT_ROM=coreboot.rom.signed.ecc
CONFIG_COREBOOT_BOOTBLOCK=bootblock.signed.ecc
CONFIG_LINUX_CONFIG=config/linux-talos-2_workstation.config

CONFIG_CRYPTSETUP=y
CONFIG_LVM2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_MBEDTLS=y
CONFIG_POPT=y
CONFIG_QRENCODE=y
CONFIG_TPMTOTP=y
CONFIG_GPG2=y
CONFIG_PCIUTILS=y

#whiptail in graphical mode
CONFIG_CAIRO=y
CONFIG_FBWHIPTAIL=y

CONFIG_LINUX_USB=y
CONFIG_LINUX_BUNDLED=y

#SSH client/server
CONFIG_DROPBEAR=y

# for OpenBMC VGA console
export CONFIG_USE_AGETTY=y
export CONFIG_USB_KEYBOARD=y
export CONFIG_BOOT_EXTRA_TTYS="tty0"

export CONFIG_TPM=y
export CONFIG_BOOTSCRIPT=/bin/gui-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_KERNEL_REMOVE="quiet"
export CONFIG_BOOT_KERNEL_ADD="console=tty0 console=hvc0 rootdelay=3 rootwait panic=10"
export CONFIG_BOOT_DEV="/dev/sda1"
export CONFIG_BOARD_NAME="Talos 2 Workstation"
2 changes: 2 additions & 0 deletions config/coreboot-talos-2.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_VENDOR_RAPTOR_CS=y
CONFIG_PAYLOAD_SKIBOOT=y
Loading

0 comments on commit 493149b

Please sign in to comment.