• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: 1 2 [3] 4 5 ... 8
31  Linux Stuff / Kernel / Re: SD card support on: May 04, 2009, 06:31:42 AM
So the new mvsdio.patch for 2.6.30-rc4 broke my ability to read my sdcard.

I'm using a 8GB kingston class 6 SDHC card.

32  Linux Stuff / Kernel / Re: 2.6.30-rc uImage and kmods ipkg feed on: May 04, 2009, 04:35:49 AM
Yes I'm following that guide and I've built this module and used it on my NSLU2 using both the unslug firmware and debian.

The code must need some changes to work with 2.6.30.

The module crashes on load.  This is from dmesg after plugging in the cm19a:

x10-cm19a: Found input endpoint: 81, and output endpoint: 2
kernel BUG at arch/arm/mm/dma-mapping.c:497!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c4b68000
[00000000] *pgd=1f2d6031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT
Modules linked in: x10_cm19a(+) nfsd nfs_acl auth_rpcgss exportfs dm_crypt dm_mod ipv6 sg
CPU: 0    Not tainted  (2.6.30-rc4 #1)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<c0028bb4>]    lr : [<c0028bb0>]    psr: 60000013
sp : df2d3d18  ip : 000024dc  fp : 00000000
r10: dfb5ec00  r9 : d4851464  r8 : 00000000
r7 : de8e6b80  r6 : 00000005  r5 : d4851400  r4 : ffc03060
r3 : 00000000  r2 : 00000000  r1 : c0439ecc  r0 : 00000030
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: 04b68000  DAC: 00000015
Process modprobe (pid: 10676, stack limit = 0xdf2d2268)
Stack: (0xdf2d3d18 to 0xdf2d4000)
3d00:                                                       c04b9f9d c002ab10
3d20: 3fc03060 d4851400 000000d0 c01ffd08 0000000d 00000000 ffffffff 00000010
3d40: ffffffff ffffffff 00000001 df2d3d5c df2d3d7c 00000400 00000000 00000000
3d60: ffffffff 00000010 ffffffff 000024ac 000024ac c00367c8 d4851400 00000000
3d80: d4851400 00000000 c04b9f9f de8e6bc0 000000d0 df81dbd8 00000000 c0036df4
3da0: 00000007 20000013 00000000 a0000013 000000d0 ffc03060 d4851400 df2d2000
3dc0: 00000005 df2d3de4 d4851464 df2d3df0 00000000 bf0d00cc 00000000 df2d3e33
3de0: bf0d3b88 df2d3e33 d4851400 00000002 00000050 df0d0d00 c019ef88 df2d3e33
3e00: d4851400 df2d3e2e df2d3e26 df0d0d00 c019ef88 df2ada48 00000000 bf0d12c4
3e20: c4bea7b0 01803e40 24140000 01802020 20142000 a758cb34 bf0d3bd8 df0d0d20
3e40: df0d0d00 bf0d3b58 bf0d3b88 bf0d3bd8 dfb90000 c0203d74 df0d0d28 df0d0d20
3e60: df0d0d20 bf0d3b88 bf0d3b88 c042d048 00000060 c019ffd8 bf0d3b58 df0d0d20
3e80: df0d0d54 bf0d3b88 df2d3ea0 c01a0110 00000000 c01a00b0 bf0d3b88 c019f7c4
3ea0: df95c0b8 df868f90 c042d048 00000000 bf0d3c68 bf0d3b88 df122120 c019f098
3ec0: bf0d2237 c00760f4 bf0d3b58 bf0d3c68 bf0d3b88 bf0d3b88 00000000 df2d2000
3ee0: 00000000 c01a03ec bf0d3b58 bf0d3c68 bf0d21a0 bf0d3b88 00000000 c0203b2c
3f00: 40155000 bf0d3b54 bf0d3c68 40155000 bf0d6000 bf0d609c 00025242 c0025300
3f20: 00000000 fffffffc 00000000 c0065190 00000001 c03083b4 00000000 c0416a20
3f40: c0416a14 ffffffff 00000001 00000000 c0416a14 c0050dc8 00000000 00000000
3f60: 00025242 bf0d3c68 40155000 00000000 00025242 bf0d3c68 40155000 00000000
3f80: c0025b04 c005f950 00001000 00000003 00000000 4015202c 00000000 00018eb0
3fa0: 00000080 c0025980 4015202c 00000000 40155000 00025242 00018330 00000000
3fc0: 4015202c 00000000 00018eb0 00000080 00000000 40155000 00000000 00000000
3fe0: 00000000 bed7d904 0000b484 400ee6f4 60000010 40155000 0a29303d 00000000
[<c0028bb4>] (__bug+0x1c/0x28) from [<c002ab10>] (dma_cache_maint+0x78/0xe8)
[<c002ab10>] (dma_cache_maint+0x78/0xe8) from [<c01ffd08>] (usb_hcd_submit_urb+0x160/0x948)
[<c01ffd08>] (usb_hcd_submit_urb+0x160/0x948) from [<bf0d00cc>] (write_intr_data+0x1b4/0x208 [x10_cm19a])
[<bf0d00cc>] (write_intr_data+0x1b4/0x208 [x10_cm19a]) from [<bf0d12c4>] (x10_cm19a_probe+0x1c0/0x2e0 [x10_cm19a])
[<bf0d12c4>] (x10_cm19a_probe+0x1c0/0x2e0 [x10_cm19a]) from [<c0203d74>] (usb_probe_interface+0xec/0x14c)
[<c0203d74>] (usb_probe_interface+0xec/0x14c) from [<c019ffd8>] (driver_probe_device+0xb0/0x188)
[<c019ffd8>] (driver_probe_device+0xb0/0x188) from [<c01a0110>] (__driver_attach+0x60/0x84)
[<c01a0110>] (__driver_attach+0x60/0x84) from [<c019f7c4>] (bus_for_each_dev+0x4c/0x8c)
[<c019f7c4>] (bus_for_each_dev+0x4c/0x8c) from [<c019f098>] (bus_add_driver+0x130/0x2a4)
[<c019f098>] (bus_add_driver+0x130/0x2a4) from [<c01a03ec>] (driver_register+0xc0/0x14c)
[<c01a03ec>] (driver_register+0xc0/0x14c) from [<c0203b2c>] (usb_register_driver+0x68/0xec)
[<c0203b2c>] (usb_register_driver+0x68/0xec) from [<bf0d609c>] (x10_cm19a_init+0x9c/0x120 [x10_cm19a])
[<bf0d609c>] (x10_cm19a_init+0x9c/0x120 [x10_cm19a]) from [<c0025300>] (do_one_initcall+0x50/0x194)
[<c0025300>] (do_one_initcall+0x50/0x194) from [<c005f950>] (sys_init_module+0x90/0x194)
[<c005f950>] (sys_init_module+0x90/0x194) from [<c0025980>] (ret_fast_syscall+0x0/0x2c)
Code: e1a01000 e59f000c eb0b6c1b e3a03000 (e5833000)
---[ end trace de5dfc3b178aba34 ]---
33  Hardware and U-Boot firmware / U-Boot stuff / Re: Kernel panic with (newly) fresh install: "No init found" on: May 03, 2009, 07:49:02 AM
Also note that compiling with SZ_2M is setting the uImage partition to 2MB.  Your kernel image is probably very close to this size.  Some kernels I have compiled are larger than that.  I think this is why they bumped it up to SZ_4M or 4MB.  This is why I have suggested using either 3MB (0x00300000) or 4MB (0x00400000) for your uImage partition.

mtdparts=nand_mtd:0x100000@0x000000(u-boot)ro,0x200000@0x100000(uImage),0x1fd00000@0x300000(rootfs) will give you 1MB(u-boot),2MB(uImage),509MB(rootfs)

mtdparts=nand_mtd:0x100000@0x000000(u-boot)ro,0x300000@0x100000(uImage),0x1fc00000@0x400000(rootfs) will give you 1MB(u-boot),3MB(uImage),508MB(rootfs)

mtdparts=nand_mtd:0x100000@0x000000(u-boot)ro,0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) will give you 1MB(u-boot),4MB(uImage),507MB(rootfs)

