libreboot

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4fe6a7e48e17f0668919d9230a392663f7ff7390
parent 6af64c59134384a3960546764d5baac884942704
Author: Klemens Nanni <contact@autoboot.org>
Date:   Wed,  9 Dec 2015 12:35:32 +0100

New payload: Coreinfo

Add coreinfo as optional payload providing various
useful system information.

As part of coreboot, coreinfo does not need to be
downloaded seperately, just build it using

         $ ./build module coreinfo

after downloading and building coreboot.

See https://www.coreboot.org/Payloads#Coreinfo for
more information.

Diffstat:
resources/grub/config/menuentries/txtmode.cfg | 5++++-
resources/libreboot/config/coreboot/coreinfo | 1+
resources/libreboot/config/coreinfo/config | 26++++++++++++++++++++++++++
resources/libreboot/config/libpayload/config | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
resources/scripts/helpers/build/module/coreinfo | 39+++++++++++++++++++++++++++++++++++++++
resources/scripts/helpers/build/roms/withgrub_helper | 6++++++
6 files changed, 159 insertions(+), 1 deletion(-)

diff --git a/resources/grub/config/menuentries/txtmode.cfg b/resources/grub/config/menuentries/txtmode.cfg @@ -2,4 +2,7 @@ menuentry 'Load MemTest86+ [m]' --hotkey='m' { set root='memdisk' linux16 /memtest.bin } - +menuentry 'Load Coreinfo [i]' --hotkey='i' { + set root='cbfsdisk' + chainloader /coreinfo.elf +} diff --git a/resources/libreboot/config/coreboot/coreinfo b/resources/libreboot/config/coreboot/coreinfo @@ -0,0 +1 @@ +753af5b1042a73d6287a7b9ee78755cb29013ba6 diff --git a/resources/libreboot/config/coreinfo/config b/resources/libreboot/config/coreinfo/config @@ -0,0 +1,26 @@ +# +# Automatically generated file; DO NOT EDIT. +# coreinfo Configuration +# + +# +# General settings +# +CONFIG_SHOW_DATE_TIME=y +CONFIG_PAYLOAD_INFO_NAME="coreinfo" +CONFIG_PAYLOAD_INFO_LISTNAME="System Information" +CONFIG_PAYLOAD_INFO_DESC="Display information about the system" +CONFIG_PAYLOAD_INFO_VERSION="0.1" + +# +# Modules +# +CONFIG_MODULE_COREBOOT=y +CONFIG_MODULE_MULTIBOOT=y +CONFIG_MODULE_CPUINFO=y +CONFIG_MODULE_PCI=y +CONFIG_MODULE_NVRAM=y +CONFIG_MODULE_BOOTLOG=y +CONFIG_MODULE_RAMDUMP=y +# CONFIG_MODULE_LAR is not set +CONFIG_MODULE_CBFS=y diff --git a/resources/libreboot/config/libpayload/config b/resources/libreboot/config/libpayload/config @@ -0,0 +1,83 @@ +# +# Automatically generated file; DO NOT EDIT. +# Libpayload Configuration +# + +# +# Generic Options +# +CONFIG_LP_GPL=y +# CONFIG_LP_EXPERIMENTAL is not set +# CONFIG_LP_DEVELOPER is not set +CONFIG_LP_COMPILER_GCC=y +# CONFIG_LP_COMPILER_LLVM_CLANG is not set +# CONFIG_LP_REMOTEGDB is not set +# CONFIG_LP_CHROMEOS is not set + +# +# Architecture Options +# +# CONFIG_LP_ARCH_ARM is not set +CONFIG_LP_ARCH_X86=y +# CONFIG_LP_ARCH_ARM64 is not set +# CONFIG_LP_ARCH_MIPS is not set +# CONFIG_LP_MEMMAP_RAM_ONLY is not set +CONFIG_LP_MULTIBOOT=y + +# +# Standard Libraries +# +CONFIG_LP_LIBC=y +CONFIG_LP_CURSES=y +# CONFIG_LP_TINYCURSES is not set +CONFIG_LP_PDCURSES=y +CONFIG_LP_CBFS=y +CONFIG_LP_LZMA=y +CONFIG_LP_LZ4=y + +# +# Console Options +# +# CONFIG_LP_SKIP_CONSOLE_INIT is not set +CONFIG_LP_CBMEM_CONSOLE=y +# CONFIG_LP_SERIAL_CONSOLE is not set +CONFIG_LP_VIDEO_CONSOLE=y +CONFIG_LP_VGA_VIDEO_CONSOLE=y +# CONFIG_LP_GEODELX_VIDEO_CONSOLE is not set +CONFIG_LP_COREBOOT_VIDEO_CONSOLE=y +CONFIG_LP_PC_KEYBOARD=y +CONFIG_LP_PC_KEYBOARD_LAYOUT_US=y +# CONFIG_LP_PC_KEYBOARD_LAYOUT_DE is not set + +# +# Drivers +# +CONFIG_LP_PCI=y +CONFIG_LP_NVRAM=y +# CONFIG_LP_RTC_PORT_EXTENDED_VIA is not set +CONFIG_LP_SPEAKER=y +CONFIG_LP_STORAGE=y +# CONFIG_LP_STORAGE_64BIT_LBA is not set +CONFIG_LP_STORAGE_ATA=y +CONFIG_LP_STORAGE_ATAPI=y +CONFIG_LP_STORAGE_AHCI=y +CONFIG_LP_STORAGE_AHCI_ONLY_TESTED=y +CONFIG_LP_TIMER_RDTSC=y +CONFIG_LP_USB=y +# CONFIG_LP_USB_UHCI is not set +# CONFIG_LP_USB_OHCI is not set +CONFIG_LP_USB_EHCI=y +CONFIG_LP_USB_XHCI=y +# CONFIG_LP_USB_XHCI_MTK_QUIRK is not set +# CONFIG_LP_USB_DWC2 is not set +CONFIG_LP_USB_HID=y +CONFIG_LP_USB_HUB=y +# CONFIG_LP_USB_EHCI_HOSTPC_ROOT_HUB_TT is not set +CONFIG_LP_USB_MSC=y +CONFIG_LP_USB_GEN_HUB=y +CONFIG_LP_USB_PCI=y +# CONFIG_LP_UDC is not set +# CONFIG_LP_BIG_ENDIAN is not set +CONFIG_LP_LITTLE_ENDIAN=y +CONFIG_LP_IO_ADDRESS_SPACE=y +CONFIG_LP_ARCH_SPECIFIC_OPTIONS=y diff --git a/resources/scripts/helpers/build/module/coreinfo b/resources/scripts/helpers/build/module/coreinfo @@ -0,0 +1,39 @@ +#!/bin/bash + +# helper script: builds coreinfo payload and it's dependency libpayload +# +# Copyright (C) 2015 Klemens Nanni <contact@autoboot.org> +# +# 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 <http://www.gnu.org/licenses/>. +# + +# 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 the coreinfo payload\n" + +( +cd coreboot/ + +# Build libpayload first +cp ../resources/libreboot/config/libpayload/config payloads/libpayload/.config +make -j"$(nproc)" -BC payloads/libpayload install + +# Build coreinfo itself +cp ../resources/libreboot/config/coreinfo/config payloads/coreinfo/.config +make -j"$(nproc)" -BC payloads/coreinfo +) diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper @@ -105,6 +105,9 @@ do ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f ../seabios/out/bios.bin.elf -n bios.bin.elf -t raw ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f ../seabios/out/vgabios.bin -n vgaroms/vgabios.bin -t raw + # Path to coreinfo payload + coreinfo=payloads/coreinfo/build/coreinfo.elf + # Add the correct GRUB configuration file for this image. for keylayout in ../resources/utilities/grub-assemble/keymap/original/* do @@ -117,6 +120,9 @@ do ./util/cbfstool/cbfstool "${boardtarget}_${keymap}_${romtype}.rom" add -f "grub_${keymap}_${romtype}.cfg" -n grub.cfg -t raw # Insert grub test config into the image (for the user to test modifications to before modifying the main one) ./util/cbfstool/cbfstool "${boardtarget}_${keymap}_${romtype}.rom" add -f "grub_${keymap}_${romtype}_test.cfg" -n grubtest.cfg -t raw + + # Add coreinfo payload in case it was built before + [ -f "${coreinfo}" ] && ./util/cbfstool/cbfstool "${boardtarget}"_"${keymap}"_"${romtype}".rom add-payload -f "${coreinfo}" -n coreinfo.elf done # This config-less ROM is no longer needed