Hello Friends, I am new to Android and I am encountering a problem that I couldn't figure it out.
I am porting Android to one of our devices. The info is the following: CPU: PXA320 (runs at 800MHz) RAM: 128MB NAND: 1Gb Kernel is Linux-2.6.32 with Android patches (I got from Android.git.kernel.org before it was hacked). I have tried to build Linux rootfs with YAFFS2 type and everything looked fine. Then I check out Android-2.1-r2 source code and built as generic device. The build succeed without any error. I created YAFFS2 rootfs and flushed it to the NAND flash. The Android rootfs booted but and it crashed during the booting precess and I got kernel panic. I dump the log using logcat and it showed that Java threw an exception when getting resources. I have no idea why this happened and how to fix it. Please give me some hints. The following is the log from logcat: load kernel - flash_ofs = 60000 calc_obm_ver - cpuid = 69056826 Starting kernel at 0x80800000... Uncompressing Linux.................................................................................................................................. done, booting the kernel. Linux version 2.6.32.9 (admin-vm@admin-vm) (gcc version 4.3.3 (GCC) ) #58 PREEMPT Thu Sep 22 12:09:12 PDT 2011 CPU: XScale-V3 based processor [69056826] revision 6 (ARMv5TE), cr=0000397f CPU: VIVT data cache, VIVT instruction cache Machine: PXA3xx Platform Development Kit (aka Zylonite) Memory policy: ECC disabled, Data cache writeback RO Mode clock: 60.00MHz (inactive) Run Mode clock: 403.00MHz (*31) Turbo Mode clock: 806.00MHz (*2, active) HSIO bus clock: 104.00MHz Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 Kernel command line: mem=128M console=ttyS1,115200 root=/dev/mtdblock2 rw rootfstype=yaffs2 init=/init rootdelay=1 PID hash table entries: 512 (order: -1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 125184KB available (3664K code, 713K data, 104K init, 0K highmem) Hierarchical RCU implementation. NR_IRQS:320 Console: colour dummy device 80x30 Calibrating delay loop... 804.45 BogoMIPS (lpj=4022272) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: failed, enabling work-around XScale3 L2 cache enabled. NET: Registered protocol family 16 ++zylonite_init_lcd, FB bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Switching to clocksource oscr0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered NET: Registered protocol family 1 NetWinder Floating Point Emulator V0.97 (double precision) ashmem: initialized JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. yaffs Sep 22 2011 12:05:05 Installing. msgmni has been set to 244 alg: No test for stdrng (krng) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) pxafb.c pxa2xx-fb pxa2xx-fb: pxafb_probe pxafb.c pxa2xx-fb pxa2xx-fb: got a 800x480x16 LCD Console: switching to colour frame buffer device 100x30 pxafb.c pxafb: Enabling LCD controller pxafb.c fdadr0 0x87959c60 pxafb.c fdadr1 0x00000000 pxafb.c reg_lccr0 0x003008f8 pxafb.c reg_lccr1 0x50501f1f pxafb.c reg_lccr2 0x020701df pxafb.c reg_lccr3 0x04700002 pxafb.c pxafb: LCD power on pxafb.c pxafb: backlight on pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART console [ttyS1] enabled pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART brd: module loaded loop: module loaded Android kernel panic handler initialized (bind=kpanic) pxafb.c ++C_REENABLE pxafb.c pxafb: LCD power off pxafb.c pxafb: Enabling LCD controller pxafb.c fdadr0 0x87959c60 pxafb.c fdadr1 0x00000000 pxafb.c reg_lccr0 0x003008f8 pxafb.c reg_lccr1 0x50501f1f pxafb.c reg_lccr2 0x020701df pxafb.c reg_lccr3 0x04700002 pxafb.c pxafb: LCD power on NAND device: Manufacturer ID: 0x20, Chip ID: 0xa1 (ST Micro NAND 128MiB 1,8V 8-bit) Scanning device for bad blocks Bad eraseblock 283 at 0x000002360000 Creating 5 MTD partitions on "NAND 128MiB 1,8V 8-bit": 0x000000000000-0x000000060000 : "Bootloader" 0x000000060000-0x000000260000 : "Kernel" 0x000000260000-0x000004d60000 : "system" 0x000004d60000-0x000005d60000 : "userdata" 0x000005d60000-0x000006d60000 : "cache" ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver pxa27x-ohci pxa27x-ohci: PXA27x OHCI pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000 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... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. pxa27x_udc: version 2008-04-18 android init f_adb init android_register_function adb f_mass_storage init android_register_function usb_mass_storage using rtc device, pxa-rtc, for alarms pxa-rtc pxa-rtc: rtc core: registered pxa-rtc as rtc0 Linux video capture interface: v2.00 usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver logger: created 64K log 'log_main' logger: created 256K log 'log_events' logger: created 64K log 'log_radio' logger: created 64K log 'log_system' Advanced Linux Sound Architecture Driver Version 1.0.21. No device for DAI pxa2xx-ssp1 No device for DAI pxa2xx-ssp2 No device for DAI pxa2xx-ssp3 No device for DAI pxa2xx-ssp4 WM9713/WM9714 SoC Audio Codec 0.15 asoc: AC97 HiFi <-> pxa2xx-ac97 mapping ok asoc: AC97 Aux <-> pxa2xx-ac97-aux mapping ok asoc: WM9713 Voice <-> pxa2xx-ssp3 mapping ok wm97xx-ts 0-0:WM9713: detected a wm9713 codec ++++ wm9713_phy_init wm97xx-ts 0-0:WM9713: setting pen detect pull-up to 4266 Ohms wm97xx-ts 0-0:WM9713: setting 5-wire touchscreen mode. ---- wm9713_phy_init input: wm97xx touchscreen as /devices/platform/soc-audio/0-0:WM9713/ input/input0 ALSA device list: #0: Zylonite (WM9713) TCP cubic registered NET: Registered protocol family 17 XScale iWMMXt coprocessor detected. pxa-rtc pxa-rtc: setting system clock to 2000-01-01 00:00:12 UTC (946684812) Waiting 1sec before mounting root device... yaffs: dev is 32505858 name is "mtdblock2" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.2, "mtdblock2" block 265 is bad yaffs_read_super: isCheckpointed 0 VFS: Mounted root (yaffs2 filesystem) on device 31:2. Freeing init memory: 104K Warning: unable to open an initial console. init: cannot open '/initlogo.rle' pxafb.c ++C_REENABLE pxafb.c pxafb: LCD power off pxafb.c pxafb: Enabling LCD controller pxafb.c fdadr0 0x87959c60 pxafb.c fdadr1 0x00000000 pxafb.c reg_lccr0 0x003008f8 pxafb.c reg_lccr1 0x50501f1f pxafb.c reg_lccr2 0x020701df pxafb.c reg_lccr3 0x04700002 pxafb.c pxafb: LCD power on save exit: isCheckpointed 1 yaffs: dev is 32505859 name is "mtdblock3" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.3, "mtdblock3" yaffs_read_super: isCheckpointed 0 yaffs: dev is 32505860 name is "mtdblock4" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.4, "mtdblock4" yaffs_read_super: isCheckpointed 0 init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery' sh: can't access tty; job control turned off # logcat I/DEBUG ( 31): debuggerd: Sep 22 2011 19:16:14 I/vold ( 30): Android Volume Daemon version 2.0 D/vold ( 30): Bootstrapping complete D/AndroidRuntime( 32): D/AndroidRuntime( 32): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< D/AndroidRuntime( 32): CheckJNI is ON I/ ( 33): ServiceManager: 0xad08 W/AudioHardwareInterface( 33): Using stubbed audio hardware. No sound will be produced. D/AudioHardwareInterface( 33): setMode(NORMAL) I/CameraService( 33): CameraService started: pid=33 I/AudioFlinger( 33): AudioFlinger's thread 0xb370 ready to run D/AndroidRuntime( 32): --- registering native functions --- I/SamplingProfilerIntegration( 32): Profiler is disabled. I/Zygote ( 32): Preloading classes... D/dalvikvm( 32): GC freed 793 objects / 50568 bytes in 3ms D/dalvikvm( 32): GC freed 251 objects / 16168 bytes in 3ms D/dalvikvm( 32): GC freed 295 objects / 18768 bytes in 4ms D/dalvikvm( 32): GC freed 214 objects / 13712 bytes in 5ms D/dalvikvm( 32): GC freed 413 objects / 26432 bytes in 5ms D/skia ( 32): ------ build_power_table 1.4 D/skia ( 32): ------ build_power_table 0.714286 D/dalvikvm( 32): GC freed 420 objects / 28752 bytes in 6ms D/dalvikvm( 32): Trying to load lib /system/lib/libmedia_jni.so 0x0 D/dalvikvm( 32): Added shared lib /system/lib/libmedia_jni.so 0x0 D/dalvikvm( 32): Trying to load lib /system/lib/libexif.so 0x0 D/dalvikvm( 32): Added shared lib /system/lib/libexif.so 0x0 D/dalvikvm( 32): GC freed 2314 objects / 121408 bytes in 8ms D/dalvikvm( 32): Trying to load lib /system/lib/libmedia_jni.so 0x0 D/dalvikvm( 32): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0 D/dalvikvm( 32): Trying to load lib /system/lib/libmedia_jni.so 0x0 D/dalvikvm( 32): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0 D/dalvikvm( 32): Trying to load lib /system/lib/libmedia_jni.so 0x0 D/dalvikvm( 32): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0 D/dalvikvm( 32): Trying to load lib /system/lib/libmedia_jni.so 0x0 D/dalvikvm( 32): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0 D/dalvikvm( 32): GC freed 3790 objects / 197008 bytes in 14ms D/dalvikvm( 32): GC freed 461 objects / 26352 bytes in 12ms D/dalvikvm( 32): GC freed 294 objects / 17088 bytes in 13ms D/dalvikvm( 32): GC freed 204 objects / 11464 bytes in 14ms D/dalvikvm( 32): GC freed 178 objects / 9560 bytes in 15ms D/dalvikvm( 32): Trying to load lib /system/lib/libsrec_jni.so 0x0 D/dalvikvm( 32): Added shared lib /system/lib/libsrec_jni.so 0x0 D/dalvikvm( 32): Trying to load lib /system/lib/libsrec_jni.so 0x0 D/dalvikvm( 32): Shared lib '/system/lib/libsrec_jni.so' already loaded in same CL 0x0 W/zipro ( 32): Missed a central dir sig (at 0) D/asset ( 32): failed to open Zip archive '/system/framework/ framework-res.apk' W/asset ( 32): Unable to find resources file resources.arsc W/dalvikvm( 32): Exception Landroid/content/res/Resources $NotFoundException; thrown during Landroid/text/AutoText;.<clinit> E/Zygote ( 32): Error preloading android.text.AutoText. E/Zygote ( 32): java.lang.ExceptionInInitializerError E/Zygote ( 32): at java.lang.Class.classForName(Native Method) E/Zygote ( 32): at java.lang.Class.forName(Class.java:237) E/Zygote ( 32): at java.lang.Class.forName(Class.java:183) E/Zygote ( 32): at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:295) EKernel panic - not syncing: Attempted to kill init! /Zygote ( 32): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:582) E/Zygote ( 32): at dalvik.system.NativeStart.main(Native Method) E/Zygote ( 32): Caused by: android.content.res.Resources $NotFoundException: Resource ID #0x10b0001 E/Zygote ( 32): at android.content.res.Resources.getValue(Resources.java:891) E/Zygote ( 32): at android.content.res.Resources.loadXmlResourceParser(Resources.java: 1865) E/Zygote ( 32): at android.content.res.Resources.getXml(Resources.java:779) E/Zygote ( 32): at android.text.AutoText.init(AutoText.java:160) E/Zygote ( 32): at android.text.AutoText.<init>(AutoText.java:76) E/Zygote ( 32): at android.text.AutoText.<clinit>(AutoText.java: 56) E/Zygote ( 32): ... 6 more D/AndroidRuntime( 32): Shutting down VM W/dalvikvm( 32): threadid=3: thread exiting with uncaught exception (group=0x4001b170) D/dalvikvm( 32): DestroyJavaVM waiting for non-daemon threads to exit D/dalvikvm( 32): DestroyJavaVM shutting VM down D/dalvikvm( 32): VM cleaning up D/dalvikvm( 32): LinearAlloc 0x0 used 1409724 of 5242880 (26%) D/skia ( 32): purging 6K from font cache [1 entries] Thanks a lot, James -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
