[BusyBox] Busybox' "sh" shell on PowerPC

Matthias Fuchs matthias.fuchs at esd-electronics.com
Mon Apr 2 17:42:54 UTC 2001


Hi Erik,

here's my output for your commands:

... kernel boots ...
console=/dev/ttyS0
init started:  BusyBox v0.50 (2001.04.02-17:35+0000) multi-call binary
rcS: starting /etc/init.d/rcS
rcS: mount filesystems
rcS: done

Please press Enter to activate this console. 
Couldn't open file '/etc/profile'


BusyBox v0.50 (2001.04.02-17:35+0000) Built-in shell (lash)
Enter 'help' for a list of built-in commands.

/ # cat /proc/cpuinfo
processor       : 0
cpu             : 405GP
clock           : 198MHz
revision        : 0.196 (pvr 4011 00c4)
bogomips        : 198.33
zero pages      : total: 0 (0Kb) current: 0 (0Kb) hits: 0/0 (0%)
plb bus clock   : 99MHz
pci bus clock   : 99MHz
/ # rubbish
-sh: rubbish: No such file or directory
/ # foo
-sh: foo: No such file or directory
/ # bar
-sh: bar: No such file or directory
Process '-/bin/sh' (pid 13) exited.  Scheduling it for restart.

Please press Enter to activate this console. 
Couldn't open file '/etc/profile'


BusyBox v0.50 (2001.04.02-17:35+0000) Built-in shell (lash)
Enter 'help' for a list of built-in commands.

/ # ldd /bin/busybox
/ # grep foo
-sh: grep: No such file or directory
/ # 

All commands used here are busybox build in. ldd is from the Hardhat
Linux devkit and does nothing ?..!.
grep is not compiled into my busybox. Strange is that pressing return
causes busybox to restart :-)

Perhaps this helps

Matthias

Erik Andersen wrote:
> 
> On Wed Mar 28, 2001 at 11:59:02AM +0200, Michael Shmulevich wrote:
> > Hello,
> 
> Hi -- first my appologies for the delay.  I took several days off
> from work this last week so I could _finally_ finish my basement.
> I worked my guts out and it is now usable space.  Wahoo!
> 
> [------------snip-------------]
> > free() does the segmentation. command is not NULL, it was allocated, was
> > not free()'d before but still, doing free() causes segmentation.
> > Anyway, why we want to free() and then allocate again with exactly the
> > same size?
> 
> The reason we free here is that command can potentially grow to be quite
> a bit larger then BUFSIZ.  This frees up the extra allocated memory and
> goes back to using a buffer of just BUFSIZ.
> 
> > 2. commands seem to ignore control characters from keyboard:
> > ~ # cat
> > <cat does what it is told to>
> > ...
> > <Ctrl-C>[ignored] <Ctrl-D>[ignored] <Ctrl-Z> [ignored]
> > avctually there is no way to stop the cat now. Only telneting and
> > killing the cat process.
> > Same thing with ping, and several others... control signals seem to not
> > being transferred to child process.
> 
> This is very odd.  Lemme try this on a ppc box
> 
>     [andersee at voltaire busybox]$ cat /proc/cpuinfo
>     processor       : 0
>     cpu             : 7400 (G4, altivec supported)
>     clock           : 500MHz
>     revision        : 2.9
>     bogomips        : 993.37
> 
>     processor       : 1
>     cpu             : 7400 (G4, altivec supported)
>     clock           : 500MHz
>     revision        : 2.9
>     bogomips        : 993.37
> 
>     total bogomips  : 1986.24
>     zero pages      : total: 0 (0Kb) current: 0 (0Kb) hits: 0/0 (0%)
>     machine         : PowerMac3,3
>     motherboard     : PowerMac3,3 MacRISC Power Macintosh
>     L2 cache        : 1024K unified
>     memory          : 320MB
>     pmac-generation : NewWorld
>     [andersee at voltaire busybox]$ ./busybox sh
> 
>     BusyBox v0.51pre (2001.04.02-16:45+0000) Built-in shell (lash)
>     Enter 'help' for a list of built-in commands.
> 
>     /home/andersee/busybox $ rubbish
>     sh: rubbish: No such file or directory
>     /home/andersee/busybox $ foo
>     sh: foo: No such file or directory
>     /home/andersee/busybox $ bar
>     sh: bar: No such file or directory
>     /home/andersee/busybox $
>     /home/andersee/busybox $ ldd ./busybox
>             libc.so.6 => /lib/libc.so.6 (0x0feb3000)
>             /lib/ld.so.1 => /lib/ld.so.1 (0x30000000)
>     /home/andersee/busybox $ grep foo
>     <---control C---->
>     /home/andersee/busybox $
>     [andersee at voltaire busybox]$ cat /etc/debian_version
>     testing/unstable
>     [andersee at voltaire busybox]$ dpkg -l libc6 | tail -1
>     ii  libc6          2.2.2-1        GNU C Library: Shared libraries and Timezone
> 
> So it seems to work fine from the command prompt...  Unfortunately,
> I'm not in a position to run sh from init on this box.
> 
>  -Erik
> 
> --
> Erik B. Andersen   email:  andersen at lineo.com
> --This message was written using 73% post-consumer electrons--
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox

-- 
-------------------------------------------------
\ Matthias Fuchs                                 \
 \ esd electronic system design Gmbh              \
  \ Vahrenwalder Straße 205                        \
   \ D-30165 Hannover                               \
    \ email: matthias.fuchs at esd-electronics.com      \
     \ phone: +49-511-37298-0                         \
      \ fax:   +49-511-37298-68                        \
       --------------------------------------------------





More information about the busybox mailing list