[Q] Enabling KGDB/KDB/Kprobes on Nexus 5 Lollipop - Nexus 5 Q&A, Help & Troubleshooting

FYI, if someone gives me the right response, I will paypal $50 in their account. This is how desperate I am.
I have spent a week trying to enable kernel level debugging over the serial jack port and have got nowhere. Every time I enable them, I get a number of errors. I've gone through endless tutorials and books on the subject, but nothing seems to work properly.
This is the kprobe self test at boot time:
Code:
[ 6.502088] Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM
[ 6.508480] Modules linked in:
[ 6.511517] CPU: 0 Not tainted (3.4.0-geaa8415 #1)
[ 6.516675] PC is at kprobe_arm_test_cases+0x520/0x18bac
[ 6.521931] LR is at 0x7
[ 6.524484] pc : [<c010e59c>] lr : [<00000007>] psr: 00000013
[ 6.524486] sp : ee04fdf8 ip : 21522d52 fp : 21522a52
[ 6.535939] r10: 21522b52 r9 : 21522852 r8 : 21522952
[ 6.541118] r7 : 21522652 r6 : 21522752 r5 : 21522452 r4 : 21522552
[ 6.547658] r3 : 21522252 r2 : 21522352 r1 : 21522052 r0 : 21522152
[ 6.554136] Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 6.561461] Control: 10c5787d Table: 0000406a DAC: 00000015
[ 6.567159]
[ 6.567160] PC: 0xc010e51c:
[ 6.571409] e51c 6c646e61 31720965 72202c34 72202c30 202c3331 206c736c 00343172 00000001
[ 6.579570] e53c f00f00ff 00000e01 00000008 00002000 000c000c e320f000 d000ee1d e320f000
[ 6.587729] e55c ebfffcfd ebfffcf6 09646e61 2c323172 2c637020 34317220 6f72202c 31722072
[ 6.595889] e57c 00000034 00000e01 f00f00ff 00000e01 00000007 00002000 000c000c e7f001f8
[ 6.604051] e59c e00fce7e e7f001f8 ebfffceb ebfffce4 09646e61 2c343172 2c307220 2c637020
[ 6.612209] e5bc 6c736c20 34317220 00000000 00000001 f00f00ff 00000e01 00000008 00002000
[ 6.620368] e5dc 000c000c e320f000 e000ee1f e320f000 ebfffcd9 ebfffcd2 65646e61 30720971
[ 6.628529] e5fc 7220202c 202c3131 66783023 00000035 00000b01 12345678 00002000 000c000c
KGDB boot time test:
Code:
[ 198.615183] WARNING: at drivers/misc/kgdbts.c:813 run_simple_test+0x11c/0x29c()
[ 198.622441] Modules linked in:
[ 198.625482] [<c010e414>] (unwind_backtrace+0x0/0x144) from [<c0a4b118>] (dump_stack+0x20/0x24)
[ 198.634077] [<c0a4b118>] (dump_stack+0x20/0x24) from [<c0194138>] (warn_slowpath_common+0x5c/0x74)
[ 198.643048] [<c0194138>] (warn_slowpath_common+0x5c/0x74) from [<c019417c>] (warn_slowpath_null+0x2c/0x34)
[ 198.652685] [<c019417c>] (warn_slowpath_null+0x2c/0x34) from [<c0510f3c>] (run_simple_test+0x11c/0x29c)
[ 198.662058] [<c0510f3c>] (run_simple_test+0x11c/0x29c) from [<c0510be4>] (kgdbts_put_char+0x30/0x38)
[ 198.671174] [<c0510be4>] (kgdbts_put_char+0x30/0x38) from [<c01feae0>] (put_packet+0xa8/0x120)
[ 198.679737] [<c01feae0>] (put_packet+0xa8/0x120) from [<c01ff51c>] (gdb_serial_stub+0x348/0x1060)
[ 198.688620] [<c01ff51c>] (gdb_serial_stub+0x348/0x1060) from [<c01fe028>] (kgdb_cpu_enter+0x318/0x6a4)
[ 198.697911] [<c01fe028>] (kgdb_cpu_enter+0x318/0x6a4) from [<c01fe5a0>] (kgdb_handle_exception+0x94/0x1b0)
[ 198.707545] [<c01fe5a0>] (kgdb_handle_exception+0x94/0x1b0) from [<c010d84c>] (kgdb_compiled_brk_fn+0x38/0x40)
[ 198.717528] [<c010d84c>] (kgdb_compiled_brk_fn+0x38/0x40) from [<c01000fc>] (do_undefinstr+0xfc/0x20c)
[ 198.726816] [<c01000fc>] (do_undefinstr+0xfc/0x20c) from [<c0a5da28>] (__und_svc+0x48/0x60)
[ 198.735114] Exception stack(0xee04fe78 to 0xee04fec0)
Also, I compiled my own kernel and enabled module loading, but when I try and load my own module I get this error:
127|[email protected]:/data/local/tmp # insmod ./kgdboc.ko
insmod: init_module './kgdboc.ko' failed (Function not implemented)
My question is, has anyone got this working? There must be a way of doing it, or else there would be no point in having it in the kernel.
Does anyone know how to enable/initialise the FIQ debugger? I really don't want to go down the printk path.
Thanks

