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  [ 43 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: OpenEmbedded/Angstrom on 9G20?
PostPosted: Thu Mar 19, 2009 12:18 am 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
I'm able to build OE (Angstrom 2008.1) for the 9260 and using the cross tool chain from that, I've built a 2.6.27 kernel (kernel.org + patches from linux4sam) for the 9G20. My presumption is that the OE rootfs should work on the 9G20, but perhaps I'm missing something.

The kernel boots fine, as expected, but startup fails as follows:
Code:
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
INIT: version 2.86 booting
Starting udevKernel panic - not syncing: Attempted to kill init!

(Complete boot log is below)

My understanding is that the rootfs has been mounted successfully and that udev is actually resident in the rootfs. I suspect that the udev configuration (again, in the rootfs) is broken.

2 questions:
1. Am I correct in believing the OE/9260 rootfs should work on a 9G20?
2. If I want to modify the init scripts (e.g., set /etc/udev/udev.conf to debug mode), how do I do it? I can't seem to find a simple way to edit the rootfs prior to the mkfs.jffs2 step; it's rewritten when I rerun bitbake. Furthermore, I can't determine how the deployed /etc/udev/udev.conf file is created. I tried to create a 'tweaked' rootfs (i.e., modified config files) as follows:
Code:
mkfs.jffs2 -r tmp/rootfs/ -o foo.jffs2 --pad --little-endian --eraseblock=0x20000 -n

where tmp/rootfs is the tree created by OE and foo.jffs2 is the new rootfs image. The kernel is unable to read the resulting jffs2 image, however.

Here's the full boot log:
Code:
U-Boot 1.3.4 (Dec 12 2008 - 12:18:59)

DRAM:  64 MB
NAND:  256 MiB
DataFlash:AT45DB642
Nb pages:   8192
Page Size:   1056
Size= 8650752 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D00041FF (RO) Bootstrap
Area 1: D0004200 to D00083FF      Environment
Area 2: D0008400 to D0041FFF (RO) U-Boot
Area 3: D0042000 to D0251FFF      Kernel
Area 4: D0252000 to D083FFFF      FS
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot:  0
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   linux-2.6
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1531744 Bytes =  1.5 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.27 (nferre@bendor) (gcc version 4.2.0 20070413 (prerelease) (C
odeSourcery Sourcery G++ Lite 2007q1-10)) #1 Fri Dec 12 12:38:40 CET 2008
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9G20-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock1 mtdparts=at91_nand
:-(root) rw rootfstype=jffs2
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: 61688KB available (2820K code, 233K data, 124K init)
Calibrating delay loop... 197.83 BogoMIPS (lpj=989184)
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 user reset
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 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 0xc4870000 (irq 14)
macb macb: invalid hw address, using random
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (1a:02:55:6a:af:60)
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-bi
t)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 3 MTD partitions on "atmel_nand":
0x00000000-0x00400000 : "Bootstrap"
0x00400000-0x04000000 : "Partition 1"
0x04000000-0x10000000 : "Partition 2"
usbmon: debugfs is not available
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
input: gpio-keys as /class/input/input0
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
i2c /dev entries driver
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
Registered led device: ds5
Registered led device: ds1
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.17.
ASoC version 0.13.2
WM8731 Audio Codec 0.13<6>asoc: WM8731 <-> atmel-ssc0 mapping ok
ALSA device list:
  #0: WM8731 (WM8731)
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
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
INIT: version 2.86 booting
Starting udevKernel panic - not syncing: Attempted to kill init!


Cheers!
Mike


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Thu Mar 19, 2009 4:22 pm 
Offline

Joined: Wed Feb 14, 2007 11:17 am
Posts: 79
Hi,

mikewest wrote:
2 questions:
1. Am I correct in believing the OE/9260 rootfs should work on a 9G20?

It should work, yes.

