Commit 6713d2d1 authored by Matt Devillier's avatar Matt Devillier

Add configs, bootsplash, script for building

Change-Id: I1ea470ce710a3d32cc0e5a3be591dff343be1932
Signed-off-by: Matt Devillier's avatarMatt DeVillier <matt.devillier@puri.sm>
parent 65d983ba
/pci@i0cf8/pci-bridge@1d/*@0
/pci@i0cf8/*@17/drive@2/disk@0
/pci@i0cf8/*@1f,2/drive@1/disk@0
/pci@i0cf8/*@1f,2/drive@3/disk@0
/pci@i0cf8/*@17/drive@0/disk@0
/pci@i0cf8/*@1f,2/drive@0/disk@0
/pci@i0cf8/usb@14/usb-*@0
/pci@i0cf8/usb@14/usb-*@1
/pci@i0cf8/usb@14/usb-*@2
/pci@i0cf8/usb@14/usb-*@3
/pci@i0cf8/usb@14/usb-*@4
/pci@i0cf8/usb@14/usb-*@5
/pci@i0cf8/usb@14/usb-*@6
/pci@i0cf8/usb@14/usb-*@7
/pci@i0cf8/usb@14/usb-*@8
/pci@i0cf8/usb@14/usb-*@9
/pci@i0cf8/usb@14/usb-*@a
/pci@i0cf8/usb@14/usb-*@b
/pci@i0cf8/usb@14/usb-*@c
/pci@i0cf8/usb@14/usb-*@d
/pci@i0cf8/usb@14/usb-*@e
/pci@i0cf8/usb@14/usb-*@f
/pci@i0cf8/usb@14/hub@1/usb-*@0
/pci@i0cf8/usb@14/hub@1/usb-*@1
/pci@i0cf8/usb@14/hub@1/usb-*@2
/pci@i0cf8/usb@14/hub@1/usb-*@3
/pci@i0cf8/usb@14/hub@1/usb-*@4
/pci@i0cf8/usb@14/hub@1/usb-*@5
/pci@i0cf8/usb@14/hub@1/usb-*@6
/pci@i0cf8/usb@14/hub@1/usb-*@7
/pci@i0cf8/usb@14/hub@1/usb-*@8
/pci@i0cf8/usb@14/hub@1/usb-*@9
/pci@i0cf8/usb@14/hub@1/usb-*@a
/pci@i0cf8/usb@14/hub@1/usb-*@b
/pci@i0cf8/usb@14/hub@1/usb-*@c
/pci@i0cf8/usb@14/hub@1/usb-*@d
/pci@i0cf8/usb@14/hub@1/usb-*@e
/pci@i0cf8/usb@14/hub@1/usb-*@f
#!/usr/bin/bash
# use TERM to exit on error
trap "exit 1" TERM
export TOP_PID=$$
die () {
local msg=$1
if [ ! -z "$msg" ]; then
echo ""
echo -e "$msg"
echo ""
fi
kill -s TERM $TOP_PID
exit 1
}
update_crossgcc_toolchain() {
# assume called from coreboot root dir
local CURRENT_TOOLCHAIN_VERSION=0
local GCC_FILE='util/crossgcc/xgcc/bin/i386-elf-gcc'
local TARGET_TOOLCHAIN_VERSION="$(git log -n 1 --pretty=%h util/crossgcc)"
if [ -f "${GCC_FILE}" ]; then
CURRENT_TOOLCHAIN_VERSION=$(${GCC_FILE} --version | grep -m 1 'coreboot toolchain' | cut -f2 -d'v' | cut -f1 -d' ')
fi
if [ "${CURRENT_TOOLCHAIN_VERSION}" != "${TARGET_TOOLCHAIN_VERSION}" ]; then
echo "coreboot toolchain version changed from ${CURRENT_TOOLCHAIN_VERSION} to ${TARGET_TOOLCHAIN_VERSION}"
echo "Cleaning crossgcc compiler before rebuilding it"
make crossgcc-clean
make crossgcc-i386 CPUS=$(nproc)
[ $? -ne 0 ] && die "Error building coreboot toolchain" || true
fi
}
# check build target
BOARD=$1
if [[ ! -f configs/config.${BOARD} ]]; then
echo "Error: You must specify a valid build target"
exit 1
fi
# checkout/update submodules
make gitconfig || true
git submodule update --init 2>/dev/null || die "unable to update submodules"
# verify submodules clean
git submodule foreach 'git reset --hard' >/dev/null 2>&1
if [[ "`git diff 3rdparty`" != "" ]]; then
git sup >/dev/null 2>&1
[[ "`git diff 3rdparty`" != "" ]] && \
die "submodules have been modified; build would not be reproducible"
fi
# check/build toolchain
update_crossgcc_toolchain || die
# do a clean build
rm -rf ./build || true
#make distclean
# copy config
cp configs/config.${BOARD} .config
make olddefconfig >/dev/null
# build coreboot and payload(s)
if ! make; then
die "Error building coreboot"
fi
# get git rev
rev=$(git describe --tags --dirty)
# copy to root dir
filename="coreboot-${BOARD}-${rev}.rom"
cp build/coreboot.rom ./$filename
echo "$filename"
# print SHA for BIOS region (should match utility script)
util/ifdtool/ifdtool -x $filename >/dev/null
echo "SHA: $(sha256sum flashregion_1_bios.bin | awk '{print $1}')"
rm -f flashregion* 2>/dev/null
# add default bootorder
cbfstool $filename add -t raw -n bootorder -f bootorder.txt >/dev/null
CONFIG_LOCALVERSION="4.12-Purism-1"
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_VENDOR_PURISM=y
CONFIG_CBFS_SIZE=0x5C0000
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_bdw/descriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_bdw/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM13_V1=y
CONFIG_HAVE_MRC=y
CONFIG_MRC_FILE="3rdparty/purism-blobs/mainboard/purism/librem_bdw/mrc.bin"
CONFIG_HAVE_REFCODE_BLOB=y
CONFIG_REFCODE_BLOB_FILE="3rdparty/purism-blobs/mainboard/purism/librem_bdw/refcode.elf"
# CONFIG_PCIEXP_CLK_PM is not set
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_bdw/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1280
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=720
CONFIG_MAINBOARD_SERIAL_NUMBER="System Serial Number"
CONFIG_COREINFO_SECONDARY_PAYLOAD=y
CONFIG_LOCALVERSION="4.12-Purism-1"
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_VENDOR_PURISM=y
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_skl/descriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_skl/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM13_V2=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_skl/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1280
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=720
CONFIG_MAINBOARD_SERIAL_NUMBER="System Serial Number"
CONFIG_COREINFO_SECONDARY_PAYLOAD=y
CONFIG_LOCALVERSION="4.12-Purism-1"
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_VENDOR_PURISM=y
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_kbl/descriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_kbl/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM13_V4=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_kbl/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1280
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=720
CONFIG_MAINBOARD_SERIAL_NUMBER="System Serial Number"
CONFIG_COREINFO_SECONDARY_PAYLOAD=y
CONFIG_LOCALVERSION="4.12-Purism-1"
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_VENDOR_PURISM=y
CONFIG_CBFS_SIZE=0x5C0000
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_bdw/descriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_bdw/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM15_V2=y
CONFIG_HAVE_MRC=y
CONFIG_MRC_FILE="3rdparty/purism-blobs/mainboard/purism/librem_bdw/mrc.bin"
CONFIG_HAVE_REFCODE_BLOB=y
CONFIG_REFCODE_BLOB_FILE="3rdparty/purism-blobs/mainboard/purism/librem_bdw/refcode.elf"
# CONFIG_PCIEXP_CLK_PM is not set
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_bdw/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1280
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=720
CONFIG_MAINBOARD_SERIAL_NUMBER="System Serial Number"
CONFIG_COREINFO_SECONDARY_PAYLOAD=y
CONFIG_LOCALVERSION="4.12-Purism-1"
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_VENDOR_PURISM=y
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_skl/descriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_skl/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM15_V3=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_skl/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1280
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=720
CONFIG_MAINBOARD_SERIAL_NUMBER="System Serial Number"
CONFIG_COREINFO_SECONDARY_PAYLOAD=y
CONFIG_LOCALVERSION="4.12-Purism-1"
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_VENDOR_PURISM=y
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_kbl/descriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_kbl/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM15_V4=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_kbl/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1280
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=720
CONFIG_MAINBOARD_SERIAL_NUMBER="System Serial Number"
CONFIG_COREINFO_SECONDARY_PAYLOAD=y
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment