|
|
 |
« Reply #15 on: May 24, 2009, 03:45:32 PM » |
|
Thanks, karurosu. I can mount the nand now.
Is there any reason that I should have formatted my sd card with a jffs2 file system, rather than ext3? Would it be faster, or make the flash last longer?
BTW, mtab shows me the same thing mount did. Now that I've mounted the nand (ro), it shows:
rootfs / rootfs rw 0 0 tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0 varrun /var/run tmpfs rw,nosuid,mode=0755 0 0 varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0 udev /dev tmpfs rw,mode=0755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0 tmpfs /var/cache/apt tmpfs rw,noatime 0 0 /dev/mtdblock1 /mnt/nand jffs2 ro 0 0
I'm confident that the SD is the root system now, even though mtab (and mount) doesn't confirm it, so no worries.
I'll try to write this up for the wiki, so it's easier for the next noob than it was for me.
Thanks again!
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #16 on: May 24, 2009, 04:09:57 PM » |
|
Every flash memory have an effect known as memory wear, were some blocks become unreadable, to avoid this problem a technique known as wear leveling was created. Flash cards and every SD have wear leveling built-in, via an integrated controller, so you can use whatever you want (ext2 is the recommended, I am using ext3 myself because my sheeva keeps crashing from external noise), on the othr hand, mtd devices (like the NAND) are "RAW" in the sense that there is no controller performing wear leveling, so it has to be implemented by software, jffs2 and UBIFS are 2 fs that implement it.
So, short answer: you don't need jffs2 in your card, in fact you cannot use it.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|
|
 |
