This commit is contained in:
aixiao 2019-04-11 21:36:44 +08:00
parent e33d0f4fb5
commit a57f4666c2

258
aq.sh
View File

@ -19,10 +19,10 @@
# aixiao@aixiao.me. # aixiao@aixiao.me.
# #
#set -x
path() { path() {
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
} }
init() { init() {
initdate initdate
check_os check_os
@ -30,6 +30,7 @@ init() {
check_root check_root
PWD=$(pwd) PWD=$(pwd)
SRC=$PWD/AQ SRC=$PWD/AQ
LOG=$(pwd)/AQ/LOG
QEMU_PREFIX=/data/local/aixiao.qemu QEMU_PREFIX=/data/local/aixiao.qemu
QEMU_VERSION="2.8.0" QEMU_VERSION="2.8.0"
QEMU_VERSION="2.8.1.1" QEMU_VERSION="2.8.1.1"
@ -47,6 +48,8 @@ init() {
QEMU_VERSION="2.11.1" QEMU_VERSION="2.11.1"
QEMU_VERSION="2.12.0-rc4" QEMU_VERSION="2.12.0-rc4"
QEMU_VERSION="2.12.0" QEMU_VERSION="2.12.0"
QEMU_VERSION="3.0.0"
QEMU_VERSION="4.0.0-rc2"
QEMU_VERSION=${qemu_version:-"$QEMU_VERSION"} QEMU_VERSION=${qemu_version:-"$QEMU_VERSION"}
check_qemu_version $QEMU_VERSION check_qemu_version $QEMU_VERSION
QEMU_TAR_SRC=${PWD}/AQ/qemu-${QEMU_VERSION}.tar.xz QEMU_TAR_SRC=${PWD}/AQ/qemu-${QEMU_VERSION}.tar.xz
@ -55,97 +58,54 @@ init() {
QEMU_SRC_DIR=${PWD}/AQ/qemu-${QEMU_VERSION} QEMU_SRC_DIR=${PWD}/AQ/qemu-${QEMU_VERSION}
QEMU_GIT_SRC_DIR=${PWD}/AQ/qemu QEMU_GIT_SRC_DIR=${PWD}/AQ/qemu
QEMU_CONFIGURE_2_8_0=" QEMU_CONFIGURE_2_8_0="
./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu \ ./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu --static --enable-docs --enable-guest-agent --enable-gcrypt --enable-vnc --enable-vnc-jpeg --enable-vnc-png --enable-fdt --enable-bluez --enable-kvm --enable-colo --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-bzip2 --enable-coroutine-pool --enable-tpm --disable-libssh2 --enable-replication --disable-libiscsi --disable-libnfs --disable-libusb --disable-smartcard --disable-usb-redir --disable-glusterfs --disable-seccomp
--static \
--enable-docs --enable-guest-agent \
--enable-gcrypt --enable-vnc --enable-vnc-jpeg --enable-vnc-png --enable-fdt --enable-bluez --enable-kvm --enable-colo --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-bzip2 \
--enable-coroutine-pool --enable-tpm --disable-libssh2 --enable-replication \
--disable-libiscsi --disable-libnfs --disable-libusb --disable-smartcard --disable-usb-redir --disable-glusterfs --disable-seccomp \
" "
QEMU_CONFIGURE_2_8_1_1=" QEMU_CONFIGURE_2_8_1_1="
./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu \ ./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu --static --enable-docs --enable-guest-agent --enable-gcrypt --enable-vnc --enable-vnc-jpeg --enable-vnc-png --enable-fdt --enable-bluez --enable-kvm --enable-colo --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-bzip2 --enable-coroutine-pool --enable-tpm --disable-libssh2 --enable-replication --disable-libiscsi --disable-libnfs --disable-libusb --disable-smartcard --disable-usb-redir --disable-glusterfs --disable-seccomp
--static \
--enable-docs --enable-guest-agent \
--enable-gcrypt --enable-vnc --enable-vnc-jpeg --enable-vnc-png \
--enable-fdt --enable-bluez --enable-kvm --enable-colo --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-bzip2 \
--enable-coroutine-pool --enable-tpm --disable-libssh2 --enable-replication \
--disable-libiscsi --disable-libnfs --disable-libusb --disable-smartcard --disable-usb-redir --disable-glusterfs --disable-seccomp \
" "
QEMU_CONFIGURE_2_10_0_RC0=" QEMU_CONFIGURE_2_10_0_RC0="
./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu \ ./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu --static --enable-docs --enable-guest-agent --disable-sdl --disable-gtk --disable-vte --disable-curses --disable-cocoa --enable-gcrypt --enable-vnc --enable-vnc-jpeg --enable-vnc-png --disable-virtfs --enable-fdt --enable-bluez --enable-kvm --disable-hax --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --enable-live-block-migration --disable-usb-redir --enable-bzip2 --enable-coroutine-pool --disable-glusterfs --enable-tpm --enable-libssh2 --enable-replication --enable-vhost-vsock --enable-xfsctl --enable-tools --enable-crypto-afalg
--static \
--enable-docs \
--enable-guest-agent \
--disable-sdl --disable-gtk --disable-vte --disable-curses --disable-cocoa \
--enable-gcrypt --enable-vnc --enable-vnc-jpeg --enable-vnc-png --disable-virtfs --enable-fdt --enable-bluez --enable-kvm --disable-hax \
--enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --enable-live-block-migration --disable-usb-redir --enable-bzip2 \
--enable-coroutine-pool --disable-glusterfs --enable-tpm --enable-libssh2 --enable-replication --enable-vhost-vsock --enable-xfsctl --enable-tools \
--enable-crypto-afalg \
" "
QEMU_CONFIGURE_2_10_0_RC2=" QEMU_CONFIGURE_2_10_0_RC2="
./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu \ ./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu --static --enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse --disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa --enable-virtfs --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-fdt --enable-bluez --enable-kvm --disable-hax --disable-rdma --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 --disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl --disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user
--static \
--enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse \
--disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa \
--enable-virtfs --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-fdt --enable-bluez --enable-kvm --disable-hax \
--disable-rdma --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard \
--disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy \
--enable-bzip2 \
--disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl \
--disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs \
--enable-crypto-afalg --enable-vhost-user\
" "
QEMU_CONFIGURE_2_11_0_RC0=" QEMU_CONFIGURE_2_11_0_RC0="
./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu \ ./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu --static --enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse --disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa --enable-virtfs --enable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-fdt --enable-bluez --enable-kvm --disable-hax --disable-rdma --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 --disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl --disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone
--static \
--enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse \
--disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa \
--enable-virtfs --enable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-fdt --enable-bluez --enable-kvm --disable-hax \
--disable-rdma --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard \
--disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 \
--disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl \
--disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone\
" "
QEMU_CONFIGURE_2_11_1=" QEMU_CONFIGURE_2_11_1="
./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu \ ./configure --prefix=${QEMU_PREFIX} --target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu --static --enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse --disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa --enable-virtfs --disable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-fdt --enable-bluez --enable-kvm --disable-hax --disable-rdma --enable-vde --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 --disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl --disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone
--static \
--enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse \
--disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa \
--enable-virtfs --disable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-fdt --enable-bluez --enable-kvm --disable-hax \
--disable-rdma --enable-vde --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard \
--disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 \
--disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl \
--disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone \
" "
QEMU_CONFIGURE_2_12_0_RC4=" QEMU_CONFIGURE_2_12_0_RC4="
./configure --prefix=${QEMU_PREFIX}\ ./configure --prefix=${QEMU_PREFIX} --static --enable-malloc-trim --enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse --disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa --enable-virtfs --disable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-membarrier --enable-fdt --enable-bluez --enable-kvm --disable-hax --disable-hvf --disable-whpx --disable-rdma --enable-vde --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-vhost-crypto --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 --disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --enable-libxml2 --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl --disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone
--static\ "
--enable-malloc-trim\
QEMU_CONFIGURE_3_0_0="
./configure --prefix=${QEMU_PREFIX} --static --enable-malloc-trim\
--enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse\ --enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse\
--disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa\ --disable-gnutls --disable-nettle --enable-gcrypt --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa\
--enable-virtfs --disable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-membarrier --enable-fdt --enable-bluez --enable-kvm --disable-hax\ --enable-virtfs --disable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-membarrier --enable-fdt --enable-bluez --enable-kvm --disable-hax
--disable-hvf --disable-whpx\ --disable-hvf --disable-whpx --disable-rdma --enable-vde --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-vhost-crypto --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard\
--disable-rdma --enable-vde --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-vhost-crypto --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard\
--disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2\ --disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2\
--disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --enable-libxml2 --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl\ --disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --disable-libssh2 --disable-numa --enable-libxml2 --disable-tcmalloc --disable-jemalloc --enable-replication --enable-vhost-vsock --disable-opengl\
--disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone\ --disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-crypto-afalg --enable-vhost-user --enable-capstone --disable-capstone
" "
ALSA_PREFIX="/data/local/alsa"
QEMU_CONFIGURE_4_0_0_RC2="
./configure --prefix=${QEMU_PREFIX}\
--static --audio-drv-list=alsa --extra-ldflags=-L${ALSA_PREFIX}/lib\
--enable-malloc-trim\
--enable-system --enable-user --disable-bsd-user --enable-docs --enable-guest-agent --disable-guest-agent-msi --disable-pie --disable-modules --enable-debug-tcg --disable-debug-info --disable-sparse\
--disable-gnutls --disable-nettle --enable-gcrypt --disable-auth-pam --disable-sdl --disable-gtk --disable-vte --disable-curses --enable-iconv --enable-vnc --disable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa\
--enable-virtfs --disable-mpath --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --enable-membarrier --enable-fdt --enable-bluez --enable-kvm --disable-hax\
--disable-hvf --disable-whpx\
--disable-rdma --disable-pvrdma --enable-vde --disable-netmap --enable-linux-aio --enable-cap-ng --enable-attr --enable-vhost-net --enable-vhost-vsock --enable-vhost-scsi --enable-vhost-crypto --enable-vhost-kernel --enable-vhost-user --disable-spice --disable-rbd --enable-libiscsi --disable-libnfs --disable-smartcard\
--disable-libusb --enable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --enable-bzip2 --disable-lzfse\
--disable-seccomp --enable-coroutine-pool --disable-glusterfs --enable-tpm --enable-libssh2 --disable-numa --enable-libxml2 --disable-tcmalloc --disable-jemalloc --disable-avx2 --enable-replication --disable-opengl\
--disable-virglrenderer --enable-xfsctl --enable-qom-cast-debug --enable-tools --disable-vxhs --enable-bochs --enable-cloop --enable-dmg --enable-qcow1 --enable-vdi --enable-vvfat --enable-qed --enable-parallels --enable-sheepdog --enable-crypto-afalg --enable-capstone --enable-debug-mutex --disable-libpmem\
"
QEMU_CONFIGURE_2_10_0_RC1=$QEMU_CONFIGURE_2_10_0_RC0 QEMU_CONFIGURE_2_10_0_RC1=$QEMU_CONFIGURE_2_10_0_RC0
QEMU_CONFIGURE_2_10_0_RC2=$QEMU_CONFIGURE_2_10_0_RC2 QEMU_CONFIGURE_2_10_0_RC2=$QEMU_CONFIGURE_2_10_0_RC2
QEMU_CONFIGURE_2_10_0_RC3=$QEMU_CONFIGURE_2_10_0_RC2 QEMU_CONFIGURE_2_10_0_RC3=$QEMU_CONFIGURE_2_10_0_RC2
@ -160,7 +120,10 @@ init() {
QEMU_CONFIGURE_2_11_1=$QEMU_CONFIGURE_2_11_1 QEMU_CONFIGURE_2_11_1=$QEMU_CONFIGURE_2_11_1
QEMU_CONFIGURE_2_12_0_RC4=$QEMU_CONFIGURE_2_12_0_RC4 QEMU_CONFIGURE_2_12_0_RC4=$QEMU_CONFIGURE_2_12_0_RC4
QEMU_CONFIGURE_2_12_0=$QEMU_CONFIGURE_2_12_0_RC4 QEMU_CONFIGURE_2_12_0=$QEMU_CONFIGURE_2_12_0_RC4
QEMU_CONFIGURE_GIT=$QEMU_CONFIGURE_2_12_0_RC4 QEMU_CONFIGURE_3_0_0=$QEMU_CONFIGURE_3_0_0
QEMU_CONFIGURE_4_0_0_RC2=$QEMU_CONFIGURE_4_0_0_RC2
QEMU_CONFIGURE_GIT=$QEMU_CONFIGURE_3_0_0
MAKE_J="$(grep -c ^processor /proc/cpuinfo | grep -E '^[1-9]+[0-9]*$' || echo 1)" ; test $MAKE_J != "1" && make_j=$((MAKE_J - 1)) || make_j=$MAKE_J MAKE_J="$(grep -c ^processor /proc/cpuinfo | grep -E '^[1-9]+[0-9]*$' || echo 1)" ; test $MAKE_J != "1" && make_j=$((MAKE_J - 1)) || make_j=$MAKE_J
MAKE_J="-j${make_j}" MAKE_J="-j${make_j}"
pkg_install $OS pkg_install $OS
@ -171,26 +134,94 @@ init() {
fi fi
src_download src_download
tar_extract tar_extract
if test "${QEMU_VERSION}" = "4.0.0-rc2"; then
build_alsa-lib;
fi
install qemu install qemu
} }
function check_alsa() {
case $1 in
"4.0.0-rc2") build_alsa-lib; ;;
esac
}
function build_alsa-lib() {
ALSA_VERSION="1.1.8";
ALSA_TAR_SRC="${SRC}/alsa-lib-${ALSA_VERSION}.tar.bz2";
ALSA_TAR_SRC_USR="ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${ALSA_VERSION}.tar.bz2";
ALSA_SRC_DIR=${SRC}/alsa-lib-${ALSA_VERSION};
ALSA_CONFIGURE_1_1_8="
./configure --prefix=${ALSA_PREFIX} --enable-static=yes --disable-shared
"
if ! test -f ${ALSA_TAR_SRC} ; then
echo -n "Download ALSA-LIB ${ALSA_VERSION} "
bg_wait wget -q -T 120 -O ${ALSA_TAR_SRC}_tmp ${ALSA_TAR_SRC_USR}
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -f ${ALSA_TAR_SRC}_tmp ; then
echo -ne fail\\n
test -f ${ALSA_TAR_SRC}_tmp && rm -f ${ALSA_TAR_SRC}_tmp && exit 3
else
echo -ne done\\n
mv ${ALSA_TAR_SRC}_tmp ${ALSA_TAR_SRC}
fi
fi
if ! test -d ${ALSA_SRC_DIR}; then
echo -n +Extract ALSA ....
tar -axf ${ALSA_TAR_SRC} -C ${SRC} >> ${BGEXEC_LOG_STATUS_FILE} 2>&1
if ! test -d ${ALSA_SRC_DIR} ; then
echo -ne \\b\\b\\b\\bfail\\n
exit 3
else
echo -ne \\b\\b\\b\\bdone\\n
fi
fi
cd ${ALSA_SRC_DIR};
echo -n "Configure ALSA "
bg_wait $ALSA_CONFIGURE_1_1_8
if test $(cat $BGEXEC_EXIT_STATUS_FILE) = "0" && test -f ${ALSA_SRC_DIR}/Makefile ; then
echo -ne done\\n
else
echo -ne fail\\n
exit 3
fi
make $MAKE_J >> $LOG 2>&1 &
echo -n Make ALSA\ ;wait_pid $!
if test -x $ALSA_SRC_DIR/aserver/aserver ; then
echo -ne done\\n
else
echo -ne fail\\n
exit 3
fi
make install >> $LOG 2>&1 &
echo -n Make install ALSA\ ;wait_pid $!
if test -x $ALSA_PREFIX/bin/aserver ; then
echo -ne done\\n
else
echo -ne fail\\n
exit 3
fi
}
initdate() { initdate() {
init_date=`date +%s` init_date=`date +%s`
} }
helloworld() { helloworld() {
cat <<HELLOWORLD cat <<EOF
----------------------------- -----------------------------
Web: AIXIAO.ME Web: AIXIAO.ME
AQ: $VER for $OS $vvv AQ: $VER for $OS $vvv
Qq: 1225803134
Qq: 1605227279 Qq: 1605227279
Qemail: 1225803134@qq.com
Qemail: 1605227279@qq.com Qemail: 1605227279@qq.com
Author: aixiao@aixiao.me Author: aixiao@aixiao.me
Android Qemu Android Qemu
----------------------------- -----------------------------
HELLOWORLD EOF
} }
check_os() { check_os() {
@ -222,6 +253,7 @@ check_os() {
test "$arch" = "x86_64" && arch=x64 test "$arch" = "x86_64" && arch=x64
test "$arch" = "armv7l" && arch=arm test "$arch" = "armv7l" && arch=arm
test "$arch" = "armv6l" && arch=arm test "$arch" = "armv6l" && arch=arm
test "$arch" = "aarch64" && arch=arm;
case $vvv in case $vvv in
"8") "8")
: :
@ -240,13 +272,13 @@ check_os() {
"9") "9")
case $arch in case $arch in
"arm") "arm")
APT1="libbz2-dev libxml2-dev liblzma-dev" APT1="libbz2-dev libxml2-dev liblzma-dev flex bison texinfo perl python-sphinx"
;; ;;
"x86") "x86")
APT1="libbz2-dev libxml2-dev liblzma-dev" APT1="libbz2-dev libxml2-dev liblzma-dev"
;; ;;
"x64") "x64")
APT1="libbz2-dev libxml2-dev liblzma-dev" APT1="libbz2-dev libxml2-dev liblzma-dev flex bison texinfo perl python-sphinx"
;; ;;
esac esac
;; ;;
@ -302,6 +334,8 @@ check_qemu_version() {
"2.11.1") : ;; "2.11.1") : ;;
"2.12.0-rc4") : ;; "2.12.0-rc4") : ;;
"2.12.0") : ;; "2.12.0") : ;;
"3.0.0") : ;;
"4.0.0-rc2") : ;;
*) echo -ne The QEMU $QEMU_VERSION version does not support configure\\n ; exit 3 ;; *) echo -ne The QEMU $QEMU_VERSION version does not support configure\\n ; exit 3 ;;
esac esac
} }
@ -339,18 +373,22 @@ wait_pid() {
done done
} }
function TEE() {
$@ | tee -a $LOG
}
pkg_install() { pkg_install() {
case $1 in case $1 in
debian) debian)
echo -n "Debian apt update " echo -n "Debian apt update "
bg_wait apt-get update bg_wait TEE apt-get update
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n echo -ne fail\\n
else else
echo -ne done\\n echo -ne done\\n
fi fi
echo -n "Debian apt install " echo -n "Debian apt install "
DEBIAN_FRONTEND=noninteractive bg_wait apt-get -qqy --force-yes install build-essential git-core $APT DEBIAN_FRONTEND=noninteractive bg_wait TEE apt-get -qqy --force-yes install build-essential git-core $APT
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n-----------------------------\\n echo -ne fail\\n-----------------------------\\n
exit 3 exit 3
@ -358,7 +396,7 @@ pkg_install() {
echo -ne done\\n echo -ne done\\n
fi fi
echo -n "Debian apt build-dep " echo -n "Debian apt build-dep "
DEBIAN_FRONTEND=noninteractive bg_wait apt-get -qqy --force-yes build-dep qemu-system DEBIAN_FRONTEND=noninteractive bg_wait TEE apt-get -qqy --force-yes build-dep qemu-system
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n-----------------------------\\n echo -ne fail\\n-----------------------------\\n
exit 3 exit 3
@ -367,14 +405,14 @@ pkg_install() {
;; ;;
ubuntu) ubuntu)
echo -n "Ubuntu apt update " echo -n "Ubuntu apt update "
bg_wait apt-get update bg_wait TEE apt-get update
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n echo -ne fail\\n
else else
echo -ne done\\n echo -ne done\\n
fi fi
echo -n "Ubuntu apt install " echo -n "Ubuntu apt install "
DEBIAN_FRONTEND=noninteractive bg_wait apt-get -qqy --force-yes install build-essential git $APT DEBIAN_FRONTEND=noninteractive bg_wait TEE apt-get -qqy --force-yes install build-essential git $APT
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n-----------------------------\\n echo -ne fail\\n-----------------------------\\n
exit 3 exit 3
@ -382,7 +420,7 @@ pkg_install() {
echo -ne done\\n echo -ne done\\n
fi fi
echo -n "Ubuntu apt build-dep " echo -n "Ubuntu apt build-dep "
DEBIAN_FRONTEND=noninteractive bg_wait apt-get -qqy --force-yes build-dep qemu-system DEBIAN_FRONTEND=noninteractive bg_wait TEE apt-get -qqy --force-yes build-dep qemu-system
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n-----------------------------\\n echo -ne fail\\n-----------------------------\\n
exit 3 exit 3
@ -396,7 +434,7 @@ pkg_install() {
src_download() { src_download() {
if ! test -f ${QEMU_TAR_SRC} ; then if ! test -f ${QEMU_TAR_SRC} ; then
echo -n "Download QEMU ${QEMU_VERSION} " echo -n "Download QEMU ${QEMU_VERSION} "
bg_wait wget -q -T 120 -O ${QEMU_TAR_SRC}_tmp ${QEMU_TAR_SRC_USR} bg_wait TEE wget -q -T 120 -O ${QEMU_TAR_SRC}_tmp ${QEMU_TAR_SRC_USR}
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -f ${QEMU_TAR_SRC}_tmp ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -f ${QEMU_TAR_SRC}_tmp ; then
echo -ne fail\\n echo -ne fail\\n
test -f ${QEMU_TAR_SRC}_tmp && rm -f ${QEMU_TAR_SRC}_tmp && exit 3 test -f ${QEMU_TAR_SRC}_tmp && rm -f ${QEMU_TAR_SRC}_tmp && exit 3
@ -448,18 +486,18 @@ git_clone() {
if ! test -d $QEMU_GIT_SRC_DIR ; then if ! test -d $QEMU_GIT_SRC_DIR ; then
echo -n "GIT PULL QEMU " echo -n "GIT PULL QEMU "
cd $SRC cd $SRC
bg_wait git clone git://git.qemu-project.org/qemu.git bg_wait TEE git clone git://git.qemu-project.org/qemu.git
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -d $QEMU_GIT_SRC_DIR ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -d $QEMU_GIT_SRC_DIR ; then
echo -ne fail\\n echo -ne fail\\n
exit 3 exit 3
fi fi
cd $QEMU_GIT_SRC_DIR cd $QEMU_GIT_SRC_DIR
bg_wait git submodule init bg_wait TEE git submodule init
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" ; then
echo -ne fail\\n echo -ne fail\\n
exit 3 exit 3
fi fi
bg_wait git submodule update --recursive bg_wait TEE git submodule update --recursive
if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -f $QEMU_GIT_SRC_DIR/configure ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) != "0" || ! test -f $QEMU_GIT_SRC_DIR/configure ; then
echo -ne fail\\n echo -ne fail\\n
exit 3 exit 3
@ -502,6 +540,8 @@ configure() {
"2.11.1") ${QEMU_CONFIGURE_2_11_1} ;; "2.11.1") ${QEMU_CONFIGURE_2_11_1} ;;
"2.12.0-rc4") ${QEMU_CONFIGURE_2_12_0_RC4} ;; "2.12.0-rc4") ${QEMU_CONFIGURE_2_12_0_RC4} ;;
"2.12.0") ${QEMU_CONFIGURE_2_12_0_RC4} ;; "2.12.0") ${QEMU_CONFIGURE_2_12_0_RC4} ;;
"3.0.0") ${QEMU_CONFIGURE_3_0_0} ;;
"4.0.0-rc2") ${QEMU_CONFIGURE_4_0_0_RC2} ;;
esac esac
;; ;;
qemu-git) qemu-git)
@ -515,7 +555,7 @@ install() {
qemu) qemu)
cd $QEMU_SRC_DIR cd $QEMU_SRC_DIR
echo -n "Configure QEMU " echo -n "Configure QEMU "
bg_wait configure $1 $QEMU_VERSION bg_wait TEE configure $1 $QEMU_VERSION
if test $(cat $BGEXEC_EXIT_STATUS_FILE) = "0" && test -f $QEMU_SRC_DIR/Makefile ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) = "0" && test -f $QEMU_SRC_DIR/Makefile ; then
echo -ne done\\n echo -ne done\\n
else else
@ -531,7 +571,8 @@ install() {
else else
echo -ne done\\n echo -ne done\\n
fi fi
make $MAKE_J >> $BGEXEC_LOG_STATUS_FILE 2>&1 & : make $MAKE_J >> $BGEXEC_LOG_STATUS_FILE 2>&1 &
make $MAKE_J >> $LOG 2>&1 &
echo -n Make QEMU\ ;wait_pid $! echo -n Make QEMU\ ;wait_pid $!
if test -x $QEMU_SRC_DIR/arm-softmmu/qemu-system-arm ; then if test -x $QEMU_SRC_DIR/arm-softmmu/qemu-system-arm ; then
echo -ne done\\n echo -ne done\\n
@ -539,7 +580,8 @@ install() {
echo -ne fail\\n echo -ne fail\\n
exit 3 exit 3
fi fi
make install >> $BGEXEC_LOG_STATUS_FILE 2>&1 & : make install >> $BGEXEC_LOG_STATUS_FILE 2>&1 &
make install >> $LOG 2>&1 &
echo -n Make install QEMU\ ;wait_pid $! echo -n Make install QEMU\ ;wait_pid $!
if test -x $QEMU_PREFIX/bin/qemu-system-arm ; then if test -x $QEMU_PREFIX/bin/qemu-system-arm ; then
echo -ne done\\n echo -ne done\\n
@ -551,7 +593,7 @@ install() {
qemu-git) qemu-git)
cd $QEMU_GIT_SRC_DIR cd $QEMU_GIT_SRC_DIR
echo -n "Configure QEMU " echo -n "Configure QEMU "
bg_wait configure $1 bg_wait TEE configure $1
if test $(cat $BGEXEC_EXIT_STATUS_FILE) = "0" && test -f $QEMU_GIT_SRC_DIR/Makefile ; then if test $(cat $BGEXEC_EXIT_STATUS_FILE) = "0" && test -f $QEMU_GIT_SRC_DIR/Makefile ; then
echo -ne done\\n echo -ne done\\n
else else
@ -597,19 +639,24 @@ init_exec() {
--------------------------- ---------------------------
AQ AQ
Android Qemu Android Qemu
Qq: 1225803134
Qq: 1605227279 Qq: 1605227279
Qemail: 1225803134@qq.com
Qemail: 1605227279@qq.com Qemail: 1605227279@qq.com
Author: aixiao@aixiao.me Author: aixiao@aixiao.me
--------------------------- ---------------------------
-x
print debug.
---------------------------
--prefix= --prefix=
Installation directory.
--------------------------- ---------------------------
--qemuversion= --qemuversion=
Qemu Version.
--------------------------- ---------------------------
--gitqemu --gitqemu
Clone source code from GIT repository.
--------------------------- ---------------------------
--help --help
print help.
--------------------------- ---------------------------
HELP HELP
exit 3 exit 3
@ -625,8 +672,20 @@ HELP
;; ;;
esac esac
} }
while getopts :x x; do
case ${x} in
x)
debug=x;
shift $((OPTIND-1));
;;
esac
done
test "${debug}" = "x" && set -x;
path path
VER=1.15 VER=1.17
for((i=1;i<=$#;i++)); do for((i=1;i<=$#;i++)); do
ini_cfg=${!i} ini_cfg=${!i}
ini_cfg_a=`echo $ini_cfg | sed -r s/^-?-?.*=//` ini_cfg_a=`echo $ini_cfg | sed -r s/^-?-?.*=//`
@ -636,3 +695,4 @@ done
init $@ init $@
exit exit
aixiao@aixiao.me. aixiao@aixiao.me.
201904061843