Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock/Linux Mainline"

(Boot log: Update to version 3.13.6)
(Use linux-next tree for kernel development)
Line 1: Line 1:
 
= Build Linux Mainline =
 
= Build Linux Mainline =
 +
 +
'''WARNING: this Linux kernel is intended for developers only. A lot of things are not working yet: I2C, SPI, USB, framebuffer, HDMI driver, SD/MMC, NAND Flash, etc.'''
  
 
== Download ==
 
== Download ==
  
Get latest Linux stable version, default config and initramfs.cpio.
+
Get linux-next kernel tree, default config and initramfs.cpio.
  
    wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.6.tar.xz
+
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
    tar xJf linux-3.13.6.tar.xz
+
cd linux-next
    cd linux-3.13.6
+
wget http://www.sntech.de/rockchip/rockchip_defconfig -O arch/arm/configs/rockchip_defconfig
    wget http://www.sntech.de/rockchip/rockchip_defconfig -O arch/arm/configs/rockchip_defconfig
+
wget http://www.sntech.de/rockchip/initramfs.cpio
    wget http://www.sntech.de/rockchip/initramfs.cpio
+
 
+
=== Apply latest patches from linux-next tree ===
+
 
+
These patches add snoop-control-unit, power-management-unit, smp bringup code, sram dt nodes and documentation (thanks to Heiko Stuebner).
+
 
+
    for i in f6f70cf7 de18e014 46b8219c5 a7a2b311 ; do curl -s https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/patch/?id=$i | patch -p1 ; done
+
  
 
== Build ==
 
== Build ==
  
    export ARCH=arm && export CROSS_COMPILE=arm-linux-gnueabihf-
+
export ARCH=arm && export CROSS_COMPILE=arm-linux-gnueabihf-
    make rockchip_defconfig
+
make rockchip_defconfig
    make -j8 rk3188-radxarock.dtb
+
make -j8 rk3188-radxarock.dtb
    make -j8 zImage
+
make -j8 zImage
  
 
== Flash boot image ==
 
== Flash boot image ==
  
    cat arch/arm/boot/zImage arch/arm/boot/dts/rk3188-radxarock.dtb > kernel.img
+
cat arch/arm/boot/zImage arch/arm/boot/dts/rk3188-radxarock.dtb > kernel.img
    mkbootimg --kernel kernel.img --ramdisk initramfs.cpio -o boot.img
+
mkbootimg --kernel kernel.img --ramdisk initramfs.cpio -o boot.img
    upgrade_tool di -b boot.img
+
upgrade_tool di -b boot.img
    upgrade_tool rd
+
upgrade_tool rd
  
 
The device will reboot and you will see the linux kernel booting with GPIO, UART and SMP support.
 
The device will reboot and you will see the linux kernel booting with GPIO, UART and SMP support.
 
'''TODO:''' among things that are not working yet and remain to be implemented in mainline kernel: I2C, SPI, USB, framebuffer, HDMI driver, etc.
 
  
 
= Boot log =
 
= Boot log =
  
    DDR Version 1.04 20130517
+
In
    In
+
3 3 DDR3
    DDR3
+
222MHz
    300MHz
+
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=8 Size=2048MB
    Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=8 Size=2048MB
+
Memory OK
    Memory OK
+
OUT
    OUT
+
BUILD=====2
    BUILD=====2
+
No.1 FLASH ID:2c 64 44 4b a9 0
    SdmmcInit=0 0
+
OK! 267026
    FwPartOffset=0 , 0
+
unsigned!
    No.1 FLASH ID:ad de 94 eb 74 44
+
SecureBootEn = 0 0
    No.2 FLASH ID:14 ff ff ff ff ff
+
Boot ver: 2014-03-03#2.13
    OK! 312004
+
RECOVERY key is pressed
    unsigned!
+
UsbBoot 272418
    SecureBootEn = 0 0
+
UsbHook ...926685
    Boot ver: 2013-12-27#2.10
+
powerOn 926711
    start_linux=====317529
+
  1198166 UsbConnected
    1903042 Starting kernel...@0x60408000
+
  1270413 UsbConnected
   
+
  1352808 UsbConnected
    Uncompressing Linux... done, booting the kernel.
+
DDR Version 1.04 20140217
    Booting Linux on physical CPU 0x0
+
In
    Linux version 3.13.6+ (julien@julien-ubuntu) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #1 SMP Thu Mar 13 11:34:41 CET 2014
+
SRX
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
+
DDR3
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
+
3 222MHz
    Machine model: Radxa Rock
