Showing posts with label rk3188. Show all posts
Showing posts with label rk3188. Show all posts

2018-11-05

Radxa - SD Images


SD Images

SD images for the rock are images booting and running on the uSD card completely. This is good when you want to try different OS or new version of the firmware without touching the nand flash.

Downloading SD Images

Check your hardware revision (Pro or Full/Lite), then download image "for SD card" from here

Writing SD image to SD card

Windows

See the readme in the individual image zip file for additional information on which tool to use.
Before beginning, you will need to prepare a high quality SD card of at least 8GB. A poor quality SD card will result in boot failures.
  • Download the Win32DiskImager from here.
  • Download the image from above link.
  • Use the Win32DiskImager to Write the image into SD card

 Win32DiskImager.png


Linux

We use dd in Linux to write the image:
   sudo dd if=radxa_rock_xxxx_sdcard.img of=/dev/sdx              # x is the disk name of your uSD card on your PC

Mac OS X

We use dd and Apple's diskutil utility to write the image:
  1. Run diskutil list to determine the drive associated the SD card (ex: /dev/disk4)
  2. Unmount the existing disk sudo diskutil unmountDisk /dev/diskX where X is the disk name of your uSD card on your PC
  3. Write the image file to the uSD card sudo dd if=radxa_rock_xxxx_sdcard.img of=/dev/diskX where X is the disk name of your uSD card on your PC

Booting to SD Card

  1. Power off the Rock
  2. Insert the SD card
  3. Power on the Rock and it will boot to the SD card 

Radxa - U-Boot

U-Boot

Features

  • both Rockchip proprietary USB protocol and fastboot USB protocol are supported (Rockchip USB tools works)
  • format of partitions (images) are compatible to Rockchip proprietary bootloader (rkcrc, mkbootimg works)
  • (need more investigation...)

For NAND flash

Build

Refer install toolchain if you don't have arm-eabi- on your system. Other toolchain(Linaro arm-linux-gnueabihf-gcc 4.9) may cause data abort errors.
git clone -b u-boot-rk3188 https://github.com/radxa/u-boot-rockchip.git
cd u-boot-rockchip
make rk30xx
The binary we need for nand flash are RK3188Loader_miniall.bin and uboot.img.

Flash

refer flash image page
use the new u-boot to erase the old loader
   sudo upgrade_tool ef RK3188Loader_miniall.bin
flash new loader
   sudo upgrade_tool ul RK3188Loader_miniall.bin
format NAND (first time only)
   sudo upgrade_tool lf
flash parameter
   upgrade_tool di -p parameter
paramter file
   FIRMWARE_VER:4.2.2
   MACHINE_MODEL:radxa_rock
   MACHINE_ID:007
   MANUFACTURER:RADXA
   MAGIC: 0x5041524B
   ATAG: 0x60000800
   MACHINE: 3066
   CHECK_MASK: 0x80
   KERNEL_IMG: 0x60408000
   CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x00800000  mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00008000@0x00004000(boot),-@0x000c0000(linuxroot)
flash U-Boot
   sudo upgrade_tool wl 0x2000 uboot.img
   sudo upgrade_tool rd
flash kernel + ramdisk
   upgrade_tool di -b boot-linux.img
flash root fs
   upgrade_tool di linuxroot rootfs.img
Booting log can be found at: http://paste.ubuntu.com/9623598/

For SD card

Build

Refer install toolchain if you don't have arm-eabi- on your system. Other toolchain(Linaro arm-linux-gnueabihf-gcc 4.9) may cause data abort errors.
git clone -b u-boot-rk3188-sdcard https://github.com/radxa/u-boot-rockchip.git
cd u-boot-rockchip
make rk30xx
./pack-sd.sh
The binary we need for sdcard is u-boot-sd.img.

Flash

sudo dd if=u-boot-sd.img of=/dev/sdx seek=64
Insert the uSD card to rock pro, it will boot from u-boot on uSD card.

Develop

