[klibc] problem about initramfs

chengzhiyong at harbournetworks.com chengzhiyong at harbournetworks.com
Sun Apr 3 20:52:29 PDT 2005


dear friend.


i have mips board with BCM sibyte 1125CPU(use board sibyte 1250 swarm.)

i use linux-kernel 2.6.12-rc1 download from linux-mips.com

i use kernel 2.4.26 before this time, it's work ok at 2.4.26 with 
Ramdisk-busybox
when i try to use ramdisk in 2.6.1x version, i found that ramdisk i not 
exist,
i don't known how to use it again(i had try a patch for get ramdisk init 
to 2.6.1x, but can not complire),
so i use initramfs with klibc.

please help me with it. thanks!
                                              kugle




my initramfs file-list content.
--------------------------------------------------------------------------
          1 # This is a very simple, default initramfs
          2 
          3 dir   /dev 0755 0 0
          4 nod   /dev/console 0600 0 0 c 5 1
          5 dir   /root 0700 0 0
          6 nod   /dev/ram0 0777 0 0 b 1 0
          7 nod   /dev/mem 0777 0 0 c 1 1
          8 
          9 dir   /lost+found 0755 0 0
         10 dir   /etc 0755 0 0
         11 dir   /etc/init.d 0755 0 0
         12 file  /etc/init.d/rcS 
/root/project/linux-mips/linux/root-file-system/etc/init.d/rcS 0755 0 0
         13 file  /etc/passwd 
/root/project/linux-mips/linux/root-file-system/etc/passwd 0755 0 0
         14 file  /etc/inittab 
/root/project/linux-mips/linux/root-file-system/etc/inittab 0755 0 0
         15 file  /etc/group 
/root/project/linux-mips/linux/root-file-system/etc/group 0755 0 0
         16 dir   /tmp 0755 0 0
         17 dir   /var 0755 0 0
         18 dir   /proc 0755 0 0
         19 dir   /mnt 0755 0 0
         20 dir   /home 0755 0 0
          1 # This is a very simple, default initramfs
          2 
          3 dir   /dev 0755 0 0
          4 nod   /dev/console 0600 0 0 c 5 1
          5 dir   /root 0700 0 0
          6 nod   /dev/ram0 0777 0 0 b 1 0
          7 nod   /dev/mem 0777 0 0 c 1 1
          8 
          9 dir   /lost+found 0755 0 0
         10 dir   /etc 0755 0 0
         11 dir   /etc/init.d 0755 0 0
         12 file  /etc/init.d/rcS 
/root/project/linux-mips/linux/root-file-system/etc/init.d/rcS 0755 0 0
         13 file  /etc/passwd 
/root/project/linux-mips/linux/root-file-system/etc/passwd 0755 0 0
         14 file  /etc/inittab 
/root/project/linux-mips/linux/root-file-system/etc/inittab 0755 0 0
         15 file  /etc/group 
/root/project/linux-mips/linux/root-file-system/etc/group 0755 0 0
         16 dir   /tmp 0755 0 0
         17 dir   /var 0755 0 0
         18 dir   /proc 0755 0 0
         19 dir   /mnt 0755 0 0
         20 dir   /home 0755 0 0
         21 dir   /root 0755 0 0
         22 dir   /bin 0755 0 0
         23 dir   /sbin 0755 0 0
         24 dir   /lib 0755 0 0
         25 
         26 
         27 file  /lib/crt0.o 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-lib/crt0.o 0755 0 
0
         28 file  /lib/cinterp.o 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-lib/interp.o 0755 
0 0
         29 file  /lib/libc.so 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-lib/libc.so 0755 
0 0
         30 file  /lib/klibc-DYbflytbid1xNDZf1_tuES7t0Rs.so 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-lib/klibc-DYbflyt
            bid1xNDZf1_tuES7t0Rs.so 0755 0 0
         31 file  /lib/libc.a 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-lib/libc.a 0755 0 
0
         32 
         33 file  /bin/busybox 
/root/project/linux-mips/linux/root-file-system/bin/busybox 0755 0 0
         34 slink /sbin/getty     /bin/busybox 0755 0 0
         35 slink /sbin/ifconfig  /bin/busybox 0755 0 0
         36 file  /bin/cat 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/cat 0755 0 0
         37 file  /bin/chroot 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/chroot 0755 0 
0
         38 file  /bin/dd 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/dd 0755 0 0
         39 file  /bin/false 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/false 0755 0 
0
         40 file  /bin/fstype 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/fstype 0755 0 
0
         41 file  /bin/gzip 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/gzip 0755 0 0
         42 file  /bin/gunzip 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/gunzip 0755 0 
0
         43 file  /bin/insmod 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/insmod 0755 0 
0
         44 file  /bin/ipconfig 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/ipconfig 0755 
0 0
         45 file  /bin/kinit 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/kinit 0755 0 
0
         46 file  /bin/ln 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/ln 0755 0 0
         47 file  /bin/minips 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/minips 0755 0 
0
         48 file  /bin/mkdir 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/mkdir 0755 0 
0
         49 file  /bin/mkfifo 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/mkfifo 0755 0 
0
         50 file  /bin/mount 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/mount 0755 0 
0
         51 file  /bin/nfsmount 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/nfsmount 0755 
0 0
         52 file  /bin/nuke 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/nuke 0755 0 0
         53 file  /bin/pivot_root 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/pivot_root 