+
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=8 Size=2048MB
    bootconsole [earlycon0] enabled
+
OUT
    Memory policy: Data cache writealloc
+
BUILD=====3
    PERCPU: Embedded 7 pages/cpu @c18dd000 s7616 r8192 d12864 u32768
+
No.1 FLASH ID:2c 64 44 4b a9 0
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522768
+
No.2 FLASH ID:7f ff ff ff ff ff
    Kernel command line: console=ttyS2,115200 earlyprintk init=/init
+
OK! 273294
    PID hash table entries: 4096 (order: 2, 16384 bytes)
+
unsigned!
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
+
SecureBootEn = 0 0
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
+
Boot ver: 2014-03-03#2.13
    Memory: 2074164K/2097152K available (2491K kernel code, 128K rwdata, 728K rodata, 2011K init, 207K bss, 22988K reserved, 1318912K highmem)
+
start_linux=====278869
    Virtual kernel memory layout:
+
  2046791 Starting kernel...@0x60408000
        vector  : 0xffff0000 - 0xffff1000  (  4 kB)
+
        fixmap  : 0xfff00000 - 0xfffe0000  ( 896 kB)
+
Uncompressing Linux... done, booting the kernel.
        vmalloc : 0xf0000000 - 0xff000000  ( 240 MB)
+
[    0.000000] Booting Linux on physical CPU 0x0
        lowmem  : 0xc0000000 - 0xef800000  ( 760 MB)
+
[    0.000000] Linux version 3.15.0-rc1-next-20140414 (julien@pandora) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #2 SMP Mon Apr 14 16:10:50 CEST 2014
        pkmap  : 0xbfe00000 - 0xc0000000  (  2 MB)
+
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
        modules : 0xbf000000 - 0xbfe00000  (  14 MB)
+
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
          .text : 0xc0008000 - 0xc032cf0c   (3220 kB)
+
[    0.000000] Machine model: Radxa Rock
          .init : 0xc032d000 - 0xc0523dc0   (2012 kB)
+
[    0.000000] bootconsole [earlycon0] enabled
          .data : 0xc0524000 - 0xc05442c8   ( 129 kB)
+
[    0.000000] Memory policy: Data cache writealloc
          .bss : 0xc05442d0 - 0xc0578058   ( 208 kB)
+
[    0.000000] PERCPU: Embedded 7 pages/cpu @ee7c6000 s7680 r8192 d12800 u32768
    Hierarchical RCU implementation.
+
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522768
    NR_IRQS:16 nr_irqs:16 16
+
[    0.000000] Kernel command line: console=ttyS2,115200 earlyprintk init=/init
    sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 28633115641ns
+
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    Console: colour dummy device 80x30
+
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
+
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    pid_max: default: 32768 minimum: 301
+
[    0.000000] Memory: 2074088K/2097152K available (2551K kernel code, 131K rwdata, 740K rodata, 2019K init, 209K bss, 23064K reserved, 1318912K highmem)
    Mount-cache hash table entries: 512
+
[    0.000000] Virtual kernel memory layout:
    CPU: Testing write buffer coherency: ok
+
[    0.000000]    vector  : 0xffff0000 - 0xffff1000  (  4 kB)
    Setting up static identity map for 0x60274fc8 - 0x60275020
+
[    0.000000]    fixmap  : 0xfff00000 - 0xfffe0000  ( 896 kB)
    CPU1: Booted secondary processor
+
[    0.000000]    vmalloc : 0xf0000000 - 0xff000000  ( 240 MB)
    CPU2: Booted secondary processor
+
[    0.000000]    lowmem  : 0xc0000000 - 0xef800000  ( 760 MB)
    CPU3: Booted secondary processor
+
[    0.000000]    pkmap  : 0xbfe00000 - 0xc0000000  (  2 MB)
    Brought up 4 CPUs
+
[    0.000000]    modules : 0xbf000000 - 0xbfe00000  (  14 MB)
    SMP: Total of 4 processors activated.
+
[    0.000000]      .text : 0xc0008000 - 0xc033eeec   (3292 kB)
    CPU: All CPU(s) started in SVC mode.
+
[    0.000000]      .init : 0xc033f000 - 0xc0537e00   (2020 kB)
    devtmpfs: initialized
+
[    0.000000]      .data : 0xc0538000 - 0xc0558e90   ( 132 kB)
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
+
[    0.000000]        .bss : 0xc0558e98 - 0xc058d594   ( 210 kB)
    pinctrl core: initialized pinctrl subsystem
