From owner-freebsd-emulation Tue Mar 28 18:17:27 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from beta.nova.org (beta.nova.org [209.31.144.41]) by hub.freebsd.org (Postfix) with ESMTP id 1EA7A37B5D1; Tue, 28 Mar 2000 18:17:19 -0800 (PST) (envelope-from bsletten@nova.org) Received: from fcac.org (members.fcac.org [209.31.144.35]) by beta.nova.org (8.9.1/8.9.1) with ESMTP id VAA06961; Tue, 28 Mar 2000 21:17:15 -0500 (EST) Received: from localhost by fcac.org (8.8.8+Sun/SMI-SVR4) id VAA23890; Tue, 28 Mar 2000 21:17:07 -0500 (EST) Date: Tue, 28 Mar 2000 21:17:06 -0500 (EST) From: Brian Sletten To: Joao Paulo Campello Cc: Marcel Moolenaar , ports@FreeBSD.ORG, freebsd-emulation@FreeBSD.ORG Subject: Re: Linux emulation patches for FreeBSD 3.4-STABLE In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1423418003-954296226=:21300" Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-1423418003-954296226=:21300 Content-Type: TEXT/PLAIN; charset=US-ASCII These patches only work on FreeBSD 3.4-STABLE - anything else, and you're on your own. Save the patches in a file, say /tmp/patches become root cd /usr/src/sys/i386/linux patch -p0 < /tmp/patches if the patches succeed, (they should fail only if you are not 3.4-STABLE) cd ../../modules/linux make I get some warnings about linux_sysent.c - they're ok. if the make succeeds, make install make clean Now you have two choices: The easy choice: reboot The fast choice: kill all processes using linux emulation kldunload linux kldload linux ---559023410-1423418003-954296226=:21300 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patches Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=patches LS0tIGxpbnV4X3NvY2tldC5jLm9yaWcJV2VkIEZlYiAgMiAxMjo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ZzsNCisJcmV0dXJu IGZjbnRsKHAsICZmY250bF9hcmdzKTsgDQogICAgIH0NCiAgICAgcmV0dXJu IEVJTlZBTDsNCiB9DQo= ---559023410-1423418003-954296226=:21300-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message