linux-um archives
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: user-mode-linux-devel@lists.sourceforge.net,
	Ian McDonald <imcdnzl@gmail.com>
Subject: Re: [uml-devel] Can't compile under vanilla 2.6.11
Date: Thu, 17 Mar 2005 22:40:54 -0500	[thread overview]
Message-ID: <200503172240.54876.rob@landley.net> (raw)
In-Reply-To: <cbec11ac05031719187cb8e7d2@mail.gmail.com>

On Thursday 17 March 2005 10:18 pm, Ian McDonald wrote:
> Hi there,
>
> I've been watching the discussion around 2.6.11 and reading the
> archives and I can't find the information with any clarity that I
> need. My problem is that I can't get UML to compile. I can on 2.4.27
> (with the standard patches) and with 2.6.10 also.

All I have to do, on x86 under either Knoppix or Red Hat, is (this is off the 
top of my head, so there might be a typo or two):

tar xvjf linux-2.6.11.tar.bz2
cd linux-2.6.11
# Get a usable .config file, you can use "make ARCH=um menuconfig" for this
# if you know what to select.  This adds a more or less minimal set of options 
# to allnoconfig to provide a usable test system.  Later, you'll want to add
# thinks like loopback support, UBD, ext2, maybe swap support...
make ARCH=um allnoconfig
cat >> .config << EOF
CONFIG_MODE_TT=y
CONFIG_LD_SCRIPT_STATIC=y
CONFIG_BINFMT_ELF=y
CONFIG_HOSTFS=y
CONFIG_STDERR_CONSOLE=y
CONFIG_LBD=y
CONFIG_PROC_FS=y
EOF
yes "" | make ARCH=um oldconfig
# Now build it.
make ARCH=um
# Run it.  Later you might want to add "rootflags" (defaults to rootflags=/)
# and "mem" (defaults to mem=32M).  "quiet" is nice too...
./linux rootfstype=hostfs rw init=/bin/sh
# Show that the new shell prompt is under UML, not the parent system.
mount -t proc /proc /proc
cat /proc/cpuinfo

The polite way to exit is either "shutdown -n" or "halt -f" (both in sbin, 
which isn't int he path), but when pid 1 is /bin/sh then just "exit" will 
work as well if you don't mind a UML panic message about "tried to kill 
init"...

Speaking of path: the default UML path ends with ".", and if you try to 
compile anything this triggers some "holier than thou" code in gcc that 
ignores the entire path without even a warning message because it thinks it 
knows better than you, and thus doesn't find the linker.  Just set your PATH 
to "/sbin:/usr/sbin:/bin:/usr/bin" and it should work fine.  (Why this isn't 
the default, I have no idea...)

> My environment is Debian Woody with 2.4.27 kernel. My gcc version is
> 2.95.4. I am using default options when I do 'make menu_config
> ARCH=um'

There's no underscore in menuconfig.

> Here is the error that I am experiencing once I do 'make linux ARCH=um':
> arch/um/kernel/sys_call_table.c:277: duplicate array index in initializer
> arch/um/kernel/sys_call_table.c:277: (near initialization for
> `sys_call_table') arch/um/kernel/sys_call_table.c:277: duplicate array
> index in initializer arch/um/kernel/sys_call_table.c:277: (near
> initialization for `sys_call_table')

I remember a problem like that in one of the 2.6.11-pre releases, but it was 
fixed in the final 2.6.11.  What compiler version are you using?

> The code at line 277 is:
>        ARCH_SYSCALLS
>        [ LAST_SYSCALL + 1 ... NR_syscalls ] =
>                (syscall_handler_t *) sys_ni_syscall
>
> I don't quite understand this as it surpasses my C knowledge but if I
> do a dirty hack and change this to:

Yeah, I did too.  It was fixed before the 2.6.11 release.  Are you sure you're 
building 2.6.11 sources?

> Can anybody point me in the right direction?

You're sure you're using linux-2.6.11.tar.bz2 on x86?

> Regards,
>
> Ian

Rob


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2005-03-18  4:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-18  3:18 [uml-devel] Can't compile under vanilla 2.6.11 Ian McDonald
2005-03-18  3:40 ` Rob Landley [this message]
2005-03-18  6:34   ` Ian McDonald
2005-03-18 23:42 ` Rob Landley
2005-03-18 23:43 ` Rob Landley
2005-03-19 21:31   ` [uml-devel] Running JDK1.5 Maxes Out CPU Peter
2005-03-21  4:43   ` BUG with proposed fix Re: [uml-devel] Can't compile under vanilla 2.6.11 Ian McDonald
2005-03-21  5:13     ` [uml-devel] 2.4 do_mmap_pgoff compile problem Peter
2005-03-22 17:50       ` Blaisorblade
2005-03-21  5:30     ` BUG with proposed fix Re: [uml-devel] Can't compile under vanilla 2.6.11 Ian McDonald
2005-03-24 11:03       ` Blaisorblade
2005-04-08  4:04         ` Ian McDonald
2005-04-08  4:24           ` Blaisorblade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503172240.54876.rob@landley.net \
    --to=rob@landley.net \
    --cc=imcdnzl@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox