Ник:
Пароль:

Контакты

Cтатус Skype: starterkit.ru
тел.: (+7 3412) 478-448
тел.: +7 922 680-21-73
тел.: +7 922 680-21-74
E-mail: info@starterkit.ru
Партнеры:
otladka.com.ua - г.Киев

Способы оплаты

User Info


Добро пожаловать,
Guest

Регистрация или входРегистрация или вход
Потеряли пароль?Потеряли пароль?

Ник:
Пароль:

ПользователейПользователей:0
Поисковых ботовПоисковых ботов:2
ГостейГостей:1

ОбновитьПодробнееВсегоВсего:3
Форум » starterkit.ru » Embedded Linux
kernel panic при попытке монтирования флеш-памяти
Romantic
Добавлено 10.07.2014 16:30
0
Сообщение: 1
Romantic
3

Пункты: 2111
Регистрация: 20.11.2009
Пол: Мужчина
Приветствую, уважаемые эксперты.
Может, сможете полечить по фотографии:
Я экспериментирую с гигабитной флешкой - аналогом micron N25Q00AA, подключена через разъем к spi платы AT91SAM9G45-XC6SLX. Пришлось долго искать, в какой версии ядра есть поддержка этой памяти и оказалось, что ни в одном официальном ядре с kernel.org ее нет и в помине, в самых последних появилась поддержка только вроде 250-мегабитных этойлинейки. Однако нашел на гите xilinx-овское ядро, в котором жэта поддержка есть. Добавил в bsp код для инициализации жэтой памяти и создания двух разделов, подключил mtd в ядре и mtd-utils в билдруте. В результате ядро загружается, обнаруживает флешку и создает символные и блочные устройства, и даже flash_erase успешно форматирует флешку.

А дальше возникла проблема: пытаюсь смонтировать раздел флешки как диск с jffs2, и mount приводит к kernel panic, судя по стеку сбой в обработчике прерывания.

Подскажите, в к4аком направлении копать?


Цитата

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.14.0+ (michael@mmsj-ws-vubuntu1404) (gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-33) ) #13 Wed Jul 2 16:47:06 MSK 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Statrerkit AT91SAM9G45-XC6SLX
Ignoring tag cmdline (using the default kernel command line)
Memory policy: Data cache writeback
AT91: Detected soc type: at91sam9g45
AT91: Detected soc subtype: Unknown
AT91: sram at 0x300000 of 0x10000 mapped at 0xfef68000
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 root=/dev/ram0 rw
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 56856K/65536K available (3435K kernel code, 186K rwdata, 1028K rodata, 3282K init, 104K bss, 8680K reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc4800000 - 0xff000000 ( 936 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc04640ac (4465 kB)
.init : 0xc0465000 - 0xc0799854 (3283 kB)
.data : 0xc079a000 - 0xc07c89c0 ( 187 kB)
.bss : 0xc07c89c0 - 0xc07e2a64 ( 105 kB)
NR_IRQS:16 nr_irqs:16 16
AT91: 160 gpio irqs in 5 banks
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836480000000ns
Console: colour dummy device 80x30
Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x70340f00 - 0x70340f58
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
AT91: Power Management (with slow clock mode)
AT91: Starting after power-restored wakeup
bio: create slab <bio-0> at 0
at_hdmac at91sam9g45_dma: Atmel AHB DMA Controller ( cpy slave ), 8 channels
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c-gpio i2c-gpio.0: using pins 20 (SDA) and 21 (SCL)
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
futex hash table entries: 256 (order: -1, 3072 bytes)
jffs2: version 2.2. (NAND) (SUMMARY) б&#9560; 2001-2006 Red Hat, Inc.
msgmni has been set to 111
io scheduler noop registered (default)
atmel_usart.0: ttyS0 at MMIO 0xffffee00 (irq = 17, base_baud = 8333333) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart.1: ttyS1 at MMIO 0xfff8c000 (irq = 23, base_baud = 8333333) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfff90000 (irq = 24, base_baud = 8333333) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
atmel_nand atmel_nand: Use On Flash BBT
atmel_nand atmel_nand: No DMA support for NAND access.
nand: No NAND device found
atmel_spi atmel_spi.0: version: 0x210
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 30)
m25p80 spi0.0: found n25q00aa13, expected m25p128
m25p80 spi0.0: n25q00aa13 (131072 Kbytes)
Creating 2 MTD partitions on "spi_flash":
0x000000000000-0x000006000000 : "rootfs"
0x000006000000-0x000008000000 : "config"
macb macb (unregistered net_device): invalid hw address, using random
libphy: MACB_mii_bus: probed
macb macb eth0: Cadence MACB at 0xfffbc000 irq 41 (c6:21:d9:cb:79:f1)
macb macb eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=macb-ffffffff:01, irq=-1)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci atmel-ehci: EHCI Host Controller
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 38, io mem 0x00800000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 3.14.0+ ehci_hcd
usb usb1: SerialNumber: atmel-ehci
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci at91_ohci: can't request vbus gpio 0
at91_ohci at91_ohci: OHCI Host Controller
at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
at91_ohci at91_ohci: irq 38, io mem 0x00700000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OHCI Host Controller
usb usb2: Manufacturer: Linux 3.14.0+ ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xfff78000 mapped at c48a6000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00600000 mapped at c4900000
using random self ethernet address
using random host ethernet address
using random self ethernet address
using random host ethernet address
usb0: HOST MAC be:a0:2c:0e:cd:8d
usb0: MAC a6:a7:e9:94:b5:9c
Number of LUNs=8
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
Number of LUNs=1
no file given for LUN0
g_multi atmel_usba_udc: failed to start g_multi: -22
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
at91_rtc at91_rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
at91_rtc at91_rtc: setting system clock to 2007-01-01 00:00:05 UTC (1167609605)
atmel_mci atmel_mci.0: version: 0x410
atmel_mci atmel_mci.0: using dma0chan0 for DMA transfers
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff80000 irq 27, 1 slots
atmel_mci atmel_mci.1: version: 0x410
atmel_mci atmel_mci.1: using dma0chan1 for DMA transfers
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 45, 1 slots
ALSA device list:
No soundcards found.
Freeing unused kernel memory: 3280K (c0465000 - c0799000)
Starting logging: OK
Initializing random number generator... random: dd urandom read with 2 bits of entropy available
done.
Starting network...

Welcome to Buildroot
sk-at91sam9g45-xc6slx login: root
# mtdinfo /dev/mtd0
mtd0
Name: rootfs
Type: nor
Eraseblock size: 4096 bytes, 4.0 KiB
Amount of eraseblocks: 24576 (100663296 bytes, 96.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:0
Bad blocks are allowed: false
Device is writable: true

# mtdinfo /dev/mtd1
mtd1
Name: config
Type: nor
Eraseblock size: 4096 bytes, 4.0 KiB
Amount of eraseblocks: 8192 (33554432 bytes, 32.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:2
Bad blocks are allowed: false
Device is writable: true

# mkdir /mnt/config
# mount -t jffs2 /dev/mtdblock1 /mnt/config
random: nonblocking pool is initialized
------------[ cut here ]------------
WARNING: CPU: 0 PID: 363 at kernel/workqueue.c:1387 __queue_work+0x160/0x1f4()
workqueue: per-cpu pwq for events on cpu0 has 0 refcnt
Modules linked in:
CPU: 0 PID: 363 Comm: spi0 Not tainted 3.14.0+ #13
[<c000d66c>] (unwind_backtrace) from [<c000bc54>] (show_stack+0x10/0x14)
[<c000bc54>] (show_stack) from [<c0016074>] (warn_slowpath_common+0x60/0x80)
[<c0016074>] (warn_slowpath_common) from [<c00160c0>] (warn_slowpath_fmt+0x2c/0x3c)
[<c00160c0>] (warn_slowpath_fmt) from [<c002663c>] (__queue_work+0x160/0x1f4)
[<c002663c>] (__queue_work) from [<c001e034>] (call_timer_fn.isra.41+0x20/0x84)
[<c001e034>] (call_timer_fn.isra.41) from [<c001e1f0>] (run_timer_softirq+0x158/0x1a4)
[<c001e1f0>] (run_timer_softirq) from [<c0019284>] (__do_softirq+0xd4/0x208)
[<c0019284>] (__do_softirq) from [<c00195ec>] (irq_exit+0x80/0xa8)
[<c00195ec>] (irq_exit) from [<c0009df0>] (handle_IRQ+0x64/0x80)
[<c0009df0>] (handle_IRQ) from [<c000c680>] (__irq_svc+0x40/0x4c)
[<c000c680>] (__irq_svc) from [<c033e7dc>] (schedule_timeout+0xfc/0x12c)
[<c033e7dc>] (schedule_timeout) from [<c033f7c8>] (wait_for_common+0x130/0x168)
[<c033f7c8>] (wait_for_common) from [<c01e82f8>] (atmel_spi_transfer_one_message+0x718/0x9e0)
[<c01e82f8>] (atmel_spi_transfer_one_message) from [<c01e56c0>] (spi_pump_messages+0x148/0x170)
[<c01e56c0>] (spi_pump_messages) from [<c002c480>] (kthread_worker_fn+0xa8/0x13c)
[<c002c480>] (kthread_worker_fn) from [<c002c5d4>] (kthread+0xc0/0xd4)
[<c002c5d4>] (kthread) from [<c00095b0>] (ret_from_fork+0x14/0x24)
---[ end trace 53dd79622e4ef90a ]---
Unable to handle kernel paging request at virtual address fffffffe
pgd = c2ecc000
[fffffffe] *pgd=73ffd831, *pte=00000000, *ppte=00000000
Internal error: Oops: 801 [#1] ARM
Modules linked in:
CPU: 0 PID: 363 Comm: spi0 Tainted: G W 3.14.0+ #13
task: c38cc340 ti: c2df0000 task.ti: c2df0000
PC is at insert_work+0x64/0xcc
LR is at __queue_work+0x1d0/0x1f4
pc : [<c0026474>] lr : [<c00266ac>] psr: 00000093
sp : c2df1d28 ip : 40000093 fp : 00208040
r10: c07c9384 r9 : c3f71407 r8 : c07c88b6
r7 : 00000000 r6 : c3f71458 r5 : c07adb14 r4 : c3f71400
r3 : fffffffe r2 : c3f71458 r1 : c07adb18 r0 : c3f71400
Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 72ecc000 DAC: 00000017
Process spi0 (pid: 363, stack limit = 0xc2df01c0)
Stack: (0xc2df1d28 to 0xc2df2000)
1d20: 00000002 c3f71400 c3806720 c07adb14 00000000 c07c88b6
1d40: c07c9360 c00266ac 00000000 c3806720 00000100 c2df0000 c2df0028 00200200
1d60: c0026a1c c001e034 c0026a1c c07adb14 c07c94c0 c2df1d88 c07ab470 00200200
1d80: 00000000 c001e1f0 c2df1d88 c2df1d88 00000002 c2df0028 c2df0000 c07c9380
1da0: 00000100 c0019284 00014200 00000001 c07c88f1 00000001 40000001 0000000a
1dc0: ffffa62d 00000002 00000000 00000022 c07b11bc 00000000 c2df1e3c c07ab470
1de0: 00000000 00989680 c3924990 c00195ec 00000022 c0009df0 c033e7dc 20000013
1e00: ffffffff c000c680 c07c9948 c2df1e54 00001bbf a0000013 ffffa68f c2df1e54
1e20: c07c94c0 c07c94c0 c07ab470 00000000 00989680 c3924990 ffffa62c c2df1e50
1e40: c001db4c c033e7dc 20000013 ffffffff a0000013 c07c9948 c07c9948 ffffa68f
1e60: c07c94c0 c001d9a0 c38cc340 ffffffff 00000001 c39249b4 00000064 00000002
1e80: c2df0000 00000000 00000000 c033f7c8 00000001 00000001 c38cc340 c0031af0
1ea0: c39249b8 c39249b8 c2df1efc c2eb5c0c c3924990 c2eb5bb8 c3924990 c3924800
1ec0: 00000001 c01e82f8 c2df1ef4 00000000 00000000 07f28155 00000001 c38cc340
1ee0: c07ac170 c2dd0800 c2dd0800 00000001 c38cc340 00000001 72df2000 73864821
1f00: c38cc340 c07ac170 c2eb401c c38cc340 00000015 c2df0000 ffffffff c38cc340
1f20: c07ac170 c3924934 c3924800 c2df0018 c07d09a8 00000001 00000000 00000000
1f40: 00000000 c01e56c0 c3924920 c2df0000 c2df0018 c002c480 c2df7660 00000000
1f60: c3924920 c002c3d8 00000000 c002c5d4 0000000d 00000000 c2ddc900 c3924920
1f80: 00000000 c2df1f84 c2df1f84 00000000 c2df1f90 c2df1f90 c2df1fac c2df7660
1fa0: c002c514 00000000 00000000 c00095b0 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 efd37fbf 7df767cf
[<c0026474>] (insert_work) from [<c00266ac>] (__queue_work+0x1d0/0x1f4)
[<c00266ac>] (__queue_work) from [<c001e034>] (call_timer_fn.isra.41+0x20/0x84)
[<c001e034>] (call_timer_fn.isra.41) from [<c001e1f0>] (run_timer_softirq+0x158/0x1a4)
[<c001e1f0>] (run_timer_softirq) from [<c0019284>] (__do_softirq+0xd4/0x208)
[<c0019284>] (__do_softirq) from [<c00195ec>] (irq_exit+0x80/0xa8)
[<c00195ec>] (irq_exit) from [<c0009df0>] (handle_IRQ+0x64/0x80)
[<c0009df0>] (handle_IRQ) from [<c000c680>] (__irq_svc+0x40/0x4c)
[<c000c680>] (__irq_svc) from [<c033e7dc>] (schedule_timeout+0xfc/0x12c)
[<c033e7dc>] (schedule_timeout) from [<c033f7c8>] (wait_for_common+0x130/0x168)
[<c033f7c8>] (wait_for_common) from [<c01e82f8>] (atmel_spi_transfer_one_message+0x718/0x9e0)
[<c01e82f8>] (atmel_spi_transfer_one_message) from [<c01e56c0>] (spi_pump_messages+0x148/0x170)
[<c01e56c0>] (spi_pump_messages) from [<c002c480>] (kthread_worker_fn+0xa8/0x13c)
[<c002c480>] (kthread_worker_fn) from [<c002c5d4>] (kthread+0xc0/0xd4)
[<c002c5d4>] (kthread) from [<c00095b0>] (ret_from_fork+0x14/0x24)
Code: e5963004 e5861004 e5856004 e5853008 (e5831000)
---[ end trace 53dd79622e4ef90b ]---
Kernel panic - not syncing: Fatal exception in interrupt
Спуститься к концу Подняться к началу
Персональная информация
sasamy
Добавлено 10.07.2014 17:56 Сообщение: 2
sasamy
4.77

Пункты: 63534
Регистрация: 14.08.2009
Для начала ФС нужно создать - потом монтировать, посмотрите например тут
http://www.denx.de/wiki/view/DULG/RootFileSystemOnAJFFS2FileSystem
Спуститься к концу Подняться к началу
Персональная информация
Romantic
Добавлено 10.07.2014 19:05 Сообщение: 3
Romantic
3

Пункты: 2111
Регистрация: 20.11.2009
Пол: Мужчина
Спасибо за совет, я пока не пробовал создавать образ. Раньше всегда прокатывало просто монтирование чистой флешки и автоматически получался пустой раздел. К тому же, mkfs.jffs2 для таргета и не собиравется почему-то, наверное, хостовая утилита тоже должна подойти.
Цитата
Для начала ФС нужно создать - потом монтировать, посмотрите например тут
http://www.denx.de/wiki/view/DULG/RootFileSystemOnAJFFS2FileSystem

У меня нет U-boot, есть bootstrap, а из линукса как развернуть образ диска на флешку? Копировать файл образа на /dev/mtd или на /dev/mtdblock? И копировать можно командой cp или dd?
Спуститься к концу Подняться к началу
Персональная информация
sasamy
Добавлено 10.07.2014 20:16 Редактировалось 10.07.2014 20:16 Сообщение: 4
sasamy
4.77

Пункты: 63534
Регистрация: 14.08.2009
С jjfs2 тоже не имел дела, у техаса в вики много информации

http://processors.wiki.ti.com/index.php/Put_JFFS2_Image_to_Flash

можно просто отформатиолвать из Linux оказывается и на целевой платформе - достаточно стереть флеш с параметром -j

Цитата

target$ flash_eraseall -j /dev/mtd3

Here we use the -j option to tell the flash_eraseall command to format the device for jffs2.


соответственно для 1 раздела как вы пытались сделать надо сначала отформатировать

flash_eraseall -j /dev/mtd1
Спуститься к концу Подняться к началу
Персональная информация
Romantic
Добавлено 10.07.2014 20:26 Сообщение: 5
Romantic
3

Пункты: 2111
Регистрация: 20.11.2009
Пол: Мужчина
Цитата

для 1 раздела как вы пытались сделать надо сначала отформатировать

flash_eraseall -j /dev/mtd1


Это я так и делал, просто команду выполнял раньше, она не попала в сеанс консоли
Спуститься к концу Подняться к началу
Персональная информация
Romantic
Добавлено 14.07.2014 14:46 Сообщение: 6
Romantic
3

Пункты: 2111
Регистрация: 20.11.2009
Пол: Мужчина
Я тут попробовал поэкспериментировать с параметрами микросхемы в реализации драйвера m25p80, а конкретно - убрал у этой микросхемы в списке параметров флаг M25P80_QUAD_READ, вроде этот процессор не поддерживает такой режим. Монтирование по-прежнему не работает, но сбой другой:
Цитата

------------[ cut here ]------------
WARNING: CPU: 0 PID: 466 at kernel/workqueue.c:1387 __queue_work+0x160/0x1f4()
workqueue: per-cpu pwq for events_power_efficient on cpu0 has 0 refcnt
Modules linked in:
CPU: 0 PID: 466 Comm: mount Not tainted 3.14.0+ #19
[<c000d66c>] (unwind_backtrace) from [<c000bc54>] (show_stack+0x10/0x14)
[<c000bc54>] (show_stack) from [<c0016074>] (warn_slowpath_common+0x60/0x80)
[<c0016074>] (warn_slowpath_common) from [<c00160c0>] (warn_slowpath_fmt+0x2c/0x3c)
[<c00160c0>] (warn_slowpath_fmt) from [<c002663c>] (__queue_work+0x160/0x1f4)
[<c002663c>] (__queue_work) from [<c001e034>] (call_timer_fn.isra.41+0x20/0x84)
[<c001e034>] (call_timer_fn.isra.41) from [<c001e1f0>] (run_timer_softirq+0x158/0x1a4)
[<c001e1f0>] (run_timer_softirq) from [<c0019284>] (__do_softirq+0xd4/0x208)
[<c0019284>] (__do_softirq) from [<c00195ec>] (irq_exit+0x80/0xa8)
[<c00195ec>] (irq_exit) from [<c0009df0>] (handle_IRQ+0x64/0x80)
[<c0009df0>] (handle_IRQ) from [<c000c680>] (__irq_svc+0x40/0x4c)
[<c000c680>] (__irq_svc) from [<c01e6428>] (spi_async_locked+0x40/0x44)
[<c01e6428>] (spi_async_locked) from [<c01e6484>] (spi_sync+0x58/0x90)
[<c01e6484>] (spi_sync) from [<c01e65b8>] (spi_write_then_read+0xfc/0x158)
[<c01e65b8>] (spi_write_then_read) from [<c01ca468>] (wait_till_ready+0x68/0xc4)
[<c01ca468>] (wait_till_ready) from [<c01cbb18>] (write_ear+0x14/0x144)
[<c01cbb18>] (write_ear) from [<c01cc064>] (m25p80_read_ext+0xd4/0x144)
[<c01cc064>] (m25p80_read_ext) from [<c01c548c>] (part_read+0x44/0x7c)
[<c01c548c>] (part_read) from [<c01c3314>] (mtd_read+0x78/0xb0)
[<c01c3314>] (mtd_read) from [<c00f7f30>] (jffs2_fill_scan_buf+0x24/0x44)
[<c00f7f30>] (jffs2_fill_scan_buf) from [<c00f8530>] (jffs2_scan_medium+0x3f0/0x12d0)
[<c00f8530>] (jffs2_scan_medium) from [<c00fb1a0>] (jffs2_do_mount_fs+0x16c/0x594)
[<c00fb1a0>] (jffs2_do_mount_fs) from [<c00fd2ec>] (jffs2_do_fill_super+0x16c/0x258)
[<c00fd2ec>] (jffs2_do_fill_super) from [<c01c3918>] (mount_mtd_aux.isra.0+0x50/0xb0)
[<c01c3918>] (mount_mtd_aux.isra.0) from [<c01c3a7c>] (mount_mtd+0x104/0x13c)
[<c01c3a7c>] (mount_mtd) from [<c00fd4d4>] (jffs2_mount+0x10/0x1c)
[<c00fd4d4>] (jffs2_mount) from [<c007d5f4>] (mount_fs+0x10/0xc0)
[<c007d5f4>] (mount_fs) from [<c0091348>] (vfs_kern_mount+0x48/0xd4)
[<c0091348>] (vfs_kern_mount) from [<c00936d0>] (do_mount+0x730/0x834)
[<c00936d0>] (do_mount) from [<c00939f0>] (SyS_mount+0x84/0xb8)
[<c00939f0>] (SyS_mount) from [<c0009520>] (ret_fast_syscall+0x0/0x2c)
---[ end trace ab4e15836bfd1334 ]---
Unable to handle kernel paging request at virtual address fffffffe
pgd = c2d40000
[fffffffe] *pgd=73ffd831, *pte=00000000, *ppte=00000000
Internal error: Oops: 801 [#1] ARM
Modules linked in:
CPU: 0 PID: 466 Comm: mount Tainted: G W 3.14.0+ #19
task: c38ce9a0 ti: c2dec000 task.ti: c2dec000
PC is at insert_work+0x64/0xcc
LR is at __queue_work+0x1d0/0x1f4
pc : [<c0026474>] lr : [<c00266ac>] psr: 00000093
sp : c2deda78 ip : 40000093 fp : 00400100
r10: c0779384 r9 : c3f71807 r8 : c07788b6
r7 : 00000000 r6 : c3f71858 r5 : c0777038 r4 : c3f71800
r3 : fffffffe r2 : c3f71858 r1 : c077703c r0 : c3f71800
Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 72d40000 DAC: 00000015
Process mount (pid: 466, stack limit = 0xc2dec1c0)
Stack: (0xc2deda78 to 0xc2dee000)
da60: 00000002 c3f71800
da80: c3847e00 c0777038 00000000 c07788b6 c0779360 c00266ac 00000000 c3847e00
daa0: 00000100 c2dec000 c2dec038 00200200 c0026a1c c001e034 c0026a1c c0777038
dac0: c07794c0 c2dedad8 c075b470 00200200 00000000 c001e1f0 c2dedad8 c2dedad8
dae0: 00000002 c2dec038 c2dec000 c0779380 00000100 c0019284 00014200 00000001
db00: c07788f1 00000001 40000001 0000000a ffffa1a1 00000002 00000000 00000022
db20: c07611bc 00000000 c2dedb8c c2cff800 c2dedc7e c3924414 c3924410 c00195ec
db40: 00000022 c0009df0 c01e6428 60000013 ffffffff c000c680 00000000 c38cc050
db60: 00000001 c01e56e8 60000013 c2cff800 c2dedbd8 c3924900 c2cff800 c2dedc7e
db80: c3924414 c3924410 c38cc050 c2dedba0 c0034974 c01e6428 60000013 ffffffff
dba0: c2dedbd8 c2dedbb4 c2cff800 c01e6484 c3864820 00000000 c2dedbb8 c2dedbb8
dbc0: c2cff800 c3864820 c3864821 00000001 c2dedc7f c01e65b8 c2dedc24 c2dedc48
dbe0: c2cff800 00000000 c01e54e4 c2dedbb4 00000002 00000000 ffffff8d c392494c
dc00: c392494c 00000000 c3864820 00000000 00000001 00000000 00000000 00000802
dc20: 00e4e1c0 c2dedc48 c2dedbd8 00000000 c3864821 00000001 00000000 00000000
dc40: 00000810 00e4e1c0 c2dedbd8 c2dedc24 00000001 c3924410 00005d1f c075b470
dc60: 07812000 c2dedd3c 00000000 c01ca468 00000001 07812000 07812000 0070e000
dc80: c3924420 07812000 c3924410 c01cbb18 0000000e 0000000e 00000000 c2dedc9c
dca0: c2dedc9c 00000000 c2d124d0 00000000 00000006 72d124d0 ffffffff 00000802
dcc0: 00e4e1c0 c2dedce8 c2dedc78 00000000 c2e0aff8 00000008 ffffffff 72e0aff8
dce0: 00000810 00e4e1c0 c2dedc78 c2dedcc4 c3924420 07812000 c2cff000 00000100
dd00: c2dedd3c c01cc064 00000008 c2dedd3c c2e0aff8 00000000 c2dedd7c 00000000
dd20: 00000022 01000000 007ee000 07812000 00000000 c0009df0 c01c32cc 00000000
dd40: c07781f0 06000000 00000000 c2cff000 00000000 00000000 00000000 c2cff000
dd60: 00000100 c01c548c 00000100 c2deddd4 c2e0a000 00000000 007ee000 00000000
dd80: 02000000 00000000 00000100 c01c3314 00000100 c2deddd4 c2e0a000 00000000
dda0: 00000100 c2dbfe00 c49db3a8 00000008 00000000 c2e0a000 01812000 c00f7f30
ddc0: 00000100 c2deddd4 c2e0a000 c49db374 0181100c 00000000 01812000 c00f8530
dde0: 00000000 c2dede24 c2dede20 00000000 80002000 00001000 01812000 01812000
de00: c390e640 00000000 0004e3a8 c498d000 01811000 00001812 00000000 000000d0
de20: c2e0a000 00000000 00001000 20031985 0000000c c00764f8 c0780dec c2dbfe00
de40: 00000000 02000000 00001000 c00fd82c 01f00001 c2da1c40 00000000 c00fb1a0
de60: 60000013 c00fd82c 00000003 00000000 c2d53000 c2dbfe00 c2d53000 02000000
de80: 00001000 c00fd82c 01f00001 c00fd2ec 00008400 c2d53000 c2cff000 00008000
dea0: 00000000 c01c3918 c2cff000 00008000 00000000 c2da1c40 00008000 00000000
dec0: c0760114 c01c3a7c c00fd82c c381f578 c2da1c4f 000000d0 c2da1c40 c3817a60
dee0: c2da1c40 c0760114 00000000 c0760114 00008000 c00fd4d4 c00fd82c 00008000
df00: c2da1c40 c007d5f4 c0760114 00008000 c3817a60 c2da1c40 00008000 c0091348
df20: 00000020 00008000 c0760114 c2da1c80 c075b4b8 c00936d0 c38179d0 c342a980
df40: 0000000f 00000000 0000000f c0061388 0000000f 00000000 c2dae000 00008000
df60: be9b2e98 c0009684 c2dec000 00000000 00000000 c00939f0 00000000 16a660b8
df80: 00000001 c2da1c80 c2da1c40 00000000 00001000 00000000 be9b2b90 b6f9f4d0
dfa0: 00000015 c0009520 00000000 be9b2b90 be9b2e98 be9b2ea7 be9b2e92 00008000
dfc0: 00000000 be9b2b90 b6f9f4d0 00000015 00000000 00000000 b6fa4000 00000000
dfe0: b6f0e8c0 be9b2a88 00047640 b6f0e8d0 60000010 be9b2e98 00000000 00000000
[<c0026474>] (insert_work) from [<c00266ac>] (__queue_work+0x1d0/0x1f4)
[<c00266ac>] (__queue_work) from [<c001e034>] (call_timer_fn.isra.41+0x20/0x84)
[<c001e034>] (call_timer_fn.isra.41) from [<c001e1f0>] (run_timer_softirq+0x158/0x1a4)
[<c001e1f0>] (run_timer_softirq) from [<c0019284>] (__do_softirq+0xd4/0x208)
[<c0019284>] (__do_softirq) from [<c00195ec>] (irq_exit+0x80/0xa8)
[<c00195ec>] (irq_exit) from [<c0009df0>] (handle_IRQ+0x64/0x80)
[<c0009df0>] (handle_IRQ) from [<c000c680>] (__irq_svc+0x40/0x4c)
[<c000c680>] (__irq_svc) from [<c01e6428>] (spi_async_locked+0x40/0x44)
[<c01e6428>] (spi_async_locked) from [<c01e6484>] (spi_sync+0x58/0x90)
[<c01e6484>] (spi_sync) from [<c01e65b8>] (spi_write_then_read+0xfc/0x158)
[<c01e65b8>] (spi_write_then_read) from [<c01ca468>] (wait_till_ready+0x68/0xc4)
[<c01ca468>] (wait_till_ready) from [<c01cbb18>] (write_ear+0x14/0x144)
[<c01cbb18>] (write_ear) from [<c01cc064>] (m25p80_read_ext+0xd4/0x144)
[<c01cc064>] (m25p80_read_ext) from [<c01c548c>] (part_read+0x44/0x7c)
[<c01c548c>] (part_read) from [<c01c3314>] (mtd_read+0x78/0xb0)
[<c01c3314>] (mtd_read) from [<c00f7f30>] (jffs2_fill_scan_buf+0x24/0x44)
[<c00f7f30>] (jffs2_fill_scan_buf) from [<c00f8530>] (jffs2_scan_medium+0x3f0/0x12d0)
[<c00f8530>] (jffs2_scan_medium) from [<c00fb1a0>] (jffs2_do_mount_fs+0x16c/0x594)
[<c00fb1a0>] (jffs2_do_mount_fs) from [<c00fd2ec>] (jffs2_do_fill_super+0x16c/0x258)
[<c00fd2ec>] (jffs2_do_fill_super) from [<c01c3918>] (mount_mtd_aux.isra.0+0x50/0xb0)
[<c01c3918>] (mount_mtd_aux.isra.0) from [<c01c3a7c>] (mount_mtd+0x104/0x13c)
[<c01c3a7c>] (mount_mtd) from [<c00fd4d4>] (jffs2_mount+0x10/0x1c)
[<c00fd4d4>] (jffs2_mount) from [<c007d5f4>] (mount_fs+0x10/0xc0)
[<c007d5f4>] (mount_fs) from [<c0091348>] (vfs_kern_mount+0x48/0xd4)
[<c0091348>] (vfs_kern_mount) from [<c00936d0>] (do_mount+0x730/0x834)
[<c00936d0>] (do_mount) from [<c00939f0>] (SyS_mount+0x84/0xb8)
[<c00939f0>] (SyS_mount) from [<c0009520>] (ret_fast_syscall+0x0/0x2c)
Code: e5963004 e5861004 e5856004 e5853008 (e5831000)
---[ end trace ab4e15836bfd1335 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Спуститься к концу Подняться к началу
Персональная информация
Jury093
Добавлено 14.07.2014 16:22 Редактировалось 14.07.2014 19:16 Сообщение: 7
Jury093
4.58

Пункты: 54111
Регистрация: 25.05.2009
Пол: Мужчина
Из: Санкт-Петербург
Цитата
Я тут попробовал поэкспериментировать с параметрами микросхемы в реализации драйвера m25p80

распишите пошагово, что и как делали и место, где происходит сбой..
я за час с перекурами прикрутил к Холе:

Код
root@holapc:~# mount
/dev/root on / type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=123724k,nr_inodes=30931,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=24768k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=49520k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mtdblock0 on /mnt type jffs2 (rw,relatime)
root@holapc:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 7.9G 7.3G 233M 97% /
/dev/root 7.9G 7.3G 233M 97% /
devtmpfs 121M 0 121M 0% /dev
tmpfs 25M 180K 25M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 49M 0 49M 0% /run/shm
/dev/mmcblk0p1 32M 14M 19M 43% /boot
/dev/mtdblock0 8.0M 524K 7.5M 7% /mnt
root@holapc:~# ls -l /mnt/
total 123
-rw-r--r-- 1 root root 1024 Jul 14 12:04 mmc-dump.bin
-rw-r--r-- 1 root root 124626 Jul 14 15:52 strace_4.5.20-2.3_armel.deb
root@holapc:~# dmesg |grep spi
spi_imx imx6q-ecspi.3: probed
spi_imx imx6q-ecspi.0: probed
m25p80 spi3.0: at25df641 (8192 Kbytes)
Creating 1 MTD partitions on "spi_flash":
root@holapc:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00800000 00001000 "userspace"


из кривизны - в доке на флеш сказано о 4кб erasepage, а утилита заныла, что "меньше 8кб нельзя".. в целом, все работает - монтируется/пишет/стирает/читает..

опирался на:
http://armbedded.eu/node/175
http://processors.wiki.ti.com/index.php/Create_a_JFFS2_Target_Image
http://processors.wiki.ti.com/index.php/Put_JFFS2_Image_to_Flash

На любой вопрос есть любой ответ.
Спуститься к концу Подняться к началу
Персональная информация
Форум » starterkit.ru » Embedded Linux