Shell does not start

Sébastien Masson contacts at massonsebastien.be
Sat Aug 2 11:59:19 UTC 2014


Hello Busyboxers,

I'm experiencing an issue with busybox that would require a bit of help.
Would you provide it to me?

Here is what I'm trying to do:
------------------------------
I'm following this book 
(http://www.amazon.fr/Linux-embarqu%C3%A9-Pierre-Ficheux/dp/221212452X);
And I'm building (well ... I'm trying to) an embedded linux from scratch 
that I would to emulate with QEMU.

The objective is simply self-learning which is the reason why I choose 
to not use a tool such as Builroot, or others.


What I did:
-----------
I downloaded latest stable kernel version (3.15.7) and compiled it with 
CodeSourcery Lite.  I used default config for "Versatile PB" ARM board.

Then I installed busybox to the project's filesystem ~/Embedded/rootfs/

In a first time I used a "HelloWorld.c" program as the init program and 
tested it with QEMU.  It worked well.

In a second time, I downloaded latest stable busybox version (1.22.1) 
and compiled it with default config.
And I made dev/, sys/ and proc/ directories with mkdir.
I made a symbolic link from init to bin/busybox.

And finally I edited a etc/init.d/rcS script as follows:
    mount -a
    mdev -s

According to the book, I tried to emulate the system as is.  Which means 
without having a fstab nor an inittab file.

I tried as is / with a fstab file / with fstab and inittab files. Those 
three cases give the same result which is described here below.



What I observed:
----------------
The kernel is loaded, and the rcS script is used.  I observed it by 
inserting lines as "ls dev/".
It was an opportunity to check that mdev really populate the devices 
directory.  It does.

Right after the rcS script, the system require me to type ENTER in order 
to active the console.

At this point, busybox seems to stop and give the hand back to qemu.
I get the "(qemu)" prompt instead of the shell one.


How I compressed the filesystem and called qemu:
------------------------------------------------
[sebastien at seb-linux-laptop rootfs]$ find . | cpio -o -H newc | gzip > 
../rootfs4.gz ; cd ..

[sebastien at seb-linux-laptop EmbeddedLinux]$ qemu-system-arm -M 
versatilepb -m 64 -kernel zImage -initrd rootfs4.gz -serial stdio 
-nographic -append "console=ttyAMA0,115200 mem=64M"


Does someone can help about this issue?
Was my analysis correct?
What can lead busybox to not load the shell?  Or What can lead busybox 
to stop working?

I thank you so munch for helping me with this issue.

Regards,

Sébastien.




Whole output whether it may help:
---------------------------------
QEMU 2.0.0 monitor - type 'help' for more information
(qemu) pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.15.7 (sebastien at seb-linux-laptop) (gcc version 4.8.3 
20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-28) ) #1 Fri Aug 
1 17:41:19 CEST 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
Machine: ARM-Versatile PB
Memory policy: Data cache writeback
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyAMA0,115200 mem=64M
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 59236K/65536K available (2804K kernel code, 157K rwdata, 732K 
rodata, 114K init, 120K bss, 6300K reserved)
Virtual kernel memory layout:
     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
     modules : 0xbf000000 - 0xc0000000   (  16 MB)
       .text : 0xc0008000 - 0xc037c41c   (3538 kB)
       .init : 0xc037d000 - 0xc039997c   ( 115 kB)
       .data : 0xc039a000 - 0xc03c1660   ( 158 kB)
        .bss : 0xc03c1660 - 0xc03dfa1c   ( 121 kB)
NR_IRQS:224
VIC @f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "SIC" @ f1003000, 13 irqs, parent IRQ: 63
Console: colour dummy device 80x30
Calibrating delay loop... 382.15 BogoMIPS (lpj=1910784)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x2aa668 - 0x2aa6c0
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45, base_baud = 0) is a PL011 rev1
dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46, base_baud = 0) is a PL011 rev1
fpga:09: ttyAMA3 at MMIO 0x10009000 (irq = 70, base_baud = 0) is a PL011 
rev1
Switched to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 1724K (c2000000 - c21af000)
futex hash table entries: 256 (order: -1, 3072 bytes)
Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 119
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pl061_gpio dev:e4: PL061 GPIO chip @0x101e4000 registered
pl061_gpio dev:e5: PL061 GPIO chip @0x101e5000 registered
pl061_gpio dev:e6: PL061 GPIO chip @0x101e6000 registered
pl061_gpio dev:e7: PL061 GPIO chip @0x101e7000 registered
clcd-pl11x dev:20: PL110 rev0 at 0x10120000
clcd-pl11x dev:20: Versatile hardware, VGA display
Console: switching to colour frame buffer device 80x60
brd: module loaded
physmap platform flash device: 04000000 at 34000000
physmap-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer 
ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico at fluxnic.net>
smc91x smc91x.0 eth0: SMC91C11xFD (rev 1) at c49c8000 IRQ 57
  [nowait]
smc91x smc91x.0 eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
ledtrig-cpu: registered to indicate activity on CPUs
TCP: cubic registered
NET: Registered protocol family 17
Freeing unused kernel memory: 112K (c037d000 - c0399000)
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0

----------------------
- Starting rcS sript -
----------------------

input: ImExPS/2 Generic Explorer Mouse as 
/devices/fpga:07/serio1/input/input2

---------------------
- Ending rcS script -
---------------------


Please press Enter to activate this console.
(qemu)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20140802/3652f33e/attachment.html>


More information about the busybox mailing list