+
[    0.000000] Hierarchical RCU implementation.
    regulator-dummy: no parameters
+
[    0.000000] NR_IRQS:16 nr_irqs:16 16
    NET: Registered protocol family 16
+
[    0.000021] sched_clock: 64 bits at 150MHz, resolution 6ns, wraps every 1832519401472ns
    DMA: preallocated 256 KiB pool for atomic coherent allocations
+
[    0.009620] Console: colour dummy device 80x30
    cpuidle: using governor ladder
+
[    0.014626] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
    cpuidle: using governor menu
+
[    0.102253] pid_max: default: 32768 minimum: 301
    L310 cache controller enabled
+
[    0.107648] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    l2x0: 16 ways, CACHE_ID 0x4100c0c8, AUX_CTRL 0x76050001, Cache size: 512 kB
+
[    0.115059] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
+
[    0.123874] CPU: Testing write buffer coherency: ok
    hw-breakpoint: maximum watchpoint size is 4 bytes.
+
[    0.130006] Setting up static identity map for 0x60283ea8 - 0x60283f00
    bio: create slab <bio-0> at 0
+
[    0.141348] CPU1: Booted secondary processor
    SCSI subsystem initialized
+
[    0.180620] CPU2: Booted secondary processor
    Switched to clocksource arm_global_timer
+
[    0.220659] CPU3: Booted secondary processor
    NET: Registered protocol family 2
+
[    0.259308] Brought up 4 CPUs
    TCP established hash table entries: 8192 (order: 3, 32768 bytes)
+
[    0.277018] SMP: Total of 4 processors activated.
    TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
+
[    0.282303] CPU: All CPU(s) started in SVC mode.
    TCP: Hash tables configured (established 8192 bind 8192)
+
[    0.288319] devtmpfs: initialized
    TCP: reno registered
+
[    0.297250] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    UDP hash table entries: 512 (order: 2, 16384 bytes)
+
[    0.306337] pinctrl core: initialized pinctrl subsystem
    UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
+
[    0.312800] regulator-dummy: no parameters
    NET: Registered protocol family 1
+
[    0.320519] NET: Registered protocol family 16
    bounce pool size: 64 pages
+
[    0.326502] DMA: preallocated 256 KiB pool for atomic coherent allocations
    msgmni has been set to 1475
+
[    0.334756] cpuidle: using governor ladder
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
+
[    0.339400] cpuidle: using governor menu
    io scheduler noop registered
+
[    0.343959] L310 cache controller enabled
    io scheduler deadline registered (default)
+
[    0.348460] l2x0: 16 ways, CACHE_ID 0x4100c0c8, AUX_CTRL 0x76050001, Cache size: 512 kB
    Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
+
[    0.360943] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    10124000.serial: ttyS0 at MMIO 0x10124000 (irq = 66, base_baud = 1500000) is a 16550A
+
[    0.369844] hw-breakpoint: maximum watchpoint size is 4 bytes.
    dw-apb-uart 10126000.serial: Couldn't set LCR to 0
+
[    0.380991] SCSI subsystem initialized
    dw-apb-uart 10126000.serial: Couldn't set LCR to 0
+
[    0.386198] Switched to clocksource arm_global_timer
    10126000.serial: ttyS1 at MMIO 0x10126000 (irq = 67, base_baud = 1500000) is a 16550A
+
[    0.403056] NET: Registered protocol family 2
    20064000.serial: ttyS2 at MMIO 0x20064000 (irq = 68, base_baud = 1500000) is a 16550A
+
[    0.408724] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    console [ttyS2] enabled
+
[    0.416680] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    console [ttyS2] enabled
+
[    0.424023] TCP: Hash tables configured (established 8192 bind 8192)
    bootconsole [earlycon0] disabled
+
[    0.431211] TCP: reno registered
    bootconsole [earlycon0] disabled
+
[    0.434859] UDP hash table entries: 512 (order: 2, 16384 bytes)
    dw-apb-uart 20068000.serial: Couldn't set LCR to 0
+
[    0.441509] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    dw-apb-uart 20068000.serial: Couldn't set LCR to 0
+
[    0.448859] NET: Registered protocol family 1
    20068000.serial: ttyS3 at MMIO 0x20068000 (irq = 69, base_baud = 1500000) is a 16550A
+
[    0.583624] futex hash table entries: 1024 (order: 4, 65536 bytes)
    brd: module loaded