I'm not sure if SZ_3M is defined for using in sheevaplug-setup.c but you could also justs use the hex number 0x00300000 if you want this size partition.
34  Hardware and U-Boot firmware / U-Boot stuff / Re: Kernel panic with (newly) fresh install: "No init found" on: May 03, 2009, 07:21:39 AM
The kernel is compiled with default partitioning values for mtdparts.

You can override these on the kernel command line as most people are doing with the mtdparts=... which gets passed to the kernel command line from the u-boot bootargs.

You can modify the default partition scheme by modifying arch/arm/mach-kirkwood/sheevaplug-setup.c and compiling a kernel.

Since there is no partition table in the NAND-flash the kernel must be told how you want to partition it.  You can't use fdisk to partition the NAND-Flash.

Once you have picked a partitioning scheme you want to use for the internal nand-flash you must stick with it or rewrite the data to the partitions when it changes just like you would with a disk drive.

the mtdparts command line defines the partitions with a list of   'Size@StartingLocation(Name)[ro]'  so if the size of your u-boot partition is 0x00100000 then the start of your uImage partition should be 0x00100000.  If the size of your uImage partition is 0x00300000 then the start of the rootfs partition should be 0x00400000 (u-boot + uImage Size) the size of the rootfs partition will be the size of the flash 0x02000000 - the size of the other two partitions (0x02000000 - 0x00100000 - 0x00300000 = 0x01fc00000).