0755 0 0
         54 file  /bin/printf 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/printf 0755 0 
0
         55 file  /bin/run-init 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/run-init 0755 
0 0
         56 file  /bin/sh 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/sh 0755 0 0
         57 file  /bin/sleep 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/sleep 0755 0 
0
         58 file  /bin/true 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/true 0755 0 0
         59 file  /bin/umount 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/umount 0755 0 
0
         60 file  /bin/uname 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/uname 0755 0 
0
         61 file  /bin/zcat 
/root/project/linux-mips/klib-1.0.5/lib/klibc/mips-linux-bin/zcat 0755 0 0
         62 slink /init           /bin/kinit 0755 0 0
         63 slink /sbin/init      /bin/kinit 0755 0 0
 


my inittab content.
--------------------------------------------------------------------------

          1 # System startup
          2 ::sysinit:/etc/init.d/rcS
          3 
          4 # Console
          5 ::respawn:/sbin/getty 9600 /dev/console
          6 
          7 # Go into runlevel 0 (Halt)
          8 ::shutdown:/etc/init.d/rcH


my init.d/rcS content.
--------------------------------------------------------------------------
          1 #!/bin/sh
          2 
          3 /bin/mount -t proc  none /proc
          4 /bin/mount -t tmpfs shm /root
          5 
          6 /sbin/ipconfig lo 127.0.0.1 up
          7 /sbin/ipconfig eth0 10.29.60.222 up
          8 




console output:
---------------------------------------------------------------------------
Broadcom SiByte BCM1125H A2 @ 400 MHz (SB1 rev 3)
Board type: SiByte BCM91250A (SWARM)
[4294667.296000] Linux version 2.6.12-rc1 (root at debian) (gcc version 3.2.3 
with SiByte modifications) #31 Mon Apr 4 11:19:56 CST 2005
[4294667.296000] CPU revision is: 00040103
[4294667.296000] This kernel optimized for board runs with CFE
[4294667.296000] Determined physical RAM map:
[4294667.296000]  memory: 07ea8e00 @ 00000000 (usable)
[4294667.296000]  memory: 07fffe00 @ 08000000 (usable)
[4294667.296000] Built 1 zonelists
[4294667.296000] Kernel command line: root=/dev/ram0 
[4294667.296000] Primary instruction cache 32kB, 4-way, linesize 32 bytes.
[4294667.296000] Primary data cache 32kB, 4-way, linesize 32 bytes.
[4294667.296000] Synthesized TLB refill handler (24 instructions).
[4294667.296000] Synthesized TLB load handler fastpath (36 instructions).
[4294667.296000] Synthesized TLB store handler fastpath (31 instructions).
[4294667.296000] Synthesized TLB modify handler fastpath (30 
instructions).
[4294667.296000] PID hash table entries: 1024 (order: 10, 16384 bytes)
[4294667.298000] Dentry cache hash table entries: 65536 (order: 6, 262144 
bytes)
[4294667.302000] Inode-cache hash table entries: 32768 (order: 5, 131072 
bytes)
[4294667.345000] Memory: 254592k/260764k available (1477k kernel code, 
5904k reserved, 302k data, 560k init, 0k highmem)
[4294667.369000] Mount-cache hash table entries: 512
[4294667.370000] Checking for 'wait' instruction...  unavailable.
[4294667.455000] NET: Registered protocol family 16
[4294667.460000] devfs: 2004-01-31 Richard Gooch (rgooch at atnf.csiro.au)
[4294667.461000] devfs: boot_options: 0x1
[4294667.462000] Initializing Cryptographic API
[4294667.464000] io scheduler noop registered
[4294667.466000] io scheduler anticipatory registered
[4294667.468000] io scheduler deadline registered
[4294667.470000] io scheduler cfq registered
[4294667.472000] RAMDISK driver initialized: 4 RAM disks of 12800K size 
1024 blocksize
[4294667.473000] loop: loaded (max 8 devices)
[4294667.475000] eth0: enabling TCP rcv checksum
[4294667.476000] eth0: enabling TCP rcv checksum
[4294667.477000] eth0: SiByte Ethernet at 0x10064000, address: 
00:05:3B:91:00:9E
[4294667.478000] eth1: enabling TCP rcv checksum
[4294667.480000] eth1: enabling TCP rcv checksum
[4294667.481000] eth1: SiByte Ethernet at 0x10065000, address: 
00:05:3B:91:00:9F
[4294667.482000] NET: Registered protocol family 2
[4294667.489000] IP: routing cache hash table of 2048 buckets, 16Kbytes
[4294667.490000] TCP established hash table entries: 16384 (order: 5, 
131072 bytes)
[4294667.491000] TCP bind hash table entries: 16384 (order: 4, 65536 
bytes)
[4294667.492000] TCP: Hash tables configured (established 16384 bind 
16384)
[4294667.493000] NET: Registered protocol family 1
[4294667.494000] NET: Registered protocol family 17
[4294667.495000] Freeing unused kernel memory: 560k freed
VFS: Cannot open [4294667.501000] Kernel panic - not syncing: Attempted to 
kill init!
root device "000[4294667.502000]  0"
pivot_root: <0>Rebooting in 5 seconds..Device or resource busy
Passing control back to CFE...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.vas.nu/pipermail/klibc/attachments/20050404/21e1d342/attachment-0001.html


More information about the klibc mailing list