@ -9,10 +9,10 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := qemu
PKG_NAME := qemu
PKG_VERSION := 4.0 .0
PKG_VERSION := 4.1 .0
PKG_RELEASE := 1
PKG_RELEASE := 1
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.xz
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.xz
PKG_HASH := 13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469
PKG_HASH := 656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6
PKG_SOURCE_URL := http://download.qemu.org/
PKG_SOURCE_URL := http://download.qemu.org/
PKG_LICENSE := GPL-2.0
PKG_LICENSE := GPL-2.0
PKG_LICENSE_FILES := LICENSE tcg/LICENSE
PKG_LICENSE_FILES := LICENSE tcg/LICENSE
@ -53,10 +53,6 @@ define Package/qemu-ga
DEPENDS:= +glib2 +virtio-console-helper $( CXX_DEPENDS) $( QEMU_DEPS_IN_GUEST)
DEPENDS:= +glib2 +virtio-console-helper $( CXX_DEPENDS) $( QEMU_DEPS_IN_GUEST)
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
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
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_DIR) $( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/qemu-ga $( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/qemu-ga $( 1) /usr/bin
@ -66,20 +62,8 @@ define Package/qemu-ga/install
$( INSTALL_BIN) ./files/10-qemu-ga.hotplug $( 1) /etc/hotplug.d/virtio-ports/10-qemu-ga
$( INSTALL_BIN) ./files/10-qemu-ga.hotplug $( 1) /etc/hotplug.d/virtio-ports/10-qemu-ga
e n d e f
e n d e f
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
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
SUBMENU:= Virtualization
TITLE:= QEMU blobs of BIOS, VGA BIOS and keymaps
URL:= http://www.qemu.org
DEPENDS:= $( QEMU_DEPS_IN_HOST)
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
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
SECTION:= utils
@ -97,13 +81,14 @@ define Package/qemu-bridge-helper/install
$( INSTALL_DATA) ./files/bridge.conf $( 1) /etc/qemu
$( INSTALL_DATA) ./files/bridge.conf $( 1) /etc/qemu
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 - i m g
d e f i n e P a c k a g e / q e m u - i m g
SECTION:= utils
SECTION:= utils
CATEGORY:= Utilities
CATEGORY:= Utilities
SUBMENU:= Virtualization
SUBMENU:= Virtualization
TITLE:= QEMU Image utility
TITLE:= QEMU Image utility
URL:= http://www.qemu.org
URL:= http://www.qemu.org
DEPENDS:= +glib2 $( CXX_DEPENDS) $( QEMU_DEPS_IN_HOST)
DEPENDS:= +glib2 $( QEMU_DEPS_IN_HOST)
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 - i m g / i n s t a l l
d e f i n e P a c k a g e / q e m u - i m g / i n s t a l l
@ -111,13 +96,14 @@ define Package/qemu-img/install
$( INSTALL_BIN) $( PKG_BUILD_DIR) /qemu-img $( 1) /usr/bin/qemu-img
$( INSTALL_BIN) $( PKG_BUILD_DIR) /qemu-img $( 1) /usr/bin/qemu-img
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 - n b d
d e f i n e P a c k a g e / q e m u - n b d
SECTION:= utils
SECTION:= utils
CATEGORY:= Utilities
CATEGORY:= Utilities
SUBMENU:= Virtualization
SUBMENU:= Virtualization
TITLE:= QEMU Network Block Device Utility
TITLE:= QEMU Network Block Device Utility
URL:= http://www.qemu.org
URL:= http://www.qemu.org
DEPENDS:= +glib2 $( CXX_DEPENDS) $( QEMU_DEPS_IN_HOST) +kmod-nbd
DEPENDS:= +glib2 $( QEMU_DEPS_IN_HOST) +kmod-nbd
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 - n b d / i n s t a l l
d e f i n e P a c k a g e / q e m u - n b d / i n s t a l l
@ -125,7 +111,41 @@ define Package/qemu-nbd/install
$( INSTALL_BIN) $( PKG_BUILD_DIR) /qemu-nbd $( 1) /usr/sbin/qemu-nbd
$( INSTALL_BIN) $( PKG_BUILD_DIR) /qemu-nbd $( 1) /usr/sbin/qemu-nbd
e n d e f
e n d e f
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
d e f i n e q e m u - f i r m w a r e
QEMU_PACKAGES += qemu-firmware-$( 1)
define Package/qemu-firmware-$( 1)
SECTION:= utils
CATEGORY:= Utilities
SUBMENU:= Virtualization
TITLE:= $( qemu-firmware-$( 1) -title)
URL:= http://www.qemu.org
DEPENDS:= $( QEMU_DEPS_IN_HOST)
endef
define Package/qemu-firmware-$( 1) /install
$$ ( INSTALL_DIR) $$ ( 1) /usr/share/qemu
$$ ( CP) $( foreach f,$( qemu-firmware-$( 1) -files) ,$$ ( PKG_INSTALL_DIR) /usr/share/qemu/$( f) ) $$ ( 1) /usr/share/qemu
endef
e n d e f
qemu-firmware-seabios-title := QEMU build of SeaBIOS for x86 guest
qemu-firmware-seabios-files := bios.bin bios-256k.bin
$( eval $ ( call qemu -firmware ,seabios ) )
qemu-firmware-seavgabios-title := QEMU build of SeaVGABIOS
qemu-firmware-seavgabios-files := vgabios-*.bin
$( eval $ ( call qemu -firmware ,seavgabios ) )
qemu-firmware-pxe-title := QEMU build of iPXE PXE roms
qemu-firmware-pxe-files := pxe-*.rom
$( eval $ ( call qemu -firmware ,pxe ) )
qemu-firmware-efi-title := QEMU build of iPXE EFI roms
qemu-firmware-efi-files := efi-*.rom
$( eval $ ( call qemu -firmware ,efi ) )
# Naming rules used in qemu Makefile.target
# Naming rules used in qemu Makefile.target
d e f i n e q e m u - p r o g _
d e f i n e q e m u - p r o g _
@ -145,6 +165,7 @@ qemu-prog = $(strip $(call qemu-prog_,$(1)))
#
#
d e f i n e q e m u - t a r g e t
d e f i n e q e m u - t a r g e t
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-$( 1)
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-$( 1)
QEMU_PACKAGES += qemu-$( 1)
define Package/qemu-$( 1)
define Package/qemu-$( 1)
SECTION:= utils
SECTION:= utils
@ -152,8 +173,8 @@ define qemu-target
SUBMENU:= Virtualization
SUBMENU:= Virtualization
TITLE:= QEMU target $( 1)
TITLE:= QEMU target $( 1)
URL:= http://www.qemu.org
URL:= http://www.qemu.org
DEPENDS:= +glib2 +libpthread +zlib $( CXX_DEPENDS) $( QEMU_DEPS_IN_HOST) \
$( if $( filter %-softmmu,$( 1) ) ,+libncurses +libfdt +pixman +qemu-blobs $( ICONV_DEPENDS) )
DEPENDS:= +glib2 +libpthread +zlib $( CXX_DEPENDS) $( QEMU_DEPS_IN_HOST) $( qemu-target-$( 1) -deps) \
$( if $( filter %-softmmu,$( 1) ) ,+libncurses +libfdt +pixman +qemu-firmware-efi $( ICONV_DEPENDS) )
endef
endef
define Package/qemu-$( 1) /description
define Package/qemu-$( 1) /description
@ -163,18 +184,34 @@ define qemu-target
define Package/qemu-$( 1) /install
define Package/qemu-$( 1) /install
$( INSTALL_DIR) $$ ( 1) /usr/bin
$( INSTALL_DIR) $$ ( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/$( call qemu-prog,$( 1) ) $$ ( 1) /usr/bin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/$( call qemu-prog,$( 1) ) $$ ( 1) /usr/bin
$( foreach f,$( qemu-target-$( 1) -extra-files) ,
$( INSTALL_DIR) $$ ( 1) /$( dir $( f) )
$( CP) $( PKG_INSTALL_DIR) /$( f) $$ ( 1) /$( f)
)
endef
endef
e n d e f
e n d e f
QEMU_TARGET_LIST := \
qemu-target-list := \
x86_64-softmmu \
x86_64-softmmu \
arm-softmmu \
arm-softmmu \
$( foreach target ,$ ( QEMU_TARGET_LIST ) , \
qemu-target-x86_64-softmmu-deps := \
+qemu-firmware-pxe \
+qemu-firmware-seabios \
+qemu-firmware-seavgabios
qemu-target-x86_64-softmmu-extra-files := \
usr/share/qemu/kvmvapic.bin \
usr/share/qemu/linuxboot.bin \
usr/share/qemu/linuxboot_dma.bin \
usr/share/qemu/multiboot.bin \
usr/share/qemu/pvh.bin
$( foreach target ,$ ( qemu -target -list ) , \
$( eval $( call qemu-target,$( target) ) ) \
$( 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= % \
@ -193,6 +230,9 @@ CONFIGURE_ARGS += \
--host-cc= " $( HOSTCC) " \
--host-cc= " $( HOSTCC) " \
--disable-fortify-source \
--disable-fortify-source \
--disable-stack-protector \
--disable-stack-protector \
--extra-cflags= " $( EXTRA_CFLAGS) " \
--extra-cxxflags= " $( EXTRA_CXXFLAGS) " \
--extra-ldflags= " $( EXTRA_LDFLAGS) " \
# VHost features
# VHost features
CONFIGURE_ARGS += \
CONFIGURE_ARGS += \
@ -285,7 +325,7 @@ CONFIGURE_ARGS += \
--disable-libiscsi \
--disable-libiscsi \
--disable-libnfs \
--disable-libnfs \
--disable-libpmem \
--disable-libpmem \
--disable-libssh2 \
--disable-libssh \
--disable-libudev \
--disable-libudev \
--disable-libusb \
--disable-libusb \
--disable-libxml2 \
--disable-libxml2 \
@ -321,11 +361,11 @@ CONFIGURE_ARGS += \
--disable-xen-pci-passthrough \
--disable-xen-pci-passthrough \
--disable-xfsctl \
--disable-xfsctl \
CONFIGURE_ARGS += --target-list= '$(foreach target,$(QEMU_TARGET_LIST ),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
CONFIGURE_ARGS += --target-list= '$(foreach target,$(qemu-target-list ),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
CONFIGURE_ARGS += $( if $( CONFIG_PACKAGE_qemu-ga) ,--enable-guest-agent)
CONFIGURE_ARGS += $( if $( CONFIG_PACKAGE_qemu-ga) ,--enable-guest-agent)
TARGET_LDFLAGS += -Wl,--as-needed
TARGET_LDFLAGS += -Wl,--as-needed
MAKE_VARS += V = s
MAKE_VARS += V = 1
# ARCH is special in qemu's build system, e.g. ARCH mips64 will be translated
# ARCH is special in qemu's build system, e.g. ARCH mips64 will be translated
# there to mips and stored in config-host.mak
# there to mips and stored in config-host.mak
MAKE_FLAGS := $( filter-out \
MAKE_FLAGS := $( filter-out \
@ -337,7 +377,7 @@ QEMU_MAKE_TARGETS := \
$( if $( CONFIG_PACKAGE_qemu-bridge-helper) ,qemu-bridge-helper) \
$( if $( CONFIG_PACKAGE_qemu-bridge-helper) ,qemu-bridge-helper) \
$( if $( CONFIG_PACKAGE_qemu-img) ,qemu-img) \
$( if $( CONFIG_PACKAGE_qemu-img) ,qemu-img) \
$( if $( CONFIG_PACKAGE_qemu-nbd) ,qemu-nbd) \
$( if $( CONFIG_PACKAGE_qemu-nbd) ,qemu-nbd) \
$( foreach target,$( QEMU_TARGET_LIST ) ,$( if $( CONFIG_PACKAGE_qemu-$( target) ) ,subdir- $( target) ) ) \
$( foreach target,$( qemu-target-list ) ,$( if $( CONFIG_PACKAGE_qemu-$( target) ) ,$( target) /all ) ) \
d e f i n e B u i l d / C o m p i l e
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) ) )
$( if $( strip $( QEMU_MAKE_TARGETS) ) ,$( call Build/Compile/Default,$( QEMU_MAKE_TARGETS) ) )
@ -348,7 +388,6 @@ $(eval $(call BuildPackage,qemu-ga))
$( eval $ ( call BuildPackage ,qemu -bridge -helper ) )
$( eval $ ( call BuildPackage ,qemu -bridge -helper ) )
$( eval $ ( call BuildPackage ,qemu -img ) )
$( eval $ ( call BuildPackage ,qemu -img ) )
$( eval $ ( call BuildPackage ,qemu -nbd ) )
$( eval $ ( call BuildPackage ,qemu -nbd ) )
$( eval $ ( call BuildPackage ,qemu -blobs ) )
$( foreach target ,$ ( QEMU_TARGET_LIST ) , \
$( eval $( call BuildPackage,qemu-$( target) ) ) \
$( foreach p ,$ ( QEMU_PACKAGES ) , \
$( eval $( call BuildPackage,$( p) ) ) \
)
)