Some important files and directories related to the Rockchip platform:
 * UserManual - documentation
 * include/configs/rk30xx.h - configuration file
 * tools/rk_tools
 * board/rockchip
    ├── common
    │   ├── armlinux
    │   ├── common
    │   │   ├── A8MMU
    │   │   ├── crc
    │   │   ├── emmc
    │   │   ├── fat
    │   │   ├── rc4
    │   │   ├── rockusb
    │   │   ├── serial_p9
    │   │   └── SPI
    │   └── platform
    │       ├── rk2928
    │       └── rk30
    └── rk30xx
 * arch/arm/cpu/armv7/rk30xx
 * arch/arm/include/asm/arch-rk30xx

Unbrick

If something goes wrong and your device doesn't boot anymore, read Unbrick Rock.

External links

Radxa - Make SD booting images



Make SD booting images

http://wiki.radxa.com/Rock/make_sd_image


Rock/pro/lite has on board NAND flash, but can also boot from exteranl uSD card. uSD card has a higher booting priority. This page introduce how to make a completely off NAND bootable image for sd card.

Introduction

To boot from uSD card and run the system on uSD card, we need the following
  • bootloader for booting from uSD card - u-boot-sd.img
  • parameter for uSD card layout and kernel cmdline - parameter.img
  • kernel+ramdisk - boot.img
  • a rootfs - rootfs.ext4

Prepare images

u-boot for sdcard

Follow the instruction at Make u-boot for sdcard to create the u-boot-sd.img for sd card.

get the parameter

Download the parameter from dl.radxa.com
wget http://dl.radxa.com/rock/images/parameter/parameter_linux_sd
rkcrc -p parameter_linux_sd parameter.img                                      #where to get rkcrc, refer to http://radxa.com/Rock/flash_the_image "Flash with rkflashtool"

build the kernel

Follow the Booting Linux(3.0.36) or build mainline kernl page to make the boot.img.

make the roofts

Follow the instructions here to make the Ubuntu or Debian rootfs - rootfs.ext4.

Write to the sdcard

First, let's clean the uSD card.
sudo dd if=/dev/zero of=/dev/sdx bs=1M count=1

Then, create the partitions with fdisk
export START_SECTOR=65536              

why the start sector is 65536(32MB offset) is we need reserve some sectors # for boot.img/parameter/bootloader before the filesystem starts.
 
sudo fdisk /dev/sdx  << EOF
n
p
1
$START_SECTOR

w
EOF

Now we have a new partition for rootfs starting at START_SECTOR. It's time to write the images to the sdcard.
 
sudo dd if=u-boot-sd.img of=/dev/sdx conv=sync seek=64 
sudo dd if=parameter.img of=/dev/sdx conv=sync seek=$((0x2000))
sudo dd if=boot.img of=/dev/sdx conv=sync seek=$((0x2000+0x2000))
sudo dd if=rootfs.ext4 of=/dev/sdx1 conv=sync

Insert the uSD card to rock/pro/lite, you can boot from uSD card now.

Rockchip Boot flow


Here is Rockchip pre-released binaries which may be mentioned later:
https://github.com/rockchip-linux/rkbin
And Rockcip Linux GPT partition here.

Boot flow

Here is a table show the detail what we may use in Rockchip platform, for 2 boot stage:
- use U-Boot SPL;
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin;



Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:
  • Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled).
  • Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place;
  • Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC;
  • Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card;
  • Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5;
  • Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network;




Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;
Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;
Boot Flow 3 is use only for RK3399 with SPL ATF support;
Boot Flow 4 is used for armv7 SoCs which do not support trust;

Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.
Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).
Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.
Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;  



2014-06-18

Slitaz on Radxa Rock


Ubuntu 14.04 and Slitaz on Radxa Rock
http://www.cnx-software.com/2014/05/18/ubuntu-14-04-and-slitaz-on-radxa-rock/

