Re: [uml-devel] [RFC] UML kernel & rootfs bundle with every kernel release ?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Geert Uytterhoeven <geert@...>
Cc: Jeff Dike <jdike@...>, Blaisorblade <blaisorblade@...>, <devzero@...>, User-mode Linux Kernel Development <user-mode-linux-devel@...>, Linux Kernel Development <linux-kernel@...>, <kraxel@...>
Date: Wednesday, April 4, 2007 - 4:27 pm

Geert Uytterhoeven wrote:
Ahh, thanks for that, it did the trick.

I also needed to add this to include/asm-um/pgtable.h:
#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)         \
                 remap_pfn_range(vma, vaddr, pfn, size, prot)

And replace config.h with autoconf.h in arch/um/drivers/x11_kern.c

Then I hit:
arch/um/drivers/built-in.o:include/linux/input.h:1168: more undefined 
references to `input_event' follow
So I added: "select INPUT" to Kconfig
(starting with a defconfig might have done the trick too)

Then I hit:
arch/um/drivers/built-in.o: In function `x11_probe':
arch/um/drivers/x11_kern.c:442: undefined reference to `init_input_dev'
So I replaced:
         init_input_dev(kd->mouse);
with:
	kd->mouse = input_allocate_device();

That gave me a working kernel, but no x11 window appeared....
(I tried adding x11=640x480 to the command line too - no effect)

I then tried this patch:
http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.21-rc1/patches/x11-fb
(fixing similar issues)

I had to comment out the line containing "soft_cursor" (couldn't figure 
out where to get it from)
It also required a lot of search and replace to change all instances of:
	kd->mouse.XXX
to
	kd->mouse->XXX
(same for kbd and changes to the initialization code)


Looks like the CONFIG_FB_CFB_FILLRECT and friends should not be set:
   LD      .tmp_vmlinux1
drivers/built-in.o: In function `cfb_copyarea':
drivers/video/cfbcopyarea.c:344: multiple definition of `cfb_copyarea'
arch/um/drivers/built-in.o:arch/um/drivers/../../../drivers/video/cfbcopyarea.c:344: 
first defined here
drivers/built-in.o: In function `cfb_imageblit':
drivers/video/cfbimgblt.c:263: multiple definition of `cfb_imageblit'
arch/um/drivers/built-in.o:arch/um/drivers/../../../drivers/video/cfbimgblt.c:263: 
first defined here
drivers/built-in.o: In function `cfb_fillrect':
drivers/video/cfbfillrect.c:345: multiple definition of `cfb_fillrect'
arch/um/drivers/built-in.o:arch/um/drivers/../../../drivers/video/cfbfillrect.c:345: 


Finally, this one pops up an X11 window, but it dies instantly:
[...]
Checking syscall emulation patch for ptrace...missing

Program received signal SIGSEGV, Segmentation fault.
kref_get (kref=0x5a5a5a5a5a5a5aa6) at lib/kref.c:32
32              WARN_ON(!atomic_read(&kref->refcount));
(gdb) bt
#0  kref_get (kref=0x5a5a5a5a5a5a5aa6) at lib/kref.c:32
#1  0x00000000600f4aa2 in kobject_get (kobj=0x5a5a5a5a5a5a5a8a) at 
lib/kobject.c:394
#2  0x0000000060109a95 in class_get (cls=<value optimized out>) at 
include/linux/kobject.h:145
#3  0x000000006010a3e5 in class_device_add (class_dev=0x602c9b38) at 
drivers/base/class.c:594
#4  0x000000006010ff5d in input_register_device (dev=0x602c9488) at 
drivers/input/input.c:987
#5  0x000000006001ed60 in x11_probe () at arch/um/drivers/x11_kern.c:482
#6  0x000000006000444d in x11_init () at arch/um/drivers/x11_kern.c:504
#7  0x00000000600015a6 in do_initcalls () at init/main.c:651
#8  0x0000000060001690 in do_basic_setup () at init/main.c:695
#9  0x000000006000f9ce in init (unused=<value optimized out>) at 
init/main.c:744
#10 0x00000000600241ca in run_kernel_thread (fn=0x6000f985 <init>, 
arg=0x0, jmp_ptr=<value optimized out>)
     at arch/um/os-Linux/process.c:289
#11 0x00000000600149b8 in new_thread_handler () at 
arch/um/kernel/skas/process.c:64
#12 0xa55a5a5a5a5a5a5a in ?? ()
#13 0x00000000602bd100 in ?? ()
#14 0x0000000060205f40 in ident_map ()
#15 0x0000000000000000 in ?? ()

And I am now completely out of my depth!

Antoine


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [uml-devel] [RFC] UML kernel &amp; rootfs bundle with ev..., Geert Uytterhoeven, (Mon Apr 2, 7:22 am)
Re: [uml-devel] [RFC] UML kernel &amp; rootfs bundle with ev..., Geert Uytterhoeven, (Wed Apr 4, 2:35 am)
Re: [uml-devel] [RFC] UML kernel & rootfs bundle with ev..., Antoine Martin, (Wed Apr 4, 4:27 pm)
Re: [uml-devel] [RFC] UML kernel &amp; rootfs bundle with ev..., Geert Uytterhoeven, (Mon Apr 2, 8:50 am)