mikewest wrote:
2. If I want to modify the init scripts (e.g., set /etc/udev/udev.conf to debug mode), how do I do it? I can't seem to find a simple way to edit the rootfs prior to the mkfs.jffs2 step; it's rewritten when I rerun bitbake. Furthermore, I can't determine how the deployed /etc/udev/udev.conf file is created. I tried to create a 'tweaked' rootfs (i.e., modified config files) as follows:
Code:
mkfs.jffs2 -r tmp/rootfs/ -o foo.jffs2 --pad --little-endian --eraseblock=0x20000 -n

where tmp/rootfs is the tree created by OE and foo.jffs2 is the new rootfs image. The kernel is unable to read the resulting jffs2 image, however.


For mkfs.jffs2 we are using:
mkfs.jffs2 -l -n --pad -s 0x800 -e 0x20000 -r my_root_fs_dir -o my_root_fs_jffs2_image_file.jffs2

But reading the OE manual, you will notice that:
"NOTE: This means that you cannot use the root filesystem in tmp/rootfs directly on your target device. You need to use the .tar.gz image and uncompress it, as root, in order to generate a root filesystem which is suitable for use directly on the target (or as an NFS root)."
http://docs.openembedded.org/usermanual ... l#id340207


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Thu Mar 19, 2009 8:23 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
When I build the rootfs with that command, I get the following:
Code:
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
JFFS2 compression type 0x07 not available.
Error: jffs2_decompress returned -5
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.


Here's what I did:
1. I untarred the minimal-image tar file (sudo tar ...) into my_root_fs_dir
2. sudo vi <my_root_fs_dir>/etc/udev/udev.conf
3. sudo mkfs.jffs2 -l -n --pad -s 0x800 -e 0x20000 -r my_root_fs_dir -o my_root_fs_jffs2_image_file.jffs2

Cheers!
Mike


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 20, 2009 7:38 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 207
Location: Mounds View, MN
It seems by default that mkfs.jffs2 creates a compressed image unless you specifically tell it to create an uncompressed on. And your kernel looks like it does not have compression support enables for JFFS2. Try adding a -m NONE to the parameter list. This should disable compression.

As for your first post, it looks like the rfs is being read, otherwise init would not run. So you must have some sort of issue with udev.

In general, I have had better luck with an RFS created using buildroot. And it is easier to figure out how to modify the RFS that buildroot generates.

_________________
Tim Barr
Multitech Inc.


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 20, 2009 11:58 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
It appears that the mkfs.jffs2 provided by OE does not support zlib - which is the JFFS2 compression specified in the default kernel config from the linux4sam.org site. I modified the kernel config to support lzo and it appears that I can now tweak my rootfs. Unfortunately, I still get a kernel panic right after 'Starting uDev'.

Any thoughts on next steps? Is it time to fire up the BDI pod? I certainly didn't anticipate this much trouble getting OE up and running.

Mike


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Sat Mar 21, 2009 3:48 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
Having dug a bit further in udev start up (/etc/init.d/udev), it appears the the '/sbin/udevadm trigger' call is causing the panic.

Still looking for suggestions as to how to debug this. I've been scouring the kernel default config (defcon) file provided on linux4sam.org and am surprised by the number of extraneous, enabled options (IDE, Alsa, EXT2, etc.)

Cheers!
Mike


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Sat Mar 21, 2009 10:51 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
A few more notes, for what it's worth:
- I can run the Angstrom demo (binary) from Linux4Sam.org just fine.
- My kernel (2.6.27 + Linux4Sam patches + toolchain from OE) works fine with the rootfs from the Angstrom demo.
- My rootfs does not work with any kernel. (Panic at udev start - see previous post).

To clarify how I'm building OE:
    Ubuntu 8.04. DevTools + bitbake 1.8.12
    git clone from git.openembedded.onet/openembedded
    'local.conf' from linux4sam (tweaked for angstrom-2008.1 and local directory names + using PARALLEL_MAKE and 4 threads)
    bitbake minimal-image


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Wed Mar 25, 2009 7:38 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
Any suggestions on how to debug "Starting udevKernel Panic - not syncing"?

