Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: re: problem after booting ubifs on angstrom+at91sam9260ek
PostPosted: Sun Aug 23, 2009 2:49 am 
Offline

Joined: Fri May 22, 2009 1:49 am
Posts: 4
Hi,

I'm having trouble with ubifs on Angstrom.2007.12. When I make a jffs2 image from
the same rootfs I have no problems. I'm flashing the ubi image using SAMBA. When
I boot the ubi image I see these problems (otherwise the system seems functional):

1. After the "UBIFS: background thread "ubifs_bgt0_0" started, PID 331" message in
the kernel log there is a long delay before the udhcpc client runs, then...

2. The login prompt is never displayed. The following message is repeated over and over:

INIT: Id "S" respawning too fast: disabled for 5 minutes

3. I can log in via ssh but there is a difference in the file owner/group on /dev/ttyS0
between the jffs2 and ubifs images. Owner/group of ttyS0 on jffs2 image is root root,
but on the ubifs image I get:

root@tant-ipc3:~$ ls -l /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 Jan 1 00:00 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Jan 1 00:00 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Jan 1 00:00 /dev/ttyS2

From /var/log/messages:
8 tant-ipc3 auth.err getty: /dev/ttyS0: cannot open as standard input: Permission denied
8 tant-ipc3 auth.err getty: /dev/ttyS0: cannot open as standard input: Permission denied
8 tant-ipc3 auth.err getty: /dev/ttyS0: cannot open as standard input: Permission denied
8 tant-ipc3 auth.err getty: /dev/ttyS0: cannot open as standard input: Permission denied

I built the ubifs and ubi images manually (not from within OE) - could that be a difference?
Something to do with fakeroot?

My setup:

hardware: at91sam9260ek
OE branch: origin/org.openembedded.angstrom-2007.12-stable
distro: angstrom-2007.1
mtd-utils-native: 1.2.0 (built from stable/2009 branch)
kernel: 2.6.27, 2.6.27 from mtd site, 2.6.27.31, 2.6.30.5 - all have the same problem
bootargs: mem=64M console=ttyS0,115200 ubi.mtd=4,512 root=ubi0:rootfw
mkfs.ubifs: mkfs.ubifs -e 129024 -c 512 -m 2048 -x lzo -r myrootfs -o rootfs.ubifs -v
ubinize: ubinize -p 128KiB -m 2048 -s 512 -o rootfs.ubi ubifs.cfg -v
ubifs.cfg:

[ubifs]
mode=ubi
image=rootfs.ubifs
vol_id=0
vol_size=9324KiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

Sample kernel log:

Starting kernel ...

