1) При загрузке из Dataflash (Bootstrap - в dataflash по 0х00 адресу, u-boot по 0х8400 адресу в dataflash, ядро по 0х42000 адресу в dataflash, jffs2-образ файловой системы по 0х400000 адресу в nandflash) все происходит нормально. Собственно этим способом я всегда и пользовалась. Возникла необходимость использовать загрузку с nandflash (Bootstrap - в dataflash по 0х00 адресу, u-boot по 0х20000 адресу в nandflash, ядро по 0х200000 адресу в nandflash, jffs2-образ файловой системы по 0х400000 адресу в nandflash). После прошивки первый запуск системы происходит без проблем (грузятся и u-boot, и ядро, монтируется файловая система, происходят операции чтения-записи...). После перезагрузки - как будто вся nandflash стерта((( В консоли только строка от Bootstrap'a, который прошит в dataflash ("Starting AT91 Bootstrap...") и тишина...Перед заливкой в nandflash в самбе выбираю пункты Enable nandflash и Erase All...В чем может быть проблема???
2)Для ускорения загрузки решили попробовать ubifs вместо jffs2. Посмотрев обсуждения на форумах (и на electronix'е - http://electronix.ru/forum/index.php?showtopic=68478&hl=, и на www.at91.com), попробовала сделать аналогичное - файловую систему от Angstrom Openembedded с помощью mkfs.ubifs и ubinize превратила в образ rootfs.ubi и прошила так же по 0x400000 адресу в nandflash. Результаты получились такими же, какие описаны в упомянутых ветках форума. Ошибки те же, хотя там вроде как проблема решена...
Лог загрузки:
Код
RomBOOT
>Start AT91Bootstrap...
Uncompressing Linux.............................................................
Linux version 2.6.28 (nastya@nastya-desktop) (gcc version 4.2.4) #25 Thu Feb 250
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9261-EK
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c02f9f8c, node_mem_map c0313000
Normal zone: 128 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16256 pages, LIFO batch:3
Movable zone: 0 pages used for memmap
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 ubi.mtd=1 root=ubi0:rootfs row
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
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: 61748KB available (2796K code, 220K data, 92K init)
Calibrating delay loop... 99.12 BogoMIPS (lpj=495616)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after power-restored wakeup
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) пїЅВ© 2001-2006 Red Hat, Inc.
msgmni has been set to 120
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 525KiB frame buffer at 23a00000 (mapped at ffc00000)
Console: switching to colour frame buffer device 80x26
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c48ae000), 1
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
dm9000 Ethernet Driver, V1.31
dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000e at c48b2000,c48b6044 IRQ 107 MAC: 00:00:00:00:00:00 (chip)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bi)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 2 MTD partitions on "atmel_nand":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x10000000 : "Partition 2"
UBI: attaching mtd1 to ubi0
UBI DBG (pid 1): io_init: min_io_size 2048
UBI DBG (pid 1): io_init: hdrs_min_io_size 512
UBI DBG (pid 1): io_init: ec_hdr_alsize 512
UBI DBG (pid 1): io_init: vid_hdr_alsize 512
UBI DBG (pid 1): io_init: vid_hdr_offset 512
UBI DBG (pid 1): io_init: vid_hdr_aloffset 512
UBI DBG (pid 1): io_init: vid_hdr_shift 0
UBI DBG (pid 1): io_init: leb_start 2048
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI DBG (pid 1): ubi_scan: process PEB 0
UBI DBG (pid 1): ubi_scan: process PEB 1
UBI DBG (pid 1): ubi_scan: process PEB 2
UBI DBG (pid 1): ubi_scan: process PEB 3
UBI DBG (pid 1): ubi_scan: process PEB 4
UBI DBG (pid 1): ubi_scan: process PEB 5
UBI DBG (pid 1): ubi_scan: process PEB 6
UBI DBG (pid 1): ubi_scan: process PEB 7
UBI DBG (pid 1): ubi_scan: process PEB 8
UBI DBG (pid 1): ubi_scan: process PEB 9
UBI DBG (pid 1): ubi_scan: process PEB 10
UBI DBG (pid 1): ubi_scan: process PEB 11
UBI DBG (pid 1): ubi_scan: process PEB 12
UBI DBG (pid 1): ubi_scan: process PEB 13
UBI DBG (pid 1): ubi_scan: process PEB 14
UBI DBG (pid 1): ubi_scan: process PEB 15
UBI DBG (pid 1): ubi_scan: process PEB 16
UBI DBG (pid 1): ubi_scan: process PEB 17
UBI DBG (pid 1): ubi_scan: process PEB 18
UBI DBG (pid 1): ubi_scan: process PEB 19
UBI DBG (pid 1): ubi_scan: process PEB 20
UBI DBG (pid 1): ubi_scan: process PEB 21
UBI DBG (pid 1): ubi_scan: process PEB 22
UBI DBG (pid 1): ubi_scan: process PEB 23
UBI DBG (pid 1): ubi_scan: process PEB 24
UBI DBG (pid 1): ubi_scan: process PEB 25
UBI DBG (pid 1): ubi_scan: process PEB 26
UBI DBG (pid 1): ubi_scan: process PEB 27
UBI DBG (pid 1): ubi_scan: process PEB 28
UBI DBG (pid 1): ubi_scan: process PEB 29
UBI DBG (pid 1): ubi_scan: process PEB 30
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
Erase counter header dump:
magic 0x55424923
version 1
ec 0
vid_hdr_offset 2048
data_offset 4096
hdr_crc 0x7fb7d50c
erase counter header hexdump:
00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 10 .
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .
[<c002400c>] (dump_stack+0x0/0x14) from [<c0198e0c>] (ubi_io_read_ec_hdr+0x2f8/)
[<c0198b14>] (ubi_io_read_ec_hdr+0x0/0x368) from [<c019bee8>] (ubi_scan+0x164/0)
[<c019bd84>] (ubi_scan+0x0/0x71c) from [<c0193360>] (ubi_attach_mtd_dev+0x580/0)
[<c0192de0>] (ubi_attach_mtd_dev+0x0/0xc74) from [<c00163cc>] (ubi_init+0x154/0)
[<c0016278>] (ubi_init+0x0/0x280) from [<c001f320>] (__exception_text_end+0x60/)
[<c001f2c0>] (__exception_text_end+0x0/0x190) from [<c000872c>] (kernel_init+0x)
r8:00000000 r7:00000000 r6:00000000 r5:c001ab84 r4:c001ab10
[<c00086bc>] (kernel_init+0x0/0xd8) from [<c003820c>] (do_exit+0x0/0x6cc)
r5:00000000 r4:00000000
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 30
UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
mtd_dataflash spi0.0: AT45DB642x (8448 KBytes) pagesize 1056 bytes (OTP)
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.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS784x Touchscreen as /class/input/input1
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
UBIFS DBG (pid 1): ubifs_get_sb: name ubi0:rootfs, flags 0x8000
UBI DBG (pid 1): ubi_open_volume_nm: open volume rootfs, mode 1
UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,255)
Please append a correct "root=" boot option; here are the available partitions:
1f00 256 mtdblock0 (driver?)
1f01 261888 mtdblock1 (driver?)
1f02 8448 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
>Start AT91Bootstrap...
Uncompressing Linux.............................................................
Linux version 2.6.28 (nastya@nastya-desktop) (gcc version 4.2.4) #25 Thu Feb 250
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9261-EK
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c02f9f8c, node_mem_map c0313000
Normal zone: 128 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16256 pages, LIFO batch:3
Movable zone: 0 pages used for memmap
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 ubi.mtd=1 root=ubi0:rootfs row
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
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: 61748KB available (2796K code, 220K data, 92K init)
Calibrating delay loop... 99.12 BogoMIPS (lpj=495616)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after power-restored wakeup
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) пїЅВ© 2001-2006 Red Hat, Inc.
msgmni has been set to 120
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 525KiB frame buffer at 23a00000 (mapped at ffc00000)
Console: switching to colour frame buffer device 80x26
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c48ae000), 1
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
dm9000 Ethernet Driver, V1.31
dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000e at c48b2000,c48b6044 IRQ 107 MAC: 00:00:00:00:00:00 (chip)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bi)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 2 MTD partitions on "atmel_nand":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x10000000 : "Partition 2"
UBI: attaching mtd1 to ubi0
UBI DBG (pid 1): io_init: min_io_size 2048
UBI DBG (pid 1): io_init: hdrs_min_io_size 512
UBI DBG (pid 1): io_init: ec_hdr_alsize 512
UBI DBG (pid 1): io_init: vid_hdr_alsize 512
UBI DBG (pid 1): io_init: vid_hdr_offset 512
UBI DBG (pid 1): io_init: vid_hdr_aloffset 512
UBI DBG (pid 1): io_init: vid_hdr_shift 0
UBI DBG (pid 1): io_init: leb_start 2048
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI DBG (pid 1): ubi_scan: process PEB 0
UBI DBG (pid 1): ubi_scan: process PEB 1
UBI DBG (pid 1): ubi_scan: process PEB 2
UBI DBG (pid 1): ubi_scan: process PEB 3
UBI DBG (pid 1): ubi_scan: process PEB 4
UBI DBG (pid 1): ubi_scan: process PEB 5
UBI DBG (pid 1): ubi_scan: process PEB 6
UBI DBG (pid 1): ubi_scan: process PEB 7
UBI DBG (pid 1): ubi_scan: process PEB 8
UBI DBG (pid 1): ubi_scan: process PEB 9
UBI DBG (pid 1): ubi_scan: process PEB 10
UBI DBG (pid 1): ubi_scan: process PEB 11
UBI DBG (pid 1): ubi_scan: process PEB 12
UBI DBG (pid 1): ubi_scan: process PEB 13
UBI DBG (pid 1): ubi_scan: process PEB 14
UBI DBG (pid 1): ubi_scan: process PEB 15
UBI DBG (pid 1): ubi_scan: process PEB 16
UBI DBG (pid 1): ubi_scan: process PEB 17
UBI DBG (pid 1): ubi_scan: process PEB 18
UBI DBG (pid 1): ubi_scan: process PEB 19
UBI DBG (pid 1): ubi_scan: process PEB 20
UBI DBG (pid 1): ubi_scan: process PEB 21
UBI DBG (pid 1): ubi_scan: process PEB 22
UBI DBG (pid 1): ubi_scan: process PEB 23
UBI DBG (pid 1): ubi_scan: process PEB 24
UBI DBG (pid 1): ubi_scan: process PEB 25
UBI DBG (pid 1): ubi_scan: process PEB 26
UBI DBG (pid 1): ubi_scan: process PEB 27
UBI DBG (pid 1): ubi_scan: process PEB 28
UBI DBG (pid 1): ubi_scan: process PEB 29
UBI DBG (pid 1): ubi_scan: process PEB 30
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
Erase counter header dump:
magic 0x55424923
version 1
ec 0
vid_hdr_offset 2048
data_offset 4096
hdr_crc 0x7fb7d50c
erase counter header hexdump:
00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 10 .
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .
[<c002400c>] (dump_stack+0x0/0x14) from [<c0198e0c>] (ubi_io_read_ec_hdr+0x2f8/)
[<c0198b14>] (ubi_io_read_ec_hdr+0x0/0x368) from [<c019bee8>] (ubi_scan+0x164/0)
[<c019bd84>] (ubi_scan+0x0/0x71c) from [<c0193360>] (ubi_attach_mtd_dev+0x580/0)
[<c0192de0>] (ubi_attach_mtd_dev+0x0/0xc74) from [<c00163cc>] (ubi_init+0x154/0)
[<c0016278>] (ubi_init+0x0/0x280) from [<c001f320>] (__exception_text_end+0x60/)
[<c001f2c0>] (__exception_text_end+0x0/0x190) from [<c000872c>] (kernel_init+0x)
r8:00000000 r7:00000000 r6:00000000 r5:c001ab84 r4:c001ab10
[<c00086bc>] (kernel_init+0x0/0xd8) from [<c003820c>] (do_exit+0x0/0x6cc)
r5:00000000 r4:00000000
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 30
UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
mtd_dataflash spi0.0: AT45DB642x (8448 KBytes) pagesize 1056 bytes (OTP)
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.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS784x Touchscreen as /class/input/input1
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
UBIFS DBG (pid 1): ubifs_get_sb: name ubi0:rootfs, flags 0x8000
UBI DBG (pid 1): ubi_open_volume_nm: open volume rootfs, mode 1
UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,255)
Please append a correct "root=" boot option; here are the available partitions:
1f00 256 mtdblock0 (driver?)
1f01 261888 mtdblock1 (driver?)
1f02 8448 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
mkfs.ubifs и ubinizе собраны из исходников git clone git://git.infradead.org/mtd-utils.git
В ядре включена поддержка UBI и файловой системы UBIFS.
Пожалуйста, подскажите, если кто решал уже эти проблемы) Спасибо.