diff options
author | Gui Chen <gui.chen@intel.com> | 2014-08-01 03:29:21 -0400 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2014-08-03 22:39:07 -0400 |
commit | 6f05eee4ddfc41d7145e87187b9bec96cc475cfd (patch) | |
tree | 037773ce58acbdf660b5330707bef0160896a38a | |
parent | a8ef9a9cf3cc866d109017e65deff1aadfca6e10 (diff) | |
download | qemu-arm-static-6f05eee4ddfc41d7145e87187b9bec96cc475cfd.tar.gz qemu-arm-static-6f05eee4ddfc41d7145e87187b9bec96cc475cfd.tar.bz2 qemu-arm-static-6f05eee4ddfc41d7145e87187b9bec96cc475cfd.zip |
add debian
Signed-off-by: Gui Chen <gui.chen@intel.com>
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 12 | ||||
-rw-r--r-- | debian/qemu-binfmt-conf.sh | 69 | ||||
-rwxr-xr-x | debian/rules | 72 |
5 files changed, 160 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..78f48aee4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +qemu-arm-static (1.6.0) unstable; urgency=low + + * update to v1.6.0 + + -- Gui Chen <gui.chen@intel.com> Wed, 09 Jul 2014 17:25:35 +0800 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..7f8f011eb --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..1277c53a3 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: qemu-arm-static +Maintainer: Gui Chen <gui.chen@intel.com> +Homepage: http://wiki.qemu.org/Index.html +Standards-Version: 3.7.0 +Build-Depends: debhelper (>= 4.0.0), dpatch, cdbs, pkg-config, python, bzip2, uuid-dev, zlib1g-dev, zlib1g, texi2html, libc6, libglib2.0-dev, + +Package: qemu-arm-static +Architecture: i386 amd64 +Depends: bzip2, uuid-dev, zlib1g-dev, zlib1g, texi2html, libc6 +Replaces: qemu-user-static +Provides: tizen-qemu-arm-static-2013.12.12 +Description: QEMU is an extremely well-performing CPU emulator that allows you to choose between simulating an entire system and running userspace binaries for different architectures under your native operating system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well as PC and PowerMac systems. diff --git a/debian/qemu-binfmt-conf.sh b/debian/qemu-binfmt-conf.sh new file mode 100644 index 000000000..53fadc815 --- /dev/null +++ b/debian/qemu-binfmt-conf.sh @@ -0,0 +1,69 @@ +#!/bin/sh +# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel + +# load the binfmt_misc module +if [ ! -d /proc/sys/fs/binfmt_misc ]; then + /sbin/modprobe binfmt_misc +fi +if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then + mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc +fi + +# probe cpu type +cpu=`uname -m` +case "$cpu" in + i386|i486|i586|i686|i86pc|BePC|x86_64) + cpu="i386" + ;; + m68k) + cpu="m68k" + ;; + mips*) + cpu="mips" + ;; + "Power Macintosh"|ppc|ppc64) + cpu="ppc" + ;; + armv[4-9]*) + cpu="arm" + ;; +esac + +# register the interpreter for each cpu except for the native one +if [ $cpu != "i386" ] ; then + echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register + echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "alpha" ] ; then + echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "arm" ] ; then + echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register + echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-arm-static:P' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "sparc" ] ; then + echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "ppc" ] ; then + echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "m68k" ] ; then + echo 'Please check cpu value and header information for m68k!' + echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "mips" ] ; then + # FIXME: We could use the other endianness on a MIPS host. + echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register + echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register + echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register + echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register + echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register + echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "sh" ] ; then + echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register + echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register +fi +if [ $cpu != "s390x" ] ; then + echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..04948e67d --- /dev/null +++ b/debian/rules @@ -0,0 +1,72 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make +unexport LDFLAGS + +build: build-stamp +build-stamp: patch-stamp + dh_testdir + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/libexec/ \ + --target-list="arm-linux-user,arm64-linux-user" \ + --disable-tools \ + --disable-guest-agent \ + --disable-docs \ + --disable-system \ + --enable-linux-user \ + --disable-werror \ + --disable-linux-aio \ + --disable-fdt \ + --disable-sdl \ + --static + dh_auto_build + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + make DESTDIR=$(CURDIR)/debian/qemu-arm-static install + mkdir -p $(CURDIR)/debian/qemu-arm-static/usr/sbin/ + install -m755 debian/qemu-binfmt-conf.sh $(CURDIR)/debian/qemu-arm-static/usr/sbin/ + mv $(CURDIR)/debian/qemu-arm-static/usr/bin/qemu-arm $(CURDIR)/debian/qemu-arm-static/usr/bin/qemu-arm-static + mv $(CURDIR)/debian/qemu-arm-static/usr/bin/qemu-arm64 $(CURDIR)/debian/qemu-arm-static/usr/bin/qemu-arm64-static + rm -rf $(CURDIR)/debian/qemu-arm-static/usr/share + rm -rf $(CURDIR)/debian/qemu-arm-static/usr/etc + rm -rf $(CURDIR)/debian/qemu-arm-static/etc + rm -rf $(CURDIR)/debian/qemu-arm-static/usr/libexec/ + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_install + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install |