(no subject)
Hi,
I am relatively new to Linux and definitely new to MTD/JFFS. We have a motorola 8xx board, the boot loader used is ppcboot. We are currently using NFS as the root file system. The kernel has been compiled with the right JFFS and MTD options. I am able to erase the MTD device, copy the file system on to it and mount and umount multiple times without any problems. The kernel is in the flash. We are using Dhcp to figure out its IP address.
When I set the bootargs in ppcboot to "root=/dev/mtdblock1 rw" or "root=/dev/mtdblock1 rw ip=10.100.4.44" and try booting the kernel, everything is fine till it comes time to mount the root FS.It still seems to try and go out on the net. This is the trace I see. I have cut out some parts to reduce the clutter.
----------------------------------------------------------------------
Initializing...
CPU: XPC860xxZPnnD4 at 80 MHz: 16 kB I-Cache 8 kB D-Cache FEC
present
Board: DRAM: About to program UPMB... finished programming UPMB
Setting value for MPTPR to 400
Run precharge command for each chip-select used
<snip...>
cas latensies supported 3 2
<snip...>
ppcboot->printenv
bootdelay=10
baudrate=19200
ipaddr=10.0.0.77
serverip=10.0.0.128
bootcmd=bootm 28080000
stdin=serial
stdout=serial
stderr=serial
bootargs=root=/dev/mtdblock1 rw ip=10.100.4.44
SWSE(bootrom)->bootm 28080000
## Booting Linux kernel at 28080000 ...
Image Name: HHL 2.0 for SWSE version 0.005 Created: 2001-12-06 5:07:40 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 550042 Bytes = 537 kB = 0 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Transferring control to Linux (at address 00000000) ... Linux version 2.4.2_hhl20 ([email protected]) (gcc version 2.95.3 20010
315 (release/MontaVista)) #6 Wed Dec 5 21:03:08 PST 2001 On node 0 totalpages: 65536
zone(0): 65536 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock1 rw ip=10.100.4.44 Decrementer Frequency = 300000000/60
<snip....>
JFFS version 1.0, (C) 1999, 2000 Axis Communications AB
loop: loaded (max 8 devices)
physmap flash device: 1780000 at 28880000
Physically mapped flash: Found 2 x16 CFI devices at location 0 in 16 bit mode
JEDEC ID: 89 18cstm_cfi_jedec flash device: 1780000 at 28880000
MTD flash: Found 2 x16 CFI devices at location 0 in 16 bit mode JEDEC ID: 89 18
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384) Sending BOOTP requests............. timed out!
IP-Config: Auto-configuration of network failed.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy. request_module[block-major-2]: Root fs not mounted
VFS: Cannot open root device "mtdblock1" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00
Rebooting in 180 seconds..
----------------------------------------------------------------------
The "Sending BOOTP requests" line is what I don't understand. The kernel obviously does not figure out that the root filesystem to be used is 'jffs'. How can I get it to do that? Do I need to make changes to some kernel files? Or is it that I need to change the kernel so that it detects the MTD block device first and figures out the filesystem?
Any help is greatly appreciated.
Thanks,
Sheela.
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
Quoted 3 lines · [email protected] said:
everything is fine till it comes time to mount the root FS.It still seems to try and go out on the net. This is the trace I see. I have cut out some parts to reduce the clutter.
A kernel that old doesn't have 'mtdblock' in the root_dev_names array in init/main.c. Add it.
--
dwmw2
Thank you. I was the missing the root dev as you rightly guessed. I am now successfully booting off mtd/jffs.
While creating the jffs image using mkfs.jffs, I noticed that it did not create all the /dev entries for me. I had to use 'mknod' and create it manually on the target. What is the easiest way for me to create a target image with all the /dev files?
Thanks,
Sheela.
Quoted 6 lines · --- David Woodhouse
Quoted 1 line · [email protected] said:
everything is fine till it comes time to mount the root FS.It
still
Quoted 1 line
seems to try and go out on the net. This is the trace I see. I
have
Quoted 10 lines
Quoted 1 line
cut out some parts to reduce the clutter.
A kernel that old doesn't have 'mtdblock' in the
root_dev_namesarray ininit/main.c. Add it.--
dwmw2
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
Quoted 4 lines · [email protected] said:
While creating the jffs image using mkfs.jffs, I noticed that it did
not create all the /dev entries for me. I had to use 'mknod' and create it manually on the target. What is the easiest way for me to create a target image with all the /dev files?
Er, not sure - mkfs.jffs ought to work. Why are you using jffs not jffs2?
--
dwmw2
Hmm... I will try mkfs.jffs again in that case.
Well, by the time I was involved with the project, there had been some work done on using jffs. But we'll be moving to Jffs2 in a short while.
Thank you for your help.
Sheela.
Quoted 6 lines · --- David Woodhouse
Quoted 1 line · [email protected] said:
While creating the jffs image using mkfs.jffs, I noticed that it
did
Quoted 2 lines
not create all the /dev entries for me. I had to use 'mknod' and create it manually on the target. What is the easiest way for me
Quoted 10 lines
to
Quoted 1 line
create a target image with all the /dev files?
Er, not sure - mkfs.jffs ought to work. Why are you using jffs not jffs2?
--
dwmw2
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
Quoted 1 line · [email protected] said:
Hmm... I will try mkfs.jffs again in that case.
If it fails, can you cut down the directory tree you're putting into the JFFS image to the smallest testcase that shows the problem (like the /dev directory and a single device node), then send me both a tarball and the JFFS image of it?
Where did you get your mkfs.jffs from?
--
dwmw2
The utilities had already been downloaded by someone else. I am not sure where they got the package from. I will download the mtd-utils package again and build the image.
The 'Id' string in the mkfs.jffs.c file is as follows:
$Id: mkfs.jffs.c,v 1.11 2001/03/11 11:44:42 dwmw2 Exp $
Sheela.
Quoted 12 lines · --- David Woodhouse
Quoted 1 line · [email protected] said:
Hmm... I will try mkfs.jffs again in that case.
If it fails, can you cut down the directory tree you're putting into the
JFFS image to the smallest testcase that shows the problem (like the /dev
directory and a single device node), then send me both a tarball and the
JFFS image of it?
Quoted 6 lines
Where did you get your mkfs.jffs from?
--
dwmw2
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com