ЗАО «ЗЭО»
Техническая поддержка пользователей => ОС Linux, U-Boot => Тема начата: QwerTech от 21 Августа, 2010, 13:24:11
-
2) КФС постоянно затирается, при перезагрузке, на дефолтную. КФС записанна во флэш. При установке использовал эту:uramdisk_bb1.8.2.gz Возможно ли как-то сохранять изменения?
> КФС постоянно затирается, при перезагрузке, на дефолтную. КФС записанна во флэш. При установке использовал эту:uramdisk_bb1.8.2.gz
Это и называется _ram_ disk
> Возможно ли как-то сохранять изменения?
Да, использовать как корень файловую систему jffs2 на /dev/mtdblock2
-
спасибо попробую
-
Попытался использовать jffs2. Делал по аналогии
setenv jffs_file rootfs.jffs2
setenv kern_file uImage
setenv kern_fladdr 60080000
setenv jffs_fladdr 60300000
setenv jffs_size 3d00000
setenv fileaddr 0
setenv serverip 10.42.42.1
setenv kern_flash 'tftpboot ${fileaddr} ${kern_file}; erase ${kern_fladdr} +${filesize}; cp.b ${fileaddr} ${kern_fladdr} ${filesize}'
setenv jffs_flash 'tftpboot ${fileaddr} ${jffs_file}; erase ${jffs_fladdr} +${jffs_size}; cp.b ${fileaddr} ${jffs_fladdr} ${filesize}'
setenv bootcmd 'bootm ${kern_fladdr}'
setenv reflash 'echo Re-flashing...; protect off all; run kern_flash; run jffs_flash; imls; echo Re-flash done'
setenv bootargs 'console=ttyAM0,57600n8 root=/dev/mtdblock2 rootfstype=jffs2'
в итоге
VFS: Unable to mount root fs via NFS, trying floppy.
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Подскажите, а надо ли предварительно создавать раздел с файловой системой jffs2? Или она там уже есть?
И еще не много не ясна фраза:
Значение переменной jffs_fladdr для Тион-Про2 3d00000, для Тион/Тион-Про 500000
Но ведь 3d00000 не лежит во flash? Или я совсем запутался?
-
В моём сообщении http://www.zao-zeo.ru/forum/index.php?topic=214.msg1046#msg1046
речь идёт о jffs_size, как видно по приведённому коду. Сообщение я исправил.
-
> Подскажите, а надо ли предварительно создавать раздел с файловой системой jffs2? Или она там уже есть?
Flash в Linux уже разделена на три раздела, файловую систему на третьем вы создадите записав образ ФС по адресу 60300000, предварительно стерев весь третий раздел размера jffs_size. Значения адресов, размеров, размеров стираемых блоков можно узнать в U-Boot по командам flinfo и mtdparts.
-
Не подскажете, где можно узнать как задавать соответствующий блок стирания? Или это необходимо для создания сборки КФС?
Вот что выдает mtdparts:
$ mtdparts
device nor0 <flash>, # parts = 3
#: name size offset mask_flags
0: u-boot 0x00080000 0x00000000 1
1: kernel 0x00280000 0x00080000 1
2: fs 0x03d00000 0x00300000 0
active partition: nor0,2 - (fs) 0x03d00000 @ 0x00300000
defaults:
mtdids : nor0=flash
mtdparts: mtdparts=flash:512k(u-boot)ro,2560k(kernel)ro,-(fs)
Вот так задан bootargs:
bootargs 'console=ttyAM0,57600n8 root=/dev/mtdblock2 rootfstype=jffs2 video=ep93xxfb:vout=1,vmode=16'
Соответствует ли второму разделу(fs) root=/dev/mtdblock2 ?
Если не затруднит, не подскажете как еще можно узнать почему не монтируется КФС?
-
> задавать соответствующий блок стирания?
Указывается при создании образа jffs2 при выполнении mkfs.jffs2
> Соответствует ли второму разделу(fs) root=/dev/mtdblock2 ?
Да
> Если не затруднит, не подскажете как еще можно узнать почему не монтируется КФС?
Сообщения какие?
-
VFS: Unable to mount root fs via NFS, trying floppy.
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
-
А до этих?
-
В U-Boot выполните ls, показывает список файлов?
-
$ ls
Scanning JFFS2 FS: ............... done.
drwxr-xr-x 0 Fri Nov 20 10:14:53 2009 Applications
drwxr-xr-x 0 Fri Nov 20 10:14:53 2009 Documents
-rw-r--r-- 135202 Fri Nov 20 06:51:31 2009 Noise.wav
drwxr-xr-x 0 Fri Nov 20 10:14:53 2009 Settings
drwxr-xr-x 0 Fri Nov 20 09:15:07 2009 bin
drwxr-xr-x 0 Fri Nov 20 07:21:49 2009 dev
drwxr-xr-x 0 Fri Nov 20 06:56:52 2009 etc
drwxr-xr-x 0 Fri Nov 20 06:55:46 2009 home
drwxr-xr-x 0 Fri Nov 20 10:14:53 2009 lib
lrwxrwxrwx 11 Fri Nov 20 09:15:07 2009 linuxrc -> bin/busybox
drwxr-xr-x 0 Fri Nov 20 06:55:46 2009 media
drwxr-xr-x 0 Wed Jan 21 21:30:34 1998 mnt
drwxr-xr-x 0 Fri Nov 20 10:14:53 2009 opt
dr-xr-xr-x 0 Wed Nov 03 00:54:07 1999 proc
drwxr-xr-x 0 Fri Nov 20 09:15:07 2009 sbin
drwxr-xr-x 0 Fri Nov 20 06:55:46 2009 sys
drwxr-xr-t 0 Thu Jun 29 23:20:38 2000 tmp
drwxr-xr-x 0 Fri Nov 20 07:03:36 2009 usr
drwxr-xr-x 0 Wed Nov 08 21:04:25 2006 var
Неужели так должно быть?
использовал вот эту КФС rootfs_crater_svn819_tion-pro2.jffs2 13369344 2010/01/31 19:20.
-
> Неужели так должно быть?
Да, теперь -- лог загрузки ядра.
-
U-Boot 1.3.3-svn894 (Mar 5 2010 - 12:14:38)
CPU: Cirrus Logic EP9315 rev. E2
DRAM: 64 MB
Flash: 64 MB
Hit any key to stop autoboot: 0
## Booting kernel from Legacy Image at 60080000 ...
Image Name: Linux-2.6.20.4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1806988 Bytes = 1.7 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux...................................................................
................................................. done, booting the kernel.
Linux version 2.6.20.4 (asv@asv) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #3
PREEMPT Mon Apr 27 17:20:07 MSD 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Tion-Pro2 Board
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists. Total pages: 16192
Kernel command line: console=ttyAM0,57600n8 root=/dev/nor0,2 rootfstype=jffs2 video=ep
93xxfb:vout=1,vmode=16
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 32MB 32MB = 64MB total
Memory: 61084KB available (3328K code, 338K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
ep93xx: PLL1 running at 399 MHz, PLL2 at 192 MHz
ep93xx: FCLK 199 MHz, HCLK 99 MHz, PCLK 49 MHz
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: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (extended precision)
audit: initializing netlink socket (disabled)
audit(0.390:1): initialized
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
io scheduler anticipatory registered
ep93xxfb_get_par: VGA 640x480
Console: switching to colour frame buffer device 80x30
fb0: EP93xx frame buffer at 640x480x16bpp
ep93xx_wdt: EP93XX watchdog, driver version 0.3
Serial: AMBA driver $Revision: 1.41 $
RS485 hardware flow control on 3rd serial port
apb:uart1: ttyAM0 at MMIO 0x808c0000 (irq = 52) is a AMBA
apb:uart2: ttyAM1 at MMIO 0x808d0000 (irq = 54) is a AMBA
apb:uart3: ttyAM2 at MMIO 0x808e0000 (irq = 55) is a AMBA
RAMDISK: wrong blocksize 8096, reverting to defaults
RAMDISK driver initialized: 2 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
Cirrus Logic EP93XX IDE initialization.
physmap platform flash device: 02000000 at 60000000
physmap-flash.0: Found 2 x16 devices at 0x0 in 32-bit bank
NOR chip too large to fit in mapping. Attempting to cope...
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Reducing visibility of 65536KiB chip to 32768KiB
cmdlinepart partition parsing not available
RedBoot partition parsing not available
edb93xxflash: probe of edb93xxflash.0 failed with error -16
ep93xx-spi ep93xx-spi.1: SPI Controller initialized
ep93xx-usb ep93xx-usb: EP93xx OHCI
ep93xx-usb ep93xx-usb: new USB bus registered, assigned bus number 1
ep93xx-usb ep93xx-usb: irq 56, io mem 0x80020000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usb 1-1: new low speed USB device using ep93xx-usb and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-2: new low speed USB device using ep93xx-usb and address 3
usb 1-2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver hiddev
input: USB Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [ USB Keyboard] on usb-ep93xx-1
input: USB Keyboard as /class/input/input1
input: USB HID v1.10 Device [ USB Keyboard] on usb-ep93xx-1
input: MLK Defender 2.4GHz Nano mouse as /class/input/input2
input,hiddev96: USB HID v1.10 Mouse [MLK Defender 2.4GHz Nano mouse] on usb-ep93xx-2
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Dev
ice
usbcore: registered new interface driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
m41t00 0-0068: rtc core: registered m41t00 as rtc0
mmc_spi spi1.1: ASSUMING 3.2-3.4 V slot power
mmc_spi spi1.1: SD/MMC host mmc0, no DMA, no WP, no poweroff
mmc_spi spi1.1: setup unsupported mode bits 4
mmc_spi spi1.1: can't change chip-select polarity
mmc0: error -22 whilst initialising SDIO card
Registered led device: ep93xx:green
Registered led device: ep93xx:red
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
m41t00 0-0068: setting the system clock to 2010-07-16 10:11:58 (1279275118)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
-
> Kernel command line: console=ttyAM0,57600n8 root=/dev/nor0,2 rootfstype=jffs2
> root=/dev/nor0,2
Что это?
-
Простите пожалуйста, это я пытался попробовать разные варианты. И на правильный вариант, перед отправкой вам, забыл исправить.
такое чувство, что он эту строку не видит.
Вот исправленный лог:
U-Boot 1.3.3-svn894 (Mar 5 2010 - 12:14:38)
CPU: Cirrus Logic EP9315 rev. E2
DRAM: 64 MB
Flash: 64 MB
Hit any key to stop autoboot: 0
## Booting kernel from Legacy Image at 60080000 ...
Image Name: Linux-2.6.20.4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1806988 Bytes = 1.7 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux...................................................................
................................................. done, booting the kernel.
Linux version 2.6.20.4 (asv@asv) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #3
PREEMPT Mon Apr 27 17:20:07 MSD 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Tion-Pro2 Board
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists. Total pages: 16192
Kernel command line: console=ttyAM0,57600n8 root=/dev/mtdblock2 rootfstype=jffs2 video
=ep93xxfb:vout=1,vmode=16
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 32MB 32MB = 64MB total
Memory: 61084KB available (3328K code, 338K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
ep93xx: PLL1 running at 399 MHz, PLL2 at 192 MHz
ep93xx: FCLK 199 MHz, HCLK 99 MHz, PCLK 49 MHz
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: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (extended precision)
audit: initializing netlink socket (disabled)
audit(0.390:1): initialized
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
io scheduler anticipatory registered
ep93xxfb_get_par: VGA 640x480
Console: switching to colour frame buffer device 80x30
fb0: EP93xx frame buffer at 640x480x16bpp
ep93xx_wdt: EP93XX watchdog, driver version 0.3
Serial: AMBA driver $Revision: 1.41 $
RS485 hardware flow control on 3rd serial port
apb:uart1: ttyAM0 at MMIO 0x808c0000 (irq = 52) is a AMBA
apb:uart2: ttyAM1 at MMIO 0x808d0000 (irq = 54) is a AMBA
apb:uart3: ttyAM2 at MMIO 0x808e0000 (irq = 55) is a AMBA
RAMDISK: wrong blocksize 8096, reverting to defaults
RAMDISK driver initialized: 2 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
Cirrus Logic EP93XX IDE initialization.
physmap platform flash device: 02000000 at 60000000
physmap-flash.0: Found 2 x16 devices at 0x0 in 32-bit bank
NOR chip too large to fit in mapping. Attempting to cope...
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Reducing visibility of 65536KiB chip to 32768KiB
cmdlinepart partition parsing not available
RedBoot partition parsing not available
edb93xxflash: probe of edb93xxflash.0 failed with error -16
ep93xx-spi ep93xx-spi.1: SPI Controller initialized
ep93xx-usb ep93xx-usb: EP93xx OHCI
ep93xx-usb ep93xx-usb: new USB bus registered, assigned bus number 1
ep93xx-usb ep93xx-usb: irq 56, io mem 0x80020000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usb 1-1: new low speed USB device using ep93xx-usb and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-2: new low speed USB device using ep93xx-usb and address 3
usb 1-2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver hiddev
input: USB Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [ USB Keyboard] on usb-ep93xx-1
input: USB Keyboard as /class/input/input1
input: USB HID v1.10 Device [ USB Keyboard] on usb-ep93xx-1
input: MLK Defender 2.4GHz Nano mouse as /class/input/input2
input,hiddev96: USB HID v1.10 Mouse [MLK Defender 2.4GHz Nano mouse] on usb-ep93xx-2
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Dev
ice
usbcore: registered new interface driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
m41t00 0-0068: rtc core: registered m41t00 as rtc0
mmc_spi spi1.1: ASSUMING 3.2-3.4 V slot power
mmc_spi spi1.1: SD/MMC host mmc0, no DMA, no WP, no poweroff
mmc_spi spi1.1: setup unsupported mode bits 4
mmc_spi spi1.1: can't change chip-select polarity
mmc0: error -22 whilst initialising SDIO card
Registered led device: ep93xx:green
Registered led device: ep93xx:red
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
m41t00 0-0068: setting the system clock to 2010-07-16 11:21:27 (1279279287)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
-
Так как не видно сообщений о разделах, то видимо ядро довольно старое. У вас ФС из Crater c OABI, поэтому запишите с помощью U-Boot вот это ядро
http://www.zao-zeo.ru/media/files/linux/2.6.20/image/uImage-2.6.20.21_tion-pro2_svn787_oabi
-
physmap platform flash device: 03ff0000 at 60000000
physmap-flash.0: Found 2 x16 devices at 0x0 in 32-bit bank
NOR chip too large to fit in mapping. Attempting to cope...
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
Reducing visibility of 65536KiB chip to 65472KiB
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00080000 : "bootloader"
0x00080000-0x00300000 : "kernel"
0x00300000-0x03fc0000 : "rootfs"
Вот эти разделы: bootloader, kernel, rootfs
-
Ядро вот это uImage-2.6.20.4_tion-pro2 (1 807 052 байт) качал где-то 1го августа.
Спасибо попробую вечером.
-
Большое спасибо. Все заработало. Теперь буду разбираться с третьей темой про мышь.