On Tue, Apr 29 2003, christophe barbe wrote:
> On Mon, Apr 28, 2003 at 08:41:19AM +0200, Jens Axboe wrote:
> > > > - Run bash /usr/gnemul/qemu-i386/bin/qemu-conf.sh
> > > ..
> > > > Note the /usr/gnemul path. Hope this helps.
> > > ..
> > > > +       switch (current->personality) {
> > > > +       case (PER_X86_LINUX & PER_MASK):
> > > > +               return "usr/gnemul/x86-linux/";
> > > 
> > > That looks interesting.
> > > Is your /usr/gnemul/qemu-i386 path equivalent to the
> > > /usr/local/qemu-i386 we get when following the qemul instructions?
> > 
> > Yes
> > 
> > > If yes, what should i put instead of usr/gnemul/x86-linux/ in the kernel
> > > patch?
> > >    "usr/local/qemu-i386/" ?
> > 
> > That would like right, yep.
> 
> Do I need to apply another patch before this one?
> First I have to replace dep_tristate by tristate in the config.in part
> of your patch (No idea if this make sense or not). If I don't do that,
> xconfig complains about this line.
> 
> Then when I try to compile the kernel I get errors. Last I tried to
> compile the x86 emulation in the kernel (not as a module) and got:

You probably did everything right, but I think my bk diff left out the
x86emu.c file. I've attached here, copy to arch/ppc/kernel/ and the
kernel should link.

-- 
Jens Axboe

#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/personality.h>
#include <linux/binfmts.h>

struct exec_domain x86_linux_exec_domain = {
        .name           ="X86LINUX",
        .pers_low       = PER_X86_LINUX & PER_MASK,
        .pers_high      = PER_X86_LINUX & PER_MASK,
        .module         = THIS_MODULE
};

static int init(void)
{
        return register_exec_domain(&x86_linux_exec_domain);
}

static void fini(void)
{
        unregister_exec_domain(&x86_linux_exec_domain);
}

module_init(init);
module_exit(fini);

MODULE_DESCRIPTION("x86 Linux execution domain");
MODULE_LICENSE("GPL");

Reply via email to