+
[    0.591714] bounce pool size: 64 pages
    mousedev: PS/2 mouse device common for all mice
+
[    0.596430] msgmni has been set to 1474
    Synopsys Designware Multimedia Card Interface Driver
+
[    0.601430] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
    TCP: cubic registered
+
[    0.609689] io scheduler noop registered
    NET: Registered protocol family 17
+
[    0.614088] io scheduler deadline registered (default)
    input: gpio-keys.1 as /devices/soc.0/gpio-keys.1/input/input0
+
[    0.620105] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    Freeing unused kernel memory: 2008K (c032d000 - c0523000)
+
[    0.628965] 10124000.serial: ttyS0 at MMIO 0x10124000 (irq = 66, base_baud = 1500000) is a 16550A
    mount: mounting /dev/mmcblk0p1 on /mnt failed: No such device or address
+
[    0.661593] dw-apb-uart 10126000.serial: Couldn't set LCR to 0
    total 0
+
[    0.670018] dw-apb-uart 10126000.serial: Couldn't set LCR to 0
    drwxr-xr-x    2 1000    1000            40 May 30  2013 .
+
[    0.676568] 10126000.serial: ttyS1 at MMIO 0x10126000 (irq = 67, base_baud = 1500000) is a 16550A
    drwxr-xr-x  13 1000    1000          280 Jun  9  2013 ..
+
[    0.687132] console [ttyS2] disabled
    umount: can't umount /mnt: Invalid argument
+
[    0.711313] 20064000.serial: ttyS2 at MMIO 0x20064000 (irq = 68, base_baud = 1500000) is a 16550A
    processor : 0
+
[    0.721192] console [ttyS2] enabled
    model name : ARMv7 Processor rev 0 (v7l)
+
[    0.721192] console [ttyS2] enabled
    Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
+
[    0.728603] bootconsole [earlycon0] disabled
    CPU implementer : 0x41
+
[    0.728603] bootconsole [earlycon0] disabled
    CPU architecture: 7
+
[    0.761298] dw-apb-uart 20068000.serial: Couldn't set LCR to 0
    CPU variant : 0x3
+
[    0.770043] dw-apb-uart 20068000.serial: Couldn't set LCR to 0
    CPU part : 0xc09
+
[    0.775903] 20068000.serial: ttyS3 at MMIO 0x20068000 (irq = 69, base_baud = 1500000) is a 16550A
    CPU revision : 0
+
[    0.785905] brd: module loaded
   
+
[    0.789367] mousedev: PS/2 mouse device common for all mice
    processor : 1
+
[    0.795010] Synopsys Designware Multimedia Card Interface Driver
    model name : ARMv7 Processor rev 0 (v7l)
+
[    0.801361] TCP: cubic registered
    Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
+
[    0.804699] NET: Registered protocol family 17
    CPU implementer : 0x41
+
[    0.810545] input: gpio-keys.1 as /devices/soc.0/gpio-keys.1/input/input0
    CPU architecture: 7
+
[    0.826727] Freeing unused kernel memory: 2016K (c033f000 - c0537000)
    CPU variant : 0x3
+
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such device or address
    CPU part : 0xc09
+
total 0
    CPU revision : 0
+
drwxr-xr-x    2 1000    1000            40 May 30  2013 .
   
+
drwxr-xr-x  13 1000    1000          280 Jun  9  2013 ..
    processor : 2
+
umount: can't umount /mnt: Invalid argument
    model name : ARMv7 Processor rev 0 (v7l)
+
processor : 0
    Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
+
model name : ARMv7 Processor rev 0 (v7l)
    CPU implementer : 0x41
+
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
    CPU architecture: 7
+
CPU implementer : 0x41
    CPU variant : 0x3
+
CPU architecture: 7
    CPU part : 0xc09
+
CPU variant : 0x3
    CPU revision : 0
+
CPU part : 0xc09
   
+
CPU revision : 0
    processor : 3
+
    model name : ARMv7 Processor rev 0 (v7l)
+
processor : 1
    Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
+
model name : ARMv7 Processor rev 0 (v7l)
    CPU implementer : 0x41
+
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
    CPU architecture: 7
+
CPU implementer : 0x41
    CPU variant : 0x3
+
CPU architecture: 7
    CPU part : 0xc09
+
CPU variant : 0x3
    CPU revision : 0
+
CPU part : 0xc09
   
+
CPU revision : 0
    Hardware : Rockchip Cortex-A9 (Device Tree)
+
    Revision : 0000
+
processor : 2
    Serial : 0000000000000000