First download boot-slitaz-20140517.img (kernel + slitaz ramdisk), and slitaz-armhf-mini-2012-12-14.zip. Extract the rootfs from slitaz-armhf-mini-2012-12-14.img (ext-4 partition). then follow the 「Flashing Ubuntu to Radxa Rock」 section in my getting started guide for Radxa Rock to flash boot.img. It is simply one line:
upgrade_tool di -b /path-to/boot-slitaz-20140517.img
Simply login with root username, and root password to access the command line. It might also be possible to use a more up-to-date rootfs from http://arm.slitaz.org/rpi/, but it is only armel.
[Update: Alanyih has also been given me the build instructions for his Slitaz image:
git clone -b wip/lsk-android-14.04-radxa-rock https://github.com/linux-rockchip/kernel_rockchip.git
make radxa_rock_defconfig
make zImage rk3188-radxa-rock.dtb
cat arch/arm/boot/zImage arch/arm/boot/dts/rk3188-radxa-rock.dtb > zImage-lsk
mkbootimg --kernel zImage-lsk --ramdisk slitaz-ramdisk.gz -o boot-slitaz-20140517.img
]
Both Ubuntu 14.04 and Slitaz should be able to run on any Rockchip RK3188 device thanks to the device tree and multi-platform enabled Linux kernel, as long as you can somehow come up with the right device file for your device, which may not always be an easy task.
boot-slitaz-20140517.img (kernel + slitaz ramdisk)
http://goo.gl/Mc7L4q

2014-06-02

radxa -- Serial console debugging




Serial console debugging / putty


1.
Connect the cable
Board    TTL2USB Cable
RX    ->  Green
TX    ->  White
GND   ->  Black 


2.
root@slitaz:/home/tux# dmesg | tail
usb 2-1: new full-speed USB device number 3 using uhci_hcd
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for pl2303
pl2303 2-1:1.0: pl2303 converter detected
usb 2-1: pl2303 converter now attached to ttyUSB0
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver


3.
root@slitaz:/home/tux#  cat /proc/tty/drivers
/dev/tty             /dev/tty        5         0 system:/dev/tty
/dev/console         /dev/console    5         1 system:console
/dev/ptmx            /dev/ptmx       5         2 system
/dev/vc/0            /dev/vc/0       4         0 system:vtmaster
usbserial            /dev/ttyUSB   188      0-253 serial
serial               /dev/ttyS       4         64-67 serial
pty_slave            /dev/pts      136         0-1048575 pty:slave
pty_master           /dev/ptm      128         0-1048575 pty:master
unknown              /dev/tty        4         1-63 console


4.
root@slitaz:/home/tux# ls -l /dev/ttyUSB*
crw-rw----    1 root     dialout   188,   0 May  2 21:41 /dev/ttyUSB0


5.
root@slitaz:/home/tux# grep dialout /etc/group
dialout:x:95:tux


6.
root@slitaz:/home/tux# tazpkg -gi putty


7.
DDR Version 1.04 20130517
In
DDR3
300MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB
Memory OK
OUT
BUILD=====2
SdmmcInit=0 0
FwPartOffset=0 , 0
No.1 FLASH ID:2c 64 44 4b a9 0
OK! 248205
unsigned!
SecureBootEn = 0 0
Boot ver: 2013-12-02#2.08
start_linux=====253060
 2571850 Starting kernel...@0x60408000

<hit enter to activate fiq debugger>
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.37-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Sun May 18 00:04:25 UTC 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: RK30board, model: rockchip,rk3188

2014-06-01

radxa -- device-tree


device-tree

