mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Added qemu 4.1.0 as bare target
* target name is devel/qemu4, old qemu preserved as devel/qemu
This commit is contained in:
parent
a0fff477a0
commit
4c51cd9c4b
26
bare/config/devel/glib-2.46.2-1.cfg
Normal file
26
bare/config/devel/glib-2.46.2-1.cfg
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# GLib
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define glib_version_major 2.46
|
||||
%define glib_version_minor 2
|
||||
%define glib_version %{glib_version_major}.%{glib_version_minor}
|
||||
|
||||
%hash sha256 glib-%{glib_version}.tar.xz 5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db
|
||||
|
||||
%patch add glib https://gaisler.se/qemu/glib-2.46.2-werror.patch
|
||||
%hash sha256 glib-2.46.2-werror.patch 389c00993f2890edaff6774d0dcfc7fcc99e92795ba913443fb9ec522f44a443
|
||||
|
||||
|
||||
#
|
||||
# The GLib build instructions. We use 2.x.x Release 1.
|
||||
#
|
||||
%ifn %{pkgconfig check glib-2.0}
|
||||
%include %{_configdir}/glib-2-1.cfg
|
||||
%endif
|
58
bare/config/devel/qemu4-git-1.cfg
Normal file
58
bare/config/devel/qemu4-git-1.cfg
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Qemu from git
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%include %{_configdir}/bare-config.cfg
|
||||
|
||||
#
|
||||
# Stable version. Qemu is fast moving.
|
||||
#
|
||||
%define qemu_version v4.1.0
|
||||
|
||||
#
|
||||
# Qemu is from GIT unless the RSB has been released.
|
||||
#
|
||||
# We need to handle the release process
|
||||
#
|
||||
%if %{rsb_released} && %{!defined without_release_url}
|
||||
%source set qemu %{rtems_release_url}/%{rtems_version}/sources/qemu-git-42d58e7.tar.xz
|
||||
%else
|
||||
%source set qemu git://git.qemu-project.org/qemu.git?pull?checkout=%{qemu_version}?submodule=dtc
|
||||
%endif
|
||||
|
||||
#
|
||||
# Patches from Qemu's patchworks site.
|
||||
#
|
||||
%patch add qemu pw://patchwork.ozlabs.org/patch/406903/raw/Provide-the-missing-LIBUSB_LOG_LEVEL_-for-older-libusb-or-FreeBSD.-Providing-just-the-needed-value-as-a-defined..patch
|
||||
%hash sha256 Provide-the-missing-LIBUSB_LOG_LEVEL_-for-older-libusb-or-FreeBSD.-Providing-just-the-needed-value-as-a-defined..patch 40399fcedb44b2c1bfa1a95af482f7f335f42d713967ed2f34980a7a940c3740
|
||||
|
||||
#
|
||||
# These patches are broken.
|
||||
#
|
||||
#%patch add qemu pw://patchwork.ozlabs.org/patch/347503/raw/CAN-bus-simple-SJA1000-PCI-card-emulation-for-QEMU.patch
|
||||
#%hash md5 CAN-bus-simple-SJA1000-PCI-card-emulation-for-QEMU.patch fbbe8f02867b8b8ee7c23c83cf1e1efa
|
||||
#%patch add qemu pw://patchwork.ozlabs.org/patch/347502/raw/CAN-bus-Kvaser-PCI-CAN-S-single-SJA1000-channel-emulation-added.patch
|
||||
#%hash md5 CAN-bus-Kvaser-PCI-CAN-S-single-SJA1000-channel-emulation-added.patch 7bd24fa8b55116c9a1301afd7dfa69d3
|
||||
|
||||
#
|
||||
# Patches to build qemu-4.1.0-sparc with Leon3 support
|
||||
#
|
||||
%patch add qemu https://gaisler.se/qemu/qemu-4.1.0-leon3.patch
|
||||
%hash sha256 qemu-4.1.0-leon3.patch d62ff3418903f1c5eb7f6d727af0400caeb250e23cc120111930601c9ecce02a
|
||||
|
||||
#
|
||||
# Patch to send halt signal to qemu-system-or32 process when RTEMS terminates
|
||||
#
|
||||
#%patch add qemu %{rtems_http_git}/rtems-tools/plain/tools/qemu/0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch
|
||||
#%hash sha256 0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch 88cd5c9e6e2a6bab23bf049a6f4212ff00083b002b73dbe63b2fe9832717f19e
|
||||
|
||||
#
|
||||
# The Qemu build instructions. We use 4.x.x Release 1.
|
||||
#
|
||||
%include %{_configdir}/qemu-4-1.cfg
|
25
bare/config/devel/qemu4.bset
Normal file
25
bare/config/devel/qemu4.bset
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Build set for QEMU
|
||||
#
|
||||
|
||||
%define release 1
|
||||
|
||||
#
|
||||
# Name of the package.
|
||||
#
|
||||
package: qemu-%{qemu_version}-%{_host}-%{release}
|
||||
|
||||
#
|
||||
# A magic internal path that would break if changes in the defaults.mc
|
||||
# macro file are made.
|
||||
#
|
||||
%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
|
||||
|
||||
# I don't think these are needed anymore ...?
|
||||
#devel/autotools-internal
|
||||
devel/libiconv-1.14-1
|
||||
devel/gettext-0.18.3.1-1
|
||||
devel/libffi-3.0.13-1
|
||||
devel/pixman-0.32.4-1
|
||||
devel/glib-2.46.2-1
|
||||
devel/qemu4-git-1
|
135
source-builder/config/qemu-4-1.cfg
Normal file
135
source-builder/config/qemu-4-1.cfg
Normal file
@ -0,0 +1,135 @@
|
||||
#
|
||||
# QEMU 4.1.0 Version 1.
|
||||
#
|
||||
# This configuration file configure's, make's and install's QEMU.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
#
|
||||
# Select Snapshot Macro Maps
|
||||
#
|
||||
%select qemu-snapshot
|
||||
|
||||
#
|
||||
# The description.
|
||||
#
|
||||
Name: qemu-%{qemu_version}-%{_host}-%{release}
|
||||
Summary: Qemu is a simulator of various processors.
|
||||
Version: %{qemu_version}
|
||||
Release: %{release}
|
||||
URL: http://www.qemu.org/
|
||||
|
||||
#
|
||||
# Source
|
||||
#
|
||||
%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
|
||||
|
||||
|
||||
#
|
||||
# QEMU Disable component list.
|
||||
#
|
||||
# We are not interested in the VM use case for qemu and most of that
|
||||
# functionality carries host platform baggage which complicates building on a
|
||||
# range of host platforms.
|
||||
#
|
||||
# You can specialise before including this config file.
|
||||
#
|
||||
#
|
||||
%define qemu_std_disables --disable-werror
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-tools
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-pie
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-vnc
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-sdl
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-gtk
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-opengl
|
||||
%define qemu_std_disables %{qemu_std_disables} --disable-netmap
|
||||
%ifn %{defined qemu_disables}
|
||||
%define qemu_disables %{nil}
|
||||
%endif
|
||||
%define qemu_disables %{qemu_std_disables} %{qemu_disables}
|
||||
|
||||
#
|
||||
# QEMU Targets to build.
|
||||
#
|
||||
%if %{!defined qemu_archs} && %{!defined with_qemu_archs}
|
||||
%define qemu_target_list %{nil}
|
||||
%else
|
||||
%if %{defined with_qemu_archs}
|
||||
%define qemu_target_list --target-list=%{with_qemu_archs}
|
||||
%else
|
||||
%define qemu_target_list --target-list=%{qemu_archs}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
#
|
||||
# Prepare the source code.
|
||||
#
|
||||
%prep
|
||||
build_top=$(pwd)
|
||||
|
||||
source_dir_qemu="qemu-%{qemu_version}"
|
||||
%source setup qemu -q -n qemu-%{qemu_version}
|
||||
%patch setup qemu -p1
|
||||
|
||||
cd ${build_top}
|
||||
|
||||
%build
|
||||
build_top=$(pwd)
|
||||
|
||||
%{build_directory}
|
||||
|
||||
mkdir -p ${build_dir}
|
||||
cd ${build_dir}
|
||||
|
||||
%if %{pkgconfig check vdeplug}
|
||||
VDE_CONFIG="--enable-vde"
|
||||
VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
|
||||
VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
|
||||
%endif
|
||||
|
||||
%{host_build_flags}
|
||||
|
||||
if test "%{_build}" != "%{_host}" ; then
|
||||
CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
|
||||
fi
|
||||
|
||||
SYSROOT=$SB_TMPPREFIX
|
||||
|
||||
#
|
||||
# The --extra-cflags and --extra-ldflags do not work as expected.
|
||||
#
|
||||
# Hack warning: MSYS2 does not seem to convert the path to
|
||||
# a shell path from Windows so we keep them
|
||||
# separate and handle it in the pkgconfig tool.
|
||||
#
|
||||
PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
|
||||
PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
|
||||
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
|
||||
%{_ld_library_path}=$SYSROOT/lib \
|
||||
LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib -L$SYSROOT/lib ${VDE_LDFLAGS}" \
|
||||
CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
|
||||
../${source_dir_qemu}/configure \
|
||||
--prefix=%{_prefix} \
|
||||
${CROSS_PREFIX_OPTION} \
|
||||
--make=%{__make} \
|
||||
%{qemu_target_list} \
|
||||
${VDE_CONFIG} \
|
||||
%{qemu_disables}
|
||||
|
||||
%{_ld_library_path}=$SYSROOT/lib \
|
||||
%{__make} %{?_smp_mflags} all
|
||||
|
||||
cd ${build_top}
|
||||
|
||||
%install
|
||||
build_top=$(pwd)
|
||||
|
||||
%{__rmdir} $SB_BUILD_ROOT
|
||||
|
||||
cd ${build_dir}
|
||||
%{_ld_library_path}=$SYSROOT/lib \
|
||||
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
||||
cd ${build_top}
|
Loading…
x
Reference in New Issue
Block a user