+
model name : ARMv7 Processor rev 0 (v7l)
   
+
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
   
+
CPU implementer : 0x41
    BusyBox v1.20.2 (Debian 1:1.20.0-8) built-in shell (ash)
+
CPU architecture: 7
    Enter 'help' for a list of built-in commands.
+
CPU variant : 0x3
   
+
CPU part : 0xc09
    /bin/sh: can't access tty; job control turned off
+
CPU revision : 0
    / # ps
+
    PID  USER    COMMAND
+
processor : 3
        1 0        {init} /bin/sh /init
+
model name : ARMv7 Processor rev 0 (v7l)
        2 0        [kthreadd]
+
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32  
        3 0        [ksoftirqd/0]
+
CPU implementer : 0x41
        4 0        [kworker/0:0]
+
CPU architecture: 7
        5 0        [kworker/0:0H]
+
CPU variant : 0x3
        6 0        [kworker/u8:0]
+
CPU part : 0xc09
        7 0        [rcu_sched]
+
CPU revision : 0
        8 0        [rcu_bh]
+
        9 0        [migration/0]
+
Hardware : Rockchip Cortex-A9 (Device Tree)
      10 0        [migration/1]
+
Revision : 0000
      11 0        [ksoftirqd/1]
+
Serial : 0000000000000000
      12 0        [kworker/1:0]
+
      13 0        [kworker/1:0H]
+
      14 0        [migration/2]
+
BusyBox v1.20.2 (Debian 1:1.20.0-8) built-in shell (ash)
      15 0        [ksoftirqd/2]
+
Enter 'help' for a list of built-in commands.
      16 0        [kworker/2:0]
+
      17 0        [kworker/2:0H]
+
/bin/sh: can't access tty; job control turned off
      18 0        [migration/3]
+
/ #
      19 0        [ksoftirqd/3]
+
/ # ps
      20 0        [kworker/3:0]
+
PID  USER    COMMAND
      21 0        [kworker/3:0H]
+
    1 0        {init} /bin/sh /init
      22 0        [khelper]
+
    2 0        [kthreadd]
      23 0        [kdevtmpfs]
+
    3 0        [ksoftirqd/0]
      24 0        [netns]
+
    4 0        [kworker/0:0]
      25 0        [writeback]
+
    5 0        [kworker/0:0H]
      26 0        [bioset]
+
    6 0        [kworker/u8:0]
      27 0        [kblockd]
+
    7 0        [rcu_sched]
      28 0        [kworker/0:1]
+
    8 0        [rcu_bh]
      29 0        [kswapd0]
+
    9 0        [migration/0]
      30 0        [fsnotify_mark]
+
    10 0        [migration/1]
      31 0        [kworker/u8:1]
+
    11 0        [ksoftirqd/1]
      34 0        [deferwq]
+
    12 0        [kworker/1:0]
      39 0        [kworker/1:1]
+
    13 0        [kworker/1:0H]
       40 0        [kworker/2:1]
+
    14 0        [migration/2]
      57 0        /bin/sh
+
    15 0        [ksoftirqd/2]
      58 0        [kworker/3:1]
+
    16 0        [kworker/2:0]
      59 0        {busybox} ps
+
    17 0        [kworker/2:0H]
    / # help
+
    18 0        [migration/3]
    Built-in commands:
+
    19 0        [ksoftirqd/3]
    ------------------