1.
[..]
Starting udhcpc client on: eth0...
udhcpc (v1.20.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
Processing: /etc/init.d/local.sh
Starting all daemons...
Generating Dropbear rsa key... [ Done ]
Generating Dropbear dss key... [ Done ]
Starting SSH server: Dropbear... [ Done ]

Welcome to Radxa Rock
SliTaz boot time: 6s


2.
root@slitaz:~# dmesg | grep -B 3 Machine
[ 0.000000] Linux version 3.10.37-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Fri May 16 13:57:21 UTC 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: RK30board, model: rockchip,rk3188


3.
root@slitaz:~# ls /proc/device-tree
#address-cells                 nandc
#size-cells                    pinctrl@20008000
adc@2006c000                   pmu@20004000
aliases                        pwm@20030000
amba                           pwm@20030010
ap0-vcc-domain                 pwm@20050020
ap1-vcc-domain                 pwm@20050030
backlight                      rga@10114000
bootram@10080000               rk_screen
bootrom@10120000               rksdmmc@10214000
cache-controller@10138000      rksdmmc@10218000
chosen                         rksdmmc@1021C000
cif-vcc-domain                 rockchip,sram
clocks                         rockchip-hdmi-i2s
clocks-init                    rockchip-hdmi-spdif
codec-hdmi-i2s                 rockchip-i2s@0x1011a000
codec-hdmi-spdif               rockchip-spdif@0x1011e000
compatible                     rockchip_suspend
cpu_axi_bus                    serial@10124000
cpus                           serial@10126000
dvfs                           serial@20064000
dwc-control-usb@200080ac       serial@20068000
fb                             spi@20070000
fiq-debugger                   spi@20074000
flash-vcc-domain               sram@10080020
hsic@10240000                  timer@20038000
i2c@2002d000                   timer@20038020
i2c@2002f000                   timer@20038040
i2c@20056000                   timer@20038060
i2c@2005a000                   timer@20038080
i2c@2005e000                   timer@200380a0
interrupt-controller@1013d000  twd-wdt@1013c620
interrupt-parent               usb@10180000
ion                            usb@101c0000
lcdc0-vcc-domain               vccio0-vcc-domain
lcdc1-vcc-domain               vccio1-vcc-domain
lcdc@1010c000                  vmac-phy
lcdc@1010e000                  vmac@10204000
memory                         wdt@2004c000
name                           wireless-wlan

4.
root@slitaz:~# cat /proc/device-tree/compatible
rockchip,rk3188root@slitaz:~#

root@slitaz:~# cat /proc/device-tree/chosen/bootargs
clk_ignore_unused console=ttyFIQ0,115200 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x003E0000 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot) bootver=2013-12-02#2.08 firmware_ver=4.2.2

root@slitaz:~# cat /proc/device-tree/wireless-wlan/compatible
wlan-platdataroot@slitaz:~#

Slitaz -- ghex



GHex is a simple binary editor.

root@slitaz:/tmp# hexdump -C /home/tux/putty-0517-140415.log | head 
00000000  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |=~=~=~=~=~=~=~=~|
00000010  3d 7e 3d 7e 3d 7e 3d 20  50 75 54 54 59 20 6c 6f  |=~=~=~= PuTTY lo|
00000020  67 20 32 30 31 34 2e 30  35 2e 31 37 20 31 34 3a  |g 2014.05.17 14:|
00000030  30 34 3a 31 35 20 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |04:15 =~=~=~=~=~|
00000040  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 0d 0a 00  |=~=~=~=~=~=~=...|
00000050  44 44 52 20 56 65 72 73  69 6f 6e 20 31 2e 30 34  |DDR Version 1.04|
00000060  20 32 30 31 33 30 35 31  37 0d 0a 49 6e 0d 0a 44  | 20130517..In..D|
00000070  44 52 33 0d 0a 33 30 30  4d 48 7a 0d 0a 42 75 73  |DR3..300MHz..Bus|
00000080  20 57 69 64 74 68 3d 33  32 20 43 6f 6c 3d 31 30  | Width=32 Col=10|
00000090  20 42 61 6e 6b 3d 38 20  52 6f 77 3d 31 35 20 43  | Bank=8 Row=15 C| 

root@slitaz:/tmp# hexdump -C /home/tux/putty-0517-125735.log | head 
00000000  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |=~=~=~=~=~=~=~=~|
00000010  3d 7e 3d 7e 3d 7e 3d 20  50 75 54 54 59 20 6c 6f  |=~=~=~= PuTTY lo|
00000020  67 20 32 30 31 34 2e 30  35 2e 31 37 20 31 32 3a  |g 2014.05.17 12:|
00000030  35 37 3a 33 35 20 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |57:35 =~=~=~=~=~|
00000040  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 0d 0a 44  |=~=~=~=~=~=~=..D|
00000050  44 52 20 56 65 72 73 69  6f 6e 20 31 2e 30 34 20  |DR Version 1.04 |
00000060  32 30 31 33 30 35 31 37  0d 0a 49 6e 0d 0a 44 44  |20130517..In..DD|
00000070  52 33 0d 0a 33 30 30 4d  48 7a 0d 0a 42 75 73 20  |R3..300MHz..Bus |
00000080  57 69 64 74 68 3d 33 32  20 43 6f 6c 3d 31 30 20  |Width=32 Col=10 |
00000090  42 61 6e 6b 3d 38 20 52  6f 77 3d 31 35 20 43 53  |Bank=8 Row=15 CS|


2014-05-29

radxa -- symlink error / unzip

unzip tarball fail on symlink error: File name too long #34

"git archive" seems to be broken wrt zip files
> IOW, the zip file looks right. I wonder if this is actually a bug in
> "unzip".

It is. This only happens if you have more then 16k entries and when one
of the 16k entry infos is reused it happend to be previously used for a
symlink entry.

Here's a patch for unzip60 for reference:
--- process.c
+++ process.c
@@ -1751,6 +1751,12 @@ int process_cdir_file_hdr(__G)    /* ret
= (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11); 
#endif

+#ifdef SYMLINKS     
+    /* Initialize the symlink flag, may be set by the platform-specific     
+       mapattr function.  */     
+    G.pInfo->symlink = 0;
+#endif
+
return PK_COOL;

} /* end function process_cdir_file_hdr() */

radxa -- symlink error / git clone


git clone -b topic/i2c-rk3x-clean-v4 https://github.com/xqms/linux.git

1. git clone -b topic/i2c-rk3x-clean-v4 https://github.com/xqms/linux.git
root@slitaz:/run/media/tux/data-ln/radxa/src# time git clone -b topic/i2c-rk3x-clean-v4 https://github.com/xqms/linux.git
Cloning into 'linux'...
remote: Counting objects: 3545990, done.
remote: Compressing objects: 100% (589980/589980), done.
remote: Total 3545990 (delta 2926520), reused 3545990 (delta 2926520)
Receiving objects: 100% (3545990/3545990), 982.04 MiB | 51 KiB/s, done.
Resolving deltas: 100% (2926520/2926520), done.
Checking out files: 100% (46829/46829), done.
real    45m 35.28s
user    3m 22.76s
sys    0m 27.40s


2. check files
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/drivers/ata/pata_atp867x.c
-rw-r--r--    1 root     root         14638 May 27 10:43 linux/drivers/ata/pata_atp867x.c
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/drivers/misc/vmw_vmci/vmci_queue_pair.c
-rw-r--r--    1 root     root         97276 May 27 10:43 linux/drivers/misc/vmw_vmci/vmci_queue_pair.c
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/include/uapi/linux/pci_regs.h
-rw-r--r--    1 root     root         46587 May 27 10:44 linux/include/uapi/linux/pci_regs.h
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/kernel/sched/Makefile
-rw-r--r--    1 root     root           905 May 27 10:44 linux/kernel/sched/Makefile
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/security/selinux/netnode.c
-rw-r--r--    1 root     root          8424 May 27 10:44 linux/security/selinux/netnode.c
root@slitaz:/run/media/tux/data-ln/radxa/src# 


radxa -- symlink error: File name too long


symlink error: File name too long


1. Download xqms/linux as a zip file
https://github.com/xqms/linux/archive/topic/i2c-rk3x-clean-v4.zip


2. unzip i2c-rk3x-clean-v4.zip
symlink error: File name too long

/usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/ata/pata_atp867x.c -> /*^J *...
/usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/misc/vmw_vmci/vmci_queue_pair.c -> /*^J *...
/usr/src/linux-topic-i2c-rk3x-clean-v4/include/uapi/linux/pci_regs.h -> /*^J...
/usr/src/linux-topic-i2c-rk3x-clean-v4/kernel/sched/Makefile -> ifdef CONFIG...
/usr/src/linux-topic-i2c-rk3x-clean-v4/security/selinux/netnode.c -> /*^J *...


3. No such file or directory
root@slitaz:~# ls -l  /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/ata/pata_atp867x.c
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/ata/pata_atp867x.c: No such file or directory

root@slitaz:~# ls -l /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/misc/vmw_vmci/vmci_queue_pair.c
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/misc/vmw_vmci/vmci_queue_pair.c: No such file or directory

root@slitaz:~# ls -l  /usr/src/linux-topic-i2c-rk3x-clean-v4/include/uapi/linux/pci_regs.h
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/include/uapi/linux/pci_regs.h: No such file or directory

root@slitaz:~# ls -l /usr/src/linux-topic-i2c-rk3x-clean-v4/security/selinux/netnode.c
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/security/selinux/netnode.c: No such file or directory

root@slitaz:~# ls -l /usr/src/linux-topic-i2c-rk3x-clean-v4/kernel/sched/Makefile
lrwxrwxrwx    1 root     root           905 May 26 16:59 /usr/src/linux-topic-i2c-rk3x-clean-v4/kernel/sched/Makefile -> ifdef CONFIG_FUNCTION_TRACER?CFLAGS_REMOVE_clock.o = -pg?endif??ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)?# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is?# needed for x86 only.  Why this used to be enabled for all architectures is beyond?# me.  I suspect most platforms don't need this, but until we know that for sure?# I turn this off for IA-64 only.  Andreas Schwab says it's also needed on m68k?# to get a correct value for the wait-channel (WCHAN in ps). --davidm?CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer?endif??obj-y += core.o proc.o clock.o cputime.o?obj-y += idle_task.o fair.o rt.o deadline.o stop_task.o?obj-y += wait.o completion.o idle.o?obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o?obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o?obj-$(CONFIG_SCHEDSTATS) += stats.o?obj-$(CONFIG_SCHED_DEBUG) += debug.o?obj-$(CONFIG_CGROUP_CPUACCT) += cpuacct.o?

2014-05-14

Slitaz -- Radxa Rock



Welcome to Radxa Rock
SliTaz boot time: 5s

1.
root@slitaz:~# uname -a
Linux slitaz 3.10.30-slitaz #1 SMP PREEMPT Tue May 13 19:39:35 UTC 2014 armv7l GNU/Linux

2.
root@slitaz:~# dmesg | grep Machine
[ 0.000000] Machine: RK30board, model: rockchip,rk3188

3.
root@slitaz:~# date
Wed May 14 14:45:01 UTC 2014

4.
root@slitaz:~# nslookup http://www.slitaz.org
Server: 192.168.0.1
Address 1: 192.168.0.1 dir-605

Name: http://www.slitaz.org
Address 1: 46.105.127.17 ks385316.kimsufi.com
Address 2: 212.83.135.187 pangolin.slitaz-fr.org

5.
root@slitaz:~# slitaz

SliTaz GNU/Linux
================================================================================================================================================================
Release : cooking
Architecture : arm
Kernel : 3.10.30-slitaz
Boot options : clk_ignore_unused console=ttyFIQ0,115200 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x003E0000 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot) bootver=2013-12-02#2.08 firmware_ver=4.2.2
Home path : /home/slitaz
Configs : /etc/slitaz
Log files : /var/log/slitaz
Packages DB : /var/lib/tazpkg
Installed : 18 packages
Mirror : http://arm.balinor.net/slitaz/armhf/packages/
================================================================================================================================================================
Config file: /etc/slitaz/slitaz.conf



2014-05-05

radxa -- parameter

parameter


----
parameter_android_only
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0 console=tty0 androidboot.console=ttyFIQ0  root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00020000@0x00020000(backup),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),-@0x00382000(user)

----
parameter_dual_nand
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw mac_addr=de:ad:de:ad:be:ef rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),0x00300000@0x00382000(linuxroot),-@0x00682000(user)

----
parameter_dual_sd
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/mmcblk0p1 rw mac_addr=de:ad:de:ad:be:ef rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),0x00300000@0x00382000(linuxroot),-@0x00682000(user)


----
parameter_dual_usb
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/sda rw mac_addr=de:ad:de:ad:be:ef rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),0x00300000@0x00382000(linuxroot),-@0x00682000(user)

----
parameter_linux_only
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot)


----
parameter_lsk-android-14.04
----
FIRMWARE_VER:4.4.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:clk_ignore_unused console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x001A0000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00006000@0x00004000(kernel),0x00006000@0x0000a000(boot),0x00010000@0x00010000(recovery),0x00020000@0x00020000(backup),0x00040000@0x00040000(cache),0x001FE000@0x00080000(userdata),0x00002000@0x0027E000(metadata),0x00002000@0x00280000(kpanic),0x00180000@0x00282000(system),-@0x00402000(user)

2014-05-04

radxa -- Msc / Loader mode

SwitchDevice: SD
Switch the Msc mode to Rockusb mode for upgrade.

1. Type "upgrade_tool" without Quotation Marks
if No found rockusb,Rescan press <R> R
or unplug OTG cable and try again

2. Msc mode
SwitchDevice: SD
Switch the Msc mode to Rockusb mode for upgrade.

When the switch is successful, need reselect the device.

3. # upgrade_tool
    List of rockusb connected
    No found rockusb,Rescan press <R>,Quit press <Q>:R
    No found rockusb,Rescan press <R>,Quit press <Q>:R
    List of rockusb connected
    DevNo=1    Vid=0x2207,Pid=0x10,LocationID=10b    Msc  <==
    Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1
       
    ---------------------Tool Usage ---------------------
    Help:             H
    Quit:             Q
    Version:          V
    Clear Screen:     CS
    ------------------Upgrade Command ------------------
    ChooseDevice:        CD
    SwitchDevice:        SD
    UpgradeFirmware:    UF <Firmware>
    UpgradeLoader:        UL <Loader>
    DownloadImage:        DI <-p|-b|-k|-s|-r|-m image> [parameter file]
    DownloadBoot:        DB <Loader>
    EraseFlash:        EF <Loader|firmware>
    LowerFormat:        LF
    [..]

    Rockusb>SD
    Rockusb>CD
    Rockusb>LF
    Rockusb>RD
    Rockusb>Q
       
   
4. # upgrade_tool
    List of rockusb connected
    DevNo=1    Vid=0x2207,Pid=0x310b,LocationID=105    Loader    <==
    Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1
       
    ---------------------Tool Usage ---------------------
    Help:             H
    Quit:             Q
    Version:          V
    Clear Screen:     CS
    ------------------Upgrade Command ------------------
    ChooseDevice:        CD
    SwitchDevice:        SD
    UpgradeFirmware:    UF <Firmware>
    UpgradeLoader:        UL <Loader>
    DownloadImage:        DI <-p|-b|-k|-s|-r|-m image> [parameter file]
    DownloadBoot:        DB <Loader>
    EraseFlash:        EF <Loader|firmware>
    LowerFormat:        LF
    ----------------Professional Command -----------------
    TestDevice:    TD
    ResetDevice:    RD
    ReadFlashID:    RID
    ReadFlashInfo:    RFI
    ReadChipInfo:    RCI
    ReadSector:    RS <beginsec> <sectorlen> [-decode] [File]
    WriteSector:    WS <beginsec> <file>
    ReadLBA:    RL <beginsec> <sectorlen> [File]
    WriteLBA:    WL <beginsec> <file>
    EraseBlock:    EB <cs> <beginblock> <blokclen> [--Force]
    -------------------------------------------------------
       
    Rockusb>uf /tmp/radxa_rock_ubuntu_desktop_140318_update.img
    Loading firmware...
    Support Type:RK31    FW Ver:1.0.00    FW Time:2014-03-18 16:22:24
    Loader ver:2.08    Loader Time:2013-12-02 18:58:57
    Upgrade firmware ok.
    Rockusb>rfi
    Flash Info:
        Manufacturer: MICRON,value=04
        Flash Size: 8192MB
        Block Size: 2048KB
        Page Size: 8KB
        ECC Bits: 40
        Access Time: 32
        Flash CS: Flash<0>
    Rockusb>rci
    Chip Info: 42 30 31 33 32 31 30 32 30 33 31 31 30 30 31 56
    Rockusb>rid
    Flash ID:2C 64 44 4B A9
    Rockusb>v
    Upgrade Tool ver 1.15
    Rockusb>q

radxa -- Msc mode


Msc mode
The  Device did not support this operation!

Bus 002 Device 005: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 010: ID 2207:0010 
root@slitaz:/run/media/tux/data-ln/radxa# upgrade_tool uf radxa_rock_ubuntu_desktop_140318_update.img
The  Device did not support this operation!

1.
root@slitaz:/run/media/tux/data-ln/radxa# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0b05:1786 ASUSTek Computer, Inc. USB-N10 802.11n Network Adapter [Realtek RTL8188SU]
Bus 002 Device 005: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 010: ID 2207:0010 

2.
root@slitaz:/run/media/tux/data-ln/radxa# upgrade_tool
List of rockusb connected
DevNo=1    Vid=0x2207,Pid=0x10,LocationID=10a    Msc
Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1


3.
Store: Erase the data of the internal Flash memory for upgrade. 
Switch: Switch the Msc mode to Rockusb mode for upgrade. 
 
Please follow the below steps to upgrade firmware for the BK6007 ebook reader: 
1.  Connect the reader to computer and enter upgrade or USB mode. 
2.  Select the firmware file. 
3.  Make sure the reader is in Rockusb mode( Maskrom and Loader are both Rockusb mode.). 
4.  Click Upgrade button to upgrade the firmware 

Radxa Rock


Radxa Rock - rk3188

Specifications
Model radxa rock radxa rock lite
System
CPU ARM Cortex-A9 quad core @ 1.6Ghz
Memory 2GB DDR3 @ 800Mhz 1GB DDR3 @ 800Mhz
Storage 8GB Nand Flash, Micro-SD SDXC up to 128GB 4GB Nand Flash, Micro-SD SDXC up to 128GB
Display and Graphics
GPU Mali400-mp4@533Mhz, OpenGL ES 2.0
Digital Video HDMI 1.4 up to 1080p@60hz
Analog Video AV output
Network
LAN 10/100M Ethernet port
WIFI 150Mbps 802.11b/g/n with antenna
Bluetooth Bluetooth 4.0 None
I/O
Audio S/PDIF, headphone jack
USB HOST 2 USB 2.0 standard A type
USB OTG USB OTG micro-USB connector
Serial Serial Console for debugging
IR Support self defined IR remote
Key 1 power key, 1 recovery key, 1 reset key
Other
Led 3 programable leds
RTC Support power off alarm
Extend header 80 pins including GPIO, I2C, SPI, Line in, USB 2.0, PWM, ADC, LCD, etc

2014-04-28

Mali GPU Kernel Device Drivers


Update: 20181104
Open Source Mali Utgard GPU Kernel Drivers      
https://developer.arm.com/products/software/mali-drivers/utgard-kernel
 
Open Source Mali GPUs UMP User-Space Drivers Source Code
https://developer.arm.com/products/software/mali-drivers/ump-user-space


Open Source Mali-200/300/400/450 GPU Kernel Device Drivers
http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-gpus-linux-kernel-device-drivers/

Source code for Mali GPUs Kernel Device Drivers, UMP Device Drivers and DRM Device Drivers under GPLv2 licence

The Linux and Android version of the Mali GPUs DDKs include three components which run within the kernel. The most important of these, known as the Device Driver, provides the low-level access to the Mali-200, Mali-300, Mali-400 and Mali-450 GPU. An important, secondary component is the Unified Memory Provider (UMP) which can be used in a variety of ways to facilitate zero-copy operations within the driver stack. An additional component, the Mali Direct Rendering Manager (DRM), is provided to integrate the Mali GPU DDKs into the X11 environment and for enabling the Direct Rendering Interface (DRI2).


GPUs Comparison: ARM Mali vs Vivante GCxxx vs PowerVR SGX vs Nvidia Geforce ULP