Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optiplex SeaBIOS + TXT #583

Merged
merged 9 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 42 additions & 26 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,47 @@ set -euo pipefail
usage() {
echo "${0} CMD"
echo "Available CMDs:"
echo -e "\tz690a_ddr4 - build Dasharo image compatible with MSI PRO Z690-A (WIFI) DDR4"
echo -e "\tz690a_ddr5 - build Dasharo image compatible with MSI PRO Z690-A (WIFI)"
echo -e "\tz790p_ddr4 - build Dasharo image compatible with MSI PRO Z790-P (WIFI) DDR4"
echo -e "\tz790p_ddr5 - build Dasharo image compatible with MSI PRO Z790-P (WIFI)"
echo -e "\tvp66xx - build Dasharo for Protectli VP66xx"
echo -e "\tvp46xx - build Dasharo for Protectli VP46xx"
echo -e "\tvp32xx - build Dasharo for Protectli VP32xx"
echo -e "\tvp2430 - build Dasharo for Protectli VP2430"
echo -e "\tvp2420 - build Dasharo for Protectli VP2420"
echo -e "\tvp2410 - build Dasharo for Protectli VP2410"
echo -e "\tV1210 - build Dasharo for Protectli V1210"
echo -e "\tV1410 - build Dasharo for Protectli V1410"
echo -e "\tV1610 - build Dasharo for Protectli V1610"
echo -e "\tapu2 - build Dasharo for PC Engines APU2"
echo -e "\tapu3 - build Dasharo for PC Engines APU3"
echo -e "\tapu4 - build Dasharo for PC Engines APU4"
echo -e "\tapu6 - build Dasharo for PC Engines APU6"
echo -e "\toptiplex_9010 - build Dasharo compatible with Dell OptiPlex 7010/9010"
echo -e "\tqemu - build Dasharo for QEMU Q35"
echo -e "\tqemu_full - build Dasharo for QEMU Q35 with all menus available"
echo -e "\todroid_h4 - build Dasharo compatible with Hardkernel ODROID H4"
echo -e "\tz690a_ddr4 - build Dasharo image compatible with MSI PRO Z690-A (WIFI) DDR4"
echo -e "\tz690a_ddr5 - build Dasharo image compatible with MSI PRO Z690-A (WIFI)"
echo -e "\tz790p_ddr4 - build Dasharo image compatible with MSI PRO Z790-P (WIFI) DDR4"
echo -e "\tz790p_ddr5 - build Dasharo image compatible with MSI PRO Z790-P (WIFI)"
echo -e "\tvp66xx - build Dasharo for Protectli VP66xx"
echo -e "\tvp46xx - build Dasharo for Protectli VP46xx"
echo -e "\tvp32xx - build Dasharo for Protectli VP32xx"
echo -e "\tvp2430 - build Dasharo for Protectli VP2430"
echo -e "\tvp2420 - build Dasharo for Protectli VP2420"
echo -e "\tvp2410 - build Dasharo for Protectli VP2410"
echo -e "\tV1210 - build Dasharo for Protectli V1210"
echo -e "\tV1410 - build Dasharo for Protectli V1410"
echo -e "\tV1610 - build Dasharo for Protectli V1610"
echo -e "\tapu2 - build Dasharo for PC Engines APU2"
echo -e "\tapu3 - build Dasharo for PC Engines APU3"
echo -e "\tapu4 - build Dasharo for PC Engines APU4"
echo -e "\tapu6 - build Dasharo for PC Engines APU6"
echo -e "\toptiplex_9010_uefi - build Dasharo compatible with Dell OptiPlex 7010/9010 (UEFI)"
echo -e "\toptiplex_9010_seabios - build Dasharo compatible with Dell OptiPlex 7010/9010 (SeaBIOS)"
echo -e "\tqemu - build Dasharo for QEMU Q35"
echo -e "\tqemu_full - build Dasharo for QEMU Q35 with all menus available"
echo -e "\todroid_h4 - build Dasharo compatible with Hardkernel ODROID H4"
}

SDKVER="2024-02-18_732134932b"