If the kernel you are booting with has your partition definition compiled in you could leave out the definition in the bootargs.  If you boot then with a different kernel you will need to make sure the bootargs specifies the partition scheme you have been using in order to access your flash properly.  So what is important is that you pick a partition scheme and make sure the kernel you boot knows what it is either through the bootargs you supply in u-boot or by compiling it into the kernel.

Note that there seems to be a difference between the name given to the name used for file system partition in the bootargs most people are using "rootfs" and the name compiled into the kernel "root".  I don't think this makes much difference except with what shows up when you 'cat /proc/mtd'
35  Linux Stuff / General Linux questions / Re: Trouble following "Boot USB" wiki on: May 02, 2009, 06:31:01 PM
if your bootargs only define 2 partitions.
Then when this is passed to the kernel as it's command line args

uImage will be /dev/mtd0 and /dev/mtdblock0
rootfs will be /dev/mtd1 and /dev/mtdblock1

if your bootargs define all 3 partitions.
Then when this is passed to the kernel as it's command line args

u-boot will be /dev/mtd0 and /dev/mtdblock0
uImage will be /dev/mtd1 and /dev/mtdblock1
rootfs will be /dev/mtd2 and /dev/mtdblock2

It's up to you how you want to define the partitions of your flash. But you must be consistent with what you pass to the kernel. And make sure you set all references ie root=/dev/mtdblock2 or which device you write your kernel or files system to accordingly.

ro following the (name) sets the partition to read only
rw following the name is actually an error and will show up as such in dmesg if you look close.
36  Hardware and U-Boot firmware / U-Boot stuff / Re: Kernel panic with (newly) fresh install: "No init found" on: May 02, 2009, 06:19:06 PM
Well you changed the size of the uImage partition since your last attempt.  Did you rewrite the file system since you caused the rootfs partition to move?

You should pick a partition scheme and stick with it.

I suggest


Some kernel builds seem to be just over 0x200000 in size.  So if you allocate 0x300000 for uImage you should have plenty of room for whatever kernel you choose to use.  The 'ro' after (u-boot) sets that partition to read only which helps prevent you from corrupting it.  You need to keep the partitions size definitions consistent or you must rewrite the kernel and file system to the new partitions you create when ever you change it.

There is no partition table for the flash so what you pass to the kernel is the partition definition.

You can add 'ro' after (uImage) to set that partition to read only.  That would prevent you from accidently writing over the kernel.  You would need to remove it inorder to enable writing a new kernel.

