Skip to contentSkip to conversation

2.6.x nettel.c compile problems

DISCUSSION Brian T 2 participants 3 messages Jul 2, 2004 Memory technology devices (MTD)

lore
Share & tools
lore

Brian T

author
#0 lore raw

Sorry if this was covered, but I didn't see anything when searching. I'm trying to get the 2.6.2 kernel working with JFFS2 and MTD (Snapgear/Intel chipset). The standard ~/mtd/maps/nettel.c gave me an error when compiling, so I patched to the CVS from 6/30, but I was still getting the same error :

CC drivers/mtd/maps/nettel.o
drivers/mtd/maps/nettel.c: In function `nettel_init':
drivers/mtd/maps/nettel.c:429: error: `ROOT_DEV' undeclared (first use in this function)
drivers/mtd/maps/nettel.c:429: error: (Each undeclared identifier is reported only once
drivers/mtd/maps/nettel.c:429: error: for each function it appears in.) drivers/mtd/maps/nettel.c:429: warning: implicit declaration of function `MKDEV'
make[3]: *** [drivers/mtd/maps/nettel.o] Error 1
make[2]: *** [drivers/mtd/maps] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

If I add this to the top of nettel.c ...

#ifndef CONFIG_BLK_DEV_INITRD
#include <linux/config.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <linux/root_dev.h>
#endif

...then it compiles fine, but when booting the kernel it is unable to mount mtd1 :

JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
Serial: 8250/16550 driver $Revision: 1.90 $ 56 ports, IRQ sharing enabled ÿttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 24576K size 1024 blocksize PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Using anticipatory io scheduler
JEDEC: Found no SnapGear AMD device at location zero
SnapGear Intel: Found 1 x16 devices at 0x0 in 16-bit mode
Intel/Sharp Extended Query Table at 0x0031
cfi_cmdset_0001: Erase suspend on write enabled
Using buffer write method
SnapGear Intel: Found 1 x16 devices at 0x0 in 16-bit mode
Intel/Sharp Extended Query Table at 0x0031
cfi_cmdset_0001: Erase suspend on write enabled
Using buffer write method
SNAPGEAR: Intel flash device size = 16384K
Creating 6 MTD partitions on "SnapGear Intel":
0x00000000-0x000e0000 : "JBM kernel"
mtd: Giving out device 0 to JBM kernel
0x00100000-0x00fe0000 : "JBM filesystem"
mtd: Giving out device 1 to JBM filesystem 0x000e0000-0x00100000 : "JBM config"
mtd: Giving out device 2 to JBM config
0x00000000-0x01000000 : "JBM Intel"
mtd: Giving out device 3 to JBM Intel
0x00fe0000-0x01000000 : "JBM BIOS Config"
mtd: Giving out device 4 to JBM BIOS Config 0x00fe0000-0x01000000 : "JBM BIOS"
mtd: Giving out device 5 to JBM BIOS
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17

Kernel panic: VFS: Unable to mount root fs on mtdblock1

I also tried enabling INITRD without the headers I added at the top, but with the same result.

Any ideas on this?

Thanks,

-Brian

author
#1 lore raw
Quoted 8 lines

NET: Registered protocol family 1
NET: Registered protocol family 17

Kernel panic: VFS: Unable to mount root fs on mtdblock1

I also tried enabling INITRD without the headers I added at the top, but with the same result.

I added some debugging output to do_mounts.c and got this on boot:

Loading................................................................ Linux version 2.6.2 (root@FedoraCore1) (gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)) #35 Fri Jul 2 11:20:05 CDT 2004
.......
Linux Kernel Card Services
options: [pci] [cardbus]
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
......
VFS: name=/dev/root, p=ext2, root_mount_data=<NULL>, err=-22,
VFS: name=/dev/root, p=minix, root_mount_data=<NULL>, err=-22,

Kernel panic: VFS: Unable to mount root fs on mtdblock1

Now, I have JFFS2 support compiled into the kernel. Any ideas on why it is only trying to mount the root fs as ext2 or minix? I use ext2 for a ram disk, and minix is used for 128k BRAM.

Any help is appreciated.

-Brian

#2 lore raw
Quoted 3 lines · Brian T

Now, I have JFFS2 support compiled into the kernel. Any ideas on why it is only trying to mount the root fs as ext2 or minix? I use ext2 for a ram disk, and minix is used for 128k BRAM.

No idea why yet, but I have the same problem. I fixed it by specifying rootfstype=jffs2 on the kernel command line.

In 2.4 it looped through all possible filesystems, not sure why it doesn't do that now. If I get around to figuring it out, I'll be sure to let people know.

josh