Some other questions, in case that one is too open-ended:
1. Angstrom 2007.1 seems dated - as do the instructions on linux4sam. Is Angstrom 2008.1 a reasonable option for the AT91SAM9G20?
2. Any thoughts on why the demo binaries boot just fine, but the A2008.1 rootfs I build dies? udev appears different between the two. The bootlog from the demo binary INIT's as follows:
Code:
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 128K
INIT: version 2.86 booting
modprobe: FATAL: Could not load /lib/modules/2.6.27/modules.dep: No such file or
 directory

Error opening /dev/fb0: No such device
Starting the hotplug events dispatcher udevd
Synthesizing the initial hotplug events
Waiting for /dev to be fully populated
Remounting root file system...


where as the 2008.1 image I built (machine=9260) shows:
Code:
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 128K
INIT: version 2.86 booting
Starting udevKernel panic - not syncing: Attempted to kill init!


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Thu Mar 26, 2009 5:19 pm 
Offline
User avatar

Joined: Wed May 12, 2004 6:59 pm
Posts: 176
Location: Bergamo, Italia
I have an AT91SAM9G20EK board running the OE image found on Linux4Sam website and the new KaeilOS/OE based on 2.6.28

_________________
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
- Atmel Third Party Consultant
Tel. +39-(0)35-255.235 - Fax +39-178-223.9748
http://www.KoanSoftware.com | http://www.KaeilOS.com


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Thu Mar 26, 2009 5:38 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
I don't have any difficult getting existing (binary) images to run. I'm trying to build one myself, and it seems like Angstrom/OE should support the AT91SAM9G20.

Thanks!
Mike


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 27, 2009 8:39 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
Word from the angstrom irc channel is that I should try a different build distro/environment. Ubuntu 8.04 is what I've been using. Time to try Fedora and/or Slackware.


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 27, 2009 9:46 pm 
Offline
User avatar

Joined: Wed May 12, 2004 6:59 pm
Posts: 176
Location: Bergamo, Italia
Ubuntu may work perfectly as well, simply avoid dash usage.
http://www.kaeilos.com/?q=download "Ubuntu users"

BTW I suggest to use Debian Lenny 5.0
http://www.kaeilos.com/?q=download "Suggested hardware"

_________________
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
- Atmel Third Party Consultant
Tel. +39-(0)35-255.235 - Fax +39-178-223.9748
http://www.KoanSoftware.com | http://www.KaeilOS.com


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 27, 2009 9:49 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
I followed the Ubuntu instructions (8.04), including disabling dash. That resulted in this thread.

Thanks!
Mike


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 27, 2009 10:47 pm 
Offline

Joined: Wed Feb 25, 2009 9:23 pm
Posts: 9
Hi Mike,
I am having the same problem with yours, have you gone any further?

Mine error is same as yours:
INIT: version 2.86 booting
Starting udevKernel panic - not syncing: Attempted to kill init!

I am using a different branch from ulf/linux, which at times have support for AT91SAM9G20EK board.
I am using Ubuntu (8.10) and it works fine with me

by the way, using mkfs.jffs2 -x lzo, will disable the lzo compression and the fs images works ok, except the udev thing!


Top
 Profile  
 
 Post subject: Re: OpenEmbedded/Angstrom on 9G20?
PostPosted: Fri Mar 27, 2009 10:53 pm 
Offline

Joined: Tue Mar 10, 2009 4:09 pm
Posts: 18
If I understand you correctly, you can build the rootfs with Ubuntu8.10; however, you get the panic during boot. Is that correct?

My presumption is that something is wrong with my build, since I can download a rootfs from linux4sam that works correctly. I just cannot build a rootfs that works.

Cheers!
Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] 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: