Skip to content

Commit 0bca118

Browse files
committed
qemu: support legacy platforms
Some targets were dropped or not supported in latest qemu, move them to a special legacy build for now. Signed-off-by: Anas Nashif <[email protected]>
1 parent 9021ce2 commit 0bca118

File tree

2 files changed

+250
-0
lines changed

2 files changed

+250
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/configure b/configure
2+
index 7c08c18358..0613279f91 100755
3+
--- a/configure
4+
+++ b/configure
5+
@@ -3118,7 +3118,6 @@ if test "$skip_meson" = no; then
6+
fi
7+
echo "strip = [$(meson_quote $strip)]" >> $cross
8+
echo "windres = [$(meson_quote $windres)]" >> $cross
9+
- if test "$cross_compile" = "yes"; then
10+
cross_arg="--cross-file config-meson.cross"
11+
echo "[host_machine]" >> $cross
12+
echo "system = '$targetos'" >> $cross
13+
@@ -3136,9 +3135,6 @@ if test "$skip_meson" = no; then
14+
else
15+
echo "endian = 'little'" >> $cross
16+
fi
17+
- else
18+
- cross_arg="--native-file config-meson.cross"
19+
- fi
20+
mv $cross config-meson.cross
21+
22+
rm -rf meson-private meson-info meson-logs
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
2+
DEPENDS = "glib-2.0 zlib pixman gnutls libtasn1 dtc ninja-native meson-native"
3+
LICENSE = "GPLv2"
4+
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
5+
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
6+
7+
SRCREV = "06740e68dcb2c2ae168875a730f233f5661eb8b6"
8+
SRC_URI = "gitsm://github.com/zephyrproject-rtos/qemu.git;protocol=https;nobranch=1 \
9+
file://cross.patch \
10+
"
11+
12+
BBCLASSEXTEND = "native nativesdk"
13+
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
14+
INHIBIT_PACKAGE_STRIP = "1"
15+
16+
S = "${WORKDIR}/git"
17+
18+
legacy_prefix = "${base_prefix}/usr/legacy"
19+
20+
inherit autotools pkgconfig
21+
22+
# Standard options:
23+
# --prefix=PREFIX install in PREFIX [$prefix]
24+
# --interp-prefix=PREFIX where to find shared libraries, etc.
25+
# use %M for cpu name [$interp_prefix]
26+
# --target-list=LIST set target list (default: build everything)
27+
# $(echo Available targets: $default_target_list | \
28+
# fold -s -w 53 | sed -e 's/^/ /')
29+
#
30+
# Advanced options (experts only):
31+
# --source-path=PATH path of source code [$source_path]
32+
# --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]
33+
# --cc=CC use C compiler CC [$cc]
34+
# --iasl=IASL use ACPI compiler IASL [$iasl]
35+
# --host-cc=CC use C compiler CC [$host_cc] for code run at
36+
# build time
37+
# --cxx=CXX use C++ compiler CXX [$cxx]
38+
# --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
39+
# --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS
40+
# --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
41+
# --make=MAKE use specified make [$make]
42+
# --install=INSTALL use specified install [$install]
43+
# --python=PYTHON use specified python [$python]
44+
# --smbd=SMBD use specified smbd [$smbd]
45+
# --static enable static build [$static]
46+
# --mandir=PATH install man pages in PATH
47+
# --datadir=PATH install firmware in PATH$confsuffix
48+
# --docdir=PATH install documentation in PATH$confsuffix
49+
# --bindir=PATH install binaries in PATH
50+
# --libdir=PATH install libraries in PATH
51+
# --sysconfdir=PATH install config in PATH$confsuffix
52+
# --localstatedir=PATH install local state in PATH (set at runtime on win32)
53+
# --with-confsuffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir [$confsuffix]
54+
# --enable-modules enable modules support
55+
# --enable-debug-tcg enable TCG debugging
56+
# --disable-debug-tcg disable TCG debugging (default)
57+
# --enable-debug-info enable debugging information (default)
58+
# --disable-debug-info disable debugging information
59+
# --enable-debug enable common debug build options
60+
# --enable-sparse enable sparse checker
61+
# --disable-sparse disable sparse checker (default)
62+
# --disable-strip disable stripping binaries
63+
# --disable-werror disable compilation abort on warning
64+
# --disable-stack-protector disable compiler-provided stack protection
65+
# --disable-sdl disable SDL
66+
# --enable-sdl enable SDL
67+
# --with-sdlabi select preferred SDL ABI 1.2 or 2.0
68+
# --disable-gtk disable gtk UI
69+
# --enable-gtk enable gtk UI
70+
# --with-gtkabi select preferred GTK ABI 2.0 or 3.0
71+
# --disable-virtfs disable VirtFS
72+
# --enable-virtfs enable VirtFS
73+
# --disable-vnc disable VNC
74+
# --enable-vnc enable VNC
75+
# --disable-cocoa disable Cocoa (Mac OS X only)
76+
# --enable-cocoa enable Cocoa (default on Mac OS X)
77+
# --audio-drv-list=LIST set audio drivers list:
78+
# Available drivers: $audio_possible_drivers
79+
# --block-drv-whitelist=L Same as --block-drv-rw-whitelist=L
80+
# --block-drv-rw-whitelist=L
81+
# set block driver read-write whitelist
82+
# (affects only QEMU, not qemu-img)
83+
# --block-drv-ro-whitelist=L
84+
# set block driver read-only whitelist
85+
# (affects only QEMU, not qemu-img)
86+
# --disable-xen disable xen backend driver support
87+
# --enable-xen enable xen backend driver support
88+
# --disable-xen-pci-passthrough
89+
# --enable-xen-pci-passthrough
90+
# --disable-brlapi disable BrlAPI
91+
# --enable-brlapi enable BrlAPI
92+
# --disable-vnc-tls disable TLS encryption for VNC server
93+
# --enable-vnc-tls enable TLS encryption for VNC server
94+
# --disable-vnc-sasl disable SASL encryption for VNC server
95+
# --enable-vnc-sasl enable SASL encryption for VNC server
96+
# --disable-vnc-jpeg disable JPEG lossy compression for VNC server
97+
# --enable-vnc-jpeg enable JPEG lossy compression for VNC server
98+
# --disable-vnc-png disable PNG compression for VNC server (default)
99+
# --enable-vnc-png enable PNG compression for VNC server
100+
# --disable-vnc-ws disable Websockets support for VNC server
101+
# --enable-vnc-ws enable Websockets support for VNC server
102+
# --disable-curses disable curses output
103+
# --enable-curses enable curses output
104+
# --disable-curl disable curl connectivity
105+
# --enable-curl enable curl connectivity
106+
# --disable-fdt disable fdt device tree
107+
# --enable-fdt enable fdt device tree
108+
# --disable-bluez disable bluez stack connectivity
109+
# --enable-bluez enable bluez stack connectivity
110+
# --disable-slirp disable SLIRP userspace network connectivity
111+
# --disable-kvm disable KVM acceleration support
112+
# --enable-kvm enable KVM acceleration support
113+
# --disable-rdma disable RDMA-based migration support
114+
# --enable-rdma enable RDMA-based migration support
115+
# --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
116+
# --enable-system enable all system emulation targets
117+
# --disable-system disable all system emulation targets
118+
# --enable-user enable supported user emulation targets
119+
# --disable-user disable all user emulation targets
120+
# --enable-linux-user enable all linux usermode emulation targets
121+
# --disable-linux-user disable all linux usermode emulation targets
122+
# --enable-bsd-user enable all BSD usermode emulation targets
123+
# --disable-bsd-user disable all BSD usermode emulation targets
124+
# --enable-guest-base enable GUEST_BASE support for usermode
125+
# emulation targets
126+
# --disable-guest-base disable GUEST_BASE support
127+
# --enable-pie build Position Independent Executables
128+
# --disable-pie do not build Position Independent Executables
129+
# --fmod-lib path to FMOD library
130+
# --fmod-inc path to FMOD includes
131+
# --oss-lib path to OSS library
132+
# --cpu=CPU Build for host CPU [$cpu]
133+
# --enable-uuid enable uuid support
134+
# --disable-vde disable support for vde network
135+
# --enable-vde enable support for vde network
136+
# --disable-netmap disable support for netmap network
137+
# --enable-netmap enable support for netmap network
138+
# --disable-linux-aio disable Linux AIO support
139+
# --enable-linux-aio enable Linux AIO support
140+
# --disable-cap-ng disable libcap-ng support
141+
# --enable-cap-ng enable libcap-ng support
142+
# --disable-attr disables attr and xattr support
143+
# --enable-attr enable attr and xattr support
144+
# --disable-blobs disable installing provided firmware blobs
145+
# --enable-docs enable documentation build
146+
# --disable-docs disable documentation build
147+
# --disable-vhost-net disable vhost-net acceleration support
148+
# --enable-vhost-net enable vhost-net acceleration support
149+
# --enable-trace-backends=B Set trace backend
150+
# Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
151+
# --with-trace-file=NAME Full PATH,NAME of file to store traces
152+
# Default:trace-<pid>
153+
# --disable-spice disable spice
154+
# --enable-spice enable spice
155+
# --enable-rbd enable building the rados block device (rbd)
156+
# --disable-libiscsi disable iscsi support
157+
# --enable-libiscsi enable iscsi support
158+
# --disable-libnfs disable nfs support
159+
# --enable-libnfs enable nfs support
160+
# --disable-smartcard-nss disable smartcard nss support
161+
# --enable-smartcard-nss enable smartcard nss support
162+
# --disable-libusb disable libusb (for usb passthrough)
163+
# --enable-libusb enable libusb (for usb passthrough)
164+
# --disable-usb-redir disable usb network redirection support
165+
# --enable-usb-redir enable usb network redirection support
166+
# --enable-lzo enable the support of lzo compression library
167+
# --enable-snappy enable the support of snappy compression library
168+
# --disable-guest-agent disable building of the QEMU Guest Agent
169+
# --enable-guest-agent enable building of the QEMU Guest Agent
170+
# --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent
171+
# --with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)
172+
# --disable-seccomp disable seccomp support
173+
# --enable-seccomp enables seccomp support
174+
# --with-coroutine=BACKEND coroutine backend. Supported options:
175+
# gthread, ucontext, sigaltstack, windows
176+
# --disable-coroutine-pool disable coroutine freelist (worse performance)
177+
# --enable-coroutine-pool enable coroutine freelist (better performance)
178+
# --enable-glusterfs enable GlusterFS backend
179+
# --disable-glusterfs disable GlusterFS backend
180+
# --enable-gcov enable test coverage analysis with gcov
181+
# --gcov=GCOV use specified gcov [$gcov_tool]
182+
# --disable-tpm disable TPM support
183+
# --enable-tpm enable TPM support
184+
# --disable-libssh2 disable ssh block device support
185+
# --enable-libssh2 enable ssh block device support
186+
# --disable-vhdx disables support for the Microsoft VHDX image format
187+
# --enable-vhdx enable support for the Microsoft VHDX image format
188+
# --disable-quorum disable quorum block filter support
189+
# --enable-quorum enable quorum block filter support
190+
# --disable-numa disable libnuma support
191+
# --enable-numa enable libnuma support
192+
193+
194+
#--disable-blobs : BIOS needed for x86
195+
#--disable-fdt: Cannot use if supporting ARM
196+
#--disable-kvm: AArch64 has a QEMU/KVM board
197+
198+
QEMUS_BUILT = "nios2-softmmu sparc-softmmu"
199+
QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-ng \
200+
--disable-libnfs --disable-libusb --disable-libiscsi --disable-usb-redir --disable-linux-aio\
201+
--disable-guest-agent --disable-libssh --disable-vnc-png --disable-seccomp \
202+
--disable-tpm --disable-numa --disable-glusterfs \
203+
--disable-virtfs --disable-xen --disable-curl --disable-attr --disable-curses --disable-iconv \
204+
--disable-parallels --disable-replication \
205+
--disable-live-block-migration --disable-dmg --disable-werror \
206+
"
207+
208+
do_configure() {
209+
unset libdir
210+
unset libexecdir
211+
unset includedir
212+
unset bindir
213+
unset mandir
214+
unset datadir
215+
unset docdir
216+
unset sysconfdir
217+
unset local_statedir
218+
unset firmwarepath
219+
unset localedir
220+
${S}/configure ${QEMU_FLAGS} --target-list="${QEMUS_BUILT}" --prefix=${legacy_prefix} \
221+
--meson=meson
222+
}
223+
224+
FILES:${PN} = " \
225+
${legacy_prefix} \
226+
"
227+
228+
INSANE_SKIP:${PN} = "already-stripped"

0 commit comments

Comments
 (0)