Subject: Re: /bin/sh (?) problem on md-root on ZAO425
To: None <port-arm@netbsd.org>
From: Shoichi Miyake <smi@sm.sony.co.jp>
List: port-arm
Date: 08/15/2003 19:07:37
Hi port-arm,
I'd like to report someting since I got a little step.

I looked into src/bin/sh/ sources and made some test, and found
memcpy()'ed area has garbage data.
Then, I rebuilt libc to see what happens with C sources of memcpy() in
src/lib/libc/string/, instead of assembler version in
src/lib/libc/arch/arm/string.

This change made really a difference.
At least, there was such an improvemnt that now I can invoke any
command in $PATH (ls, mount, etc.), however, output from any commands
are still like garbage....

I also made a small program crunched with md-root just to printf some
short string, that still prints garbage on stdout :-(

I think there's someting wrong in src/lib/libc/arch/arm/string/*.S,
correct ?
But I cannot assert, as I'm not familiar with arm assembly language...
I wonder somebody arm expert could examine them...

# I'm sorry It's very hard for me to write English message...

Best Regards,
Shoichi Miyake

From: Shoichi Miyake <smi@sm.sony.co.jp>
Subject: /bin/sh (?) problem on md-root on ZAO425
Date: Fri, 08 Aug 2003 23:02:49 +0900 (JST)

> Hi,
> 
> On ZAO425 board,
> have anyone experienced symptom like this about /bin/sh ?
> 
> What I did are,
> - cross-built on NetBSD-1.6U/i386 (around August 3 or 4 source)
> - first off, used build.sh release
> - created big-endian sysinst ramdisk for armeb
> - built ZAO425_MD kernel
> - mdsetimage'ed this kernel and ramdisk
> - used Redboot to boot this kernel
> - made .profile nearly empty, to make it simple...
> [/.profile]
> set -x
> PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
> export PATH
> TERM=vt100
> export TERM
> HOME=/
> export HOME
> 
> umask 022
> 
> ROOTDEV=/dev/md0a
> [end of .profile]
> 
> Mounting md0a and spawning /sbin/init, /bin/sh are fine, but
> command lines to /bin/sh through both console and .profile
> seems to be broken...followings are captured log and comment of mine.
> 
> Any comments ?
> 
> Best Regards,
> Shoichi Miyake
> 
> [log start]
> NetBSD 1.6U (ZAO425_MD) #32: Fri Aug  8 22:39:59 JST 2003
>         smi@skysensor:/work/nb/arch/evbarm/obj/sys/arch/evbarm/compile/ZAO425_MD
> total memory = 65536 KB
> avail memory = 51904 KB
> using 844 buffers containing 3376 KB of memory
> mainbus0 (root)
> cpu0 at mainbus0: IXP425 533MHz rev 1 (XScale core)
> cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
> cpu0: 32KB/32B 32-way Instruction cache
> cpu0: 32KB/32B 32-way write-back-locking Data cache
> ixpsip0 at mainbus0
> ixpclk0 at ixpsip0 addr 0xc8005000-0xc800502f
> ixpclk0: IXP425 Interval Timer
> ixpcom0 at ixpsip0 addr 0xc8000000-0xc8000fff
> ixp425_intr_establish(irq=15, ipl=1ixpcom0: HighSpeed Serial (UART0) (major=100)
> ixpcom1 at ixpsip0 addr 0xc8001000-0xc8001fff
> ixp425_intr_establish(irq=13, ipl=13, func=c034ee78, arg=c1158600)
> ixdpled0 at ixpsip0 addr 0x52000000-0x52000fff
> ixpio0 at mainbus0
> clock: hz=100 stathz=0 profhz=0
> ixp425_intr_establish(irq=5, ipl=10, func=c034cddc, arg=00000000)
> md0: internal 4096 KB image area
> boot device: <unknown>
> root on md0a dumps on md0b
> mountroot: trying nfs...
> mountroot: trying ffs...
> WARNING: CHECK AND RESET THE DATE!
> root file system type: ffs
> init: copying out flags `-s' 3
> init: copying out path `/sbin/init' 11
> + PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
> + export PATH
> + T1TER=vt0
> + export 1 TE
> + HOME=/
> + exAex HOME
> + umask 022
> + ROV=ROevDEd0/dd0a
> ===============================================> .profile is done
> # echo $PATH
> + echo /sbin:/bin:/usr/bin:/usr/sbin:/
> /s/b/s:/n:r/inn:ussrbibi/u/
>                            /s/
> ===============================================> $PATH is broken ?
> # ls
> + ls
> ls: not found
> ===============================================> failed to search 'ls'
> # echo /bin/*
> + echo /bin/cat /bin/chmod /bin/cp /bin/dd /bin/df /bin/ed /bin/ln /bin/ls /bin/mkdir v /b/mv a /bn/p /bin/pwd /b/rm m /b/sh h /b/st tty y /bn/sc
> /t/bii/cah /b n/cnmod /bin/cp /bin/dd /bin/df /bin/ed /bin/ln /bin/lsd/bi//mk/ir /bin/mv  binnpaxbin/i/pwm /bin/rh /bin/st /b/n/s/ty cbinync
> ===============================================> command output is ugly...
> # /bin/ls    
> + /bin/ls
> .profile  dev       kern      mnt2      tmp       var
> b bint      e c       mntb      s in 
>                                         sr
> ===============================================> always like this
> # a
> + a
> a: nnnot# aa
> + aa
> aa: not found
> # aaa
> + aaa
> aaa: notounnnd
> # aaaa
> + aaaa
> aaaa: nounnound
> # aaaaa
> + aaaaa
> aaaaa: nnnot# aaaaaa
> + aaaaaa
> aaaaaa: not found
> # aaaaaaa
> + aaaaaaa
> aaaaaaa: notounnnd
> # aaaaaaaa
> + aaaaaaaa
> aaaaaaaa: nounnound
> =========================================> some pattern of broken message ?
> # /bin/ls -l /./././
> + /bin/ls -l /./././
> ls: /./-/: N No euch file orrdircto
> ===============================================> sigh...
> [log end]