diff options
author | Joseph Jezak <josejx@gentoo.org> | 2005-07-21 17:20:32 +0000 |
---|---|---|
committer | Joseph Jezak <josejx@gentoo.org> | 2005-07-21 17:20:32 +0000 |
commit | 838aae62c555c8afd40a337dd86b055d103be8fe (patch) | |
tree | ef3cf6d3acb106e52d294a561b2fde7a17d8c59a /app-emulation | |
parent | Added to ~ppc (diff) | |
download | gentoo-2-838aae62c555c8afd40a337dd86b055d103be8fe.tar.gz gentoo-2-838aae62c555c8afd40a337dd86b055d103be8fe.tar.bz2 gentoo-2-838aae62c555c8afd40a337dd86b055d103be8fe.zip |
Added tiger patch and bootloader fix.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/mol/ChangeLog | 8 | ||||
-rw-r--r-- | app-emulation/mol/Manifest | 5 | ||||
-rw-r--r-- | app-emulation/mol/files/digest-mol-0.9.71_pre1-r1 | 2 | ||||
-rw-r--r-- | app-emulation/mol/files/mol-tiger.patch | 126 | ||||
-rw-r--r-- | app-emulation/mol/mol-0.9.71_pre1-r1.ebuild | 142 |
5 files changed, 281 insertions, 2 deletions
diff --git a/app-emulation/mol/ChangeLog b/app-emulation/mol/ChangeLog index 4bb6c87bc6a9..556abc1d5d78 100644 --- a/app-emulation/mol/ChangeLog +++ b/app-emulation/mol/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emulation/mol # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/mol/ChangeLog,v 1.47 2005/03/28 13:22:16 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/mol/ChangeLog,v 1.48 2005/07/21 17:20:32 josejx Exp $ + +*mol-0.9.71_pre1-r1 (21 Jul 2005) + + 21 Jul 2005; Joseph Jezak <josejx@gentoo.org> +files/mol-tiger.patch, + +mol-0.9.71_pre1-r1.ebuild: + Added tiger patch and fix for broken bootloader. 28 Mar 2005; Joseph Jezak <josejx@gentoo.org> +files/mol-0.9.71_pre1-tmp-offset.patch, mol-0.9.71_pre1.ebuild: diff --git a/app-emulation/mol/Manifest b/app-emulation/mol/Manifest index 78e521135445..aaa3d0084f4c 100644 --- a/app-emulation/mol/Manifest +++ b/app-emulation/mol/Manifest @@ -1,5 +1,6 @@ -MD5 7b47fd97d7ed4b9b6f146d52fbd1f2b5 ChangeLog 9295 +MD5 9367a469d4d982e93b8b85ea7d739e06 ChangeLog 9484 MD5 37e2c58edef99f3f2be0803169d89bcd mol-0.9.70.ebuild 4048 +MD5 a0e3b09dac80c89d65a7f6153c5f0bc6 mol-0.9.71_pre1-r1.ebuild 4817 MD5 3263d375abba2d098c636efc2b135ea5 metadata.xml 333 MD5 7b1c05be512e22dbfb69b67e87d6d2f7 mol-0.9.70-r1.ebuild 3940 MD5 5674dc422930ad165912ce5d91cafff8 mol-0.9.71_pre1.ebuild 4518 @@ -11,5 +12,7 @@ MD5 2f8f758938db9b3cb5a13c0b33d989e3 files/mol-module-fix.patch 327 MD5 453e05b555f037270dd6da665e100aa8 files/digest-mol-0.9.71_pre1 69 MD5 0ea7bd65a5ff4666665a71fb9652aae8 files/mol-0.9.70-makefile-fix.patch 924 MD5 3944510308e77b92ac85c07708947ad0 files/digest-mol-0.9.70 64 +MD5 de4dd986b6c963eae483aebbab3d7a0d files/digest-mol-0.9.71_pre1-r1 121 +MD5 1b1d52b69bcae00d0339c0f3f4ae9a6d files/mol-tiger.patch 3681 MD5 8eb2c97c995cba996b31b0ba38ef4fd0 files/mol-0.9.71_pre1-tmp-offset.patch 864 MD5 3bf68312e4299f777065f55eea5297fa files/mol-0.9.71_pre1-nopriority.patch 1861 diff --git a/app-emulation/mol/files/digest-mol-0.9.71_pre1-r1 b/app-emulation/mol/files/digest-mol-0.9.71_pre1-r1 new file mode 100644 index 000000000000..cb89a5a124f9 --- /dev/null +++ b/app-emulation/mol/files/digest-mol-0.9.71_pre1-r1 @@ -0,0 +1,2 @@ +MD5 b12e3beca8c90b56af09cb41f66920b0 mol-0.9.71_pre1.tar.bz2 1768219 +MD5 e4f4fb6e63380997c1ab6d554ca93c00 bootx.gz 33043 diff --git a/app-emulation/mol/files/mol-tiger.patch b/app-emulation/mol/files/mol-tiger.patch new file mode 100644 index 000000000000..806537f4c2c0 --- /dev/null +++ b/app-emulation/mol/files/mol-tiger.patch @@ -0,0 +1,126 @@ +diff -Naur src/kmod/ptaccess.c mol-rsync/src/kmod/ptaccess.c +--- src/kmod/ptaccess.c 2004-07-24 18:44:02.000000000 +0200 ++++ mol-rsync/src/kmod/ptaccess.c 2005-07-15 00:38:28.000000000 +0200 +@@ -22,6 +22,7 @@ + #include "performance.h" + + extern int do_intercept_tlbie( kernel_vars_t *kv, ulong pte0, ulong pte1, ulong pteoffs ); ++extern int do_intercept_tlbie_block( kernel_vars_t *kv, ulong pteoffs, ulong length ); + + #define MMU (kv->mmu) + #define MREGS (kv->mregs) +@@ -49,6 +50,37 @@ + return RVEC_NOP; + } + ++int ++do_intercept_tlbie_block( kernel_vars_t *kv, ulong pteoffs, ulong length ) ++{ ++ unsigned int finish; ++ ++ //printk("do_intercept_tlbie_block: pteoffs %08lX length %08lX\n", pteoffs, length); ++ ++ if (pteoffs + length > MMU.hash_mask) { ++ printk("do_intercept_tlbie_block: length exceeding hash!\n"); ++ finish = MMU.hash_mask + 1; ++ } else ++ finish = pteoffs + length; ++ ++ if (MMU.pthash_inuse_bits == NULL) ++ return RVEC_NOP; ++ ++ while (pteoffs < finish) { ++ if (check_bit_mol(pteoffs >> 3, MMU.pthash_inuse_bits)) { ++ ulong pte0, pte1; ++ ++ pte0 = *((unsigned int *) (MMU.hash_base + pteoffs)); ++ pte1 = *((unsigned int *) (MMU.hash_base + pteoffs + 4)); ++ do_intercept_tlbie(kv, pte0, pte1, pteoffs); ++ } ++ ++ pteoffs += 8; ++ } ++ ++ return RVEC_NOP; ++} ++ + #ifdef EMULATE_603 + + extern int do_tlbli( kernel_vars_t *kv, ulong ea ); +diff -Naur src/kmod/ptintercept.S mol-rsync/src/kmod/ptintercept.S +--- src/kmod/ptintercept.S 2004-07-24 18:44:02.000000000 +0200 ++++ mol-rsync/src/kmod/ptintercept.S 2005-07-15 00:31:21.000000000 +0200 +@@ -157,7 +157,6 @@ + do_stfiw: + do_stswi: + do_stswx: +-do_stmw: + lwz r6,xNIP(r1) + DEBUGGER_SAVE(0x1882) // unimplemented store instruction + +@@ -258,3 +257,47 @@ + // r4=PTE0, r5=PTE1 + LOADI r3,EXTERN(do_intercept_tlbie) + b call_kernel ++ ++ // stmw uses another emulator entry point because it might overwrite a bunch of PTEs ++do_stmw: ++ mtlr r4 ++ ++ // save some debugging info ++// stw r2,xDBG_TRACE_SPACE(r1) ++ ++ SET_MSR_DR /**/ r6 ++ ++ // now do the stmw. we do that manually since we have to access emulator regs. ++ mr r4,r2 // r4: memory pointer ++ srwi r6,r5,3 // r6: rS ++1: cmpwi r5,32 << 3 // loop condition ++ bge 2f ++ EMU_LOAD_GPR r5, /**/ R3 // r0 = value ++ stw r0,0(r4) // store the value ++ addi r5,r5,1 << 3 // update register counter ++ addi r4,r4,4 // and memory pointer ++ b 1b ++ ++2: CLEAR_MSR_DR /**/ r0 ++ ++ // load up r4 and r5 for do_intercept_tlbie_block (see below) ++ subfic r5,r6,32 // number of registers (=words) stored ++ slwi r5,r5,2 // number of bytes stored ++ add r4,r2,r5 // last byte stored ++ addi r4,r4,7 // alignment to ++ rlwinm r5,r4,0,~0x7 // PTE size ++ rlwinm r4,r2,0,~0x7 // pte block pointer ++ sub r5,r5,r4 // substract block pointer -> length (in bytes) ++ lwz r3,K_TLBHASH_BASE_EA(r1) // calculate tlb offset ++ sub r4,r4,r3 // tlb offset ++ b st_block_continue ++ ++ // transfer to C-function [r2=dar, r4=pte block offset, r5=pte block length] ++st_block_continue: ++ BUMP("pt_intercept_taken") ++ lwz r6,xNIP(r1) ++ addi r6,r6,4 // inc NIP ++ bl save_middle_regs ++ ++ LOADI r3,EXTERN(do_intercept_tlbie_block) ++ b call_kernel +diff -Naur src/kmod/include/misc.h mol-rsync/kmod/include/misc.h +--- src/kmod/include/misc.h 2004-07-24 18:44:02.000000000 +0200 ++++ mol-rsync/src/kmod/include/misc.h 2005-06-19 18:56:51.000000000 +0200 +@@ -62,6 +68,14 @@ + *p &= ~mask; + } + ++static inline int ++check_bit_mol( int nr, char *addr ) ++{ ++ ulong mask = 1 << (nr & 0x1f); ++ ulong *p = ((ulong*)addr) + (nr >> 5); ++ return (*p & mask) != 0; ++} ++ + /* typesafe min/max (stolen from kernel.h) */ + #define min_mol(x,y) ({ \ + const typeof(x) _x = (x); \ diff --git a/app-emulation/mol/mol-0.9.71_pre1-r1.ebuild b/app-emulation/mol/mol-0.9.71_pre1-r1.ebuild new file mode 100644 index 000000000000..233679452d91 --- /dev/null +++ b/app-emulation/mol/mol-0.9.71_pre1-r1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/mol/mol-0.9.71_pre1-r1.ebuild,v 1.1 2005/07/21 17:20:32 josejx Exp $ + +inherit flag-o-matic eutils linux-mod + +DESCRIPTION="MOL (Mac-on-Linux) lets PPC users run MacOS (X) under Linux (rsync snapshot)" +HOMEPAGE="http://www.maconlinux.net/" +SRC_URI="mirror://gentoo/${P}.tar.bz2 + http://dev.gentoo.org/~josejx/bootx.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~ppc" +IUSE="vnc alsa oss fbcon X oldworld sheep debug dga usb" + +MAKEOPTS="${MAKEOPTS} -j1" + +DEPEND="" +RDEPEND="net-misc/dhcp + net-firewall/iptables + alsa? ( virtual/alsa ) + vnc? ( net-misc/vnc ) + X? ( virtual/x11 )" + + +MODULE_NAMES="mol(mol:${S}/src/kmod/Linux) + sheep(net:${S}/src/netdriver) + tun(net:${S}/src/netdriver)" + +pkg_setup() { + echo + einfo "If you want to use MOL fullscreen on a virtual console" + einfo "be sure to have the USE-flag \"fbcon\" set!" + echo + + linux-mod_pkg_setup +} + +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/${PN}-module-fix.patch + epatch ${FILESDIR}/${P}-nopriority.patch + + # Fixes bug 79428 + epatch ${FILESDIR}/${P}-linux-2.6.9.patch + + # Adds big filesystem (>2Gb) image support, bug #80098 + epatch ${FILESDIR}/${P}-big-filesystem.patch + + # Fixes bug tmp-offset access violation + epatch ${FILESDIR}/${P}-tmp-offset.patch + + # dhcp config fix and show dchpd messages on starting mol + sed -i "s:#ddns-update-style:ddns-update-style:g" Doc/config/dhcpd-mol.conf || die + sed -i "s:DHCPD\ -q\ -cf:DHCPD\ -cf:g" Doc/config/tunconfig || die + + # Add tiger support to MOL + epatch ${FILESDIR}/${PN}-tiger.patch + + # Add new bootloader + # Boot loader courtesy of http://www-user.rkrk.uni-kl.de/~nissler/mol/ + cp ${WORKDIR}/bootx ${S}/libimport/drivers/bootx + cp ${WORKDIR}/bootx ${S}/mollib/drivers/bootx +} + +src_compile() { + filter-flags -fsigned-char + + export KERNEL_SOURCE="/usr/src/${FK}" + export LDFLAGS="" + + # initialize all needed build-files + ./autogen.sh + ./configure --prefix="/usr" || die "Configure failed." + + # workaround for proper module-building + emake defconfig || die "Make failed." + + sed -i "s:CONFIG_XDGA=y:# CONFIG_XDGA is not set:" .config-ppc + sed -i "s:CONFIG_TAP=y:# CONFIG_TAP is not set:" .config-ppc + use alsa || sed -i "s:CONFIG_ALSA=y:# CONFIG_ALSA is not set:" .config-ppc + use debug && sed -i "s:# CONFIG_DEBUGGER is not set:CONFIG_DEBUGGER=y:" .config-ppc + use oss || sed -i "s:CONFIG_OSS=y:# CONFIG_OSS is not set:" .config-ppc + use oldworld || sed -i "s:CONFIG_OLDWORLD=y:# CONFIG_OLDWORLD is not set:" .config-ppc + use sheep || sed -i "s:CONFIG_SHEEP=y:# CONFIG_SHEEP is not set:" .config-ppc + use X || sed -i "s:CONFIG_X11=y:# CONFIG_X11 is not set:" .config-ppc + use fbcon || sed -i "s:CONFIG_FBDEV=y:# CONFIG_FBDEV is not set:" .config-ppc + use vnc || sed -i "s:CONFIG_VNC=y:# CONFIG_VNC is not set:" .config-ppc + use dga || sed -i "s:CONFIG_XDGA=y:# CONFIG_XDGA is not set:" .config-ppc + use usb || sed -i "s:CONFIG_USBDEV=y:# CONFIG_USBDEV is not set:" .config-ppc + + einfo "The configuration has been altered according to your USE-flags." + # reinitialize our changed configuration + emake oldconfig + + cd ${S} + emake BUILD_MODS=n || die "Build failed." + + # Build the modules too! + BUILD_PARAMS="KERNEL_SOURCE=${KV_DIR} LV=${KV_MAJOR}${KV_MINOR} MP=${KV_OBJ} + KUNAME=${KV}" + BUILD_TARGETS=all + linux-mod_src_compile +} + +src_install() { + #linux-mod_src_install + cd ${S} + emake DESTDIR=${D} install || die "Failed to install" + dodoc CREDITS Doc/Boot-ROM Doc/NewWorld-ROM Doc/Sound Doc/Video + dodoc Doc/Networking Doc/Dev/Debugger Doc/Dev/Addresses + dodoc Doc/man/molvconfig.1 Doc/man/startmol.1 Doc/man/molrc.5 +} + +pkg_postinst() { + echo + einfo "Mac-on-Linux is now installed. To run, use the command startmol." + einfo "You might want to configure video modes first with molvconfig." + einfo "Other configuration is in /etc/molrc. For more info see:" + einfo " http://www.maconlinux.net" + einfo "Also try man molrc, man molvconfig, man startmol" + echo + ewarn "For networking and sound you might install the drivers in the" + ewarn "folder \"MOL-Install\" on your Mac OS X-Desktop." + echo + ewarn "If errors with networking occur, make sure you have the following" + ewarn "kernel functions enabled:" + einfo "For the dhcp server:" + einfo " Socket Filtering (CONFIG_FILTER)" + einfo " Packet Socket (CONFIG_PACKET)" + einfo "For NAT:" + einfo " Network packet filtering (CONFIG_NETFILTER)" + einfo " Connection tracking (CONFIG_IP_NF_CONNTRACK)" + einfo " IP tables support (CONFIG_IP_NF_IPTABLES)" + einfo " Packet filtering (CONFIG_IP_NF_FILTER)" + einfo " Full NAT (CONFIG_IP_NF_NAT)" + einfo " MASQUERADE target support (CONFIG_IP_NF_TARGET_MASQUERADE)" + echo +} |