Uncompressing Linux.............................................................
Linux version 2.6.27.31 (paxton@gumstix) (gcc version 4.1.2) #1 Fri Aug 21 13:39
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c029e6b0, node_mem_map c02b0000
DMA zone: 16256 pages, LIFO batch:3
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 ubi.mtd=4,512 root=ubi0:rootfw
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: 62144KB available (2436K code, 163K data, 112K 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
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 121
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.0: Atmel SSC device at 0xc4860000 (irq 14)
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:25:5a:00:00:01)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-b)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 1012 at 0x07e80000
Creating 6 MTD partitions on "atmel_nand":
0x00000000-0x00020000 : "bootstrap"
0x00020000-0x00060000 : "u-boot"
0x00060000-0x001a0000 : "u-boot environment"
0x00200000-0x00400000 : "kernel"
0x00400000-0x00e00000 : "rootfs"
0x00e00000-0x10000000 : "general"
UBI: attaching mtd4 to ubi0
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: attached mtd4 to ubi0
UBI: MTD device name: "rootfs"
UBI: MTD device size: 10 MiB
UBI: number of good PEBs: 80
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 80
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 2/0
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
UBI: background thread "ubi_bgt0d" started, PID 304
mtd_dataflash spi0.1: AT45DB642x (8448 KBytes) pagesize 1056 bytes
ohci_hcd: 2006 August 04 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.
mice: PS/2 mouse device common for all mice
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
TCP cubic registered
NET: Registered protocol family 17
rtc-at91sam9 at91_rtt.0: setting system clock to 1970-01-01 03:20:06 UTC (12006)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 8128512 bytes (7938 KiB, 7 MiB, 63 LEBs)
UBIFS: journal size: 8773632 bytes (8568 KiB, 8 MiB, 68 LEBs)
UBIFS: default compressor: LZO
UBIFS: media format 4, latest format 4
UBIFS DBG (pid 1): mount_ubifs: compiled on: Aug 21 2009 at 13:29:18
UBIFS DBG (pid 1): mount_ubifs: min. I/O unit size: 2048 bytes
UBIFS DBG (pid 1): mount_ubifs: LEB size: 129024 bytes (126 KiB)
UBIFS DBG (pid 1): mount_ubifs: data journal heads: 1
UBIFS DBG (pid 1): mount_ubifs: UUID: 9AF0A069-A9CB-4A5A-86B8-C35
UBIFS DBG (pid 1): mount_ubifs: fast unmount: 0
UBIFS DBG (pid 1): mount_ubifs: big_lpt 0
UBIFS DBG (pid 1): mount_ubifs: log LEBs: 5 (3 - 7)
UBIFS DBG (pid 1): mount_ubifs: LPT area LEBs: 2 (8 - 9)
UBIFS DBG (pid 1): mount_ubifs: orphan area LEBs: 1 (10 - 10)
UBIFS DBG (pid 1): mount_ubifs: main area LEBs: 63 (11 - 73)
UBIFS DBG (pid 1): mount_ubifs: index LEBs: 2
UBIFS DBG (pid 1): mount_ubifs: total index bytes: 111368 (108 KiB, 0 MiB)
UBIFS DBG (pid 1): mount_ubifs: key hash type: 0
UBIFS DBG (pid 1): mount_ubifs: tree fanout: 8
UBIFS DBG (pid 1): mount_ubifs: reserved GC LEB: 53
UBIFS DBG (pid 1): mount_ubifs: first main LEB: 11
UBIFS DBG (pid 1): mount_ubifs: dead watermark: 2048
UBIFS DBG (pid 1): mount_ubifs: dark watermark: 6144
UBIFS DBG (pid 1): mount_ubifs: max. dark space: 387072 (378 KiB, 0 MiB)
UBIFS DBG (pid 1): mount_ubifs: maximum bud bytes: 8128512 (7938 KiB, 7 MiB)
UBIFS DBG (pid 1): mount_ubifs: BG commit bud bytes: 6604416 (6449 KiB, 6 MiB)
UBIFS DBG (pid 1): mount_ubifs: current bud bytes 106496 (104 KiB, 0 MiB)
UBIFS DBG (pid 1): mount_ubifs: max. seq. number: 5959
UBIFS DBG (pid 1): mount_ubifs: commit number: 11
VFS: Mounted root (ubifs filesystem).
Freeing init memory: 112K
UBIFS: background thread "ubifs_bgt0_0" started, PID 331
udhcpc[1433]: udhcpc (v1.2.1) started
udhcpc[1433]: Sending discover...
udhcpc[1433]: Sending discover...
eth0: link up (100/Full)
udhcpc[1433]: Sending discover...
udhcpc[1433]: Sending select for 10.1.2.149...
udhcpc[1433]: Lease of 10.1.2.149 obtained, lease time 345600
INIT: Entering runlevel: 5
Starting Dropbear SSH server: dropbear.
Starting Vixie-cron.
Starting ntpd: done
Starting syslogd/klogd: done
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: no more processes left in this runlevel
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes


Top
 Profile  
 
 Post subject: Re: re: problem after booting ubifs on angstrom+at91sam9260ek
PostPosted: Wed Sep 09, 2009 6:41 pm 
Offline

Joined: Sun May 20, 2007 5:11 am
Posts: 23
Location: Vancouver, BC, Canada
I seem to recall my RFS needed:
(in /dev)

mknod -m 660 console c 5 1
mknod -m 660 null c 1 3
mknod ttyS0 c 4 64
mknod ttyS1 c 4 65

And in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100

I dont think your problem is with UBIFS

But speaking of UBIFS, it looks like you got a lot further than I did. Can you help me out here ?
I build my image identical to yours, then I burn it:

./ubiformat /dev/mtd3 -f ../../../../../mtd-utils.x86/rootfs.ubi

make the control node:

mknod /dev/ubi_ctrl c 10 63 and try to attach it:

./ubiattach /dev/ubi_ctrl -m 3 -d 3

This fails. Were you able to attach the device or did you only try to mount via the kernel boot ? I am on a modified at91sam9260ek system, kernel 2.6.27 or 2.6.29.

Much appreciated

Gertjan


Top
 Profile  
 
 Post subject: Re: re: problem after booting ubifs on angstrom+at91sam9260ek
PostPosted: Sat Sep 19, 2009 12:50 am 
Offline

Joined: Fri May 22, 2009 1:49 am
Posts: 4
Problem was due to lack of fakeroot. I was creating the images from the command line using the mtd utils instead of from within the OE framework, which does all file manipulation in fakeroot, and something wasn't working right.

I'm using angstrom 2008 now from the stable/2009 branch, kernel 2.6.27 and/or 2.6.30.5.

Hmm, I did the attach during kernel boot and there were no problems (ubi at mtdblock5):

"bootargs=mem=64M console=ttyS0,115200 ubi.mtd=5,512 root=ubi0:myrootfs rootfstype=ubifs loglevel=8 rw" \


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron