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

Rock/Linux Mainline

< Rock
Revision as of 10:59, 13 March 2014 by Julien (Talk | contribs)

Build Linux Mainline

Download

Get latest Linux stable version, default config and initramfs.cpio.

   wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.6.tar.xz
   tar xJf linux-3.13.6.tar.xz
   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/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

   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.

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

   DDR Version 1.04 20130517
   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
   SdmmcInit=0 20
   No.1 FLASH ID:2c 64 44 4b a9 0
   No.2 FLASH ID:f ff ff ff ff ff
   No.3 FLASH ID:1f ff ff ff ff ff
   No.4 FLASH ID:f ff ff ff ff ff
   gpReadRetrial pageadd=3f0402  eccbit=28 errorbit=ffffffff
   FlashReadPage pageadd=3f0402  pageadd1=3b37f7ff  eccbit=28 errorbit=ffffffff
   spare: 0x0:a5760f36 aab7ffb1 aab7ffb4 aab7ffb0 
   gpReadRetrial pageadd=3f0403  eccbit=28 errorbit=ffffffff
   FlashReadPage pageadd=3f0403  pageadd1=3b37f7ff  eccbit=28 errorbit=ffffffff
   spare: 0x0:d1fb3418 de3ac49f de3ac49e de3ac49e 
   OK! 362185
   unsigned!
   SecureBootEn = 0 0
   Boot ver: 2013-12-27#2.10
   start_linux=====367703
    2023429 Starting kernel...@0x60408000
   
   Uncompressing Linux... done, booting the kernel.
   Booting Linux on physical CPU 0x0
   Linux version 3.13.1 (julien@julien-ubuntu) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #4 SMP Mon Feb 3 17:43:45 CET 2014
   CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
   CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
   Machine model: Radxa Rock
   bootconsole [earlycon0] enabled
   Memory policy: Data cache writealloc
   PERCPU: Embedded 7 pages/cpu @c18dd000 s7616 r8192 d12864 u32768
   Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522768
   Kernel command line: console=ttyS2,115200 earlyprintk init=/init
   PID hash table entries: 4096 (order: 2, 16384 bytes)
   Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
   Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
   Memory: 2074164K/2097152K available (2491K kernel code, 128K rwdata, 728K rodata, 2011K init, 207K bss, 22988K reserved, 1318912K highmem)
   Virtual kernel memory layout:
       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
       fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
       vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
       lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
         .text : 0xc0008000 - 0xc032cf0c   (3220 kB)
         .init : 0xc032d000 - 0xc0523dc0   (2012 kB)
         .data : 0xc0524000 - 0xc0544288   ( 129 kB)
          .bss : 0xc0544290 - 0xc0578018   ( 208 kB)
   Hierarchical RCU implementation.
   NR_IRQS:16 nr_irqs:16 16
   sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 28633115641ns
   Console: colour dummy device 80x30
   Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
   pid_max: default: 32768 minimum: 301
   Mount-cache hash table entries: 512
   CPU: Testing write buffer coherency: ok
   Setting up static identity map for 0x60274c88 - 0x60274ce0
   CPU1: failed to boot: -38
   CPU2: failed to boot: -38
   CPU3: failed to boot: -38
   Brought up 1 CPUs
   SMP: Total of 1 processors activated.
   CPU: All CPU(s) started in SVC mode.
   devtmpfs: initialized
   VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
   pinctrl core: initialized pinctrl subsystem
   regulator-dummy: no parameters
   NET: Registered protocol family 16
   DMA: preallocated 256 KiB pool for atomic coherent allocations
   cpuidle: using governor ladder
   cpuidle: using governor menu
   L310 cache controller enabled
   l2x0: 16 ways, CACHE_ID 0x4100c0c8, AUX_CTRL 0x76050001, Cache size: 512 kB
   hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
   hw-breakpoint: maximum watchpoint size is 4 bytes.
   bio: create slab <bio-0> at 0
   SCSI subsystem initialized
   Switched to clocksource arm_global_timer
   NET: Registered protocol family 2
   TCP established hash table entries: 8192 (order: 3, 32768 bytes)
   TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
   TCP: Hash tables configured (established 8192 bind 8192)
   TCP: reno registered
   UDP hash table entries: 512 (order: 2, 16384 bytes)
   UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
   NET: Registered protocol family 1
   bounce pool size: 64 pages
   msgmni has been set to 1475
   Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
   io scheduler noop registered
   io scheduler deadline registered (default)
   Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
   10124000.serial: ttyS0 at MMIO 0x10124000 (irq = 66, base_baud = 1500000) is a 16550A
   dw-apb-uart 10126000.serial: Couldn't set LCR to 0
   dw-apb-uart 10126000.serial: Couldn't set LCR to 0
   10126000.serial: ttyS1 at MMIO 0x10126000 (irq = 67, base_baud = 1500000) is a 16550A
   20064000.serial: ttyS2 at MMIO 0x20064000 (irq = 68, base_baud = 1500000) is a 16550A
   console [ttyS2] enabled
   console [ttyS2] enabled
   bootconsole [earlycon0] disabled
   bootconsole [earlycon0] disabled
   dw-apb-uart 20068000.serial: Couldn't set LCR to 0
   dw-apb-uart 20068000.serial: Couldn't set LCR to 0
   20068000.serial: ttyS3 at MMIO 0x20068000 (irq = 69, base_baud = 1500000) is a 16550A
   brd: module loaded
   mousedev: PS/2 mouse device common for all mice
   Synopsys Designware Multimedia Card Interface Driver
   TCP: cubic registered
   NET: Registered protocol family 17
   input: gpio-keys.1 as /devices/soc.0/gpio-keys.1/input/input0
   Freeing unused kernel memory: 2008K (c032d000 - c0523000)
   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
   
   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
   / #