function build_optiplex_9010 {
DEFCONFIG="configs/config.dell_optiplex_9010_sff_uefi_txt"
FW_VERSION=v0.1.0-rc1
DEFCONFIG=$1
# Determine FW flavor first (uefi or seabios)
if [[ ${DEFCONFIG} == *"uefi"* ]]; then
FW_FLAVOR="uefi"
else
FW_FLAVOR="seabios"
fi

# Get FW version
FW_VERSION=$(cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d '=' -f 2 | tr -d '"')

# Combine FW flavor with version
FW_VERSION="${FW_FLAVOR}_${FW_VERSION}"

docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \
-v $HOME/.ssh:/home/coreboot/.ssh \
Expand Down Expand Up @@ -323,9 +335,13 @@ case "$CMD" in
"apu6" | "APU6" )
build_pcengines "apu6"
;;
"optiplex_9010" | "optiplex_7010" )
BOARD=optiplex_9010
build_optiplex_9010
"optiplex_9010_uefi")
BOARD="optiplex_9010"
build_optiplex_9010 "configs/config.dell_optiplex_9010_sff_uefi_txt"
;;
"optiplex_9010_seabios")
BOARD="optiplex_9010"
build_optiplex_9010 "configs/config.dell_optiplex_9010_sff_txt"
;;
"qemu" | "QEMU" | "q35" | "Q35" )
build_qemu
Expand Down
25 changes: 18 additions & 7 deletions configs/config.dell_optiplex_9010_sff
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
CONFIG_USE_OPTION_TABLE=y
CONFIG_USE_BLOBS=y
CONFIG_LOCALVERSION="v0.1.0-rc3"
CONFIG_VENDOR_DELL=y
CONFIG_BOARD_DELL_OPTIPLEX_9010=y
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
# CONFIG_DRIVERS_UART_8250IO is not set
CONFIG_SEABIOS_PS2_TIMEOUT=3000
CONFIG_PXE_ROM_ID="8086,1502"
CONFIG_BOARD_DELL_OPTIPLEX_9010=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x100000
CONFIG_PCIEXP_CLK_PM=y
CONFIG_TPM_MEASURED_BOOT=y
# CONFIG_RESOURCE_ALLOCATION_TOP_DOWN is not set
# CONFIG_USE_PC_CMOS_ALTCENTURY is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0=y
# CONFIG_CONSOLE_USE_LOGLEVEL_PREFIX is not set
# CONFIG_CONSOLE_USE_ANSI_ESCAPES is not set
CONFIG_SEABIOS_USB_SIGATT_TIME=3000
CONFIG_SEABIOS_PS2_TIMEOUT=3000
CONFIG_POST_DEVICE_LPC=y
CONFIG_HAVE_EM100_SUPPORT=y
CONFIG_SEABIOS_ADD_SERCON_PORT_FILE=y
CONFIG_SEABIOS_DEBUG_LEVEL=0
CONFIG_PXE=y
CONFIG_BUILD_IPXE=y
# CONFIG_IPXE_SERIAL_CONSOLE is not set
CONFIG_IPXE_ADD_SCRIPT=y
CONFIG_IPXE_SCRIPT="3rdparty/dasharo-blobs/dasharo/dasharo.ipxe"
18 changes: 15 additions & 3 deletions configs/config.dell_optiplex_9010_sff_txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
CONFIG_LOCALVERSION="v0.1.0-rc3"
CONFIG_VENDOR_DELL=y
CONFIG_CBFS_SIZE=0x400000
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
CONFIG_SEABIOS_PS2_TIMEOUT=3000
CONFIG_PXE_ROM_ID="8086,1502"
CONFIG_BOARD_DELL_OPTIPLEX_9010=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x100000
CONFIG_PCIEXP_CLK_PM=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_HIDE_MEI_ON_ERROR=y
# CONFIG_RESOURCE_ALLOCATION_TOP_DOWN is not set
# CONFIG_USE_PC_CMOS_ALTCENTURY is not set
CONFIG_INTEL_TXT=y
CONFIG_INTEL_TXT_BDR_VERSION=4
CONFIG_POST_DEVICE_LPC=y
CONFIG_INTEL_TXT_LOGGING=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0=y
# CONFIG_CONSOLE_USE_LOGLEVEL_PREFIX is not set
# CONFIG_CONSOLE_USE_ANSI_ESCAPES is not set
CONFIG_SEABIOS_USB_SIGATT_TIME=3000
CONFIG_SEABIOS_ADD_SERCON_PORT_FILE=y
CONFIG_SEABIOS_DEBUG_LEVEL=0
CONFIG_PXE=y
CONFIG_BUILD_IPXE=y
# CONFIG_IPXE_SERIAL_CONSOLE is not set
CONFIG_IPXE_ADD_SCRIPT=y
CONFIG_IPXE_SCRIPT="3rdparty/dasharo-blobs/dasharo/dasharo.ipxe"
1 change: 0 additions & 1 deletion configs/config.dell_optiplex_9010_sff_uefi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
CONFIG_LOCALVERSION="v0.1.1"
CONFIG_OPTION_BACKEND_NONE=y
CONFIG_VENDOR_DELL=y
CONFIG_FMDFILE="src/mainboard/dell/snb_ivb_workstations/default.fmd"
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
CONFIG_BOARD_DELL_OPTIPLEX_9010=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x100000
Expand Down
1 change: 0 additions & 1 deletion configs/config.dell_optiplex_9010_sff_uefi_txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
CONFIG_LOCALVERSION="v0.1.1"
CONFIG_OPTION_BACKEND_NONE=y
CONFIG_VENDOR_DELL=y
CONFIG_FMDFILE="src/mainboard/dell/snb_ivb_workstations/default.fmd"
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
CONFIG_BOARD_DELL_OPTIPLEX_9010=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x100000
Expand Down
3 changes: 3 additions & 0 deletions src/mainboard/dell/snb_ivb_workstations/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ config USBDEBUG_HCD_INDEX
config CBFS_SIZE
default 0x600000

config FMDFILE
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/default.fmd"

config INCLUDE_SMSC_SCH5545_EC_FW
bool "Include SMSC SCH5545 EC firmware binary"
default n
Expand Down