From 872d1f1315e1290e3a02fe50fa663b588b64e5698687aa2124aafd860eb1719e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Sat, 6 Jul 2013 01:06:10 +0000 Subject: [PATCH] - Enable ARM targets for Xen OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=255 --- xen.changes | 5 ++++ xen.spec | 80 +++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 6 deletions(-) diff --git a/xen.changes b/xen.changes index e2e320a..5f0a9aa 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 5 14:31:51 UTC 2013 - agraf@suse.com + +- Enable ARM targets for Xen + ------------------------------------------------------------------- Thu Jun 27 16:57:08 MDT 2013 - carnold@suse.com diff --git a/xen.spec b/xen.spec index f59c73b..26827ea 100644 --- a/xen.spec +++ b/xen.spec @@ -17,13 +17,18 @@ Name: xen -ExclusiveArch: %ix86 x86_64 +ExclusiveArch: %ix86 x86_64 %arm aarch64 %define xvers 4.3 %define xvermaj 4 %define changeset 27190 %define xen_build_dir xen-4.3.0-testing +%ifarch %arm aarch64 +%define with_kmp 0 +%define with_stubdom 0 +%else %define with_kmp 1 %define with_stubdom 1 +%endif # EFI requires gcc46 or newer # its available in 12.1 or >= sles11sp2 %if %suse_version == 1210 || %suse_version == 1110 @@ -31,7 +36,7 @@ ExclusiveArch: %ix86 x86_64 %else %define with_gcc46 0 %endif -%ifarch x86_64 +%ifarch x86_64 %arm aarch64 %define with_dom0_support 1 %else %define with_dom0_support 0 @@ -45,13 +50,18 @@ ExclusiveArch: %ix86 x86_64 BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel BuildRequires: automake +%ifnarch %arm aarch64 BuildRequires: bin86 +%endif BuildRequires: curl-devel +%ifnarch %arm aarch64 BuildRequires: dev86 +%endif BuildRequires: fdupes BuildRequires: glib2-devel BuildRequires: graphviz BuildRequires: latex2html +BuildRequires: libaio-devel BuildRequires: libbz2-devel BuildRequires: libjpeg-devel BuildRequires: libpixman-1-0-devel @@ -71,8 +81,10 @@ BuildRequires: xz-devel %if %suse_version <= 1110 BuildRequires: pmtools %else +%ifnarch %arm aarch64 BuildRequires: acpica %endif +%endif %if %suse_version >= 1030 BuildRequires: texlive BuildRequires: texlive-latex @@ -107,8 +119,10 @@ BuildRequires: glibc-devel-32bit %define pae_enabled n %else %define max_cpus 32 +%ifnarch %arm %define pae_enabled y %endif +%endif BuildRequires: glibc-devel %if %{?with_kmp}0 BuildRequires: kernel-source @@ -644,7 +658,9 @@ export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS" --datadir=%{_datadir} %if %{?with_dom0_support}0 CFLAGS_SAVE=$CFLAGS +%ifnarch %arm aarch64 make -C xenalyze.hg CC="gcc -I../xen/include -DMAX_CPUS=%{max_cpus} ${RPM_OPT_FLAGS}" %{?_smp_mflags} -k +%endif make -C tools/include/xen-foreign %{?_smp_mflags} make tools docs %{?_smp_mflags} make -C tools/debugger/gdbsx @@ -676,7 +692,7 @@ export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS" export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS" %if %{?with_dom0_support}0 # EFI -%ifarch x86_64 +%ifarch x86_64 %arm aarch64 make -C xen install \ %if %{?with_gcc46}0 CC=gcc-4.6 \ @@ -703,9 +719,11 @@ install_xen() ln -s xen${ext}-%{version}-%{release}.gz $RPM_BUILD_ROOT/boot/xen${ext}.gz ln -sf xen-syms${ext}-%{version}-%{release} $RPM_BUILD_ROOT/boot/xen-syms${ext} } +%ifnarch %arm aarch64 make -C xen install max_phys_cpus=%{max_cpus} pae=%{pae_enabled} debug=y crash_debug=y DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags} install_xen dbg make -C xen clean +%endif make -C xen install max_phys_cpus=%{max_cpus} pae=%{pae_enabled} debug=n crash_debug=n DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags} install_xen make -C xen clean @@ -715,18 +733,19 @@ export XEN_PYTHON_NATIVE_INSTALL=1 make -C tools install \ DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} %{?_smp_mflags} rm -f $RPM_BUILD_ROOT/usr/sbin/{qcow-create,img2qcow,qcow2raw} +echo > xen.files.txt %ifarch x86_64 mkdir -p $RPM_BUILD_ROOT/${_libdir}/xen/bin/ ln -s /usr/lib/xen/bin/qemu-dm $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm -%endif + # efi depends on gcc46 -echo > xen.files.txt if test -d $RPM_BUILD_ROOT%{_libdir}/efi then echo %{_libdir}/efi >> xen.files.txt fi cp -avL xenalyze.hg/dump-raw $RPM_BUILD_ROOT/%{_bindir}/xenalyze.dump-raw cp -avL xenalyze.hg/xenalyze $RPM_BUILD_ROOT/%{_bindir} +%endif %else make -C tools install DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} %{?_smp_mflags} %endif @@ -777,13 +796,17 @@ done # init scripts %if %{?with_dom0_support}0 mkdir -p $RPM_BUILD_ROOT/etc/init.d +%ifnarch %arm aarch64 install %SOURCE13 $RPM_BUILD_ROOT/etc/init.d/xend ln -s /etc/init.d/xend $RPM_BUILD_ROOT/usr/sbin/rcxend +%endif install %SOURCE14 $RPM_BUILD_ROOT/etc/init.d/xendomains ln -s /etc/init.d/xendomains $RPM_BUILD_ROOT/usr/sbin/rcxendomains +%ifnarch %arm aarch64 install %SOURCE34 $RPM_BUILD_ROOT/etc/init.d/pciback ln -s /etc/init.d/pciback $RPM_BUILD_ROOT/usr/sbin/rcpciback install %SOURCE35 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pciback +%endif mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d install -m644 %SOURCE26 $RPM_BUILD_ROOT/etc/modprobe.d/xen_loop.conf # example config @@ -823,6 +846,7 @@ mkdir -p $RPM_BUILD_ROOT/var/log/xen mkdir -p $RPM_BUILD_ROOT/var/log/xen/console ln -s /var/lib/xen/images $RPM_BUILD_ROOT/etc/xen/images # Bootloader +mkdir -p $RPM_BUILD_ROOT/usr/lib/xen/boot/ install -m755 %SOURCE16 $RPM_BUILD_ROOT/usr/lib/xen/boot/ install -m755 %SOURCE36 $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages # udev support @@ -918,14 +942,18 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /boot/xen-%{version}-%{release}.gz /boot/xen-%{xvermaj}.gz /boot/xen-%{xvers}.gz +%ifnarch %arm aarch64 /boot/xen-dbg-%{version}-%{release}.gz /boot/xen-dbg-%{xvermaj}.gz /boot/xen-dbg-%{xvers}.gz /boot/xen-dbg.gz +%endif /boot/xen-syms /boot/xen-syms-%{version}-%{release} +%ifnarch %arm aarch64 /boot/xen-syms-dbg /boot/xen-syms-dbg-%{version}-%{release} +%endif /boot/xen.gz %endif @@ -938,23 +966,30 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper %files tools %defattr(-,root,root) +%ifnarch %arm aarch64 /usr/bin/xenalyze /usr/bin/xenalyze.dump-raw +%endif /usr/bin/xencons /usr/bin/xenstore* /usr/bin/xentrace* /usr/bin/pygrub +%ifnarch %arm aarch64 /usr/bin/tapdisk-ioemu /usr/bin/remus /usr/bin/xencov_split /usr/sbin/blktapctrl +%endif /usr/sbin/flask-* /usr/sbin/tap* +%ifnarch %arm aarch64 /usr/sbin/rcpciback /usr/sbin/xenbaked +%endif /usr/sbin/xenconsoled /usr/sbin/xencov /usr/sbin/xen-destroy +%ifnarch %arm aarch64 /usr/sbin/xen-hptool /usr/sbin/xen-hvmcrash /usr/sbin/xen-hvmctx @@ -965,23 +1000,32 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /usr/sbin/xenperf /usr/sbin/xenpm /usr/sbin/xenpmd +%endif /usr/sbin/xen-ringwatch /usr/sbin/xenstored +%ifnarch %arm aarch64 /usr/sbin/xen-tmem-list-parse +%endif /usr/sbin/xentop +%ifnarch %arm aarch64 /usr/sbin/xentrace_setmask /usr/sbin/xen-vmresync +%endif /usr/sbin/xenwatchdogd /usr/sbin/xsview /usr/sbin/gtracestat /usr/sbin/gtraceview /usr/sbin/lock-util /usr/sbin/td-util +%ifnarch %arm aarch64 /usr/sbin/vhd-update /usr/sbin/vhd-util /usr/sbin/gdbsx +%endif /usr/sbin/xl +%ifnarch %arm aarch64 /usr/sbin/kdd +%endif %dir %attr(700,root,root) /etc/xen %dir /etc/xen/scripts /etc/xen/scripts/blktap @@ -992,7 +1036,9 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /etc/xen/scripts/locking.sh /etc/xen/scripts/logging.sh /etc/xen/scripts/network-* +%ifnarch %arm aarch64 /etc/xen/scripts/qemu-ifup +%endif /etc/xen/scripts/set-lock /etc/xen/scripts/vif2 /etc/xen/scripts/vif-* @@ -1003,17 +1049,21 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /etc/xen/scripts/xen-script-common.sh /etc/xen/scripts/xmclone.sh %{_libdir}/xen -%ifarch x86_64 +%ifarch x86_64 aarch64 /usr/lib/xen %endif %dir /var/adm/fillup-templates +%ifnarch %arm aarch64 /var/adm/fillup-templates/sysconfig.pciback +%endif /var/adm/fillup-templates/sysconfig.xencommons %dir /var/lib/xen %dir %attr(700,root,root) /var/lib/xen/images %dir %attr(700,root,root) /var/lib/xen/save %dir %attr(700,root,root) /var/lib/xen/dump +%ifnarch %arm aarch64 %dir %attr(700,root,root) /var/lib/xen/xenpaging +%endif %dir /var/lib/xenstored %dir /var/log/xen %dir /var/log/xen/console @@ -1031,7 +1081,9 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper %dir /etc/init.d %config /etc/init.d/xencommons %config /etc/init.d/xen-watchdog +%ifnarch %arm aarch64 %config /etc/init.d/pciback +%endif %dir /etc/modprobe.d %dir /etc/udev %dir /etc/udev/rules.d @@ -1040,12 +1092,16 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /etc/sysconfig/network/if-up.d/xen /etc/sysconfig/network/if-down.d/xen /etc/bash_completion.d/xl.sh +%ifnarch %arm aarch64 %dir %{_datadir}/qemu-xen %{_datadir}/qemu-xen/* +%endif %dir %{_datadir}/xen %{_datadir}/xen/*.dtd +%ifnarch %arm aarch64 %dir %{_datadir}/xen/qemu %{_datadir}/xen/qemu/* +%endif %dir %{_libdir}/python%{pyver}/site-packages/grub %dir %{_libdir}/python%{pyver}/site-packages/xen %dir %{_libdir}/python%{pyver}/site-packages/xen/lowlevel @@ -1076,8 +1132,11 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper %files xend-tools %defattr(-,root,root) +%ifnarch %arm aarch64 /etc/udev/rules.d/40-xend.rules +%endif /usr/sbin/rcxendomains +%ifnarch %arm aarch64 /usr/sbin/rcxend /usr/sbin/xm /usr/sbin/xend @@ -1096,10 +1155,12 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /var/adm/fillup-templates/sysconfig.xendomains %dir /etc/init.d %config /etc/init.d/xend +%endif %config /etc/init.d/xendomains %dir %attr(700,root,root) /etc/xen %config(noreplace) /etc/xen/*.sxp %config(noreplace) /etc/xen/*.xml +%ifnarch %arm aarch64 /etc/xen/scripts/xend-relocation.sh %{_libdir}/python%{pyver}/site-packages/xen/remus/* %{_libdir}/python%{pyver}/site-packages/xen/sv/* @@ -1114,10 +1175,13 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper %{_mandir}/man5/xmdomain.cfg.5.gz %{_mandir}/man5/xend-config.sxp.5.gz %endif +%endif %files tools-domU %defattr(-,root,root) +%ifnarch %arm aarch64 /usr/bin/xen-detect +%endif /bin/domu-xenstore /bin/xenstore-* @@ -1167,6 +1231,7 @@ else fi %endif # +%ifnarch %arm aarch64 %{fillup_and_insserv -y -n xendomains xendomains} %{fillup_only -n pciback} if [ -f /usr/bin/qemu-img ]; then @@ -1181,6 +1246,7 @@ if [ -f /usr/bin/qemu-nbd ]; then fi ln -s /usr/bin/qemu-nbd /usr/bin/qemu-nbd-xen fi +%endif %preun tools %{stop_on_removal xendomains xend xencommons} @@ -1191,6 +1257,7 @@ fi %{restart_on_update xend} %endif %{insserv_cleanup} +%ifnarch %arm aarch64 if [ -f /usr/bin/qemu-img-xen ]; then rm /usr/bin/qemu-img-xen fi @@ -1198,6 +1265,7 @@ if [ -f /usr/bin/qemu-nbd-xen ]; then rm /usr/bin/qemu-nbd-xen fi %endif +%endif %post libs -p /sbin/ldconfig