+
    20 0        [kworker/3:0]
    . : [ [[ alias bg break cd chdir command continue echo eval exec
+
    21 0        [kworker/3:0H]
    exit export false fg getopts hash help jobs kill let local printf
+
    22 0        [khelper]
    pwd read readonly return set shift source test times trap true
+
    23 0        [kdevtmpfs]
    type ulimit umask unalias unset wait [ [[ adjtimex ar arp arping
+
    24 0        [netns]
    ash awk basename blockdev brctl bunzip2 bzcat bzip2 cal cat chgrp
+
    25 0        [writeback]
    chmod chown chroot chvt clear cmp cp cpio crond crontab cttyhack
+
    26 0        [bioset]
    cut date dc dd deallocvt depmod df diff dirname dmesg dnsdomainname
+
    27 0        [kblockd]
    dos2unix dpkg dpkg-deb du dumpkmap dumpleases echo ed egrep env
+
    28 0        [kworker/0:1]
    expand expr false fdisk fgrep find fold free freeramdisk ftpget
+
    29 0        [kswapd0]
    ftpput getopt getty grep groups gunzip gzip halt head hexdump
+
    30 0        [fsnotify_mark]
    hostid hostname httpd hwclock id ifconfig ifdown ifup init insmod
+
    31 0        [kworker/u8:1]
    ionice ip ipcalc kill killall klogd last less ln loadfont loadkmap
+
    34 0        [kworker/1:1]
    logger login logname logread losetup ls lsmod lzcat lzma md5sum
+
    35 0       [deferwq]
    mdev microcom mkdir mkfifo mknod mkswap mktemp modinfo modprobe
+
    38 0        [kworker/2:1]
    more mount mt mv nameif nc netstat nslookup od openvt passwd
+
    57 0        /bin/sh
    patch pidof ping ping6 pivot_root poweroff printf ps pwd rdate
+
    58 0        [kworker/3:1]
    readlink realpath reboot renice reset rev rm rmdir rmmod route
+
    59 0        {busybox} ps
    rpm rpm2cpio run-parts sed seq setkeycodes setsid sh sha1sum
+
/ # cat /proc/interrupts
    sha256sum sha512sum sleep sort start-stop-daemon stat strings
+
            CPU0      CPU1      CPU2      CPU3     
    stty su sulogin swapoff swapon switch_root sync sysctl syslogd
+
  27:         0          0          0          0      GIC 27  gt
    tac tail tar taskset tee telnet telnetd test tftp time timeout
+
  29:     36951      36928      36931      36927      GIC 29  twd
    top touch tr traceroute traceroute6 true tty tunctl udhcpc udhcpd
+
  68:       205          0         0         0       GIC  68  serial
    umount uname uncompress unexpand uniq unix2dos unlzma unxz unzip
+
160:         0         0         0          0  rockchip_gpio_irq  4  GPIO Key Power
    uptime usleep uudecode uuencode vconfig vi watch watchdog wc
+
IPI0:         0         0         0         0 CPU wakeup interrupts
    wget which who whoami xargs xz xzcat yes zcat
+
IPI1:         0         0          0          0  Timer broadcast interrupts
   
+
IPI2:         99        116        30        22  Rescheduling interrupts
    / # mkdir /usr/bin /usr/sbin
+
IPI3:         1        53        54        54  Function call interrupts
    / # /bin/busybox --install
+
IPI4:         0         0         0          Single function call interrupts
    / # ifconfig -a
+
IPI5:         0         0         0         0  CPU stop interrupts
    lo        Link encap:Local Loopback  
+
IPI6:        10          5          6          0  IRQ work interrupts
              LOOPBACK  MTU:65536 Metric:1
+
IPI7:          0          0          0          0  completion interrupts
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
+
Err:          0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
+
  / #
              collisions:0 txqueuelen:0
+
              RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
+
   
+
    / # mount
+
    rootfs on / type rootfs (rw,size=1037080k,nr_inodes=188813)
+
    proc on /proc type proc (rw,relatime)
+
    sysfs on /sys type sysfs (rw,relatime)
+
    none on /debug type debugfs (rw,relatime)
+
    / # mount -t devtmpfs none /dev
+
    / # ls /dev
+
    console            tty17              tty37              tty57
+
    cpu_dma_latency    tty18              tty38              tty58
+
    full                tty19              tty39              tty59
+
    input              tty2                tty4                tty6
+
    kmsg                tty20              tty40              tty60
+
    mem                tty21              tty41              tty61
+
    network_latency    tty22              tty42              tty62
+
    network_throughput tty23              tty43              tty63
+
    null                tty24              tty44              tty7
+
    ptmx                tty25              tty45              tty8
+
    ram0                tty26              tty46              tty9
+
    random              tty27              tty47              ttyS0
+
    tty                tty28              tty48              ttyS1
+
    tty0                tty29              tty49              ttyS2
+
    tty1                tty3                tty5                ttyS3
+
    tty10              tty30              tty50              urandom
+
    tty11              tty31              tty51              vcs
+
    tty12              tty32              tty52              vcs1
+
    tty13              tty33              tty53              vcsa
+
    tty14              tty34              tty54              vcsa1
+
    tty15              tty35              tty55              zero
+
    tty16              tty36              tty56
+
    / #
+

Revision as of 14:26, 14 April 2014

Build Linux Mainline

WARNING: this Linux kernel is intended for developers only. A lot of things are not working yet: I2C, SPI, USB, framebuffer, HDMI driver, SD/MMC, NAND Flash, etc.

Download

Get linux-next kernel tree, default config and initramfs.cpio.

git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
cd linux-next
wget http://www.sntech.de/rockchip/rockchip_defconfig -O arch/arm/configs/rockchip_defconfig
wget http://www.sntech.de/rockchip/initramfs.cpio

Build

export ARCH=arm && export CROSS_COMPILE=arm-linux-gnueabihf-
make rockchip_defconfig
make -j8 rk3188-radxarock.dtb
make -j8 zImage

Flash boot image

cat arch/arm/boot/zImage arch/arm/boot/dts/rk3188-radxarock.dtb > kernel.img
mkbootimg --kernel kernel.img --ramdisk initramfs.cpio -o boot.img
upgrade_tool di -b boot.img
upgrade_tool rd

The device will reboot and you will see the linux kernel booting with GPIO, UART and SMP support.

Boot log

In
3 3 DDR3
222MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=8 Size=2048MB
Memory OK
OUT
BUILD=====2
No.1 FLASH ID:2c 64 44 4b a9 0
OK! 267026
unsigned!
SecureBootEn = 0 0
Boot ver: 2014-03-03#2.13
RECOVERY key is pressed
UsbBoot 272418
UsbHook ...926685
powerOn 926711
 1198166 UsbConnected
 1270413 UsbConnected
 1352808 UsbConnected
DDR Version 1.04 20140217
In
SRX
DDR3
3 222MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=8 Size=2048MB
OUT
BUILD=====3
No.1 FLASH ID:2c 64 44 4b a9 0
No.2 FLASH ID:7f ff ff ff ff ff
OK! 273294
unsigned!
SecureBootEn = 0 0
Boot ver: 2014-03-03#2.13
start_linux=====278869
 2046791 Starting kernel...@0x60408000

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.15.0-rc1-next-20140414 (julien@pandora) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #2 SMP Mon Apr 14 16:10:50 CEST 2014
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Radxa Rock
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 7 pages/cpu @ee7c6000 s7680 r8192 d12800 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522768
[    0.000000] Kernel command line: console=ttyS2,115200 earlyprintk init=/init
[    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: 2074088K/2097152K available (2551K kernel code, 131K rwdata, 740K rodata, 2019K init, 209K bss, 23064K 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 - 0xc033eeec   (3292 kB)
[    0.000000]       .init : 0xc033f000 - 0xc0537e00   (2020 kB)
[    0.000000]       .data : 0xc0538000 - 0xc0558e90   ( 132 kB)
[    0.000000]        .bss : 0xc0558e98 - 0xc058d594   ( 210 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000021] sched_clock: 64 bits at 150MHz, resolution 6ns, wraps every 1832519401472ns
[    0.009620] Console: colour dummy device 80x30
[    0.014626] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
[    0.102253] pid_max: default: 32768 minimum: 301
[    0.107648] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.115059] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.123874] CPU: Testing write buffer coherency: ok
[    0.130006] Setting up static identity map for 0x60283ea8 - 0x60283f00
[    0.141348] CPU1: Booted secondary processor
[    0.180620] CPU2: Booted secondary processor
[    0.220659] CPU3: Booted secondary processor
[    0.259308] Brought up 4 CPUs
[    0.277018] SMP: Total of 4 processors activated.
[    0.282303] CPU: All CPU(s) started in SVC mode.
[    0.288319] devtmpfs: initialized
[    0.297250] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.306337] pinctrl core: initialized pinctrl subsystem
[    0.312800] regulator-dummy: no parameters
[    0.320519] NET: Registered protocol family 16
[    0.326502] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.334756] cpuidle: using governor ladder
[    0.339400] cpuidle: using governor menu
[    0.343959] L310 cache controller enabled
[    0.348460] l2x0: 16 ways, CACHE_ID 0x4100c0c8, AUX_CTRL 0x76050001, Cache size: 512 kB
[    0.360943] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.369844] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.380991] SCSI subsystem initialized
[    0.386198] Switched to clocksource arm_global_timer
[    0.403056] NET: Registered protocol family 2
[    0.408724] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.416680] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.424023] TCP: Hash tables configured (established 8192 bind 8192)
[    0.431211] TCP: reno registered
[    0.434859] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.441509] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.448859] NET: Registered protocol family 1
[    0.583624] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.591714] bounce pool size: 64 pages
[    0.596430] msgmni has been set to 1474
[    0.601430] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.609689] io scheduler noop registered
[    0.614088] io scheduler deadline registered (default)
[    0.620105] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.628965] 10124000.serial: ttyS0 at MMIO 0x10124000 (irq = 66, base_baud = 1500000) is a 16550A
[    0.661593] dw-apb-uart 10126000.serial: Couldn't set LCR to 0
[    0.670018] dw-apb-uart 10126000.serial: Couldn't set LCR to 0
[    0.676568] 10126000.serial: ttyS1 at MMIO 0x10126000 (irq = 67, base_baud = 1500000) is a 16550A
[    0.687132] console [ttyS2] disabled
[    0.711313] 20064000.serial: ttyS2 at MMIO 0x20064000 (irq = 68, base_baud = 1500000) is a 16550A
[    0.721192] console [ttyS2] enabled
[    0.721192] console [ttyS2] enabled
[    0.728603] bootconsole [earlycon0] disabled
[    0.728603] bootconsole [earlycon0] disabled
[    0.761298] dw-apb-uart 20068000.serial: Couldn't set LCR to 0
[    0.770043] dw-apb-uart 20068000.serial: Couldn't set LCR to 0
[    0.775903] 20068000.serial: ttyS3 at MMIO 0x20068000 (irq = 69, base_baud = 1500000) is a 16550A
[    0.785905] brd: module loaded
[    0.789367] mousedev: PS/2 mouse device common for all mice
[    0.795010] Synopsys Designware Multimedia Card Interface Driver
[    0.801361] TCP: cubic registered
[    0.804699] NET: Registered protocol family 17
[    0.810545] input: gpio-keys.1 as /devices/soc.0/gpio-keys.1/input/input0
[    0.826727] Freeing unused kernel memory: 2016K (c033f000 - c0537000)
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such device or address
total 0
drwxr-xr-x    2 1000     1000            40 May 30  2013 .
drwxr-xr-x   13 1000     1000           280 Jun  9  2013 ..
umount: can't umount /mnt: Invalid argument
processor	: 0
model name	: ARMv7 Processor rev 0 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc09
CPU revision	: 0

