Subject: Re: some progress, anyone got a shell?

From: christophe leroy <[email-masked]>
Date: Tue, 02 Mar 1999 14:29:47 +0000

David A Rusling wrote:
> 
> all,
> 
>         I've made good progress in porting Linux to a new ARM
> system.  Basically I've got the RAMdisk loading and the system
> starting to boot from it.  I can see ('cos I hacked the kernel) the
> init process come up and load both init and the libc that it's linked
> against.   Unfortunately it goes horribly wrong from there.  I'm using
> the rpc-root stuff - the latest that I can find which contains a.out
> object format images.  What I last tried to do was to have init start
> a shell executing shell commands - the really old basic way of booting
> a system.   This access violates someplace - pretty hard to tell where.
> OK, enough of this, a request.   Does anyone have either a statically
> linked sh or a combination of sh and libc that is known good?   I'm
> presuming that the root-rpc stuff is good, but I'm beginning to wonder.
> Oh, yes I can build some cross tools, but my goal is to get a basic
> RAMdisk kernel up and running, then to move to a different processor
> (this system has multiple header cards, up to 4).   I'd rather not
> faff around with tools if I can help it.
> 

I had the same problem with 2.2.1-rmk4
Now, with 2.2.2-rmk4, it works

christophe
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: "[email-masked]" <[email-masked]>
Date: Tue, 02 Mar 1999 17:47:06 +0000

>Now, with 2.2.2-rmk4, it works

Thanks Christophe (and others) for the hints.   I had screwed up the abort handling
code.   That's ok (I think).   Now, I'm using a modified ITSY ramdisk (after some fiddling)
that contains a /etc/rc file (executable with #!/bin/sh , echo 'hello cruel world').  I've
hacked init/main.c to do_rc().   However, I see the following error.   Looks to me
like the environment variables are stuffed.  I looked at the bash sources to search
for this error - couldn't find it.   My only thoughts now are that the environment variables
live at virtual address 0x0 and that I've made some mistakes someplace....

RAMDISK: Compressed image found at block 0
length errorVFS: Mounted root (ext2 filesystem).
init(): looking for the root device (ROOT_DEV = 0x100)
        mount_initrd = 0x1, real_root_dev = 0x100
DEBUG: sys_open(/dev/tty1) ...successful
init(): execute_command = 0
Launching kernel thread do_rc
DEBUG: sys_open(/etc/rc) ...successful
do_execve(): /bin/sh
DEBUG: aout: ..A..C..C1..C2..C3..D..EDEBUG: sys_open(/dev/tty) ...failed
DEBUG: sys_open(/dev) ...successful
DEBUG: sys_open(/etc/passwd) ...successful
*ap++ == 0x55*ap++ == 0x55
Report this to [email-masked]
eport this to [email-masked]
Stopping myself...topping [email-masked]
abort from 0x1cc80
bort from 0x1cc80

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 2 Mar 1999 18:48:36 +0000 (GMT)

> DEBUG: aout: ..A..C..C1..C2..C3..D..EDEBUG: sys_open(/dev/tty) ...failed

This is expected.  The process does not have a controlling terminal, and
therefore /dev/tty is not valid.  Use /dev/console or /dev/tty1 instead.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]