2018-02-05 16:27:45 +00:00
|
|
|
# Configuration for emulating LinuxBoot+Heads with qemu
|
2017-12-04 23:57:48 +00:00
|
|
|
#
|
2018-04-30 02:58:44 +00:00
|
|
|
export CONFIG_LINUXBOOT=y
|
2020-08-20 23:26:48 +00:00
|
|
|
export CONFIG_LINUX_VERSION=4.14.62
|
|
|
|
|
2018-02-05 20:59:26 +00:00
|
|
|
CONFIG_LINUXBOOT_BOARD=qemu
|
|
|
|
CONFIG_LINUX_CONFIG=config/linux-linuxboot.config
|
2017-12-04 19:14:16 +00:00
|
|
|
|
2018-02-28 16:12:02 +00:00
|
|
|
ifeq "$(CONFIG_UROOT)" "y"
|
|
|
|
CONFIG_BUSYBOX=n
|
2018-03-15 19:30:05 +00:00
|
|
|
else
|
2018-02-28 16:12:02 +00:00
|
|
|
CONFIG_CRYPTSETUP=y
|
|
|
|
CONFIG_LVM2=y
|
|
|
|
CONFIG_MBEDTLS=y
|
2017-12-04 19:14:16 +00:00
|
|
|
CONFIG_PCIUTILS=y
|
2018-02-28 16:12:02 +00:00
|
|
|
CONFIG_POPT=y
|
|
|
|
CONFIG_QRENCODE=y
|
|
|
|
CONFIG_TPMTOTP=y
|
2018-03-15 19:30:05 +00:00
|
|
|
endif
|
|
|
|
|
2018-05-02 15:38:39 +00:00
|
|
|
CONFIG_FLASHROM=y
|
2018-03-15 19:30:05 +00:00
|
|
|
CONFIG_FLASHTOOLS=y
|
2018-09-18 09:14:05 +00:00
|
|
|
CONFIG_GPG2=y
|
2018-03-15 19:30:05 +00:00
|
|
|
CONFIG_KEXEC=y
|
|
|
|
CONFIG_UTIL_LINUX=y
|
2018-02-02 21:27:13 +00:00
|
|
|
CONFIG_DROPBEAR=y
|
2018-02-28 16:12:02 +00:00
|
|
|
#CONFIG_FROTZ=y
|
2017-12-04 19:14:16 +00:00
|
|
|
|
2017-12-04 21:00:35 +00:00
|
|
|
CONFIG_LINUX_USB=y
|
2018-02-09 18:42:52 +00:00
|
|
|
CONFIG_LINUX_E1000=y
|
2017-12-04 21:00:35 +00:00
|
|
|
CONFIG_LINUX_SCSI_GDTH=y
|
|
|
|
CONFIG_LINUX_ATA=y
|
|
|
|
CONFIG_LINUX_AHCI=y
|
2017-12-04 19:14:16 +00:00
|
|
|
|
2018-02-28 19:57:46 +00:00
|
|
|
export CONFIG_BOOTSCRIPT=/bin/generic-init
|
2018-03-10 23:40:07 +00:00
|
|
|
export CONFIG_BOOTSCRIPT_NETWORK=/bin/network-init-recovery
|
2017-12-04 19:14:16 +00:00
|
|
|
|
2018-02-28 19:57:46 +00:00
|
|
|
export CONFIG_BOOT_REQ_HASH=n
|
|
|
|
export CONFIG_BOOT_REQ_ROLLBACK=n
|
|
|
|
export CONFIG_BOOT_DEV="/dev/sda1"
|
2018-03-10 23:40:07 +00:00
|
|
|
export CONFIG_BOOT_STATIC_IP=10.0.2.15
|
2018-02-08 00:05:22 +00:00
|
|
|
|
2018-02-09 18:42:52 +00:00
|
|
|
# You can ssh into the qemu instance by running
|
|
|
|
# ssh -p 5555 root@localhost
|
|
|
|
# The LinuxBoot firmware should set its ip address to 10.0.2.15
|
|
|
|
# or run udhcpc to get a qemu address
|
|
|
|
|
2018-02-28 16:12:02 +00:00
|
|
|
run:
|
2018-02-08 00:05:22 +00:00
|
|
|
qemu-system-x86_64 \
|
|
|
|
-machine q35,smm=on \
|
|
|
|
-global ICH9-LPC.disable_s3=1 \
|
|
|
|
-global driver=cfi.pflash01,property=secure,value=on \
|
2018-02-09 18:42:52 +00:00
|
|
|
-redir tcp:5555::22 \
|
2018-02-08 00:05:22 +00:00
|
|
|
--serial $(or $(SERIAL),/dev/tty) \
|
2021-07-22 22:24:55 +00:00
|
|
|
-drive if=pflash,format=raw,unit=0,file=$(board_build)/linuxboot.rom
|
2018-02-08 00:05:22 +00:00
|
|
|
stty sane
|
|
|
|
|