Hi,
I was trying to compile the UML enabled 2.6 series kernel,
but i am facing many problems in the process.
I am giving few attempts that I made over here

Please let me know if I am doing anything wrong.
--------------------------------------------------------------------------------------------
1)

Compiling kernel 2.6.18.3 in
Following the instructions from
http://uml.jfdi.org/uml/Wiki.jsp?page=BuildingUML

the SAKS patch used is from
http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.18-v9-pre9/skas-2.6.18-v9-pre9.patch.bz2

{{{
make mrproper ARCH=um
make menuconfig ARCH=um
make linux ARCH=um
}}}


I got following error

{{{
arch/um/os-Linux/skas/process.c: In function 'copy_context_skas0':
arch/um/os-Linux/skas/process.c:328: error: 'PAGE_SHIFT' undeclared
(first use in this function)
arch/um/os-Linux/skas/process.c:328: error: (Each undeclared
identifier is reported only once
arch/um/os-Linux/skas/process.c:328: error: for each function it appears in.)
arch/um/os-Linux/skas/process.c:560:2: warning: #warning need cpu pid
in switch_mm_skas
make[2]: *** [arch/um/os-Linux/skas/process.o] Error 1
make[1]: *** [arch/um/os-Linux/skas] Error 2
make: *** [arch/um/os-Linux] Error 2
}}}

When I greped kernel source code for "#define PAGE_SHIFT" I got many
entries for "#define PAGE_SHIFT 12".
I also find out that "arch/um/include/uml-config.h" is included in
"arch/um/os-Linux/skas/process.c"
so, I added "#define PAGE_SHIFT 12" in "arch/um/include/uml-config.h"
file to get rid of this error.

After this modification, the compilation finished successfully

Finally while trying to run it, i got following error
{{{
my_machine%./linux ../../Debian-3.0r0.ext2
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...failed: Operation not permitted
/dev/shm/ must be not mounted noexec
}}}

---------------------------------------------------------------------------------------------------------------
2)
Compiling the kernel 2.6 source code.
I am doing this experiment in location /home/pravin/uml/linux-2.6.13.4

I also tried to compile "kernel-2.6.13.4" with patch
"skas-2.6.13-rc7-v9-pre7.patch"

After fixing similar compile time problems like above, I managed to compile it.

{{{
./linux ubd0=../root_fs_slack8.1
}}}

but this gave me following kernel panic

{{{
VFS: Cannot open root device "98:0" or unknown-block(98,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(98,0)

EIP: 0073:[<a0182b51>] CPU: 0 Not tainted ESP: 007b:a7f09fac EFLAGS: 00200282
    Not tainted
EAX: 00000000 EBX: 00007929 ECX: 00000013 EDX: 00007929
ESI: 00007928 EDI: 00000000 EBP: a7f09fb8 DS: 007b ES: 007b
a08b3abc:  [<a0026dcc>] show_regs+0x17c/0x1e0
a08b3aec:  [<a001764c>] panic_exit+0x2c/0x50
a08b3b0c:  [<a003ca14>] notifier_call_chain+0x34/0x50
a08b3b2c:  [<a002b0d6>] panic+0x76/0x110
a08b3b5c:  [<a0001ab1>] mount_block_root+0xb1/0x120
a08b3bac:  [<a0001b7f>] mount_root+0x5f/0x70
a08b3bcc:  [<a0001bb3>] prepare_namespace+0x23/0xf0
a08b3bfc:  [<a000e298>] init+0xe8/0x100
a08b3c2c:  [<a00118e5>] run_kernel_thread+0x35/0x40
a08b3cec:  [<a001c3ca>] new_thread_handler+0x9a/0xd0
a08b3d1c:  [<a7f0b420>] 0xa7f0b420
}}}

--------------------------------------------------------------------------------------------------------------
3)
I also tried to use the UML enabled kernel binaries available
from site http://www.user-mode-linux.org/~blaisorblade/
Unfortunately, both kernels that i tried didnt worked properly...
I tried out following binaries
um32-2.6.13-release-mod
um32-2.6.14-release-mod

The error that I got was kernel panic related to start_userspace
{{{
mapping mmap stub failed, errno = 12
Kernel panic - not syncing: start_userspace : expected SIGSTOP, got status = 256

EIP: 0073:[<a01bf071>] CPU: 0 Not tainted ESP: 007b:a7f0dfac EFLAGS: 00200282
    Not tainted
EAX: 00000000 EBX: 000079f4 ECX: 00000013 EDX: 000079f4
ESI: 000079f3 EDI: 00000000 EBP: a7f0dfb8 DS: 007b ES: 007b
a08afa5c:  [<a003071a>] show_regs+0x21a/0x230
a08afa8c:  [<a001787c>] panic_exit+0x2c/0x50
a08afa9c:  [<a0047665>] notifier_call_chain+0x25/0x40
a08afabc:  [<a0034e41>] panic+0x71/0x100
a08afadc:  [<a001bbb9>] start_userspace+0xe9/0x1a0
a08afb1c:  [<a001b5ec>] init_new_context_skas+0x13c/0x160
a08afb4c:  [<a0085248>] do_execve+0x238/0x240
a08afb7c:  [<a000e8a6>] execve1+0x36/0x80
a08afbac:  [<a000e910>] um_execve+0x20/0x60
a08afbcc:  [<a000e188>] run_init_process+0x48/0x70
a08afbfc:  [<a000e26d>] init+0xbd/0x130
a08afc1c:  [<a0011af9>] run_kernel_thread+0x39/0x50
a08afcdc:  [<a001c814>] new_thread_handler+0xc4/0x120
a08afd1c:  [<a7f0f420>] 0xa7f0f420
}}}

-------------------------------------------------------------------------------------------------------------

File-systems that I used were downloaded from following links
{{{
http://nchc.dl.sourceforge.net/sourceforge/user-mode-linux/Debian-3.0r0.ext2.bz2
http://jaist.dl.sourceforge.net/sourceforge/user-mode-linux/root_fs_slack8.1.bz2
}}}

I am using Debian system with kernel-2.6.18

Sorry for such a long mail....
Thanx in advance
-- 
 Pravin Shinde

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to