Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

DEPENDS = "glib-2.0 zlib pixman gnutls dtc"
DEPENDS = "glib-2.0 zlib pixman gnutls dtc zephyr-seabios"
DEPENDS_append_class-nativesdk = " nativesdk-zephyr-seabios"
LICENSE = "GPLv2"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
Expand Down Expand Up @@ -201,6 +202,17 @@ QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-
--disable-virtfs --disable-xen --disable-curl --disable-attr --disable-curses --disable-iconv \
"

copy_seabios() {
cp ${STAGING_DIR}/usr/share/firmware/bios.bin ${S}/pc-bios/bios.bin
cp ${STAGING_DIR}/usr/share/firmware/bios-256k.bin ${S}/pc-bios/bios-256k.bin
}

do_unpack_append() {
bb.build.exec_func('copy_seabios', d)
}

do_unpack[depends] = "zephyr-seabios:do_populate_sysroot"

do_configure() {
${S}/configure ${QEMU_FLAGS} --target-list="${QEMUS_BUILT}" --prefix=${prefix} \
--sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --localstatedir=${localstatedir}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From a6030cbfc6f7e98c7ed0e217332cba27daa1a686 Mon Sep 17 00:00:00 2001
From: Daniel Leung <daniel.leung@intel.com>
Date: Sat, 12 Oct 2019 14:57:08 -0700
Subject: [PATCH 1/1] sercon: don't clear screen and don't disable line
wrapping

This helps with looking at emulator outputs (from both running
locally and sanitycheck) as clearing screen and disabling line
wrapping affect developer terminal.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
---
src/sercon.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/sercon.c b/src/sercon.c
index a5dadb7..80bd4b1 100644
--- a/src/sercon.c
+++ b/src/sercon.c
@@ -346,10 +346,12 @@ static void sercon_1000(struct bregs *regs)
SET_LOW(sercon_row_last, 0);
SET_LOW(sercon_attr_last, 0);

+#if 0
sercon_term_reset();
sercon_term_no_linewrap();
if (clearscreen)
sercon_term_clear_screen();
+#endif
}

/* Set text-mode cursor shape */
--
2.23.0

17 changes: 17 additions & 0 deletions meta-zephyr-sdk/recipes-devtools/seabios/files/config.seabios-128k
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# for qemu machine types 1.7 + older
# need to turn off features (xhci,uas) to make it fit into 128k
CONFIG_QEMU=y
CONFIG_ROM_SIZE=128
CONFIG_ATA_DMA=n
CONFIG_BOOTSPLASH=n
CONFIG_XEN=n
CONFIG_USB_OHCI=n
CONFIG_USB_XHCI=n
CONFIG_USB_UAS=n
CONFIG_SDCARD=n
CONFIG_TCGBIOS=n
CONFIG_MPT_SCSI=n
CONFIG_PVSCSI=n
CONFIG_NVME=n
CONFIG_USE_SMM=n
CONFIG_VGAHOOKS=n
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# for qemu machine types 2.0 + newer
CONFIG_QEMU=y
CONFIG_ROM_SIZE=256
CONFIG_ATA_DMA=n
21 changes: 21 additions & 0 deletions meta-zephyr-sdk/recipes-devtools/seabios/files/hostcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff -ur a/Makefile b/Makefile
--- a/Makefile 2015-02-02 22:02:58.651041951 -0500
+++ b/Makefile 2015-02-02 23:08:13.884514003 -0500
@@ -8,7 +8,7 @@
OUT=out/

# Common command definitions
-export HOSTCC := $(CC)
+export HOSTCC ?= $(CC)
export CONFIG_SHELL := sh
export KCONFIG_AUTOHEADER := autoconf.h
export KCONFIG_CONFIG := $(CURDIR)/.config
@@ -22,7 +22,7 @@
OBJDUMP=$(CROSS_PREFIX)objdump
STRIP=$(CROSS_PREFIX)strip
PYTHON=python
-CPP=cpp
+CPP=$(CROSS_PREFIX)cpp
IASL:=iasl
LD32BIT_FLAG:=-melf_i386

67 changes: 67 additions & 0 deletions meta-zephyr-sdk/recipes-devtools/seabios/zephyr-seabios_1.12.1.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Origin:
# http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/plain/recipes-extended/seabios/seabios_1.11.2.bb--2019-10-22

DESCRIPTION = "SeaBIOS"
HOMEPAGE = "http://www.coreboot.org/SeaBIOS"
LICENSE = "LGPLv3"
SECTION = "firmware"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"

BBCLASSEXTEND = "native nativesdk"

SRCREV = "a5cab58e9a3fb6e168aba919c5669bea406573b4"
SRC_URI = " \
git://git.seabios.org/seabios.git;protocol=https;branch=1.12-stable \
file://hostcc.patch \
file://0001-sercon-don-t-clear-screen-and-don-t-disable-line-wra.patch \
file://config.seabios-128k \
file://config.seabios-256k \
"

S = "${WORKDIR}/git"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6 \
"

SRC_URI[md5sum] = "6cb6cba431fd725126ddb5ec529ab85c"
SRC_URI[sha256sum] = "89ba3f3e3436008992e2304ca1afa1a9527e77c309d896d1b0332e97339f6127"

DEPENDS = "util-linux-native file-native bison-native flex-native gettext-native python-native"

TUNE_CCARGS = ""
EXTRA_OEMAKE += "HOSTCC='${BUILD_CC}'"
EXTRA_OEMAKE += "CROSS_PREFIX=${TARGET_PREFIX}"
EXTRA_OEMAKE += "EXTRAVERSION='-zephyr'"

do_configure() {
mkdir -p ${B}/128k
cp ${WORKDIR}/config.seabios-128k ${B}/128k/.config
oe_runmake KCONFIG_CONFIG=${B}/128k/.config OUT=${B}/128k/ oldnoconfig

mkdir -p ${B}/256k
cp ${WORKDIR}/config.seabios-256k ${B}/256k/.config
oe_runmake KCONFIG_CONFIG=${B}/256k/.config OUT=${B}/256k/ oldnoconfig
}

do_compile() {
unset CPP
unset CPPFLAGS

oe_runmake KCONFIG_CONFIG=${B}/128k/.config OUT=${B}/128k/
oe_runmake KCONFIG_CONFIG=${B}/256k/.config OUT=${B}/256k/
}

do_install() {
# install into staging are so these can be picked up by zephyr-qemu.
install -d ${STAGING_DIR}/usr/share/firmware
install -m 0644 ${B}/128k/bios.bin ${STAGING_DIR}/usr/share/firmware/bios.bin
install -m 0644 ${B}/256k/bios.bin ${STAGING_DIR}/usr/share/firmware/bios-256k.bin
}

INSANE_SKIP_${PN} = "already-stripped"