Have you gotten the magic sysrq key working over serial? Have you tried enabling just kdb? (I don't remember if you can do this, I've just used it on x86 with a keyboard and monitor).
Do you have the disassembly of the instruction that's causing the kprobes exception?
---------- Post added at 11:14 PM ---------- Previous post was at 10:59 PM ----------
Also, how are you invoking the kgdb test suite? What is it outputting before the warning? (Looks like it's an eprintk line at the end of a packet throwing a warning if the LXR code is the same as yours).
Have you tried just running the debugger without running the test suite? Maybe the test suite is broken?

Related

[PROJECT] Kernel 3.4.x For Galaxy 3

This thread to collaborate all efforts towards porting kernel 3.4.x on to the Galaxy 3. If any developers wish to help then please let me know and I will add you to the SG3 group on Github (provided you have proven yourself capable of helping by forking the repository and submitting a pull request of changes you have made - I won't just add people if they are 'learning how to develop for Linux').
Changelog
https://github.com/sg3/android_kernel_samsung_s5p6442/commits/s5p6442-3.4
I chose the Github commit system to be the changelog as there are so many things going on at once it would be impossible to keep up with, and I cannot be assed explaining it. If you don't understand then ask, but please don't ask EVERYTHING. Most of the answers will be 'It just does'.
I am trying to follow the standard process for committing to GIT by doing 's5p6442: change' or 'apollo: change' so it is easier to see what is being fixed and why we are changing it so people reviewing code have an easier job. I expect other developers to follow this as well. Pull requests made that do not follow this naming convention will be rejected.
Source Code
Source: https://github.com/sg3/android_kernel_samsung_s5p6442
Members
The following members already have full read/write access to the repository:
cdesai
hillbeast <- has UART
marcellusbe <- has UART
moikop <- has UART
tom3q <- has UART
As you can see I also listed who has UART (that I currently know of). If you also have UART then let me know and I shall add it to the list. Having UART will be a huge help as it means we can see what is going on.
Why Do We Need Kernel 3.
Easier updating the kernel to add security and performance boosts from mainline Linux kernels
More support for new versions of Android
Android 4.0 was built upon Linux Kernel 3.0.x and therefore expects kernel 3.0s APIs
Faster, more secure system
NO SAMSUNG MORONIC CODE
Because it's just better
Please let me know if you are interested (able to) in helping this cause. Please don't put your hand up if you can't dedicate your phone to this. This will result in your phone being out of action quite a lot while we are testing, and if you need your phone 24/7 then you're going to need to keep flashing back. You will also NEED ODIN. Flashing from CWM is not an option.
Status
What is working
Basic mach-code for s5p6442
Serial/UART
CPU clock and most clock sources
Most mach addresses/IRQs/GPIOs
Kernel init
initramfs init
MTD/OneNAND
GPIO
Screen/Framebuffer
Keypad/buttons
Reboot
Real time clock
I2C over GPIO
HSMMC
What needs to be done
Samsung S3C I2C
Reboot modes
I2S
SDIO
Device Drivers (WiFi, Audio, sensors, etc)
UART Dump
Code:
Starting kernel at 0x22000000...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.4.27+ ([email protected]) (gcc version 4.6.2 20120613 (release) [ARM/embedded-4_6-branch revision 188521] (GNU Tools for ARM Embedded Processors) ) #Test Sun Jan 13 20:44:01 NZDT 2013
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv6TEJ), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: APOLLO
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] CPU S5P6442 (id 0x36442000)
[ 0.000000] S3C24XX Clocks, Copyright 2004 Simtec Electronics
[ 0.000000] s5p6442_setup_clocks: clkdiv0 = 10100000
[ 0.000000] S5P6442: PLL settings, A=667000000, M=166000000, E=48000000
[ 0.000000] mout_apll: source is fout_apll (1), rate is 667000000
[ 0.000000] mout_mpll: source is fout_mpll (1), rate is 166000000
[ 0.000000] mout_epll: source is fout_epll (1), rate is 48000000
[ 0.000000] mout_arm: source is mout_apll (1), rate is 667000000
[ 0.000000] mout_d0: source is mout_mpll (1), rate is 166000000
[ 0.000000] mout_d0sync: source is mout_d0 (1), rate is 166000000
[ 0.000000] mout_d1: source is mout_mpll (1), rate is 166000000
[ 0.000000] mout_d1sync: source is mout_d1 (1), rate is 166000000
[ 0.000000] sclk_mfc: source is mout_mpll (0), rate is 166000000
[ 0.000000] sclk_mmc: source is mout_mpll (6), rate is 83000000
[ 0.000000] sclk_mmc: source is mout_mpll (6), rate is 83000000
[ 0.000000] sclk_mmc: source is mout_mpll (6), rate is 83000000
[ 0.000000] dout_a2m: source is fout_apll (1), rate is 667000000
[ 0.000000] dout_apll: source is mout_apll (1), rate is 667000000
[ 0.000000] hclkd1: source is mout_d1 (1), rate is 166000000
[ 0.000000] hclkd0: source is mout_d0 (1), rate is 166000000
[ 0.000000] pclkd0: source is mout_d0 (1), rate is 83000000
[ 0.000000] pclkd1: source is mout_d1 (1), rate is 83000000
[ 0.000000] S5P6442: HCLKD0=166000000, HCLKD1=166000000, PCLKD0=83000000, PCLKD1=83000000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 84832
[ 0.000000] Kernel command line: console=ttySAC1,115200 version=Sbl(1.0.0) 2010-10-27 17:10:33
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] allocated 1212416 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ 0.000000] Memory: 256MB 80MB = 336MB total
[ 0.000000] Memory: 324804k/324804k available, 19260k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe5800000 - 0xff000000 ( 408 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe5000000 ( 592 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0995db4 (9784 kB)
[ 0.000000] .init : 0xc0996000 - 0xc0c29000 (2636 kB)
[ 0.000000] .data : 0xc0c2a000 - 0xc0cae688 ( 530 kB)
[ 0.000000] .bss : 0xc0cae6ac - 0xc0e8bc38 (1910 kB)
[ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:208
[ 0.000000] VIC @f6000000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f6010000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f6020000: id 0x00041192, vendor 0x41
[ 0.000000] vic_register: too few VICs, increase CONFIG_ARM_VIC_NR
[ 0.000000] sched_clock: 32 bits at 41MHz, resolution 24ns, wraps every 103493ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000363] Calibrating delay loop... 663.55 BogoMIPS (lpj=1658880)
[ 0.060015] pid_max: default: 32768 minimum: 301
[ 0.060273] Security Framework initialized
[ 0.060345] AppArmor: AppArmor initialized
[ 0.060775] Mount-cache hash table entries: 512
[ 0.061926] Initializing cgroup subsys cpuacct
[ 0.061959] Initializing cgroup subsys memory
[ 0.062041] Initializing cgroup subsys devices
[ 0.062064] Initializing cgroup subsys freezer
[ 0.062082] Initializing cgroup subsys blkio
[ 0.062124] Initializing cgroup subsys perf_event
[ 0.062325] CPU: Testing write buffer coherency: ok
[ 0.062417] ftrace: allocating 24113 entries in 71 pages
[ 0.256329] hw perfevents: enabled with v6 PMU driver, 3 counters available
[ 0.256470] Setting up static identity map for 0x20652280 - 0x206522dc
[ 0.259465] devtmpfs: initialized
[ 0.261208] EVM: security.selinux
[ 0.261230] EVM: security.SMACK64
[ 0.261243] EVM: security.capability
[ 0.262295] gpiochip_add: registered GPIOs 0 to 7 on device: GPA0
[ 0.262327] gpiochip_add: registered GPIOs 9 to 10 on device: GPA1
[ 0.262348] gpiochip_add: registered GPIOs 12 to 15 on device: GPB
[ 0.262366] gpiochip_add: registered GPIOs 17 to 21 on device: GPC0
[ 0.262384] gpiochip_add: registered GPIOs 23 to 27 on device: GPC1
[ 0.262402] gpiochip_add: registered GPIOs 29 to 30 on device: GPD0
[ 0.262420] gpiochip_add: registered GPIOs 32 to 37 on device: GPD1
[ 0.262438] gpiochip_add: registered GPIOs 39 to 46 on device: GPE0
[ 0.262457] gpiochip_add: registered GPIOs 48 to 52 on device: GPE1
[ 0.262475] gpiochip_add: registered GPIOs 54 to 61 on device: GPF0
[ 0.262494] gpiochip_add: registered GPIOs 63 to 70 on device: GPF1
[ 0.262512] gpiochip_add: registered GPIOs 72 to 79 on device: GPF2
[ 0.262531] gpiochip_add: registered GPIOs 81 to 86 on device: GPF3
[ 0.262549] gpiochip_add: registered GPIOs 88 to 94 on device: GPG0
[ 0.262568] gpiochip_add: registered GPIOs 96 to 102 on device: GPG1
[ 0.262587] gpiochip_add: registered GPIOs 104 to 110 on device: GPG2
[ 0.262606] gpiochip_add: registered GPIOs 148 to 155 on device: GPJ0
[ 0.262624] gpiochip_add: registered GPIOs 157 to 162 on device: GPJ1
[ 0.262644] gpiochip_add: registered GPIOs 164 to 171 on device: GPJ2
[ 0.262664] gpiochip_add: registered GPIOs 173 to 180 on device: GPJ3
[ 0.262683] gpiochip_add: registered GPIOs 182 to 186 on device: GPJ4
[ 0.262702] gpiochip_add: registered GPIOs 188 to 195 on device: MP01
[ 0.262721] gpiochip_add: registered GPIOs 197 to 200 on device: MP02
[ 0.262739] gpiochip_add: registered GPIOs 202 to 206 on device: MP03
[ 0.262758] gpiochip_add: registered GPIOs 208 to 215 on device: MP04
[ 0.262777] gpiochip_add: registered GPIOs 217 to 224 on device: MP05
[ 0.262796] gpiochip_add: registered GPIOs 226 to 233 on device: MP06
[ 0.262815] gpiochip_add: registered GPIOs 235 to 242 on device: MP07
[ 0.262834] gpiochip_add: registered GPIOs 244 to 251 on device: MP10
[ 0.262853] gpiochip_add: registered GPIOs 112 to 119 on device: GPH0
[ 0.262872] gpiochip_add: registered GPIOs 121 to 128 on device: GPH1
[ 0.262891] gpiochip_add: registered GPIOs 130 to 137 on device: GPH2
[ 0.262910] gpiochip_add: registered GPIOs 139 to 146 on device: GPH3
[ 0.263470] dummy:
[ 0.264100] NET: Registered protocol family 16
[ 0.275100] apollo_machine_init : hw_rev_pin=0x0
[ 0.275128] apollo_machine_init : bootmode=0x0
[ 0.275146] apollo_machine_init : lcd_id=1
[ 0.275161] apollo_machine_init : uart_sel=1
[ 0.275216] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[ 0.275237] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.275523] S5P6442: Initializing architecture
[ 0.291494] bio: create slab <bio-0> at 0
[ 0.293402] SCSI subsystem initialized
[ 0.294000] usbcore: registered new interface driver usbfs
[ 0.294214] usbcore: registered new interface driver hub
[ 0.294630] usbcore: registered new device driver usb
[ 0.295434] i2c i2c-3: Not I2C compliant: can't read SCL
[ 0.295462] i2c i2c-3: Bus may be unreliable
[ 0.295487] i2c-gpio i2c-gpio.3: using pins 220 (SDA) and 219 (SCL, no clock stretching)
[ 0.296287] max8998 4-0066: No interrupt specified, no interrupts
[ 0.300785] VALIVE_1.1V: 1100 mV
[ 0.302519] VUSB+MIPI_1.1V: 1100 mV
[ 0.304283] VDAC_3.3V: 3300 mV
[ 0.306136] VTF_2.8V: 2800 mV
[ 0.307889] VCC_3.3V: 3300 mV
[ 0.310548] VLCD_1.8V: 1800 mV
[ 0.312288] VUSB+VADC_3.3V: 3300 mV
[ 0.314100] VCC+VCAM_2.8V: 2800 mV
[ 0.316692] VPLL_1.1V: 1100 mV
[ 0.318393] CAM_IO_2.8V: 2800 mV
[ 0.320204] CAM_ISP_1.2V: 1200 mV
[ 0.321958] CAM_A_2.8V: 2800 mV
[ 0.323682] CAM_CIF_1.8V: 1800 mV
[ 0.325508] CAM_AF_3.3V: 3300 mV
[ 0.327243] VMIPI_1.8V: 1800 mV
[ 0.329838] VCC_3.0V_LCD: 3000 mV
[ 0.331270] VARM_1.2V: 1200 mV
[ 0.332645] VINT_1.2V: 1200 mV
[ 0.334014] VCC_1.8V: 1800 mV
[ 0.336329] CAM_CORE_1.2V: 1200 mV
[ 0.337442] i2c-gpio i2c-gpio.4: using pins 182 (SDA) and 185 (SCL)
[ 0.337761] i2c-gpio i2c-gpio.7: using pins 153 (SDA) and 152 (SCL)
[ 0.338087] i2c-gpio i2c-gpio.8: using pins 34 (SDA) and 35 (SCL)
[ 0.338390] i2c-gpio i2c-gpio.9: using pins 178 (SDA) and 179 (SCL)
[ 0.338704] s3c-i2c s3c2410-i2c.0: slave address 0x10
[ 0.338750] s3c-i2c s3c2410-i2c.0: bus frequency set to 81 KHz
[ 0.338797] s3c-i2c s3c2410-i2c.0: cannot claim IRQ 78
[ 0.338850] s3c-i2c: probe of s3c2410-i2c.0 failed with error -38
[ 0.339021] s3c-i2c s3c2410-i2c.1: slave address 0x10
[ 0.339066] s3c-i2c s3c2410-i2c.1: bus frequency set to 81 KHz
[ 0.339106] s3c-i2c s3c2410-i2c.1: cannot claim IRQ 109
[ 0.339157] s3c-i2c: probe of s3c2410-i2c.1 failed with error -22
[ 0.339322] s3c-i2c s3c2410-i2c.2: slave address 0x10
[ 0.339364] s3c-i2c s3c2410-i2c.2: bus frequency set to 81 KHz
[ 0.339682] s3c-i2c s3c2410-i2c.2: i2c-2: S3C I2C adapter
[ 0.339810] Linux video capture interface: v2.00
[ 0.340585] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.341666] Bluetooth: Core ver 2.16
[ 0.341800] NET: Registered protocol family 31
[ 0.341822] Bluetooth: HCI device and connection manager initialized
[ 0.341843] Bluetooth: HCI socket layer initialized
[ 0.341860] Bluetooth: L2CAP socket layer initialized
[ 0.341920] Bluetooth: SCO socket layer initialized
[ 0.341941] NetLabel: Initializing
[ 0.341955] NetLabel: domain hash size = 128
[ 0.341967] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.342112] NetLabel: unlabeled traffic allowed by default
[ 0.342849] Switching to clocksource s5p_clocksource_timer
[ 0.379780] AppArmor: AppArmor Filesystem Enabled
[ 0.409043] NET: Registered protocol family 2
[ 0.409412] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.410301] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.411581] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.412212] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.412232] TCP: reno registered
[ 0.412256] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.412319] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.412878] NET: Registered protocol family 1
[ 0.413878] RPC: Registered named UNIX socket transport module.
[ 0.413908] RPC: Registered udp transport module.
[ 0.413924] RPC: Registered tcp transport module.
[ 0.413940] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 2.313502] audit: initializing netlink socket (disabled)
[ 2.313597] type=2000 audit(2.175:1): initialized
[ 2.518638] VFS: Disk quotas dquot_6.5.2
[ 2.519085] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 2.523547] NFS: Registering the id_resolver key type
[ 2.526646] fuse init (API version 7.18)
[ 2.527762] msgmni has been set to 634
[ 2.535433] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 2.535935] io scheduler noop registered
[ 2.535965] io scheduler deadline registered
[ 2.536070] io scheduler cfq registered (default)
[ 2.545209] Console: switching to colour frame buffer device 30x25
[ 2.549050] s3c-fb s3c-fb: window 0: fb
[ 2.549647] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 2.564511] s5pv210-uart.0: ttySAC0 at MMIO 0xec000000 (irq = 74) is a S3C6400/10
[ 2.565120] s5pv210-uart.1: ttySAC1 at MMIO 0xec000400 (irq = 75) is a S3C6400/10
[ 3.688673] console [ttySAC1] enabled
[ 3.692714] s5pv210-uart.2: ttySAC2 at MMIO 0xec000800 (irq = 76) is a S3C6400/10
[ 3.701079] ramoops: platform device not found, using module parameters
[ 3.706799] ramoops: The memory size and the record size must be non-zero
[ 3.713399] ramoops: probe of ramoops failed with error -22
[ 3.735283] brd: module loaded
[ 3.744057] loop: module loaded
[ 3.745830] nbd: registered device at major 43
[ 3.762773] i2c-core: driver [fsa9480] using legacy suspend method
[ 3.763421] i2c-core: driver [fsa9480] using legacy resume method
[ 3.770606] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 3.776125] =================================================================
[ 3.783321] Samsung OneNAND Driver (AUDI).
[ 3.787406] =================================================================
[ 3.794866] OneNAND: Clock gating is enabled.
[ 3.799181] Muxed OneNAND 512MB 1.8V 16-bit (0x50)
[ 3.803964] OneNAND version = 0x013e
[ 3.809584] Scanning device for bad blocks
[ 3.852229] onenand_bbt_wait: ecc error = 0x0001, controller error 0x0400
[ 3.853463] OneNAND eraseblock 320 is an initial bad block
[ 4.077529] OneNAND eraseblock 2047 is an initial bad block
[ 4.079391] Creating 8 MTD partitions on "s5p-onenand":
[ 4.082775] 0x000000a00000-0x000001180000 : "boot"
[ 4.090109] 0x000001180000-0x00000ed80000 : "system"
[ 4.095512] 0x00000ed80000-0x00001b800000 : "userdata"
[ 4.100622] 0x00001b800000-0x00001de00000 : "cache"
[ 4.105243] 0x00001de00000-0x00001f500000 : "efs"
[ 4.110030] 0x00001f500000-0x00001ffc0000 : "reservoir"
[ 4.115311] 0x00001ffc0000-0x000020000000 : "dgs"
[ 4.120079] 0x000000180000-0x000000200000 : "param"
[ 4.129186] Fixed MDIO Bus: probed
[ 4.129479] tun: Universal TUN/TAP device driver, 1.6
[ 4.132039] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[ 4.138886] PPP generic driver version 2.4.2
[ 4.143197] PPP BSD Compression module registered
[ 4.147386] PPP Deflate Compression module registered
[ 4.155764] PPP MPPE Compression module registered
[ 4.157358] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.165883] mousedev: PS/2 mouse device common for all mice
[ 4.170690] input: samsung-keypad as /devices/platform/samsung-keypad/input/input0
[ 4.183677] max8998-rtc max8998-rtc: rtc core: registered max8998-rtc as rtc0
[ 4.185222] max8998-rtc max8998-rtc: Failed to request alarm IRQ: 9: -22
[ 4.192094] max8998-rtc max8998-rtc: RTC CHIP NAME: max8998-rtc
[ 4.198341] s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
[ 4.204232] s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc1
[ 4.209837] s3c-rtc s3c64xx-rtc: warning: invalid RTC value so initializing it
[ 4.217293] i2c /dev entries driver
[ 4.223542] lirc_dev: IR Remote Control driver registered, major 252
[ 4.227104] IR NEC protocol handler initialized
[ 4.231789] IR RC5(x) protocol handler initialized
[ 4.236611] IR RC6 protocol handler initialized
[ 4.241188] IR JVC protocol handler initialized
[ 4.245773] IR Sony protocol handler initialized
[ 4.250448] IR RC5 (streamzap) protocol handler initialized
[ 4.256091] IR SANYO protocol handler initialized
[ 4.260894] IR MCE Keyboard/mouse protocol handler initialized
[ 4.266831] IR LIRC bridge handler initialized
[ 4.271884] vivi-000: V4L2 device registered as video0
[ 4.276490] Video Technology Magazine Virtual Video Capture Board ver 0.8.1 successfully loaded.
[ 4.286115] m2m-testdev m2m-testdev.0: mem2mem-testdevDevice registered as /dev/video1
[ 4.293614] S5P JPEG V4L2 Driver, (c) 2011 Samsung Electronics
[ 4.299987] s5p-jpeg s5p-jpeg.0: encoder device registered as /dev/video2
[ 4.306631] s5p-jpeg s5p-jpeg.0: decoder device registered as /dev/video3
[ 4.313092] s5p-jpeg s5p-jpeg.0: Samsung S5P JPEG codec
[ 4.319104] s5p-mfc s5p-mfc: decoder registered as /dev/video4
[ 4.324735] s5p-mfc s5p-mfc: encoder registered as /dev/video5
[ 4.331964] device-mapper: uevent: version 1.0.3
[ 4.335859] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: [email protected]
[ 4.344756] device-mapper: multipath: version 1.3.0 loaded
[ 4.349027] device-mapper: multipath round-robin: version 1.0.0 loaded
[ 4.355582] device-mapper: multipath queue-length: version 0.1.0 loaded
[ 4.362272] device-mapper: multipath service-time: version 0.2.0 loaded
[ 4.369166] Bluetooth: HCI UART driver ver 2.2
[ 4.373493] Bluetooth: HCI H4 protocol initialized
[ 4.378328] cpuidle: using governor ladder
[ 4.382413] cpuidle: using governor menu
[ 4.386665] sdhci: Secure Digital Host Controller Interface driver
[ 4.392711] sdhci: Copyright(c) Pierre Ossman
[ 4.397299] s3c-sdhci s3c-sdhci.0: clock source 0: mmc_busclk.0 (166000000 Hz)
[ 4.404494] s3c-sdhci s3c-sdhci.0: clock source 2: mmc_busclk.2 (83000000 Hz)
[ 4.413642] mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
[ 4.419361] VTF_2.8V: operation not allowed
[ 4.423067] s3c-sdhci s3c-sdhci.0: could not set regulator OCR (-1)
[ 4.429579] s3c-sdhci s3c-sdhci.1: clock source 0: mmc_busclk.0 (166000000 Hz)
[ 4.436774] s3c-sdhci s3c-sdhci.1: clock source 2: mmc_busclk.2 (83000000 Hz)
[ 4.445522] VTF_2.8V: operation not allowed
[ 4.448203] s3c-sdhci s3c-sdhci.0: could not set regulator OCR (-1)
[ 4.454713] mmc1: no vmmc regulator found
[ 4.460242] mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
[ 4.465940] s3c-sdhci s3c-sdhci.2: clock source 0: mmc_busclk.0 (166000000 Hz)
[ 4.476388] s3c-sdhci s3c-sdhci.2: clock source 2: mmc_busclk.2 (83000000 Hz)
[ 4.482175] VTF_2.8V: operation not allowed
[ 4.484543] s3c-sdhci s3c-sdhci.0: could not set regulator OCR (-1)
[ 4.491054] mmc2: no vmmc regulator found
[ 4.496685] mmc2: SDHCI controller on samsung-hsmmc [s3c-sdhci.2] using ADMA
[ 4.502247] sdhci-pltfm: SDHCI platform and OF driver helper
[ 4.509478] usbcore: registered new interface driver usbhid
[ 4.513457] usbhid: USB HID core driver
[ 4.518528] ashmem: initialized
[ 4.520813] logger: created 256K log 'log_main'
[ 4.528884] logger: created 256K log 'log_events'
[ 4.531558] logger: created 256K log 'log_radio'
[ 4.534910] logger: created 256K log 'log_system'
[ 4.552135] IPv4 over IPv4 tunneling driver
[ 4.553324] Initializing XFRM netlink socket
[ 4.555039] NET: Registered protocol family 17
[ 4.562972] NET: Registered protocol family 15
[ 4.565666] Bluetooth: RFCOMM TTY layer initialized
[ 4.569203] Bluetooth: RFCOMM socket layer initialized
[ 4.574203] Bluetooth: RFCOMM ver 1.11
[ 4.579328] NET: Registered protocol family 33
[ 4.584577] sctp: Hash tables configured (established 16384 bind 32768)
[ 4.589796] Registering the dns_resolver key type
[ 4.597496] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[ 4.604614] registered taskstats version 1
[ 4.614795] VCC_1.8V: incomplete constraints, leaving on
[ 4.615346] VINT_1.2V: incomplete constraints, leaving on
[ 4.621985] VARM_1.2V: incomplete constraints, leaving on
[ 4.626472] CAM_AF_3.3V: incomplete constraints, leaving on
[ 4.632575] CAM_ISP_1.2V: incomplete constraints, leaving on
[ 4.637494] CAM_IO_2.8V: incomplete constraints, leaving on
[ 4.643182] VPLL_1.1V: incomplete constraints, leaving on
[ 4.649650] VCC+VCAM_2.8V: incomplete constraints, leaving on
[ 4.656416] VUSB+VADC_3.3V: incomplete constraints, leaving on
[ 4.660221] VCC_3.3V: incomplete constraints, leaving on
[ 4.665695] VTF_2.8V: incomplete constraints, leaving on
[ 4.671548] VUSB+MIPI_1.1V: incomplete constraints, leaving on
[ 4.679449] input: gpio-keys as /devices/platform/gpio-keys.0/input/input1
[ 4.687987] max8998-rtc max8998-rtc: setting system clock to 2013-02-23 08:21:42 UTC (1361607702)
[ 4.692653] ALSA device list:
[ 4.695373] No soundcards found.
[ 4.699028] Warning: unable to open an initial console.
[ 4.730337] Freeing init memory: 2636K
[ 4.730385] Write protecting the kernel text section c0008000 - c090d000
[ 4.925033] mmc2: new SD card at address aaaa
[ 4.933164] mmcblk0: mmc2:aaaa SU01G 942 MiB
[ 4.936670] mmcblk0: p1
[ 5.113958] init: cannot open '/initlogo.rle'
[ 5.348302] EXT4-fs (mtdblock1): warning: maximal mount count reached, running e2fsck is recommended
[ 5.352863] EXT4-fs (mtdblock1): recovery complete
[ 5.357121] EXT4-fs (mtdblock1): mounted filesystem with ordered data mode. Opts: (null)
[ 5.366051] EXT4-fs (mtdblock1): re-mounted. Opts: (null)
[ 5.563526] EXT4-fs (mtdblock2): warning: maximal mount count reached, running e2fsck is recommended
[ 5.567565] EXT4-fs (mtdblock2): recovery complete
[ 5.572336] EXT4-fs (mtdblock2): mounted filesystem with ordered data mode. Opts: (null)
[ 5.638145] EXT4-fs (mtdblock3): warning: maximal mount count reached, running e2fsck is recommended
[ 5.642200] EXT4-fs (mtdblock3): recovery complete
[ 5.646958] EXT4-fs (mtdblock3): mounted filesystem with ordered data mode. Opts: (null)
[ 5.659542] EXT4-fs (mtdblock4): Unrecognized mount option "check=no" or missing value
[ 5.726831] lowmem_shrink: convert oom_adj to oom_score_adj:
[ 5.726892] oom_adj 0 => oom_score_adj 0
[ 5.730922] oom_adj 1 => oom_score_adj 58
[ 5.734942] oom_adj 2 => oom_score_adj 117
[ 5.739090] oom_adj 4 => oom_score_adj 235
[ 5.743230] oom_adj 7 => oom_score_adj 411
[ 5.747323] oom_adj 15 => oom_score_adj 1000
[ 5.752406] init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
sh: can't access tty; job control turned off
# [ 6.736529] init: untracked pid 139 exited
[ 7.097207] warning: `rild' uses 32-bit capabilities (legacy support in use)
How To Build
git clone git://github.com/sg3/android_kernel_samsung_s5p6442 -b s5p6442-3.4 kernel-3.4
cd kernel-3.4
make ARCH=arm apollo_defconfig
./build.sh config
./build.sh
Things to be aware of
I feel these things should be mentioned as they are important changes that may disrupt peoples user experience on the phone.
Odin will not work anymore for flashing ROMs. It's as simple as that. We will no longer be using STL/BML/TFSR for interfacing with the NAND, and that is what ODIN expects to be working with: partitions in STL format. We simply will not support STL when this kernel is complete as it is closed source and will not function on kernel 3.x. We will be moving over to MTD which is mainline, and regularly gets updates to improve performance, reliability and in general to make it better.
Kernels will however be flashable from ODIN. This WILL NOT change. Kernels, modem.bin, Sbl and boot.bin will all still work from Odin. Data, system and cache will not.
I know this will annoy a few people, as it will disrupt me too as a developer and a Windows user, it's nice to be able to flash a ROM this way, but we're going to have to move towards distributing ROMs in system.imgs, or more preferably in update.zips.
There will be no support for Samsung Froyo/Eclair ROMs in kernel 3.x. The reasoning behind this is because Samsung ROMs want Samsung drivers and we won't be using any of them. We will be aiming to support CM7 and CM9, or generally any AOSP ROM, but not Samsungs proprietary ROM. You may think 'well why not make the drivers work for both', but the problem is not with making the drivers work, the problem is with the fact that a lot of these drivers were written for a kernel over 10 major versions out of date by now, and will not function on the new kernels APIs. If we try to make them work, it will make the kernel unstable and it's going to degrade the experience for the end user. As well as that, we don't know how half these drivers actually work because they are either coded so badly it's impossible to make heads or tails of it, or it's closed source and we can't find sources for it.
There are plenty of good custom kernels for Froyo, and I have heard word in the grapevine a few people want to make a custom Eclair kernel (not confirmed, and that is just rumours), but I will not be adding support for Froyo to kernel 3.x
Kernel 3.x will not allow us to work magic with the phone. Having a newer kernel won't allow us to make the CPU itself faster, we can't give it more RAM (or find more RAM in there). We won't be able to unlock more performance from x part. This is not a magical rebirth of the phone, this is just a major fix up of all the current issues we face with AOSP based ROMs on the phone. It will most likely make the phone faster, but we can't magically make it into a dual core or something like that. It just isn't possible.
I see a reserved post there!
And one more for good luck. Now you may post.
So many reserved posts WHOA!
could possibly add a guide to clone and build it
EDIT:
Btw, also add a note about the two branches on github
android-3.0 = android-common kernel from android.googlesource.com
linux-samsung = kgene/linux-samsung on kernel.org / github
+1! Yeah guys well done! Finally! Is it only me that I think that may we have a beta or final version of Gingerbread or (cross fingers) ICS if you guys port the 3.0 kernel for our phone?
Good to have a new thread now.....
All the best Mark & all the Devs in this project..
+1 Good luck!!
Good luck with this project
All the best.. Although this is gonna take much time still waiting patiently
I may sound like an ultra-noob here : But what is Kernel 3.0 ?
Google isn't help here
You could add this to the first post but only computer programmers will understand it, unlike me
ak700 said:
I may sound like an ultra-noob here : But what is Kernel 3.0 ?
Google isn't help here
Click to expand...
Click to collapse
Newer version of the kernel that will be completely built from scratch. tom3q did this on the Spica and it worked wonders, now it's time to do it to our phone.
Smonic said:
You could add this to the first post but only computer programmers will understand it, unlike me
Click to expand...
Click to collapse
I don't like kernel.org. They're hopeless, shown by their hacking last year and their slow recovery time, and then made worse for the fact that Linus Torvalds himself switched to Github.
This is what i wanted to see since long times now. I just wanto say thank you to all the devs for just trying
Frig. I was doing so well and then I hit a brick wall with bloody assembler...
Code:
[email protected]:~/devel/galaxy3/kernel-3.0$ ./build.sh Test
Setting kernel name to (Test)
Compiling the kernel
CHK include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC init/version.o
AS arch/arm/kernel/debug.o
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:157: Error: too many positional arguments
arch/arm/kernel/debug.S:173: Error: too many positional arguments
make[1]: *** [arch/arm/kernel/debug.o] Error 1
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
Anyone smarter than me with assember know what that means?
EDIT: It's to do with ASCII and UART
Line 156-170 debug.S
Code:
ENTRY(printascii)
addruart_current r3, r1, r2
b 2f
1: waituart r2, r3
senduart r1, r3
busyuart r2, r3
teq r1, #'\n'
moveq r1, #'\r'
beq 1b
2: teq r0, #0
ldrneb r1, [r0], #1
teqne r1, #0
bne 1b
mov pc, lr
ENDPROC(printascii)
hillbeast said:
Frig. I was doing so well and then I hit a brick wall with bloody assembler...
Code:
[email protected]:~/devel/galaxy3/kernel-3.0$ ./build.sh Test
Setting kernel name to (Test)
Compiling the kernel
CHK include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC init/version.o
AS arch/arm/kernel/debug.o
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:157: Error: too many positional arguments
arch/arm/kernel/debug.S:173: Error: too many positional arguments
make[1]: *** [arch/arm/kernel/debug.o] Error 1
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
Anyone smarter than me with assember know what that means?
EDIT: It's to do with ASCII and UART
Line 156-170 debug.S
Code:
ENTRY(printascii)
addruart_current r3, r1, r2
b 2f
1: waituart r2, r3
senduart r1, r3
busyuart r2, r3
teq r1, #'\n'
moveq r1, #'\r'
beq 1b
2: teq r0, #0
ldrneb r1, [r0], #1
teqne r1, #0
bne 1b
mov pc, lr
ENDPROC(printascii)
Click to expand...
Click to collapse
The error is not on /arch/arm/kernel/debug.S, it's on /arch/arm/mach-s5p6442/include/mach/debug-macro.S (Error caused by just putting Samsung's .32 code into 3.x I guess...).
Check out that addruart_current is defined a few lines before, and it refers to "adduart" which is defined at debug-macro.S (that's why before defining addruart_current, debug-macro.S is included).
And if you check debug-macro.S, you'll see that adduart is defined only with one parameter, when in debug.S it's used with two parameters. That's where the error comes from.
In order to fix this, you'll have to redo the debug-macro.S file so that adduart takes two parameters (IMO should be based in S5PC110 or Spica's (or maybe s5p64x0?) debug-macro.S).
moikop said:
The error is not on /arch/arm/kernel/debug.S, it's on /arch/arm/mach-s5p6442/include/mach/debug-macro.S (Error caused by just putting Samsung's .32 code into 3.x I guess...).
Check out that addruart_current is defined a few lines before, and it refers to "adduart" which is defined at debug-macro.S (that's why before defining addruart_current, debug-macro.S is included).
And if you check debug-macro.S, you'll see that adduart is defined only with one parameter, when in debug.S it's used with two parameters. That's where the error comes from.
In order to fix this, you'll have to redo the debug-macro.S file so that adduart takes two parameters (IMO should be based in S5PC110 or Spica's (or maybe s5p64x0?) debug-macro.S).
Click to expand...
Click to collapse
Brilliant. Now we're back to good ol' fixing up references.
hillbeast said:
Frig. I was doing so well and then I hit a brick wall with bloody assembler...
Code:
[email protected]:~/devel/galaxy3/kernel-3.0$ ./build.sh Test
Setting kernel name to (Test)
Compiling the kernel
CHK include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC init/version.o
AS arch/arm/kernel/debug.o
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:157: Error: too many positional arguments
arch/arm/kernel/debug.S:173: Error: too many positional arguments
make[1]: *** [arch/arm/kernel/debug.o] Error 1
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
you're using homebrew right? if yes, does it compile faster? in a word, ill grab my sis macbook pro !
BTW, which baseband are you gonna use for this kernel ?

Diagnosing Forced Reboot into Recovery

I was hoping someone could help me figure out why my phone had a force reboot which went into recovery. Right now it is stock ICS with stock kernel and setting - though it is rooted. I went to a clean stock install today with the hopes of it stopping the issue but it happened again.
Below is from the last_kmsg file at the time of the crash - any help interpreting it and maybe pointing to the cause of the reboots would be welcome:
[ 3.925411] s3c-rtc s3c2410-rtc: setting system clock to 2012-06-16 22:59:24 UTC (1339887564)
[ 3.926991] FIMC0 registered successfully
[ 3.928373] FIMC1 registered successfully
[ 3.929790] FIMC2 registered successfully
[ 3.929994] max8998_charger_probe : MAX8998 Charger Driver Loading
[ 3.931981] max8998_charger_probe : pmic interrupt registered
[ 3.933422] wake enabled for irq 39
[ 3.933706] Freeing init memory: 152K
[ 3.997046] init: Unable to open persistent property directory /data/property errno: 2
[ 3.999240] enabling adb
[ 4.000259] adb_open
[ 4.058176] yaffs: dev is 32505860 name is "mtdblock4" rw
[ 4.058274] yaffs: passed flags ""
[ 4.058431] yaffs: yaffs: Attempting MTD mount of 31.4,"mtdblock4"
[ 4.064059] yaffs: yaffs_read_super: is_checkpointed 1
[ 4.194496] mmc0: new high speed MMC card at address 0001
[ 4.201024] mmcblk0: mmc0:0001 SEM16G 14.8 GiB
[ 4.201455] mmcblk0: p1 (system) p2 (userdata) p3 (media)
[ 11.794385] Restarting system.
[ 11.794487]
[ 11.794572] Restarting Linux version 2.6.35.14KalimochoAz+ ([email protected]) (gcc version 4.4.3 (GCC) ) #13 PREEMPT Wed Sep 21 15:59:01 CEST 2011
[ 11.794584]
[ 11.796704] arch_reset: attempting watchdog reset

[Q] Help with Random Reboots (last_kmsg) attached

Hey guys/gals,
I'm experiencing random reboots which I don't believe are kernel related, since it happens no matter which kernel I flash. I believe that it's an issue with an app, but I can't seem to trace it down. It was suggested to me that I post my last_kmsg file to Pastebin, so here it is. BTW, it will happen at any time, even if I am not using the phone and it's just sitting on my desk. Any help is greatly appreciated, thank you.
SaberMahdi ROM (10-18) with Stock Kernel
http://pastebin.com/2VVWwqNR
Code:
[ 8324.946134] R9: 0xc01d2314:
[ 8324.946258] 2314 e1a08003 e3ccc03f e3a03000 e59cc00c e1a04001 e1a06000 e1a0a002 e58c3000
[ 8324.946931] 2334 eb2b6b0a e594500c e284c00c e1a07000 e15c0005 0a000008 e5943010 e5853004
[ 8324.947552] 2354 e5835000 e584c00c e584c010 e1a00006 e1a01007 e8bd45f8 ea2b6bf5 e5962004
[ 8324.948168] 2374 e2863004 e1520003 0afffff7 e1a00006 e1a0100a e1a02008 eb003e32 eafffff2
[ 8324.948823] 2394 e92d4010 e1a04000 eb005698 e3500000 08bd8010 e5942010 e284300c e594100c
[ 8324.949471] 23b4 e5812004 e5821000 e584300c e5843010 e8bd8010 e59f2078 e280c101 e3a03001
[ 8324.950080] 23d4 e92d4010 e1a0c62c e24dd008 e1814280 e3493e37 e5922000 e0030493 e792228c
[ 8324.950731] 23f4 e88d0003 e59f104c e1a02f22 e0622202 e0812302 e5921388 e5922380 e2611020
[ 8324.951381]
[ 8324.951382] R10: 0xea27bf00:
[ 8324.951502] bf00 c15211e0 c1520ef8 c3575380 d6f20000 c1527310 c09b45ac 000012b0 c0cac24c
[ 8324.952209] bf20 00000002 34aeb2d7 c15211ec c1520ef8 c3575380 c152436c c1527310 c09e26e0
[ 8324.952852] bf40 c1527298 34aeb2d7 ea27bf80 c0953400 ea27a000 c1527238 ea27a000 ea27a000
[ 8324.953454] bf60 c1527204 c099662c 00006953 d944430c c01e7e04 00000000 d9444000 c01d2394
[ 8324.954105] bf80 ea27bf80 ea27bf80 ea27bfac ea27a000 ea27bfb4 c1527204 c09963b0 00000200
[ 8324.954760] bfa0 00000000 00000000 00000000 c01d1634 00000000 00000000 00000000 c1527204
[ 8324.955424] bfc0 00000000 00000000 ea27bfc8 ea27bfc8 00000001 00010001 ea27bfd8 ea27bfd8
[ 8324.956050] bfe0 eac91ea8 c01d1528 c0107d00 00000013 00000000 c0107d00 00000000 00000000
[ 8324.956727] Process MC_Thread (pid: 26963, stack limit = 0xea27a2f8)
[ 8324.956845] Stack: (0xea27bee8 to 0xea27c000)
[ 8324.956912] bee0: aeee06fd 00000027 ba614485 00000027 c1527310 00000000
[ 8324.957034] bf00: c15211e0 c1520ef8 c3575380 d6f20000 c1527310 c09b45ac 000012b0 c0cac24c
[ 8324.957156] bf20: 00000002 34aeb2d7 c15211ec c1520ef8 c3575380 c152436c c1527310 c09e26e0
[ 8324.957227] bf40: c1527298 34aeb2d7 ea27bf80 c0953400 ea27a000 c1527238 ea27a000 ea27a000
[ 8324.957350] bf60: c1527204 c099662c 00006953 d944430c c01e7e04 00000000 d9444000 c01d2394
[ 8324.957474] bf80: ea27bf80 ea27bf80 ea27bfac ea27a000 ea27bfb4 c1527204 c09963b0 00000200
[ 8324.957544] bfa0: 00000000 00000000 00000000 c01d1634 00000000 00000000 00000000 c1527204
[ 8324.957667] bfc0: 00000000 00000000 ea27bfc8 ea27bfc8 00000001 00010001 ea27bfd8 ea27bfd8
[ 8324.957787] bfe0: eac91ea8 c01d1528 c0107d00 00000013 00000000 c0107d00 00000000 00000000
[ 8324.957927] [<c09e0920>] (wpalDevicePanic) from [<c09d86e0>] (WDI_ResponseTimerCB+0xe4/0x360)
[ 8324.958011] [<c09d86e0>] (WDI_ResponseTimerCB) from [<c09e26e0>] (wpalTimerCback+0x20/0x4c)
[ 8324.958148] [<c09e26e0>] (wpalTimerCback) from [<c0953400>] (sysMcProcessMsg+0xc4/0x24c)
[ 8324.958281] [<c0953400>] (sysMcProcessMsg) from [<c099662c>] (VosMCThread+0x27c/0x6c0)
[ 8324.958409] [<c099662c>] (VosMCThread) from [<c01d1634>] (kthread+0x10c/0x118)
[ 8324.958489] [<c01d1634>] (kthread) from [<c0107d00>] (kernel_thread_exit+0x0/0x8)
[ 8324.958616] Code: c0f786fc eafeb2c4 eaef9f6f eafeb30b (e7f001f2)
[ 8324.958693] ---[ end trace 5d6761a3cb74bfb4 ]---
[ 8324.958823] Kernel panic - not syncing: Fatal exception
[ 8324.958896] CPU3: stopping
[ 8324.958945] [<c010e6ec>] (unwind_backtrace) from [<c010cfbc>] (handle_IPI+0x190/0x1c8)
[ 8324.959019] [<c010cfbc>] (handle_IPI) from [<c0100584>] (gic_handle_irq+0x50/0x58)
[ 8324.959103] [<c0100584>] (gic_handle_irq) from [<c0106dc0>] (__irq_svc+0x40/0x74)
[ 8324.959191] Exception stack(0xd3067e90 to 0xd3067ed8)
[ 8324.959242] 7e80: edf3c1cc 00007f13 d3067ed0 00000162
[ 8324.959332] 7ea0: edf3c180 edf3c1cc edf41f00 d3067f88 00000001 d3066000 ea038000 00000001
[ 8324.959382] 7ec0: 7f137f14 d3067ed8 c02c26c0 c0cad2fc 20000013 ffffffff
[ 8324.959477] [<c0106dc0>] (__irq_svc) from [<c0cad2fc>] (_raw_spin_unlock+0x0/0x4c)
[ 8324.959572] [<c0cad2fc>] (_raw_spin_unlock) from [<c02c26c0>] (dget_parent+0x48/0x64)
[ 8324.959626] [<c02c26c0>] (dget_parent) from [<c02f2518>] (__fsnotify_parent+0x3c/0xbc)
[ 8324.959721] [<c02f2518>] (__fsnotify_parent) from [<c03d4ee4>] (security_file_permission+0x74/0xb0)
[ 8324.959815] [<c03d4ee4>] (security_file_permission) from [<c02aa834>] (rw_verify_area+0x64/0x120)
[ 8324.959906] [<c02aa834>] (rw_verify_area) from [<c02aac44>] (vfs_read+0x70/0x140)
[ 8324.959956] [<c02aac44>] (vfs_read) from [<c02aad4c>] (sys_read+0x38/0x70)
[ 8324.960037] [<c02aad4c>] (sys_read) from [<c0107200>] (ret_fast_syscall+0x0/0x30)
[ 8324.960112] CPU2: stopping
[ 8324.960219] [<c010e6ec>] (unwind_backtrace) from [<c010cfbc>] (handle_IPI+0x190/0x1c8)
[ 8324.960322] [<c010cfbc>] (handle_IPI) from [<c0100584>] (gic_handle_irq+0x50/0x58)
[ 8324.960382] [<c0100584>] (gic_handle_irq) from [<c0106dc0>] (__irq_svc+0x40/0x74)
[ 8324.960480] Exception stack(0xdd2b7d98 to 0xdd2b7de0)
[ 8324.960534] 7d80: fff215d0 fff205e0
[ 8324.960633] 7da0: 00000014 00000000 00000000 fff21000 6f747000 cf05ec40 c14c8300 dd841bd8
[ 8324.960731] 7dc0: ce8856c0 c0118500 00000000 dd2b7de0 00000000 c043e224 20000113 ffffffff
[ 8324.960792] [<c0106dc0>] (__irq_svc) from [<c043e224>] (copy_page+0x44/0x80)
[ 8325.961226] wcnss crash shutdown 1
[ 8325.961297] Rebooting in 5 seconds..
[ 8330.962975] Going down for restart now
[ 8330.963737] Calling SCM to disable SPMI PMIC arbiter
No errors detected

[Completed] How to read last_kmsg after crash?

My Moto X (2013, Dev Edition on VZW, 5.1 L w/ Xposed and root and unlocked BL) seem to spontaneous reboot a couple times a day, doing different things, usually Bluetooth is on while I'm doing something else, but can't find any other common factors. Sometimes I'm just checking Google Now topics, sometimes I'm checking links in Chrome (but also happens with Dolphin)
I searched XDA and it says to check out last_kmsg which I got, but it's rather... dense? But there seems to be no kernel error. The log mainly contains "wlan:" notes, until it reaches the following:
[ 1021.376560,1] wlan: [1142:E :HDD] wlan_hdd_set_filter: Packet Filter Request
: FA 1 params 2
[ 1021.376651,0] wlan: [1118:E :CTL] Data Offset 4 Data Len 6
[ 1021.376682,0]
[ 1021.376834,0] wlan: [1118:E :CTL] CData: 51:51:255:154:134:164
[ 1021.376834,0]
[ 1021.376956,0] wlan: [1118:E :CTL] MData: 0:0:0:0:0:0
[ 1021.376956,0]
[ 1021.377658,0] wlan: [1118:E :CTL] UsData Off 8 UsSend 68 cfg -549414016
[ 1021.377780,0] wlan: [1118:E :CTL] Out: FID 3 FT 1
[ 1021.377841,0] wlan: [1118:E :CTL] NParams 2 CT 0
[ 1021.377903,0] wlan: [1118:E :CTL] Outroto 2 Comp Flag 1
[ 1021.377903,0]
[ 1021.378086,0] wlan: [1118:E :CTL] Data Offset 6 Data Len 2
[ 1021.378086,0]
[ 1021.378238,0] wlan: [1118:E :CTL] CData: 8:6:0:0:0:0
[ 1021.378238,0]
[ 1021.378360,0] wlan: [1118:E :CTL] MData: 0:0:0:0:0:0
[ 1021.378360,0]
[ 1021.378543,0] wlan: [1118:E :CTL] Outroto 2 Comp Flag 1
[ 1021.378543,0]
[ 1021.378666,0] wlan: [1118:E :CTL] Data Offset 32 Data Len 4
[ 1021.378666,0]
[ 1021.378849,0] wlan: [1118:E :CTL] CData: 10:0:0:4:0:0
[ 1021.378849,0]
[ 1021.379032,0] wlan: [1118:E :CTL] MData: 0:0:0:0:0:0
[ 1021.379032,0]
[ 1027.570333,1] SysRq : Emergency Remount R/O
[ 1027.621913,1] EXT4-fs (mmcblk0p36): re-mounted. Opts: (null)
[ 1027.661437,1] EXT4-fs (mmcblk0p23): re-mounted. Opts: (null)
[ 1027.671447,1] pn544 reboot notification received
[ 1027.671509,1] pn544_dev_ioctl ven_logic_high = 1.
[ 1027.671570,1] pn544_dev_ioctl ven_logic_low = 0.
[ 1027.671661,1] pn544_dev_ioctl discharge_delay = 0.
[ 1027.671722,1] pn544_dev_ioctl : power off
[ 1027.705997,1] pn544 calling ioctl power off returned = 0
[ 1027.706058,1] mmc0: reboot notification received
[ 1027.759132,1] EXT4-fs (mmcblk0p28): re-mounted. Opts: (null)
[ 1027.759377,1] Emergency Remount complete
[ 1028.306851,1] Disabling non-boot CPUs ...
[ 1028.308896,0] CPU1: shutdown
[ 1028.314115,0] Restarting system with command ''.
[ 1028.314176,0] Current task:init(1) Parent task:swapper/0(0)
[ 1028.314298,0] Going down for restart now
ABOOT.GIT = MBM-NG-V30.BE-0-g34b7ccb
TZ.GIT = MBM-NG-V30.BE-0-gc10fd11
RPM.GIT = MBM-NG-V30.BE-0-g2aa06de
SBL3.GIT = MBM-NG-V30.BE-0-gb2b97c8
SBL2.GIT = MBM-NG-V30.BE-0-gb2b97c8
SBL1.GIT = MBM-NG-V30.BE-0-gb2b97c8
Linux version 3.4.42-g756aa87 ([email protected]) (gcc version 4.8 (GCC) ) #1 S
MP PREEMPT Mon Aug 17 07:58:00 CDT 2015
RAM: Samsung, S4 SDRAM, 2048 MB, MR5:0x01, MR6:0x11, MR7:0x00, MR8:0x18
ACPU Krait PVS: 2 Hexagon: 1 Fuse: 0x10800
socinfo: id=138, ver=1.1, raw_id=2017, raw_ver=1, hw_plat=0, hw_plat_ver=65536,
hw_plat_subtype=0
No errors detected
Click to expand...
Click to collapse
So for 6 seconds WiFi went blank, which caused OS to panic and reboot? I'm a little confused. Where do I go and what do I read to figure out what's my phone's problem?
kschang said:
My Moto X (2013, Dev Edition on VZW, 5.1 L w/ Xposed and root and unlocked BL) seem to spontaneous reboot a couple times a day, doing different things, usually Bluetooth is on while I'm doing something else, but can't find any other common factors. Sometimes I'm just checking Google Now topics, sometimes I'm checking links in Chrome (but also happens with Dolphin)
I searched XDA and it says to check out last_kmsg which I got, but it's rather... dense? But there seems to be no kernel error. The log mainly contains "wlan:" notes, until it reaches the following:
So for 6 seconds WiFi went blank, which caused OS to panic and reboot? I'm a little confused. Where do I go and what do I read to figure out what's my phone's problem?
Click to expand...
Click to collapse
Greetings,
As a senior member of this site, with a device that has a dedicated forum, you are expected to know how to find your way. XDA Assist is for new members who need help finding their way, it is not a help desk for troubleshooting issues. Please re-read the sticky threads for this forum so you have a better understanding of what we do here.
Regards,
The_Merovingian
Forum Moderator
Thread closed.

[SOLVED] Bootloop/kernel panic in meminfo_proc_show() 3.10.65+ trying to port LOS12.1

Hello Android kernel hackers,
I am trying to port the current ASB-patched LOS12.1 (github "cm12-amami") to a Teclast 98 (M1E9) tablet for which kernel sources are missing. My build completes fine, however, I run into a boot loop due to kernel panic with an (at least for me) totally unhelpful stack trace:
During init.rc processing, the kernel panics on logd startup when logd tries to read from /proc/meminfo with the following stack trace:
Code:
[ 126.200788]00:02:29.656321 openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 4
[ 126.200956]00:02:29.656496 fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
[ 126.201077]00:02:29.656614 mprotect(0x7faf52b000, 4096, PROT_READ|PROT_WRITE) = 0
[ 126.201187]00:02:29.656726 mprotect(0x7faf52b000, 4096, PROT_READ) = 0
[ 126.202709]00:02:29.656833 read(4,
* KERNEL PANIC HAPPENS HERE!!! *
Code:
[ 126.202739]<1> (1)[949:logd]<1>start....
[ 126.202805]<1> (1)[949:logd]Unable to handle kernel NULL pointer dereference at virtual address 00000016
[ 126.202817]<1> (1)[949:logd]pgd = ffffffc070dee000
[ 126.202828]<1> (1)[949:logd][00000016] *pgd=0000000000000000 (1)[949:logd]
[ 126.202846]<1> (1)[949:logd][KERN Warning] ERROR/WARN forces debug_lock off!
[ 126.202854]<1> (1)[949:logd][KERN Warning] check backtrace:
[ 126.202868]<1> (1)[949:logd]CPU: 1 PID: 949 Comm: logd Tainted: G W 3.10.65+ #1
[ 126.202878]<1> (1)[949:logd]Call trace:
[ 126.202899]<1> (1)[949:logd][<ffffffc000088f50>] dump_backtrace+0x0/0x16c
[ 126.202913]<1> (1)[949:logd][<ffffffc0000890cc>] show_stack+0x10/0x1c
[ 126.202931]<1> (1)[949:logd][<ffffffc0009a69a0>] dump_stack+0x1c/0x28
[ 126.202947]<1> (1)[949:logd][<ffffffc0002f7210>] debug_locks_off+0x40/0x5c
[ 126.202960]<1> (1)[949:logd][<ffffffc00009a260>] oops_enter+0xc/0x28
[ 126.202974]<1> (1)[949:logd][<ffffffc000089100>] die+0x28/0x1d8
[ 126.202989]<1> (1)[949:logd][<ffffffc0009a49ec>] __do_kernel_fault.part.5+0x70/0x84
[ 126.203003]<1> (1)[949:logd][<ffffffc000094260>] do_page_fault+0x348/0x34c
[ 126.203017]<1> (1)[949:logd][<ffffffc000094350>] do_translation_fault+0x40/0x4c
[ 126.203030]<1> (1)[949:logd][<ffffffc0000813fc>] do_mem_abort+0x38/0x98
which does not seem to uncover the root cause, but rather the root cause stack trace seems to be:
Code:
[ 133.341226]<1>-(1)[949:logd]Call trace:
[ 133.341239]<1>-(1)[949:logd][<ffffffc0001f37d8>] meminfo_proc_show+0x50/0x3c4
[ 133.341255]<1>-(1)[949:logd][<ffffffc0001aefb8>] seq_read+0x1a4/0x40c
[ 133.341271]<1>-(1)[949:logd][<ffffffc0001ebeec>] proc_reg_read+0x4c/0x7c
[ 133.341285]<1>-(1)[949:logd][<ffffffc00018e75c>] vfs_read+0x88/0x170
[ 133.341298]<1>-(1)[949:logd][<ffffffc00018ebf0>] SyS_read+0x40/0x8c
[ 133.341310]<1>-(1)[949:logd]Code: 52800001 91326000 97fe67c1 aa0003f3 (f9400c00)
[ 133.341322]<1>-(1)[949:logd]---[ end trace 1b75b31a2719ed20 ]---
[ 133.341332]<1>-(1)[949:logd]Kernel panic - not syncing: Fatal exception
[ 133.341423]<1>-(1)[949:logd]mrdump: cpu[1] tsk:ffffffc073a3e000 ti:ffffffc070e64000
[ 134.241428]<1>-(1)[949:logd]
Most interestingly, the exact same kernel blob can successfully boot stock Android 5.1 and successfully read from /proc/meminfo when booted from stock boot.img while it crashes with my LOS12.1 build boot.img.
bootimg.cfg (using abootimg) is identical in both cases (except the boot size):
Code:
bootsize = 0x780000
pagesize = 0x800
kerneladdr = 0x40080000
ramdiskaddr = 0x44000000
secondaddr = 0x40f00000
tagsaddr = 0x4e000000
name = 1513588375
cmdline = bootopt=64S3,32N2,64N2 androidboot.selinux=permissive
Thanks a million in advance for any ideas or pointers about what might be going wrong with this stock kernel blob and my LOS12.1 build with regards to meminfo_proc_show()! :highfive:
awl14
Issue resolved!
Finally resolved by making changes (a whole number of, so I haven't tracked it down to one particular change) to my CM12.1 build's system partition, making it resemble the stock image more closely.
I still don't have any clues why the kernel would crash on reading from /proc/meminfo due to "wrong"/buggy contents in the system partition (/system file system), but as the issue is resolved, this can be regarded as a proof that such content in system can indeed matter in a critical way for the behaviour of the kernel...
My custom ROM for Teclast 98 (M1E9) runs fine now, I will publish a download link soon on xda.
Panic caused by kernel reading file /system/bin/cpuinfo
I encountered the same issue and was able to find the root cause. The kernel I'm dealing with has been modified by Chinese crooks who fake the amount of memory in the device by intercepting meminfo_proc_show(). In this routine, they read the file /system/bin/cpuinfo, apparently extracting the value to be shown to the user as the memory size from that file. The code does not even test the return code from the file opening routine, and simply crashes the kernel if the file is not present.

Categories

Resources