I DID IT!!! I compiled the 2.6.17.13 kernel for UML (make ARCH=um), on Ubuntu 7.10 Server (I think), vanilla style (no patches). "make ARCH=um" is not as simple as it seems, I had some errors, but finally managed to compile it (I didn't say "run it"). Here's what went bad:
arch/um/sys-i386/user-offsets.c:19: warning: implicit declaration of function offsetof
arch/um/sys-i386/user-offsets.c error: expected expression before struct
Solution:
http://www.mail-archive.com/.../msg225786.html
I don't remember the second mistake, but such a simple thing helped:
In arch/um/sys-i386/user-offsets.c, change #include <linux/stddef.h> to #include <stddef.h>
It was said on:
http://courses.ece.uiuc.edu/ece435/Labs/lab2a.pdf
http://readlist.com/lists/vger.kernel.org/linux-kernel/54/273734.html
arch/um/include/kern_util.h:9:27: error: linux/threads.h: No such file or directory
Solution:
http://readlist.com/lists/vger.kernel.org/linux-kernel/54/274755.html
arch/um/os-Linux/aio.c:83: error: unknown field aio_reserved3 specified in initializer
Solution:
https://bugs.launchpad.net/ubuntu/+source/.../+bug/163011
arch/um/os-Linux/process.c:275: error: expected =, ,, ;, asm or __attribute__ before { token
arch/um/os-Linux/process.c:144: error: parameter name omitted
arch/um/os-Linux/process.c:285: error: expected { at end of input
Solution:
http://www.uwsg.iu.edu/hypermail/linux/kernel/0609.2/1113.html
or (not tested, but they say it also works)
http://www.uwsg.iu.edu/hypermail/linux/kernel/0609.2/1061.html
arch/um/os-Linux/sys-i386/registers.c:139: error: JB_BP undeclared (first use in this function)
Apply this patch: http://user-mode-linux.sourceforge.net/.../2.6.17/patches/jmpbuf
01 December 2007
User Mode Linux with kernel 2.6.17.13
Topics:
kernel hacking,
Linux,
what geeks do
Subscribe to:
Post Comments (Atom)
Damn, do you an updated link to the user_offsets.c error? That link has gone away :(
ReplyDeleteOuch, I have made no more notes that this link and gave up on UML shortly after.
ReplyDeleteThere's http://bugs.gentoo.org/show_bug.cgi?id=172256 about kernel 2.6.18 on Gentoo that says:
add #include <stddef.h> to arch/um/sys-i386/user-offsets.c and solve it.
I don't have the possibility to test it now, sorry.
Good luck.
Thanks :) Thanks to your post I saved a few hours of work! Really, this helped me a lot, so, thank you ver much.
ReplyDeletehey, great post! thanks a lot! your tips and links to patches helped to turn this task a little bit easier... :)
ReplyDeletewhoah this blog is great i really like reading your articles.
ReplyDeleteStay up the good work! You know, a lot of people are hunting around
for this information, you could aid them greatly.