rootfs mounting problem

Maya
Hi All,

      I am trying to boot linux from scratch on mini2440 board. I have
compiled the linux image from source and also I have prepared a
rootfs.jffs2 image.

Now when I see with help of vivi bootloader I can see following partitions:

Supervivi> part show
Number of partitions: 4
name            :  offset    size    flag
------------------------------------------------------------
vivi            :  0x00000000  0x00040000  0
param           :  0x00040000  0x00020000  0
kernel          :  0x00060000  0x00500000  0
root            :  0x00560000  0x3fa80000  0



I have loaded the kernel at 0x00060000 location by running following
command

Supervivi> load flash 0x0 0x00060000 <size of kernel> u

Then I loaded the kernel from my desktop via usb utility.

Similarly i loaded the rootfs image at address 0x00560000 by using

Supervivi> load flash 0x0 0x00560000 <size of rootfs image> u

But when i boot it it gives sync error.

TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: setting system clock to 2005-07-19 20:25:09 UTC
(1121804709)
uncorrectable error : 
uncorrectable error : 
end_request: I/O error, dev mtdblock3, sector 256
isofs_fill_super: bread failed, dev=mtdblock3, iso_blknum=64, block=128
List of all partitions:
1f00             256 mtdblock0 (driver?)
1f01             128 mtdblock1 (driver?)
1f02            5120 mtdblock2 (driver?)
1f03          125568 mtdblock3 (driver?)
No filesystem could mount root, tried:  ext3 ext2 cramfs vfat msdos iso9660
romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(31,3)
Backtrace: 
[<c00333f0>] (dump_backtrace+0x0/0x114) from [<c02f94c4>]
(dump_stack+0x18/0x1c)
 r7:00008000 r6:c3c8b000 r5:c0028a08 r4:c03fd9a4
[<c02f94ac>] (dump_stack+0x0/0x1c) from [<c02f9514>] (panic+0x4c/0xd0)
[<c02f94c8>] (panic+0x0/0xd0) from [<c000914c>]
(mount_block_root+0x1e0/0x220)
 r3:00000003 r2:80000000 r1:c3c19f6c r0:c0379c65
[<c0008f6c>] (mount_block_root+0x0/0x220) from [<c0009250>]
(mount_root+0xc4/0xfc)
 r8:00000000 r7:00000000 r6:00000000 r5:c0028a08 r4:01f00003
[<c000918c>] (mount_root+0x0/0xfc) from [<c00093f8>]
(prepare_namespace+0x170/0x1c4)
 r5:c0028a08 r4:c03fd0b4
[<c0009288>] (prepare_namespace+0x0/0x1c4) from [<c000865c>]
(kernel_init+0x10c/0x148)
 r5:00000000 r4:c03fce80
[<c0008550>] (kernel_init+0x0/0x148) from [<c00554d0>] (do_exit+0x0/0x5b0)
 r4:00000000

Anyone please tell me how i can boot it successfully? I dont want to use
u-boot. I want to do it via configuration of vivi.

Thanks
-Maya

davef
You didn't say what format your rootfs image is in.

Supervivi = zImage
u-boot = uImage

I'd suggest following this tutorial, if you have a 64M machine..

http://narnia.cs.ttu.edu/drupal/node/131

Maya
it is a zImage.

davef
If you look at the Linux tutorial on the wiki there is a script that allows
you to mount your JFFS2 rootfs on your host machine.  If that is successful
you could feel more confident you have a working rootfs AND you can check
it has everything you want in it.

You did enable JFFS2 in the kernel? 

Which size of flash have you got?

davef
< compiled Linux from source

Which source?

Maya
Thanks davf,

      I ll check the script first and let you know if it works. I enabled
jffs2 support in kernel and I am using 2.6.34 version.

Maya
Now I am getting this error. Any one has any idea?


Empty flash at 0x01737ffc ends at 0x01738000
Empty flash at 0x0173bffc ends at 0x0173c000
Empty flash at 0x01743ffc ends at 0x01744000
Empty flash at 0x01747fa4 ends at 0x01748000
Empty flash at 0x0174ffc4 ends at 0x01750000
Empty flash at 0x01753ffc ends at 0x01754000
Empty flash at 0x0175605c ends at 0x01758000
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758000:
0x557b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758004:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758008:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0175800c:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758010:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758014:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758018:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0175801c:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758020:
0xcc33 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01758024:
0xcc33 instead

davef
You still haven't said where you got your kernel source from?  Or which
machine you are using.

If is is any use you are seeing a common error.  You could try searching
for <magic bitmask> using the left hand (Google) search button for this
site.

Maya
Hi,

     I used latest kernel from www.kernel.org. Its 2.6.34 I think. I
compiled it fro arm defconfigs3c2410. 

When I am trying with jffs2 I got the error which I mentioned already.
After that I tried rootfs over nfs. But there also I got the error that 

eth0 device not up ...


Any idea?

davef
You will probably never get it to work, unless you can work out all the
changes buserror made to the kernel to get all the peripherals working on
the mini2440.  I tried 2.6.34 before I found out that useful bit of info.

The other kernel that you will have better luck with in the one on the
downloads page here.

You STILL haven't said which machine you have.  64M?  If so, make sure you
can at least work through the tutorial I mentioned earlier.

eth0 not up?  Try <udhcpc> on the command line or set up
/etc/network/interfaces then do a <./networking restart> after navigating
to /etc/init.d

There are lots of useful tutorials at:
http://billforums.station51.net/

Start by working through those.

Good luck

davef
http://repo.or.cz/w/linux-2.6/mini2440.git

Maya
Hi,

    I can successfully boot linux kernel 2.32.2 given with the CD of
mini2440. There is a config file with mini2440_defconfig. Now there is a
different problem. Here is the log of my successful boot:

=====================================================
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
usbcore: registered new interface driver hiddev
usbcore: registered new interfacesdbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: setting system clock to 2005-07-24 17:11:48 UTC
(1122225108)
eth0: link down
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.1.111, mask=255.255.255.0,
gw=255.255.255.255,
     host=192.168.1.111, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.1.99, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.99
eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Looking up port of RPC 100005/1 on 192.168.1.99
VFS: Mounted root (nfs filesystem) on device 0:14.
Freeing init memory: 168K

===========================================================

Now the problem is that there is no shell coming up. Any idea how to enable
the shell in kernel config for NFS rootfs?

Thanks
-Maya