The bootcmd your using should work.
nand read.e 0x800000 0x100000 0x300000
says to read 0x300000 bytes from flash starting at address 0x100000 (the start of the kernel partition) and write it into system memory at 0x800000. this copies the kernel to memory.

bootm 0x800000
boots the kernel from memory starting at address 0x800000 (where you just wrote the kernel).
37  Hardware and U-Boot firmware / U-Boot stuff / Re: Kernel panic with (newly) fresh install: "No init found" on: May 02, 2009, 11:57:57 AM
It looks like your mtdparts is different when you are trying to boot from flash than it was when you wrote the flash.

-sh-3.2# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00200000 00020000 "uImage"
mtd2: 1fd00000 00020000 "root"

Here the mtd0 size is 0x00100000, mtd1 size is 0x00200000 so mtd2 would start at 0x00300000 and would have a size of be 0x1fd00000.

When you boot to try to run from flash you are passing this information in the bootargs
Marvell>> setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fC00000@0x400000(rootfs)rw root=/dev/mtdblock2'

This sets mtd0 size to 0x00100000 starting at 0x00000000, mtd1 size to 0x00300000 starting at 0x00100000 and mtd2 starts at 0x00400000 with a size of 0x1fc00000.

You need to make sure the mtdparts in the bootargs used when you boot up to flash the device are the same as they will be when you bootup to run from  the flash.
38  Linux Stuff / Kernel / Re: SD card support on: May 02, 2009, 10:27:47 AM
I'm using 8GB kingston class 6 SDHC cards without any problems.

What kernel are you using?  I'm not running gentoo.  I'm running ubuntu on 2.6.30-rc4.

Have you tried any other mmc or sd cards?
39  Hardware and U-Boot firmware / U-Boot stuff / Re: Bad Magic Number with uImage.sheeva.040309 and NFS on: May 02, 2009, 10:20:52 AM
Sorry, I can't help you there.  I've been using putty on a windows box for my console connection.
40  Hardware and U-Boot firmware / U-Boot stuff / Re: Bad Magic Number with uImage.sheeva.040309 and NFS on: May 02, 2009, 08:54:59 AM
Also there is a problem with your mtdparts definition.
console=console=ttyS0,115200 mtdparts=nand_mtd:0x200000@0x100000(uImage)ro,0x1f800000@0x30000(rootfs)rw

You are defining the start of the rootfs in the middle of the u-boot partition.  Be careful you could corrupt your u-Boot.

Change 0x30000(rootfs) to 0x300000(rootfs)

41  Hardware and U-Boot firmware / U-Boot stuff / Re: Bad Magic Number with uImage.sheeva.040309 and NFS on: May 02, 2009, 08:47:53 AM
your asking the tftpboot to put the image at 0x200000 and then trying to run it (bootm) at 0x2000000.

These numbers need to be the same.

Add a zero to the first one.

42  Linux Stuff / General Linux questions / Re: apt-get not working on: May 01, 2009, 01:21:03 PM
Well I'm out of ideas.  looks like it should work.  Must be something else mis-configured with apt.
43  Linux Stuff / General Linux questions / Re: SDroot vs mount on: May 01, 2009, 12:58:07 PM
if you move to a kernel built from mail line kernel source as opposed to the ones supplied from Marvell you need to switch from using nand_mtd to orion_nand.  It is based on the name the kernel understands to be the flash device.  There are two other u-boot parameters that need to also change if you move to a main line kernel.  They are posted a number of times in this forum under the kernel discussions.
44  Linux Stuff / General Linux questions / Re: apt-get not working on: May 01, 2009, 12:52:49 PM
Strange... I just tried at-get update and it works fine.

Can you ping ports.ubuntu.com ?
45  Linux Stuff / General Linux questions / Re: apt-get not working on: May 01, 2009, 12:16:56 PM
I'm using.

root@server:~# cat /etc/apt/sources.list
deb http://ports.ubuntu.com jaunty main restricted universe multiverse
Pages: 1 2 [3] 4 5 ... 8