From 1ac5701f7e5c3a9cb070f79aba97d74eeab5d2cd Mon Sep 17 00:00:00 2001 From: Yury Martynov Date: Thu, 20 Feb 2020 08:03:38 +0300 Subject: [PATCH] app-emulation: drop qemu-charm --- app-emulation/qemu-charm/Manifest | 1 - app-emulation/qemu-charm/files/charm | 30 ---- app-emulation/qemu-charm/files/qemu-wrapper.c | 16 -- .../qemu-charm/qemu-charm-0.13.0.ebuild | 148 ------------------ 4 files changed, 195 deletions(-) delete mode 100644 app-emulation/qemu-charm/Manifest delete mode 100644 app-emulation/qemu-charm/files/charm delete mode 100644 app-emulation/qemu-charm/files/qemu-wrapper.c delete mode 100644 app-emulation/qemu-charm/qemu-charm-0.13.0.ebuild diff --git a/app-emulation/qemu-charm/Manifest b/app-emulation/qemu-charm/Manifest deleted file mode 100644 index 9c1de006e..000000000 --- a/app-emulation/qemu-charm/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST qemu-0.13.0.tar.gz 5184531 SHA256 1e6f5851b05cea6e377c835f4668408d4124cfb845f9948d922808743c5fd877 diff --git a/app-emulation/qemu-charm/files/charm b/app-emulation/qemu-charm/files/charm deleted file mode 100644 index 9481545f5..000000000 --- a/app-emulation/qemu-charm/files/charm +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -[ -z $1 ] && exit 1 - -[ -d /proc/sys/fs/binfmt_misc ] || modprobe binfmt_misc -[ -f /proc/sys/fs/binfmt_misc/register ] || mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc -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\xfe\xff\xff\xff:/qemu-wrapper:' > /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-armeb:' > /proc/sys/fs/binfmt_misc/register -#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/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register -#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/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/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register -#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/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register -#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\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:/usr/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/bin/qemu-sh4eb:' >/proc/sys/fs/binfmt_misc/register -#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/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register - -mount --bind /usr/portage $1/usr/portage -[ -d /usr/local/portage ] && mount --bind /usr/local/portage $1/usr/local/portage -mount --bind /proc $1/proc -mount --bind /sys $1/sys -#mount -t tmpfs tmpfs $1/var/tmp/portage -chroot $1 /bin/busybox mdev -s -chroot $1 /bin/bash --login -# (Unmount stuff when not in use) -umount $1/usr/local/portage -#umount $1/var/tmp/portage -umount $1/usr/portage -umount $1/sys -umount $1/proc - diff --git a/app-emulation/qemu-charm/files/qemu-wrapper.c b/app-emulation/qemu-charm/files/qemu-wrapper.c deleted file mode 100644 index 4e5d46335..000000000 --- a/app-emulation/qemu-charm/files/qemu-wrapper.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include - -int main(int argc, char **argv, char **envp) { - char *newargv[argc + 3]; - - newargv[0] = argv[0]; - newargv[1] = "-cpu"; - newargv[2] = "ARMCPU"; - - memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc - 1)); - newargv[argc + 2] = NULL; - return execve("/usr/bin/qemu-arm", newargv, envp); -} - diff --git a/app-emulation/qemu-charm/qemu-charm-0.13.0.ebuild b/app-emulation/qemu-charm/qemu-charm-0.13.0.ebuild deleted file mode 100644 index f9c51c167..000000000 --- a/app-emulation/qemu-charm/qemu-charm-0.13.0.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation - # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-0.11.1.ebuild,v 1.2 2010/01/05 23:58:40 flameeyes Exp $ - -EAPI="2" - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="QEMU arm user-land emulation for CHroot ARM setup on x86*" -HOMEPAGE="http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=5" -SRC_URI="http://wiki.qemu.org/download/${P/-charm/}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-*" -IUSE="+static +cortex-a8 -cortex-a9" -S=${WORKDIR}/${P/-charm/} -# See the content of the configure script of QEmu -# Those in IUSE_USER_TARGETS are Linux specific - -COMMON_TARGETS="arm" -IUSE_SOFTMMU_TARGETS="" -IUSE_USER_TARGETS="${COMMON_TARGETS}" - -for target in ${IUSE_SOFTMMU_TARGETS}; do - IUSE="${IUSE} +qemu_softmmu_targets_${target}" -done - -for target in ${IUSE_USER_TARGETS}; do - IUSE="${IUSE} +qemu_user_targets_${target}" -done - -RDEPEND="!app-emulation/qemu-kvm[qemu_user_targets_arm]" -DEPEND="${RDEPEND} - sys-libs/zlib - app-text/texi2html" - -src_prepare() { - cp "${FILESDIR}/qemu-wrapper.c" "${S}" - if use cortex-a8; then - if use cortex-a9; then - die "You must chose either cortex-a8 or a9 implementation" - fi - sed -e 's/ARMCPU/cortex-a8/' -i "${S}/qemu-wrapper.c" - elif use cortex-a9; then - sed -e 's/ARMCPU/cortex-a9/' -i "${S}/qemu-wrapper.c" - else - die "You must chose either cortex-a8 or a9 implementation" - fi - - # avoid fdt till an updated release appears - sed -i -e 's:fdt="yes":fdt="no":' configure - # prevent docs to get automatically installed - sed -i '/$(DESTDIR)$(docdir)/d' Makefile - # Alter target makefiles to accept CFLAGS set via flag-o - sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ - Makefile Makefile.target tests/Makefile - [[ -x /sbin/paxctl ]] && \ - sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \ - Makefile.target - # Append CFLAGS while linking - sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak -} - -src_configure() { - local mycc conf_opts audio_opts softmmu_targets user_targets target_list - - for target in ${IUSE_SOFTMMU_TARGETS} ; do - use "qemu_softmmu_targets_${target}" && \ - softmmu_targets="${softmmu_targets} ${target}-softmmu" - done - - for target in ${IUSE_USER_TARGETS} ; do - use "qemu_user_targets_${target}" && \ - user_targets="${user_targets} ${target}-linux-user" - done - - conf_opts="--disable-darwin-user --disable-bsd-user --disable-strip" - - if test ! -z "${softmmu_targets}" ; then - einfo "Building following softmmu targets: ${softmmu_targets}" - use gnutls || conf_opts="$conf_opts --disable-vnc-tls" - use ncurses || conf_opts="$conf_opts --disable-curses" - use sasl || conf_opts="$conf_opts --disable-vnc-sasl" - use sdl || conf_opts="$conf_opts --disable-sdl" - use vde || conf_opts="$conf_opts --disable-vde" - use bluetooth || conf_opts="$conf_opts --disable-bluez" - use kvm || conf_opts="$conf_opts --disable-kvm" - - audio_opts="oss" - use alsa && audio_opts="alsa $audio_opts" - use esd && audio_opts="esd $audio_opts" - use pulseaudio && audio_opts="pa $audio_opts" - use sdl && audio_opts="sdl $audio_opts" - else - einfo "Disabling softmmu emulation (no softmmu targets specified)" - conf_opts="$conf_opts --disable-system --disable-vnc-tls \ - --disable-curses --disable-sdl --disable-vde \ - --disable-kvm" - fi - - if test ! -z "${user_targets}" ; then - einfo "Building following user targets: ${user_targets}" - conf_opts="$conf_opts --enable-linux-user" - else - einfo "Disabling usermode emulation (no usermode targets specified)" - conf_opts="$conf_opts --disable-linux-user" - fi - - - conf_opts="$conf_opts --prefix=/usr" - - target_list="${softmmu_targets} ${user_targets}" - - use static && conf_opts="${conf_opts} --static" - - filter-flags -fPIE - - ./configure ${conf_opts} \ - --audio-drv-list="$audio_opts" \ - --cc=$(tc-getCC) --host-cc=$(tc-getCC) \ - --target-list="${target_list}" \ - || die "configure failed" - gcc -static qemu-wrapper.c -o qemu-wrapper -} - -src_install() { - cd "${S}" - dobin arm-linux-user/qemu-arm - insinto / - insopts -m755 - doins qemu-wrapper -# dodoc Changelog MAINTAINERS TODO pci-ids.txt || die -} - -pkg_postinst() { - elog "It is strongly encouraged to read" - elog "http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=5" - elog "This package takes care of section 1.1 and 1.4" - elog "" - elog "Now you can download an arm stage3 and uncompress it somewhere." - elog "Build a binpkg from this one: quickpkg ${P}" - elog "And emerg eit to the unpacked arm stage3:" - elog "ROOT=path_to_arm_stage3/ emerge -K ${P}" - elog "There is a chroot script in ${FILESDIR}/charm to help chroot everytime" - elog "The chroot script takes care of 1.2 and part of 1.3" - echo -}