« Reply #18 on: October 17, 2009, 09:37:45 AM » |
|
Hey, I have another problem with booting from a sdcard-device. I copied all the stuff to the sd card an configured u-boot. U-boot allways find a filesystem on mmcblk0p1, but the boot-process stops after 'Freeing init memory: 140K' without any output (no Kernelpanic an so on) Here are the outputs: ## Booting image at 00800000 ... Image Name: Linux-2.6.30-rc6 Created: 2009-05-20 11:42:10 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2595144 Bytes = 2.5 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel. Linux version 2.6.30-rc6 (kelly@speedy) (gcc version 4.2.1) #2 PREEMPT Wed May 20 05:42:04 MDT 2009 CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: Marvell SheevaPlug Reference Board Memory policy: ECC disabled, Data cache writeback Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) root=/dev/mmcblk0p1 NR_IRQS:114 PID hash table entries: 2048 (order: 11, 8192 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 256MB 256MB = 512MB total Memory: 513408KB available (4680K code, 998K data, 140K init, 0K highmem) SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok net_namespace: 980 bytes NET: Registered protocol family 16 Kirkwood: MV88F6281-A0, TCLK=200000000. Feroceon L2: Enabling L2 Feroceon L2: Cache support initialised. Kirkwood: Gating clock using mask 0x1ac224 bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb cfg80211: Using static regulatory domain info cfg80211: Regulatory domain: US (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm) (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm) cfg80211: Calling CRDA for country: US NET: Registered protocol family 2 IP route cache hash table entries: 16384 (order: 4, 65536 bytes) TCP established hash table entries: 65536 (order: 7, 524288 bytes) TCP bind hash table entries: 65536 (order: 6, 262144 bytes) TCP: Hash tables configured (established 65536 bind 65536) TCP reno registered NET: Registered protocol family 1 JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. JFS: nTxBlock = 4013, nTxLock = 32104 msgmni has been set to 1003 alg: No test for stdrng (krng) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A console [ttyS0] enabled brd: module loaded loop: module loaded Driver 'sd' needs updating - please use bus_type methods MV-643xx 10/100/1000 ethernet driver version 1.4 mv643xx_eth smi: probed net eth0: port 0 with MAC address 00:50:43:01:d2:a8 libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 2400 at 0x000012c00000 2 cmdlinepart partitions found on MTD device orion_nand Creating 2 MTD partitions on "orion_nand": 0x000000100000-0x000000500000 : "uImage" 0x000000500000-0x000020000000 : "rootfs" ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver orion-ehci orion-ehci.0: Marvell Orion EHCI orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1 orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000 orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usbcore: registered new interface driver ums-datafab usbcore: registered new interface driver ums-freecom usbcore: registered new interface driver ums-jumpshot usbcore: registered new interface driver ums-sddr09 usbcore: registered new interface driver ums-sddr55 mice: PS/2 mouse device common for all mice rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0 i2c /dev entries driver cpuidle: using governor ladder cpuidle: using governor menu sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman mmc0: mvsdio driver initialized, lacking card detect (fall back to polling) Registered led device: plug:green:health mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver mv_xor mv_xor.0: Marvell XOR: ( xor cpy ) mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy ) mv_xor mv_xor.2: Marvell XOR: ( xor cpy ) mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new high speed SDHC card at address 0002 mmcblk0: mmc0:0002 3.81 GiB mmcblk0: p1 mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy ) usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver oprofile: using timer interrupt. TCP cubic registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. lib80211: common routines for IEEE802.11 drivers rtc-mv rtc-mv: setting system clock to 2009-10-17 18:35:22 UTC (1255804522) kjournald starting. Commit interval 5 seconds EXT3 FS on mmcblk0p1, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with writeback data mode. VFS: Mounted root (ext3 filesystem) on device 179:1. Freeing init memory: 140K // HERE IT STOPS
Are there any experiences with that problem? Maybe is there something i have to write in the /etc/fstab? Because there is nothing in there (but it works when i boot from nand). *-----------------------------------------------------------------------------------------------------------------------------------------------------------------------* Problem solved: According to the wiki-entry (btw thanks a lot for this site) i copied the files in the /dev directory with cp -a /dev/* /mnt/sdcard/dev/ ... don't know why but cp -ax /dev/* /mnt/sdcard/dev/ was a better solution!
|
|
|
|
« Last Edit: October 17, 2009, 04:48:16 PM by Neonfly »
|
Logged
|
|
|
|
|
|
|
 |
« Reply #19 on: October 31, 2009, 08:23:29 AM » |
|
I followed the steps in the wiki write-up in hopes of getting past the kernel panic I get when trying to boot from SD Card. No joy. Here's what I see:
Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rw Marvell>> setenv bootcmd 'mmcinit; setenv bootargs $(bootargs_console) $(mtdpart itions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x 00800000' Marvell>> boot Unknown command 'mmcinit' - try 'help'
----------------
This is the version of U-boot I have:
U-Boot 1.1.4 (Apr 9 2009 - 12:23:12) Marvell version: 3.4.16
This matches the version referenced in the wiki but there is no mmcinit command in the help menu. There should be, right?
|
|
|
|
« Last Edit: November 01, 2009, 09:29:06 AM by samweber »
|
Logged
|
|
|
|
|
|
|
 |
« Reply #20 on: November 01, 2009, 09:38:45 AM » |
|
Well, to answer my own question, yes, there should be an mmcinit command but there isn't in that version of u-boot.
So I downloaded the latest u-boot and used bubt to burn the new image to nand. I answered 'y' to the environment override question because the release notes are ambiguous on this point and seems to be confused about the difference between override and overwrite. I then went through the environment variables to see what had changed (which was a lot) and fixed things as appropriate. The latest results are as follows (abject failure):
Marvell>> boot Error! cmd : 8, err : 0201 SD found. Card desciption is: Manufacturer: 0x03, OEM "SD" Product name: "SU02G", revision 8.0 Serial number: 553266355 Manufacturing date: 7/2008 CRC: 0x00, b0 = 0
NAND read: device 0 offset 0x100000, size 0x400000
Reading data from 0x4ff800 -- 100% complete. 4194304 bytes read: OK ## Booting image at 00800000 ... Image Name: Linux-2.6.22.18 Created: 2009-04-04 1:49:44 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2070252 Bytes = 2 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK
Starting kernel ...
Uncompressing Linux............................................................. ..................................................................... done, boot ing the kernel.
----------------------
At this point, frozen. Suggestions? What is command 8? What is error 0201? Is the kernel not new enough?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #21 on: November 01, 2009, 01:39:12 PM » |
|
you are loading the kernel from nand and booting it. The kernel should mount mmc and use it as rootfs. Thats what you want?
Your kernel is pretty old. I'm not sure it can use the sdcard. You are most likely missing an initrd. Initrd must be loaded to a second memory area and passed to bootm as the second parameter.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #22 on: November 02, 2009, 05:49:54 AM » |
|
fragfutter, thanks for your response. I didn't make clear in previous posts exactly what I'm attempting to do. Thanks for pointing that out. I'm trying to leave the kernel alone in nand flash and use the SD card for just the RFS.
I did learn yesterday that the error 0201 on command 8 is in response to the mmcinit command. If you interrupt the boot process and get a u-boot prompt, you can type mmcinit. If everything is beautiful, you won't see an error, just the card description. I noticed that I get the error the first time I type the command but not on subsequent times. This information fits with what I've seen in other posts that there can be timing issues with different SD media.
I think you may be right about the age of the kernel. I'm using the kernel I put on the device when I got it some months ago. I'll try upgrading to v1.2 everything and see if that does it.
|
|
|
|
|
Logged
|
|
|
|
|
A_W
Newbie
Karma: 1
Posts: 25
|
 |
« Reply #23 on: December 01, 2009, 04:26:11 AM » |
|
Noob question here:
How fast does the SD card actually have to be, in order to be useful?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #24 on: December 01, 2009, 07:23:46 AM » |
|
depends on the use case. if you buy a new one i would go for class 6. Otherwise just try if it is fast enough for you.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #25 on: December 01, 2009, 08:23:30 AM » |
|
I'm booting off NAND but have all the working areas other than / spilled onto a class 2 SD 32GB card (I think; I'm not in front of it now) and generally I'm happy with performance.
Rgds
Damon
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #26 on: January 04, 2010, 02:14:57 PM » |
|
I tried and tried reinstalling the operating system on sheeva but with no success  . So I was thinking if someone would be kind enough to give me an image with a clean system witch I could write to an sd card. I'm actually desperate and I would be very gratefully even with a small sum of cash if it's necessary. thanks in advance 
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #27 on: January 04, 2010, 03:04:02 PM » |
|
I tried and tried reinstalling the operating system on sheeva but with no success  . So I was thinking if someone would be kind enough to give me an image with a clean system witch I could write to an sd card. I'm actually desperate and I would be very gratefully even with a small sum of cash if it's necessary. thanks in advance  I would offer my setup if you really want it, however mine is base on GENTOO with very specific custom setup so I think it will not be of your interest. If you can describe where you stuck right now I will try to see if I can help.
|
|
|
|
|
Logged
|
Good Luck 
|
|
|
|
|
|
 |
« Reply #28 on: May 20, 2010, 01:36:19 PM » |
|
Hi All,
I'm trying to load the filesystem from a 1GB SD card. I'm using an Atmel Arm processor. I've done the partition on the SD card, copied the root filesystem in to it. I wanted to check if its working or not, So I connected the SD card through an USB adaptor to X86 computer. Then I started my Board that load Kernel from NAND flash and File system from the SD card connected to the computer using NFS. It was working so the file sytem got copied properly. But then When I connect the SD card to the Board, it starts well but stops throwing an error message " Kernel panic - not syncing: No init found. Try passing init= option to kernel."
I used Ext2 for the file system and please find the logs below. It would be of great help if some one can help me on this..
DRAM: 64 MB NAND: 512 MiB DataFlash: 264 KB AT45DB021 In: serial Out: serial Err: serial Net: macb0 macb0: Starting autonegotiation... macb0: Autonegotiation complete macb0: link up, 100Mbps full-duplex (lpa: 0x45e1) Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x200000, size 0x200000 2097152 bytes read: OK ## Booting kernel from Legacy Image at 22000000 ... Image Name: Linux-2.6.31.9-at91 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1473900 Bytes = 1.4 MB Load Address: 20008000 Entry Point: 20008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux............................................................................................. done, booting the kernel. Linux version 2.6.31.9-at91 (armdev@linux1) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Tue Dec 29 11:37:56 EST 2009 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: Micromint Electrum 100 Memory policy: ECC disabled, Data cache writeback Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rw ip=192.168.1.231:192.168.1.249::255.255.255.0::eth0:none PID hash table entries: 256 (order: 8, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 64MB = 64MB total Memory: 61876KB available (2576K code, 230K data, 112K init, 0K highmem) NR_IRQS:192 AT91: 96 gpio irqs in 3 banks Console: colour dummy device 80x30 Calibrating delay loop... 197.83 BogoMIPS (lpj=989184) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 AT91: Power Management (with slow clock mode) AT91: Starting after user reset bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered NET: Registered protocol family 1 NetWinder Floating Point Emulator V0.97 (double precision) JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. msgmni has been set to 120 io scheduler noop registered io scheduler anticipatory registered (default) atmel_usart.0: ttyS0 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL console [ttyS0] enabled atmel_usart.1: ttyS1 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL brd: module loaded loop: module loaded MACB_mii_bus: probed eth0: Atmel MACB at 0xfffc4000 irq 21 (00:21:a3:00:00:15) eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1) NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit) AT91 NAND: 8-bit, Software ECC Scanning device for bad blocks Bad eraseblock 697 at 0x000005720000 Creating 7 MTD partitions on "atmel_nand": 0x000000000000-0x000000040000 : "bootstrap" 0x000000040000-0x000000080000 : "uboot" 0x000000080000-0x0000000c0000 : "env1" 0x0000000c0000-0x000000100000 : "env2" 0x000000100000-0x000000200000 : "user" 0x000000200000-0x000000400000 : "linux" 0x000000400000-0x000020000000 : "root" atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12) mtd_dataflash spi0.1: AT45DB021B (264 KBytes) pagesize 264 bytes (OTP) atmel_spi atmel_spi.1: Atmel SPI Controller at 0xfffcc000 (irq 13) usbmon: debugfs is not available ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver at91_ohci at91_ohci: AT91 OHCI at91_ohci at91_ohci: new USB bus registered, assigned bus number 1 at91_ohci at91_ohci: irq 20, io mem 0x00500000 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. udc: at91_udc version 3 May 2006 mice: PS/2 mouse device common for all mice rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0 IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs rtc-at91sam9 at91_rtt.0: rtc0: SET TIME! i2c /dev entries driver Registered led device: ds1 Registered led device: ds2 usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver TCP cubic registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SD card at address 0002 mmcblk0: mmc0:0002 00000 971 MiB mmcblk0: p1 IP-Config: Complete: device=eth0, addr=192.168.1.231, mask=255.255.255.0, gw=255.255.255.255, host=192.168.1.231, domain=, nis-domain=(none), bootserver=192.168.1.249, rootserver=192.168.1.249, rootpath= EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended VFS: Mounted root (ext2 filesystem) on device 179:1. Freeing init memory: 112K Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel. [<c002a458>] (unwind_backtrace+0x0/0xdc) from [<c02123bc>] (panic+0x40/0x108) [<c02123bc>] (panic+0x40/0x108) from [<c00244d0>] (init_post+0xd0/0xf8) [<c00244d0>] (init_post+0xd0/0xf8) from [<c000841c>] (kernel_init+0xd8/0x108) [<c000841c>] (kernel_init+0xd8/0x108) from [<c0025cd8>] (kernel_thread_exit+0x0/0x8)
|
|
|
|
|
Logged
|
|
|
|
|
TheDOC
Newbie
Karma: 1
Posts: 15
|
 |
« Reply #29 on: May 20, 2010, 02:53:39 PM » |
|
root=/dev/mmcblk0p
This one is wrong. You need to change it to root=/dev/sdb1 (1 if your rootfs is on the first partition, 2 if on the second and so on) and it should boot. If it doesn't, you need to add rootdelay=10 to give the usb time to spin up.
|
|
|
|
|
Logged
|
|
|
|
|
|