2018-02-05 20:59:26 +00:00
|
|
|
# Configuration for building a coreboot ROM that works in the.
|
2021-07-26 18:02:42 +00:00
|
|
|
# the qemu emulator.
|
|
|
|
#
|
|
|
|
# Note that the TPM does not work, so this
|
2017-03-31 17:04:46 +00:00
|
|
|
# will just drop into the recovery shell.
|
2018-03-12 01:27:19 +00:00
|
|
|
export CONFIG_COREBOOT=y
|
2021-07-26 18:02:42 +00:00
|
|
|
export CONFIG_COREBOOT_VERSION=4.13
|
2020-08-20 23:26:48 +00:00
|
|
|
export CONFIG_LINUX_VERSION=4.14.62
|
2020-07-10 13:44:01 +00:00
|
|
|
|
2018-02-05 20:59:26 +00:00
|
|
|
CONFIG_COREBOOT_CONFIG=config/coreboot-qemu.config
|
|
|
|
CONFIG_LINUX_CONFIG=config/linux-qemu.config
|
|
|
|
|
2018-02-28 16:12:02 +00:00
|
|
|
ifeq "$(CONFIG_UROOT)" "y"
|
|
|
|
CONFIG_BUSYBOX=n
|
|
|
|
else
|
2017-03-31 15:18:46 +00:00
|
|
|
CONFIG_KEXEC=y
|
2018-02-28 16:12:02 +00:00
|
|
|
CONFIG_QRENCODE=y
|
|
|
|
CONFIG_TPMTOTP=y
|
|
|
|
CONFIG_POPT=y
|
|
|
|
CONFIG_FLASHTOOLS=y
|
2018-02-28 19:57:46 +00:00
|
|
|
CONFIG_FLASHROM=y
|
2018-02-28 16:12:02 +00:00
|
|
|
CONFIG_PCIUTILS=y
|
2017-04-03 21:13:59 +00:00
|
|
|
CONFIG_UTIL_LINUX=y
|
2021-07-26 18:02:42 +00:00
|
|
|
CONFIG_CRYPTSETUP2=y
|
2018-09-18 09:14:05 +00:00
|
|
|
CONFIG_GPG2=y
|
2017-03-31 15:18:46 +00:00
|
|
|
CONFIG_LVM2=y
|
|
|
|
CONFIG_MBEDTLS=y
|
2017-04-07 13:53:02 +00:00
|
|
|
CONFIG_DROPBEAR=y
|
2019-07-30 13:36:57 +00:00
|
|
|
CONFIG_MSRTOOLS=y
|
2019-02-19 02:10:45 +00:00
|
|
|
|
|
|
|
#Uncomment only one of the following block
|
|
|
|
#Required for graphical gui-init (FBWhiptail)
|
|
|
|
#CONFIG_CAIRO=y
|
|
|
|
#CONFIG_FBWHIPTAIL=y
|
|
|
|
#
|
|
|
|
#text-based init (generic-init and gui-init)
|
|
|
|
CONFIG_NEWT=y
|
|
|
|
CONFIG_SLANG=y
|
|
|
|
|
2018-02-28 16:12:02 +00:00
|
|
|
endif
|
2017-03-31 15:18:46 +00:00
|
|
|
|
2018-05-11 20:40:12 +00:00
|
|
|
CONFIG_LINUX_ATA=y
|
|
|
|
CONFIG_LINUX_AHCI=y
|
2017-03-31 15:18:46 +00:00
|
|
|
CONFIG_LINUX_USB=y
|
|
|
|
CONFIG_LINUX_E1000=y
|
2017-07-18 17:42:19 +00:00
|
|
|
|
2019-02-19 02:10:45 +00:00
|
|
|
#Uncomment only one BOOTSCRIPT:
|
|
|
|
#Whiptail-based init (text-based or FBWhiptail)
|
|
|
|
#export CONFIG_BOOTSCRIPT=/bin/gui-init
|
|
|
|
#
|
|
|
|
#text-based original init:
|
|
|
|
export CONFIG_BOOTSCRIPT=/bin/generic-init
|
|
|
|
|
2018-02-28 19:57:46 +00:00
|
|
|
export CONFIG_TPM=n
|
2018-02-08 00:05:22 +00:00
|
|
|
|
2018-05-18 16:35:54 +00:00
|
|
|
export CONFIG_BOOT_DEV="/dev/sda1"
|
2021-07-26 18:02:42 +00:00
|
|
|
export CONFIG_BOARD_NAME="qemu-coreboot"
|
2018-05-18 16:35:54 +00:00
|
|
|
|
2020-04-23 03:02:46 +00:00
|
|
|
#borrowed from https://github.com/orangecms/webboot/blob/boot-via-qemu/run-webboot.sh
|
2018-02-28 16:12:02 +00:00
|
|
|
run:
|
2018-02-08 00:05:22 +00:00
|
|
|
qemu-system-x86_64 \
|
|
|
|
--machine q35 \
|
2018-02-28 16:12:02 +00:00
|
|
|
--serial /dev/tty \
|
2020-10-21 15:04:27 +00:00
|
|
|
--bios $(build)/$(BOARD)/$(CB_OUTPUT_FILE) \
|
2020-04-23 03:02:46 +00:00
|
|
|
-object rng-random,filename=/dev/urandom,id=rng0 \
|
|
|
|
-device virtio-rng-pci,rng=rng0 \
|
|
|
|
-netdev user,id=u1 -device e1000,netdev=u1 \
|
2018-02-28 16:12:02 +00:00
|
|
|
; stty sane
|