From 2b82b7ca087cc0045c5521449338076445bd1f52 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 14 Mar 2016 15:33:41 -0400 Subject: Add SeaBIOS payload to libreboot --- diff --git a/.gitignore b/.gitignore index d2c17b3..f717edf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ /flashrom/ /grub/ /memtest86plus/ +/seabios/ /bin/ /release/ /resources/utilities/ich9deblob/*.rom diff --git a/resources/libreboot/config/grub/kcma-d8/architecture b/resources/libreboot/config/seabios/kcma-d8/architecture index 5a9a476..5a9a476 100644 --- a/resources/libreboot/config/grub/kcma-d8/architecture +++ b/resources/libreboot/config/seabios/kcma-d8/architecture diff --git a/resources/libreboot/config/grub/kcma-d8/cbrevision b/resources/libreboot/config/seabios/kcma-d8/cbrevision index fabe753..fabe753 100644 --- a/resources/libreboot/config/grub/kcma-d8/cbrevision +++ b/resources/libreboot/config/seabios/kcma-d8/cbrevision diff --git a/resources/libreboot/config/grub/kcma-d8/config b/resources/libreboot/config/seabios/kcma-d8/config index 20f88b5..2624373 100644 --- a/resources/libreboot/config/grub/kcma-d8/config +++ b/resources/libreboot/config/seabios/kcma-d8/config @@ -18,7 +18,6 @@ CONFIG_COMPILER_GCC=y # CONFIG_USE_OPTION_TABLE is not set # CONFIG_UNCOMPRESSED_RAMSTAGE is not set CONFIG_COMPRESS_RAMSTAGE=y -# CONFIG_COMPRESS_PRERAM_STAGES is not set CONFIG_INCLUDE_CONFIG_FILE=y CONFIG_EARLY_CBMEM_INIT=y # CONFIG_COLLECT_TIMESTAMPS is not set @@ -122,7 +121,6 @@ CONFIG_HT_CHAIN_END_UNITID_BASE=0x20 CONFIG_HT_CHAIN_UNITID_BASE=0x0 CONFIG_ONBOARD_VGA_IS_PRIMARY=y # CONFIG_VGA_BIOS is not set -# CONFIG_UDELAY_IO is not set CONFIG_MAINBOARD_SERIAL_NUMBER="123456789" CONFIG_DCACHE_RAM_BASE=0xc2000 CONFIG_DCACHE_RAM_SIZE=0x1e000 @@ -205,6 +203,8 @@ CONFIG_FMDFILE="" # CONFIG_SOC_BROADCOM_CYGNUS is not set CONFIG_DCACHE_BSP_STACK_SIZE=0x4000 CONFIG_C_ENV_BOOTBLOCK_SIZE=0x10000 +CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y +CONFIG_ROMSTAGE_ADDR=0x2000000 CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT="northbridge/amd/amdfam10/bootblock.c" CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT="southbridge/amd/sb700/bootblock.c" CONFIG_TTYS0_BASE=0x3f8 @@ -255,11 +255,12 @@ CONFIG_SSE2=y # CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED is not set # CONFIG_CPU_TI_AM335X is not set CONFIG_PARALLEL_CPU_INIT=y +# CONFIG_PARALLEL_MP is not set +# CONFIG_UDELAY_IO is not set CONFIG_UDELAY_LAPIC=y # CONFIG_LAPIC_MONOTONIC_TIMER is not set # CONFIG_UDELAY_TSC is not set # CONFIG_UDELAY_TIMER2 is not set -# CONFIG_TSC_CALIBRATE_WITH_IO is not set CONFIG_TSC_SYNC_LFENCE=y # CONFIG_TSC_SYNC_MFENCE is not set CONFIG_LOGICAL_CPUS=y @@ -268,7 +269,6 @@ CONFIG_LOGICAL_CPUS=y # CONFIG_SERIALIZED_SMM_INITIALIZATION is not set CONFIG_X86_AMD_FIXED_MTRRS=y # CONFIG_PLATFORM_USES_FSP1_0 is not set -# CONFIG_PARALLEL_MP is not set # CONFIG_BACKUP_DEFAULT_SMM_REGION is not set # CONFIG_MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING is not set CONFIG_CACHE_AS_RAM=y @@ -308,6 +308,7 @@ CONFIG_LIMIT_HT_UP_WIDTH_16=y CONFIG_VIDEO_MB=0 # CONFIG_NORTHBRIDGE_AMD_PI is not set CONFIG_RAMBASE=0x100000 +# CONFIG_NORTHBRIDGE_INTEL_COMMON_MRC_CACHE is not set CONFIG_HPET_ADDRESS=0xfed00000 CONFIG_HPET_MIN_TICKS=0x14 CONFIG_MAX_PIRQ_LINKS=4 @@ -391,7 +392,6 @@ CONFIG_ARCH_RAMSTAGE_X86_32=y # CONFIG_USE_MARCH_586 is not set # CONFIG_AP_IN_SIPI_WAIT is not set # CONFIG_SIPI_VECTOR_IN_ROM is not set -CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y # CONFIG_ROMCC is not set # CONFIG_LATE_CBMEM_INIT is not set CONFIG_PC80_SYSTEM=y @@ -400,7 +400,6 @@ CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default" CONFIG_IOAPIC_INTERRUPTS_ON_FSB=y # CONFIG_IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS is not set # CONFIG_COMPILE_IN_DSDT is not set -CONFIG_ROMSTAGE_ADDR=0x2000000 CONFIG_VERSTAGE_ADDR=0x2000000 # @@ -452,6 +451,7 @@ CONFIG_DRIVERS_I2C_W83795=y # CONFIG_DRIVERS_LENOVO_WACOM is not set # CONFIG_DRIVER_MAXIM_MAX77686 is not set # CONFIG_DRIVER_PARADE_PS8625 is not set +# CONFIG_DRIVER_PARADE_PS8640 is not set CONFIG_DRIVERS_MC146818=y # CONFIG_MAINBOARD_HAS_LPC_TPM is not set # CONFIG_DRIVERS_RICOH_RCE822 is not set @@ -584,10 +584,14 @@ CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_UBOOT is not set # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_TIANOCORE is not set -CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_PAYLOAD_FILE="seabios.elf" CONFIG_PAYLOAD_OPTIONS="" CONFIG_COMPRESSED_PAYLOAD_LZMA=y # CONFIG_PAYLOAD_IS_FLAT_BINARY is not set + +# +# Secondary Payloads +# # CONFIG_COREINFO_SECONDARY_PAYLOAD is not set # CONFIG_MEMTEST_SECONDARY_PAYLOAD is not set diff --git a/resources/libreboot/config/grub/kcma-d8/vbootrevision b/resources/libreboot/config/seabios/kcma-d8/vbootrevision index c18bc86..c18bc86 100644 --- a/resources/libreboot/config/grub/kcma-d8/vbootrevision +++ b/resources/libreboot/config/seabios/kcma-d8/vbootrevision diff --git a/resources/libreboot/config/grub/kfsn4-dre/architecture b/resources/libreboot/config/seabios/kfsn4-dre/architecture index 5a9a476..5a9a476 100644 --- a/resources/libreboot/config/grub/kfsn4-dre/architecture +++ b/resources/libreboot/config/seabios/kfsn4-dre/architecture diff --git a/resources/libreboot/config/grub/kfsn4-dre/cbrevision b/resources/libreboot/config/seabios/kfsn4-dre/cbrevision index fabe753..fabe753 100644 --- a/resources/libreboot/config/grub/kfsn4-dre/cbrevision +++ b/resources/libreboot/config/seabios/kfsn4-dre/cbrevision diff --git a/resources/libreboot/config/grub/kfsn4-dre/config b/resources/libreboot/config/seabios/kfsn4-dre/config index 8f29244..35585c5 100644 --- a/resources/libreboot/config/grub/kfsn4-dre/config +++ b/resources/libreboot/config/seabios/kfsn4-dre/config @@ -19,7 +19,6 @@ CONFIG_USE_OPTION_TABLE=y # CONFIG_STATIC_OPTION_TABLE is not set # CONFIG_UNCOMPRESSED_RAMSTAGE is not set CONFIG_COMPRESS_RAMSTAGE=y -# CONFIG_COMPRESS_PRERAM_STAGES is not set CONFIG_INCLUDE_CONFIG_FILE=y CONFIG_EARLY_CBMEM_INIT=y # CONFIG_COLLECT_TIMESTAMPS is not set @@ -123,7 +122,6 @@ CONFIG_HT_CHAIN_END_UNITID_BASE=0x20 CONFIG_HT_CHAIN_UNITID_BASE=0x0 CONFIG_ONBOARD_VGA_IS_PRIMARY=y # CONFIG_VGA_BIOS is not set -# CONFIG_UDELAY_IO is not set CONFIG_MAINBOARD_SERIAL_NUMBER="123456789" CONFIG_DCACHE_RAM_BASE=0xc4000 CONFIG_DCACHE_RAM_SIZE=0x0c000 @@ -208,6 +206,8 @@ CONFIG_FMDFILE="" # CONFIG_SOC_BROADCOM_CYGNUS is not set CONFIG_DCACHE_BSP_STACK_SIZE=0x4000 CONFIG_C_ENV_BOOTBLOCK_SIZE=0x10000 +CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y +CONFIG_ROMSTAGE_ADDR=0x2000000 CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT="northbridge/amd/amdfam10/bootblock.c" CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT="southbridge/nvidia/ck804/bootblock.c" CONFIG_TTYS0_BASE=0x3f8 @@ -255,11 +255,12 @@ CONFIG_SSE2=y # CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED is not set # CONFIG_CPU_TI_AM335X is not set CONFIG_PARALLEL_CPU_INIT=y +# CONFIG_PARALLEL_MP is not set +# CONFIG_UDELAY_IO is not set CONFIG_UDELAY_LAPIC=y # CONFIG_LAPIC_MONOTONIC_TIMER is not set # CONFIG_UDELAY_TSC is not set # CONFIG_UDELAY_TIMER2 is not set -# CONFIG_TSC_CALIBRATE_WITH_IO is not set CONFIG_TSC_SYNC_LFENCE=y # CONFIG_TSC_SYNC_MFENCE is not set CONFIG_LOGICAL_CPUS=y @@ -268,7 +269,6 @@ CONFIG_LOGICAL_CPUS=y # CONFIG_SERIALIZED_SMM_INITIALIZATION is not set CONFIG_X86_AMD_FIXED_MTRRS=y # CONFIG_PLATFORM_USES_FSP1_0 is not set -# CONFIG_PARALLEL_MP is not set # CONFIG_BACKUP_DEFAULT_SMM_REGION is not set # CONFIG_MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING is not set CONFIG_CACHE_AS_RAM=y @@ -308,6 +308,7 @@ CONFIG_LIMIT_HT_UP_WIDTH_16=y CONFIG_VIDEO_MB=0 # CONFIG_NORTHBRIDGE_AMD_PI is not set CONFIG_RAMBASE=0x100000 +# CONFIG_NORTHBRIDGE_INTEL_COMMON_MRC_CACHE is not set CONFIG_HPET_ADDRESS=0xfed00000 CONFIG_HPET_MIN_TICKS=0xfa CONFIG_MAX_PIRQ_LINKS=4 @@ -389,7 +390,6 @@ CONFIG_ARCH_RAMSTAGE_X86_32=y # CONFIG_USE_MARCH_586 is not set # CONFIG_AP_IN_SIPI_WAIT is not set # CONFIG_SIPI_VECTOR_IN_ROM is not set -CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y # CONFIG_ROMCC is not set # CONFIG_LATE_CBMEM_INIT is not set CONFIG_PC80_SYSTEM=y @@ -398,7 +398,6 @@ CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default" CONFIG_IOAPIC_INTERRUPTS_ON_FSB=y # CONFIG_IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS is not set # CONFIG_COMPILE_IN_DSDT is not set -CONFIG_ROMSTAGE_ADDR=0x2000000 CONFIG_VERSTAGE_ADDR=0x2000000 # @@ -451,6 +450,7 @@ CONFIG_DRIVERS_I2C_W83793=y # CONFIG_DRIVERS_LENOVO_WACOM is not set # CONFIG_DRIVER_MAXIM_MAX77686 is not set # CONFIG_DRIVER_PARADE_PS8625 is not set +# CONFIG_DRIVER_PARADE_PS8640 is not set CONFIG_DRIVERS_MC146818=y # CONFIG_MAINBOARD_HAS_LPC_TPM is not set # CONFIG_DRIVERS_RICOH_RCE822 is not set @@ -570,10 +570,14 @@ CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_UBOOT is not set # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_TIANOCORE is not set -CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_PAYLOAD_FILE="seabios.elf" CONFIG_PAYLOAD_OPTIONS="" CONFIG_COMPRESSED_PAYLOAD_LZMA=y # CONFIG_PAYLOAD_IS_FLAT_BINARY is not set + +# +# Secondary Payloads +# # CONFIG_COREINFO_SECONDARY_PAYLOAD is not set # CONFIG_MEMTEST_SECONDARY_PAYLOAD is not set diff --git a/resources/libreboot/config/grub/kfsn4-dre/vbootrevision b/resources/libreboot/config/seabios/kfsn4-dre/vbootrevision index c18bc86..c18bc86 100644 --- a/resources/libreboot/config/grub/kfsn4-dre/vbootrevision +++ b/resources/libreboot/config/seabios/kfsn4-dre/vbootrevision diff --git a/resources/libreboot/config/grub/kgpe-d16/architecture b/resources/libreboot/config/seabios/kgpe-d16/architecture index 5a9a476..5a9a476 100644 --- a/resources/libreboot/config/grub/kgpe-d16/architecture +++ b/resources/libreboot/config/seabios/kgpe-d16/architecture diff --git a/resources/libreboot/config/grub/kgpe-d16/cbrevision b/resources/libreboot/config/seabios/kgpe-d16/cbrevision index fabe753..fabe753 100644 --- a/resources/libreboot/config/grub/kgpe-d16/cbrevision +++ b/resources/libreboot/config/seabios/kgpe-d16/cbrevision diff --git a/resources/libreboot/config/grub/kgpe-d16/config b/resources/libreboot/config/seabios/kgpe-d16/config index 05f1daf..d0c2347 100644 --- a/resources/libreboot/config/grub/kgpe-d16/config +++ b/resources/libreboot/config/seabios/kgpe-d16/config @@ -18,7 +18,6 @@ CONFIG_COMPILER_GCC=y # CONFIG_USE_OPTION_TABLE is not set # CONFIG_UNCOMPRESSED_RAMSTAGE is not set CONFIG_COMPRESS_RAMSTAGE=y -# CONFIG_COMPRESS_PRERAM_STAGES is not set CONFIG_INCLUDE_CONFIG_FILE=y CONFIG_EARLY_CBMEM_INIT=y # CONFIG_COLLECT_TIMESTAMPS is not set @@ -122,7 +121,6 @@ CONFIG_HT_CHAIN_END_UNITID_BASE=0x20 CONFIG_HT_CHAIN_UNITID_BASE=0x0 CONFIG_ONBOARD_VGA_IS_PRIMARY=y # CONFIG_VGA_BIOS is not set -# CONFIG_UDELAY_IO is not set CONFIG_MAINBOARD_SERIAL_NUMBER="123456789" CONFIG_DCACHE_RAM_BASE=0xc2000 CONFIG_DCACHE_RAM_SIZE=0x1e000 @@ -205,6 +203,8 @@ CONFIG_FMDFILE="" # CONFIG_SOC_BROADCOM_CYGNUS is not set CONFIG_DCACHE_BSP_STACK_SIZE=0x4000 CONFIG_C_ENV_BOOTBLOCK_SIZE=0x10000 +CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y +CONFIG_ROMSTAGE_ADDR=0x2000000 CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT="northbridge/amd/amdfam10/bootblock.c" CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT="southbridge/amd/sb700/bootblock.c" CONFIG_TTYS0_BASE=0x3f8 @@ -255,11 +255,12 @@ CONFIG_SSE2=y # CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED is not set # CONFIG_CPU_TI_AM335X is not set CONFIG_PARALLEL_CPU_INIT=y +# CONFIG_PARALLEL_MP is not set +# CONFIG_UDELAY_IO is not set CONFIG_UDELAY_LAPIC=y # CONFIG_LAPIC_MONOTONIC_TIMER is not set # CONFIG_UDELAY_TSC is not set # CONFIG_UDELAY_TIMER2 is not set -# CONFIG_TSC_CALIBRATE_WITH_IO is not set CONFIG_TSC_SYNC_LFENCE=y # CONFIG_TSC_SYNC_MFENCE is not set CONFIG_LOGICAL_CPUS=y @@ -268,7 +269,6 @@ CONFIG_LOGICAL_CPUS=y # CONFIG_SERIALIZED_SMM_INITIALIZATION is not set CONFIG_X86_AMD_FIXED_MTRRS=y # CONFIG_PLATFORM_USES_FSP1_0 is not set -# CONFIG_PARALLEL_MP is not set # CONFIG_BACKUP_DEFAULT_SMM_REGION is not set # CONFIG_MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING is not set CONFIG_CACHE_AS_RAM=y @@ -308,6 +308,7 @@ CONFIG_LIMIT_HT_UP_WIDTH_16=y CONFIG_VIDEO_MB=0 # CONFIG_NORTHBRIDGE_AMD_PI is not set CONFIG_RAMBASE=0x100000 +# CONFIG_NORTHBRIDGE_INTEL_COMMON_MRC_CACHE is not set CONFIG_HPET_ADDRESS=0xfed00000 CONFIG_HPET_MIN_TICKS=0x14 CONFIG_MAX_PIRQ_LINKS=4 @@ -391,7 +392,6 @@ CONFIG_ARCH_RAMSTAGE_X86_32=y # CONFIG_USE_MARCH_586 is not set # CONFIG_AP_IN_SIPI_WAIT is not set # CONFIG_SIPI_VECTOR_IN_ROM is not set -CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y # CONFIG_ROMCC is not set # CONFIG_LATE_CBMEM_INIT is not set CONFIG_PC80_SYSTEM=y @@ -400,7 +400,6 @@ CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default" CONFIG_IOAPIC_INTERRUPTS_ON_FSB=y # CONFIG_IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS is not set # CONFIG_COMPILE_IN_DSDT is not set -CONFIG_ROMSTAGE_ADDR=0x2000000 CONFIG_VERSTAGE_ADDR=0x2000000 # @@ -452,6 +451,7 @@ CONFIG_DRIVERS_I2C_W83795=y # CONFIG_DRIVERS_LENOVO_WACOM is not set # CONFIG_DRIVER_MAXIM_MAX77686 is not set # CONFIG_DRIVER_PARADE_PS8625 is not set +# CONFIG_DRIVER_PARADE_PS8640 is not set CONFIG_DRIVERS_MC146818=y # CONFIG_MAINBOARD_HAS_LPC_TPM is not set # CONFIG_DRIVERS_RICOH_RCE822 is not set @@ -584,10 +584,14 @@ CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_UBOOT is not set # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_TIANOCORE is not set -CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_PAYLOAD_FILE="seabios.elf" CONFIG_PAYLOAD_OPTIONS="" CONFIG_COMPRESSED_PAYLOAD_LZMA=y # CONFIG_PAYLOAD_IS_FLAT_BINARY is not set + +# +# Secondary Payloads +# # CONFIG_COREINFO_SECONDARY_PAYLOAD is not set # CONFIG_MEMTEST_SECONDARY_PAYLOAD is not set diff --git a/resources/libreboot/config/grub/kgpe-d16/vbootrevision b/resources/libreboot/config/seabios/kgpe-d16/vbootrevision index c18bc86..c18bc86 100644 --- a/resources/libreboot/config/grub/kgpe-d16/vbootrevision +++ b/resources/libreboot/config/seabios/kgpe-d16/vbootrevision diff --git a/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/grub/kcma-d8/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch b/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/seabios/kcma-d8/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch index 6427863..6427863 100644 --- a/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/grub/kcma-d8/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch +++ b/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/seabios/kcma-d8/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch diff --git a/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/grub/kfsn4-dre/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch b/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/seabios/kfsn4-dre/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch index 6427863..6427863 100644 --- a/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/grub/kfsn4-dre/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch +++ b/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/seabios/kfsn4-dre/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch diff --git a/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/grub/kgpe-d16/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch b/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/seabios/kgpe-d16/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch index 6427863..6427863 100644 --- a/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/grub/kgpe-d16/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch +++ b/resources/libreboot/patch/coreboot/15fca66bf08db45937ce88b950491963654805b9/seabios/kgpe-d16/0001-HOTFIX-AMD-fam10h-fam15h-don-t-use-microcode-updates.patch diff --git a/resources/scripts/helpers/build/clean/seabios b/resources/scripts/helpers/build/clean/seabios new file mode 100755 index 0000000..8de61d4 --- /dev/null +++ b/resources/scripts/helpers/build/clean/seabios @@ -0,0 +1,36 @@ +#!/bin/bash + +# helper script: clean the dependencies that were built in seabios +# +# Copyright (C) 2015 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the current working directory is the root +# of libreboot_src or libreboot git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +# clean bucts +# -------------------------------------------------------- + +printf "Cleaning the previous build of seabios\n" + +( +cd "seabios/" +make distclean +) + diff --git a/resources/scripts/helpers/build/config/seabiosmodify b/resources/scripts/helpers/build/config/seabiosmodify new file mode 100755 index 0000000..b31ef12 --- /dev/null +++ b/resources/scripts/helpers/build/config/seabiosmodify @@ -0,0 +1,38 @@ +#!/bin/bash + +# +# helper script: update the seabios config +# +# Copyright (C) 2014, 2015 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of libreboot_src or git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +( +cd "seabios/" + +if [ -f "../resources/seabios/config/config" ]; then + cp "../resources/seabios/config/config" ".config" +fi + +make menuconfig + +mv ".config" "../resources/seabios/config/config" +) diff --git a/resources/scripts/helpers/build/config/seabiosrommodify b/resources/scripts/helpers/build/config/seabiosrommodify new file mode 100755 index 0000000..e653429 --- /dev/null +++ b/resources/scripts/helpers/build/config/seabiosrommodify @@ -0,0 +1,72 @@ +#!/bin/bash + +# +# helper script: run "make menuconfig" on config(s) to modify them +# +# Copyright (C) 2014, 2015, 2016 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of libreboot_src or git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +payload="seabios" +configpath="resources/libreboot/config/${payload}" + +hackconfig () { + board="${1}" + cbrevision="$(cat ${configpath}/${board}/cbrevision)" + vbootrevision="$(cat ${configpath}/${board}/vbootrevision)" +( + cd "coreboot/${cbrevision}/${cbrevision}/" + git checkout ${payload}_${board} + ( + cd "3rdparty/vboot/" + git checkout ${payload}_${board} + ) + + printf "Modifying config for %s (%s payload)\n" "${board}" "${payload}" + sleep 2 + + if [ ! -d "../../../${configpath}/${board}/" ]; then + printf "build/config/seabiosmodify WARNING: config '%s' does not exist. Skipping.\n" "${board}" + git checkout master + ( + cd "3rdparty/vboot/" + git checkout master + ) + return + fi + + mv "../../../${configpath}/${board}/config" ".config" + make menuconfig + mv ".config" "../../../${configpath}/${board}/config" + + git checkout master + ( + cd "3rdparty/vboot/" + git checkout master + ) +) +} + +if [ $# -lt 1 ]; then + for config in ${configpath}/*; do hackconfig "${config##*/}"; done +else + for config in "${@}"; do hackconfig "${config}"; done +fi diff --git a/resources/scripts/helpers/build/config/seabiosromreplace b/resources/scripts/helpers/build/config/seabiosromreplace new file mode 100755 index 0000000..ec2359b --- /dev/null +++ b/resources/scripts/helpers/build/config/seabiosromreplace @@ -0,0 +1,63 @@ +#!/bin/bash + +# +# helper script: run "make menuconfig" on config(s) to replace them +# +# Copyright (C) 2014, 2015, 2016 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of libreboot_src or git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +payload="seabios" +configpath="resources/libreboot/config/${payload}" + +hackconfig () { + board="${1}" + cbrevision="$(cat ${configpath}/${board}/cbrevision)" + vbootrevision="$(cat ${configpath}/${board}/vbootrevision)" +( + cd "coreboot/${cbrevision}/${cbrevision}/" + git checkout ${payload}_${board} + ( + cd "3rdparty/vboot/" + git checkout ${payload}_${board} + ) + + printf "Replacing or creating new config for %s (%s payload)\n" "${board}" "${payload}" + sleep 2 + + make menuconfig + + [ ! -d "../../../${configpath}/${board}/" ] && mkdir -p "../../../${configpath}/${board}/" + mv ".config" "../../../${configpath}/${board}/config" + + git checkout master + ( + cd "3rdparty/vboot/" + git checkout master + ) +) +} + +if [ $# -lt 1 ]; then + for config in ${configpath}/*; do hackconfig "${config##*/}"; done +else + for config in "${@}"; do hackconfig "${config}"; done +fi diff --git a/resources/scripts/helpers/build/config/seabiosromupdate b/resources/scripts/helpers/build/config/seabiosromupdate new file mode 100755 index 0000000..cf090aa --- /dev/null +++ b/resources/scripts/helpers/build/config/seabiosromupdate @@ -0,0 +1,72 @@ +#!/bin/bash + +# +# helper script: run "make oldconfig" on all coreboot config files +# +# Copyright (C) 2014, 2015, 2016 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of libreboot_src or git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +payload="seabios" +configpath="resources/libreboot/config/${payload}" + +hackconfig () { + board="${1}" + cbrevision="$(cat ${configpath}/${board}/cbrevision)" + vbootrevision="$(cat ${configpath}/${board}/vbootrevision)" +( + cd "coreboot/${cbrevision}/${cbrevision}/" + git checkout ${payload}_${board} + ( + cd "3rdparty/vboot/" + git checkout ${payload}_${board} + ) + + printf "Updating config for %s (%s payload)\n" "${board}" "${payload}" + sleep 2 + + if [ ! -d "../../../${configpath}/${board}/" ]; then + printf "build/config/seabiosupdate WARNING: config '%s' does not exist. Skipping.\n" "${board}" + git checkout master + ( + cd "3rdparty/vboot/" + git checkout master + ) + return + fi + + mv "../../../${configpath}/${board}/config" ".config" + make oldconfig + mv ".config" "../../../${configpath}/${board}/config" + + git checkout master + ( + cd "3rdparty/vboot/" + git checkout master + ) +) +} + +if [ $# -lt 1 ]; then + for config in ${configpath}/*; do hackconfig "${config##*/}"; done +else + for config in "${@}"; do hackconfig "${config}"; done +fi diff --git a/resources/scripts/helpers/build/config/seabiosupdate b/resources/scripts/helpers/build/config/seabiosupdate new file mode 100755 index 0000000..d73d665 --- /dev/null +++ b/resources/scripts/helpers/build/config/seabiosupdate @@ -0,0 +1,36 @@ +#!/bin/bash + +# +# helper script: update the seabios config +# +# Copyright (C) 2014, 2015 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of libreboot_src or git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +( +cd seabios/ + +if [ -f ../resources/seabios/config/config ]; then + cp ../resources/seabios/config/config .config + make oldconfig + mv .config ../resources/seabios/config/config +fi +) diff --git a/resources/scripts/helpers/build/module/seabios b/resources/scripts/helpers/build/module/seabios new file mode 100755 index 0000000..d869c03 --- /dev/null +++ b/resources/scripts/helpers/build/module/seabios @@ -0,0 +1,49 @@ +#!/bin/bash + +# helper script: builds SeaBIOS source code +# +# Copyright (C) 2015 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of libreboot_src or git + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +# Build SeaBIOS +# --------------------------------------------------------------------- + +printf "Building SeaBIOS\n" + +cd seabios/ + +cp ../resources/seabios/config/config .config + +# clean it first +[[ -f Makefile ]] && make clean + +# build SeaBIOS +make + +printf "\n\n" + +rm -f .config + +# done. go back to main directory +cd ../ + +# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/release/src b/resources/scripts/helpers/build/release/src index e3cdbed..94d81d6 100755 --- a/resources/scripts/helpers/build/release/src +++ b/resources/scripts/helpers/build/release/src @@ -82,6 +82,7 @@ rm -Rf "${distdir}/bucts/".git* rm -Rf "${distdir}/flashrom/".git* rm -Rf "${distdir}/grub/".git* rm -Rf "${distdir}/depthcharge/".git* +rm -Rf "${distdir}/seabios/".git* rm -f "${distdir}"/*.vim diff --git a/resources/scripts/helpers/build/roms/withseabios b/resources/scripts/helpers/build/roms/withseabios new file mode 100755 index 0000000..dff1995 --- /dev/null +++ b/resources/scripts/helpers/build/roms/withseabios @@ -0,0 +1,55 @@ +#!/bin/bash + +# +# helper script: build ROM images with SeaBIOS and put them in ./bin/seabios/ +# +# Copyright (C) 2014, 2015, 2016 Francis Rowe +# Copyright (C) 2015 Klemens Nanni +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of git or release archive + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +printf "Building ROM images with the SeaBIOS payload\n" + +[ -d bin ] || mkdir "bin/" + +# Build ROM images for supported boards +buildrom() { + board="$1" + if [ -f "resources/libreboot/config/seabios/${board}/config" ]; then + ./build roms withseabios_helper "${board}" + fi +} + +if [ $# -gt 0 ]; then + for board in "${@}"; do + buildrom "${board}" + done +else + for board in resources/libreboot/config/seabios/*; do + buildrom "${board##*/}" + done +fi + +# The SeaBIOS files are no longer needed +rm -f "coreboot/seabios"*.{elf,cfg} +rm -f "coreboot/"*/*/*.{elf,cfg} + +printf "\n\n" diff --git a/resources/scripts/helpers/build/roms/withseabios_helper b/resources/scripts/helpers/build/roms/withseabios_helper new file mode 100755 index 0000000..e39fc22 --- /dev/null +++ b/resources/scripts/helpers/build/roms/withseabios_helper @@ -0,0 +1,125 @@ +#!/bin/bash + +# helper script: create ROM images for a given system, with SeaBIOS +# +# Copyright (C) 2014, 2015, 2016 Francis Rowe +# Copyright (C) 2015 Klemens Nanni +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the root +# of git or release archive + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e +if [ -z ${NPROC+x} ]; then + cores="$(nproc)" +else + case ${NPROC} in + ''|*[!0-9]*) + printf "value '%s' for NPROC is invalid. non-numeric. Exiting.\n" "${NPROC}" + exit 1 + ;; + esac + cores="${NPROC}" +fi + +if (( $# != 1 )); then + printf "Usage: ./buildrom-withseabios boardname\n" + printf "Example: ./buildrom-withseabios x60\n" + printf "You need to specify exactly 1 argument\n" + exit 1 +fi + +boardtarget="${1}" + +if [ -f "version" ]; then + # release archive is being used + version="$(cat version)" +else + # git repo is being used + version="$(git describe --tags HEAD)" +fi + +printf "SeaBIOS Helper script: build ROM images for '%s'\n" "${boardtarget}" + +( +cbrevision="$(cat resources/libreboot/config/seabios/${boardtarget}/cbrevision)" +vbootrevision="$(cat resources/libreboot/config/seabios/${boardtarget}/vbootrevision)" +branchname="seabios_${boardtarget}" + +cd "coreboot/${cbrevision}/${cbrevision}/" +git checkout ${branchname} +( + cd "3rdparty/vboot/" + git checkout ${branchname} +) + +# Make sure to remove these first +rm -f "seabios."*{elf,cfg} + +printf 'libreboot-%s\n' "${version}" > ".coreboot-version" # needed for reproducible builds in coreboot + +# Build ROM images with text-mode and corebootfb modes. + +for romtype in txtmode vesafb +do + if [ "${boardtarget}" = "kgpe-d16" ] || [ "${boardtarget}" = "kcma-d8" ]; then + if [ "${romtype}" = "vesafb" ]; then + printf "Only text-mode is reported to work on KGPE-D16, KCMA-D8\n" + printf "TODO: get tpearson to fix it\n" + continue + fi + fi + + # Build coreboot ROM image + make clean + cp "../../../resources/seabios/config/config" ".config" + cp "../../../seabios/out/bios.bin.elf" "seabios.elf" + make -j${cores} + rm -f "seabios.elf" + mv "build/coreboot.rom" "${boardtarget}_${romtype}.rom" + + # Now add SeaVGABIOS (SeaBIOS wrapper for coreboot native video init) + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f ../../../seabios/out/vgabios.bin -n vgaroms/vgabios.bin -t raw + + # .config no longer needed + rm -f ".config" +done + +# Clean up and prepare bin/ containing all ROM images + +# move ROM images into the newly created directory +rm -Rf "${boardtarget:?}/" +mkdir "${boardtarget}/" +mv "${boardtarget}"*.rom "${boardtarget}/" + +# delete old ROM images +rm -Rf "../../../bin/seabios/${boardtarget}/" +# put new ROM images in ../bin/grub/ +[ -d "../../../bin/seabios/" ] || mkdir -p "../../../bin/seabios/" +mv "${boardtarget}/" "../../../bin/seabios/" + +# version info file no longer needed +rm -f ".coreboot-version" + +git checkout master +( + cd "3rdparty/vboot/" + git checkout master +) +) + +printf "\n\n" diff --git a/resources/scripts/helpers/download/seabios b/resources/scripts/helpers/download/seabios new file mode 100755 index 0000000..0642bc7 --- /dev/null +++ b/resources/scripts/helpers/download/seabios @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Copyright (C) 2015, 2016 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This script assumes that the working directory is the +# root of libreboot_src or libreboot git. + +[ "x${DEBUG+set}" = 'xset' ] && set -v +set -u -e + +# Get SeaBIOS, revert to commit last used and apply patches. + +# Remove the old version that may still exist +# ------------------------------------------------------------------------------ + +printf "Downloading SeaBIOS\n" + +rm -rf "seabios/" + +# Get latest SeaBIOS +# ------------------------------------------------------------------------------ + +# download it using git +git clone git://git.seabios.org/seabios.git seabios + +( +# modifications are required +cd "seabios/" + +# Reset to the last commit that was tested (we use stable releases for seabios) +# ------------------------------------------------------------------------------ + +git reset --hard rel-1.9.1 +) + + diff --git a/resources/seabios/config/config b/resources/seabios/config/config new file mode 100644 index 0000000..3187127 --- /dev/null +++ b/resources/seabios/config/config @@ -0,0 +1,94 @@ +# +# Automatically generated file; DO NOT EDIT. +# SeaBIOS Configuration +# + +# +# General Features +# +CONFIG_COREBOOT=y +# CONFIG_QEMU is not set +# CONFIG_CSM is not set +# CONFIG_QEMU_HARDWARE is not set +CONFIG_THREADS=y +CONFIG_RELOCATE_INIT=y +CONFIG_BOOTMENU=y +CONFIG_BOOTSPLASH=y +CONFIG_BOOTORDER=y +CONFIG_COREBOOT_FLASH=y +CONFIG_LZMA=y +CONFIG_CBFS_LOCATION=0 +CONFIG_MULTIBOOT=y +CONFIG_ENTRY_EXTRASTACK=y +CONFIG_MALLOC_UPPERMEMORY=y +CONFIG_ROM_SIZE=0 + +# +# Hardware support +# +CONFIG_ATA=y +# CONFIG_ATA_DMA is not set +# CONFIG_ATA_PIO32 is not set +CONFIG_AHCI=y +CONFIG_SDCARD=y +CONFIG_MEGASAS=y +CONFIG_FLOPPY=y +CONFIG_FLASH_FLOPPY=y +CONFIG_PS2PORT=y +CONFIG_USB=y +CONFIG_USB_UHCI=y +CONFIG_USB_OHCI=y +CONFIG_USB_EHCI=y +CONFIG_USB_XHCI=y +CONFIG_USB_MSC=y +CONFIG_USB_UAS=y +CONFIG_USB_HUB=y +CONFIG_USB_KEYBOARD=y +CONFIG_USB_MOUSE=y +CONFIG_SERIAL=y +CONFIG_LPT=y +CONFIG_RTC_TIMER=y +CONFIG_HARDWARE_IRQ=y +CONFIG_PMTIMER=y +CONFIG_TSC_TIMER=y + +# +# BIOS interfaces +# +CONFIG_DRIVES=y +CONFIG_CDROM_BOOT=y +CONFIG_CDROM_EMU=y +CONFIG_PCIBIOS=y +CONFIG_APMBIOS=y +CONFIG_PNPBIOS=y +CONFIG_OPTIONROMS=y +CONFIG_PMM=y +CONFIG_BOOT=y +CONFIG_KEYBOARD=y +CONFIG_KBD_CALL_INT15_4F=y +CONFIG_MOUSE=y +CONFIG_S3_RESUME=y +CONFIG_VGAHOOKS=y +# CONFIG_DISABLE_A20 is not set +CONFIG_TCGBIOS=y + +# +# VGA ROM +# +# CONFIG_NO_VGABIOS is not set +# CONFIG_VGA_GEODEGX2 is not set +# CONFIG_VGA_GEODELX is not set +CONFIG_VGA_COREBOOT=y +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_EMULATE_TEXT=y +CONFIG_VGA_FIXUP_ASM=y +CONFIG_VGA_ALLOCATE_EXTRA_STACK=y +CONFIG_VGA_EXTRA_STACK_SIZE=512 +CONFIG_VGA_VBE=y + +# +# Debugging +# +CONFIG_DEBUG_LEVEL=1 +# CONFIG_DEBUG_SERIAL is not set +CONFIG_DEBUG_COREBOOT=y -- cgit v0.9.1