@ -18,6 +18,7 @@ PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
PKG_MAINTAINER := Yousong Zhou <yszhou4tech@gmail.com>
PKG_MAINTAINER := Yousong Zhou <yszhou4tech@gmail.com>
PKG_INSTALL := 1
PKG_INSTALL := 1
PKG_USE_MIPS16 := 0
i n c l u d e $( INCLUDE_DIR ) / u c l i b c + + . m k
i n c l u d e $( INCLUDE_DIR ) / u c l i b c + + . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
@ -27,15 +28,100 @@ define Package/qemu-ga
CATEGORY:= Utilities
CATEGORY:= Utilities
TITLE:= QEMU Guest Agent
TITLE:= QEMU Guest Agent
URL:= http://www.qemu.org
URL:= http://www.qemu.org
DEPENDS:= +glib2 +libpthread $( CXX_DEPENDS) +librt
DEPENDS:= +glib2 $( CXX_DEPENDS)
e n d e f
e n d e f
d e f i n e P a c k a g e / q e m u - g a / d e s c r i p t i o n
d e f i n e P a c k a g e / q e m u - g a / d e s c r i p t i o n
T h i s p a c k a g e c o n t a i n s t h e Q E M U G u e s t A g e n t d a e m o n
This package contains the QEMU Guest Agent daemon
e n d e f
d e f i n e P a c k a g e / q e m u - g a / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/qemu-ga $( 1) /usr/bin
$( INSTALL_DIR) $( 1) /etc/init.d
$( INSTALL_BIN) ./files/qemu-ga.init $( 1) /etc/init.d/qemu-ga
$( INSTALL_DIR) $( 1) /etc/hotplug.d/virtio-ports
$( INSTALL_BIN) ./files/virtio-ports.hotplug $( 1) /etc/hotplug.d/virtio-ports/qemu-ga
e n d e f
d e f i n e P a c k a g e / q e m u - b l o b s
SECTION:= utils
CATEGORY:= Utilities
TITLE:= QEMU blobs of BIOS, VGA BIOS and keymaps
URL:= http://www.qemu.org
DEPENDS:=
e n d e f
d e f i n e P a c k a g e / q e m u - b l o b s / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/share/qemu
$( CP) $( PKG_INSTALL_DIR) /usr/share/qemu/* $( 1) /usr/share/qemu
e n d e f
d e f i n e P a c k a g e / q e m u - b r i d g e - h e l p e r
SECTION:= utils
CATEGORY:= Utilities
TITLE:= QEMU bridge helper
URL:= http://www.qemu.org
DEPENDS:= +glib2 $( CXX_DEPENDS)
e n d e f
d e f i n e P a c k a g e / q e m u - b r i d g e - h e l p e r / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/lib/qemu-bridge-helper $( 1) /usr/lib
$( INSTALL_DIR) $( 1) /etc/qemu
$( INSTALL_DATA) ./files/bridge.conf $( 1) /etc/qemu
e n d e f
e n d e f
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
# Naming rules used in qemu Makefile.target
d e f i n e q e m u - p r o g _
$( if $( filter %-softmmu,$( 1) ) , \
$( patsubst %-softmmu,qemu-system-%,$( 1) ) , \
$( error unknown qemu target $( 1) ) \
)
e n d e f
qemu-prog = $( strip $( call qemu-prog_,$( 1) ) )
# Why libfdt was enabled for all softmmu targets: according to qemu's
# configure script, libfdt is only strictly required for the following targets
# and is optional for others. But libfdt support will be built into other
# targets when any single target enabled it.
#
# aarch64%-softmmu arm%-softmmu ppc%-softmmu microblaze%-softmmu
#
d e f i n e q e m u - t a r g e t
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-$( 1)
define Package/qemu-$( 1)
SECTION:= utils
CATEGORY:= Utilities
TITLE:= QEMU target $( 1)
URL:= http://www.qemu.org
DEPENDS:= +glib2 +libpthread +zlib $( CXX_DEPENDS) \
$( if $( filter %-softmmu,$( 1) ) ,+libncurses +libfdt +qemu-blobs) \
@( TARGET_x86_64|| TARGET_sunxi)
endef
define Package/qemu-$( 1) /description
This package contains the QEMU target $( 1)
endef
define Package/qemu-$( 1) /install
$( INSTALL_DIR) $$ ( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/$( call qemu-prog,$( 1) ) $$ ( 1) /usr/bin
endef
e n d e f
QEMU_TARGET_LIST := \
x86_64-softmmu \
arm-softmmu \
$( foreach target ,$ ( QEMU_TARGET_LIST ) , \
$( eval $( call qemu-target,$( target) ) ) \
)
# QEMU configure script does not recognize these options
# QEMU configure script does not recognize these options
CONFIGURE_ARGS := $( filter-out \
CONFIGURE_ARGS := $( filter-out \
--target= % \
--target= % \
@ -47,36 +133,105 @@ CONFIGURE_ARGS:=$(filter-out \
--disable-nls \
--disable-nls \
, $( CONFIGURE_ARGS) )
, $( CONFIGURE_ARGS) )
# Building qemu-ga alone does not require zlib, pixman
#
# --disable-tools to disable building pixman which will fail at the moment on
# octeon mips64 target.
# Tell build system of qemu to not add _FORTIFY_SOURCE options and let the base
# build system decide flavor of fortify_source to use
CONFIGURE_ARGS += \
CONFIGURE_ARGS += \
--cross-prefix= $( TARGET_CROSS) \
--cross-prefix= $( TARGET_CROSS) \
--host-cc= " $( HOSTCC) " \
--host-cc= " $( HOSTCC) " \
--target-list= '' \
--disable-fortify-source \
--disable-stack-protector \
CONFIGURE_ARGS += \
--audio-drv-list= '' \
--disable-debug-info \
--disable-modules \
--disable-sdl \
--disable-qom-cast-debug \
--disable-virtfs \
--disable-vnc \
--disable-debug-tcg \
--disable-sparse \
--disable-strip \
--disable-vnc-sasl \
--disable-vnc-jpeg \
--disable-vnc-png \
--disable-uuid \
--disable-vde \
--disable-netmap \
--disable-xen \
--disable-xen-pci-passthrough \
--disable-xen-pv-domain-build \
--disable-brlapi \
--disable-bluez \
--disable-tcg-interpreter \
--disable-cap-ng \
--disable-spice \
--disable-libiscsi \
--disable-libnfs \
--disable-cocoa \
--disable-bsd-user \
--disable-curl \
--disable-linux-aio \
--disable-attr \
--disable-docs \
--disable-docs \
--disable-opengl \
--disable-rbd \
--disable-xfsctl \
--disable-smartcard \
--disable-libusb \
--disable-usb-redir \
--disable-zlib-test \
--disable-zlib-test \
--disable-lzo \
--disable-snappy \
--disable-bzip2 \
--disable-guest-agent-msi \
--disable-tools \
--disable-tools \
--without-pixman \
--disable-seccomp \
--disable-glusterfs \
--disable-archipelago \
--disable-gtk \
--disable-gnutls \
--disable-nettle \
--disable-gcrypt \
--disable-rdma \
--disable-vte \
--disable-virglrenderer \
--disable-tpm \
--disable-libssh2 \
--disable-vhdx \
--disable-numa \
--disable-tcmalloc \
--disable-jemalloc \
--disable-strip \
--disable-werror \
QEMU_CONFIGURE_TARGET_LIST := $( foreach target,$( QEMU_TARGET_LIST) ,$( if $( CONFIG_PACKAGE_qemu-$( target) ) ,$( target) ) )
CONFIGURE_ARGS += --target-list= '$(QEMU_CONFIGURE_TARGET_LIST)'
i f n e q ( $( CONFIG_PACKAGE_qemu -ga ) , )
i f n e q ( $( CONFIG_PACKAGE_qemu -ga ) , )
CONFIGURE_ARGS += --enable-guest-agent
CONFIGURE_ARGS += --enable-guest-agent
e n d i f
e n d i f
TARGET_LDFLAGS += -Wl,--as-needed
MAKE_VARS += V = s
MAKE_VARS += V = s
# ARCH is special in qemu's build system, e.g. ARCH mips64 will be translated
# there to mips and stored in config-host.mak
MAKE_FLAGS := $( filter-out \
ARCH = % \
,$( MAKE_FLAGS) )
d e f i n e B u i l d / C o m p i l e
$( if $( CONFIG_PACKAGE_qemu-ga) ,$( call Build/Compile/Default,qemu-ga) )
e n d e f
QEMU_MAKE_TARGETS := \
$( if $( CONFIG_PACKAGE_qemu-ga) ,qemu-ga) \
$( if $( CONFIG_PACKAGE_qemu-bridge-helper) ,qemu-bridge-helper) \
$( foreach target,$( QEMU_TARGET_LIST) ,$( if $( CONFIG_PACKAGE_qemu-$( target) ) ,subdir-$( target) ) ) \
d e f i n e P a c k a g e / q e m u - g a / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/qemu-ga $( 1) /usr/bin
$( INSTALL_DIR) $( 1) /etc/init.d
$( INSTALL_BIN) ./files/qemu-ga.init $( 1) /etc/init.d/qemu-ga
$( INSTALL_DIR) $( 1) /etc/hotplug.d/virtio-ports
$( INSTALL_BIN) ./files/virtio-ports.hotplug $( 1) /etc/hotplug.d/virtio-ports/qemu-ga
d e f i n e B u i l d / C o m p i l e
$( if $( strip $( QEMU_MAKE_TARGETS) ) ,$( call Build/Compile/Default,$( QEMU_MAKE_TARGETS) ) )
e n d e f
e n d e f
$( eval $ ( call BuildPackage ,qemu -ga ) )
$( eval $ ( call BuildPackage ,qemu -ga ) )
$( eval $ ( call BuildPackage ,qemu -bridge -helper ) )
$( eval $ ( call BuildPackage ,qemu -blobs ) )
$( foreach target ,$ ( QEMU_TARGET_LIST ) , \
$( eval $( call BuildPackage,qemu-$( target) ) ) \
)