[Android Stick & Console RockChip based Computers] Timp74:
Building a kernel to work with this...

Hi Ian,

Thanks for your work on this. I've managed to get my Q8 RK3288(Board xt-q8l-v10) box booting into Linux from the SD card using your installation scripts.

However what I would really like to do is experiment with OpenCL on the GPU. Do do this I need compile a new kernel with the kernel source from ARM that matches the user space binary ARM posted.

The problem is that I can't get any of the kernels I compile to boot. Like the HDMI doesn't even initialise, so no logging. I've included my .config file that I'm using with the code from here:

https://github.com/linux-rockchip/linux-rockchip/tree/mirror/rk3288-rbox-kk

It's the 3.10.37 kernel.

Is there some unusual config to get the kernel to boot with the RK bootloader? I assume I can replace the kernel-linux.img without replacing the resource-linux.img given that the kernels are both 3.10.*

To flash the zImage I use the provided mkkrnlimg to create kernel-linux.img, and then do:

dd if=kernel-linux.img of=/dev/sdb conv=sync,fsync seek=$((0xC000))

replacing the kernel-linux.img with the one you provide makes the sdcard boot successfully again.

Any help would be great!

Tim.

UPDATE 22nd March

I managed to get access to the serial console. See here http://www.freaktab.com/showthread.php?24293-Serial-port-on-XT-Q8L-V10

The kernel I compiled reboots before flushing all data to the port. It's in a boot-loop logging

U-Boot 2014.10-RK3288-02 (Nov 10 2014 - 03:41:49)

CPU: rk3288
CPU's clock information:
arm pll = 600000000HZ
periph pll = 300000000HZ
ddr pll = 200000000HZ
codec pll = 594000000HZ
Board:	Rockchip platform Board
DRAM: Found dram banks:1
Adding bank:0000000000000000(0000000080000000)
128 MiB
SDCard Boot.
storage init OK!
Using default environment

GetParam
check parameter success
Unknow param: MACHINE_MODEL:linuxium-sdcard-parameter!
Unknow param: MACHINE_ID:007!
Unknow param: MANUFACTURER:RK30SDK!
Unknow param: PWR_HLD: 0,0,A,0,1!
failed to prepare fdt from boot!
power key: bank-0 pin-5
Enter power_led_init
can't find dts node for ricoh619
pmic:act8846
Can't find dts node for fuel guage cw201x
SecureBootEn = 0, SecureBootLock = 0

#Boot ver: 0000-00-00#0.00
empty serial no.
no fuel gauge found
no fuel gauge found
read logo_on switch from dts [0]
checkKey
vbus = 1
no fuel gauge found
failed to find part:misc
misc partition not found!
Hit any key to stop autoboot: 0
failed to load fdt from boot!
kernel @ 0x02000000 (0x005f4e38)
ramdisk @ 0x059fc000 (0x0015b520)
Secure Boot state: 0
bootrk: do_bootm_linux...
Loading Device Tree to 0561c000, end 05636f1c ... OK
Add bank:0000000000000000, 0000000080000000

Starting kernel ...

<hit enter to activate fiq debugger>
[ 0.000000] Booting Linux on physical CPU 0x500
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.0 (tp@nugget) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #8 SMP PREEMPT Sat Mar 21 18:24:56 CET 2015
[ 0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Rockchip RK3288 (Flattened Device Tree), model: rockchip,rk3288
[ 0.000000] rockchip_ion_reserve
[ 0.000000] cma: CMA: reserved 16 MiB at 2e800000
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] Boot mode: PANIC (7) flag: NORMAL (0xc3524200)
[ 0.000000] PERCPU: Embedded 9 pages/cpu @c1ce0000 s14016 r8192 d14656 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522768
[ 0.000000] Kernel command line: console=tty0 init=/sbin/init mtdparts=rk29xxnand:0x00008000@0x00002000(resource),0x00008000@0x0000A000(kernel),0x00010000@0x00012000(boot) storagemedia=sd loader.timestamp=2014-11-10_03:41:49
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 2048MB = 2048MB total
[ 0.000000] Memory: 2048728k/2048728k available, 48424k reserved, 1318912K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0a95bcc (10807 kB)
[ 0.000000] .init : 0xc0a96000 - 0xc0aeb6c0 ( 342 kB)
[ 0.000000] .data : 0xc0aec000 - 0xc0b8bb08 ( 639 kB)
[ 0.000000] .bss : 0xc0b8bb08 - 0xc0ca8a44 (1140 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000]	RCU dyntick-idle

The bits about device trees and fdt? in the boot-loader's output look suspicious... How does the kernel get the device tree in this setup? Device trees are new to me as this is my first time building ARM kernels.

UPDATE 26nd March

Turns out the hang kernel startup is due to having 'Framebuffer Console support' enabled. Compiling it as a module and loading once the systems up gives a SEGV. I've now got the Q8 booting into a basic Debian install but without Wifi or HDMI output.

UPDATE 5th April

I've got ARM's OpenCL working with the firefly kernel. I've started a project with wiki on BitBucket

https://bitbucket.org/DengueTim/q8-rk3288-kernel/wiki/Home