ext2fs ramdisk created on Sun/SuSE does not work on PowerPC

w.n. jacobs willy.jacobs at nl.thalesgroup.com
Thu Aug 29 00:05:20 EST 2002


I use Wolfgang Denk's Linux kernel (linux-2.4.4-2002-03-21) on STK8(2)60
boards.

Up to now I've created the ext2fs ramdisk (7707575 bytes) on a 486 PC with SuSE
7.0 and this works ok.  This is the mke2fs output:

mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
8192 inodes, 32678 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
        8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
l
32678+0 records in
32678+0 records out

When I create the same ext2fs ramdisk on a Sun Ultra5 with SuSE 7.3 everything
goes fine up to "Freeing unused kernel memory", when the kernel "stops" (see
output below). The size of the ramdisk is now also much smaller (size is now
7394443 bytes). Output of this mke2fs:

mke2fs 1.24a (02-Sep-2001)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
8192 inodes, 32678 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
        8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
32678+0 records in
32678+0 records out

When I mount (mount -t ext2 -o loop /ramdisk /mnt) the same (Sun created)
ramdisk (without the mkimage header) on the same STK8(2)60 system the mount
succeeds, but an error

EXT2-fs error (device loop(7,0)): ext2_readdir: bad entry in directory #17: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0

occurs when I do ls -l /mnt/lib (no missing files).

Although the ext2fs implementation automatically handles the big/little endian
problem, I'm not sure about Sun Ultra's 64-bit architecture.
Anyone a hint of the reason of this problem?

Logging of "erroneous" ramdisk:
PPCBoot 1.1.5 (Jul 19 2002 - 08:04:01)

MPC8260 Reset Status: External Soft, External Hard

MPC8260 Clock Configuration
 - Bus-to-Core Mult 3x, VCO Div 2, 60x Bus Freq  33-100, Core Freq 100-300
 - dfbrg 0, corecnf 0x08, busdf 3, cpmdf 1, plldf 0, pllmf 1
 - vco_out  266666664, scc_clk   66666666, brg_clk   66666666
 - cpu_clk  199999998, cpm_clk  133333332, bus_clk   66666666

CPU:   MPC8260 (Rev 01, Mask C.2 6K23A) at 199.999 MHz
Board: ### No HW ID - assuming TQM8260
DRAM:  (60x:9COL - 128 MB, Local:9COL - 64 MB) using 128 MB
FLASH: 32 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
=> run flash
## Booting image at 40040000 ...
   Image Name:   stk8260
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    533192 Bytes = 520 kB = 0 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 40100000 ...
   Image Name:   MPC8260 2002-08-28 13:03
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    7394379 Bytes = 7221 kB = 7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Ramdisk to 07891000, end 07f9e44b ... OK
Total memory = 128MB; using 0kB for hash table (at 00000000)
Linux version 2.4.4 (willy at suns500c01) (gcc version 2.95.2 19991024 (release)) #16 Thu Jul 18 14:22:58 MEST 2002
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram
Warning: real time clock seems stuck!
Calibrating delay loop... 131.89 BogoMIPS
Memory: 120044k available (1028k kernel code, 388k data, 56k init, 0k highmem)
Dentry-cache hash table entries: 16384 (order: 5, 131072 bytes)
Buffer-cache hash table entries: 8192 (order: 3, 32768 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd v1.8
CPM UART driver version 0.02
ttyS0 on SMC1 at 0x0000, BRG7
ttyS1 on SMC2 at 0x0040, BRG8
pty: 256 Unix98 ptys configured
Found 4x16bit 32MByte CFI flash device of type AMD/Fujitsu standard at 40000000
Registered flash device /dev/flasha (minor 0, 4 partitions)
block: queued sectors max/low 79682kB/26560kB, 256 slots per queue
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
eth0: SCC3 ENET Version 0.2, 08:4d:50:69:50:06
eth1: FCC2 ENET Version 0.2, 08:4d:50:69:50:06
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 7221k freed
JFFS version 1.0, (C) 1999, 2000  Axis Communications AB
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
PPP generic driver version 2.4.1
PPP BSD Compression module registered
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of JEDEC chips: 1
TQM8260 flash bank 0: Using static image partition definition
Creating 4 MTD partitions on "TQM8260 Bank 0":
0x00000000-0x00040000 : "ppcboot"
0x00040000-0x00100000 : "kernel"
0x00100000-0x01d00000 : "initrd"
0x01d00000-0x02000000 : "jffs2"
NET4NET4nux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
Linux IP multicast router 0.06 plus PIM-SM
IP-Config: Incomplete network configuration information.
ip_conntrack (1024 buckets, 8192 max)
ip_tables: (c)2000 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 56k i~t
<kernel stops>
--
willy


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list