processor	: 1
model name	: ARMv7 Processor rev 0 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc09
CPU revision	: 0

processor	: 2
model name	: ARMv7 Processor rev 0 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc09
CPU revision	: 0

processor	: 3
model name	: ARMv7 Processor rev 0 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc09
CPU revision	: 0

Hardware	: Rockchip Cortex-A9 (Device Tree)
Revision	: 0000
Serial		: 0000000000000000


BusyBox v1.20.2 (Debian 1:1.20.0-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
/ #
/ # ps
PID   USER     COMMAND
    1 0        {init} /bin/sh /init
    2 0        [kthreadd]
    3 0        [ksoftirqd/0]
    4 0        [kworker/0:0]
    5 0        [kworker/0:0H]
    6 0        [kworker/u8:0]
    7 0        [rcu_sched]
    8 0        [rcu_bh]
    9 0        [migration/0]
   10 0        [migration/1]
   11 0        [ksoftirqd/1]
   12 0        [kworker/1:0]
   13 0        [kworker/1:0H]
   14 0        [migration/2]
   15 0        [ksoftirqd/2]
   16 0        [kworker/2:0]
   17 0        [kworker/2:0H]
   18 0        [migration/3]
   19 0        [ksoftirqd/3]
   20 0        [kworker/3:0]
   21 0        [kworker/3:0H]
   22 0        [khelper]
   23 0        [kdevtmpfs]
   24 0        [netns]
   25 0        [writeback]
   26 0        [bioset]
   27 0        [kblockd]
   28 0        [kworker/0:1]
   29 0        [kswapd0]
   30 0        [fsnotify_mark]
   31 0        [kworker/u8:1]
   34 0        [kworker/1:1]
   35 0        [deferwq]
   38 0        [kworker/2:1]
   57 0        /bin/sh
   58 0        [kworker/3:1]
   59 0        {busybox} ps
/ # cat /proc/interrupts 
           CPU0       CPU1       CPU2       CPU3       
 27:          0          0          0          0       GIC  27  gt
 29:      36951      36928      36931      36927       GIC  29  twd
 68:        205          0          0          0       GIC  68  serial
160:          0          0          0          0  rockchip_gpio_irq   4  GPIO Key Power
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:         99        116         30         22  Rescheduling interrupts
IPI3:          1         53         54         54  Function call interrupts
IPI4:          0          0          0          0  Single function call interrupts
IPI5:          0          0          0          0  CPU stop interrupts
IPI6:         10          5          6          0  IRQ work interrupts
IPI7:          0          0          0          0  completion interrupts
Err:          0
/ #