configs: add defconfig for Nationalchip gx6605s dev board
gx6605s is a nice SOC for dvbs2 DVB product, and C-SKY inside. Signed-off-by: Guo Ren <ren_guo@c-sky.com> [Thomas: drop post-image script copying the gdbinit file, and suggest to use gdb -x option instead to point to the gdbinit file in board/.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
5a2d37ca12
commit
6a4131d101
@ -86,6 +86,7 @@ beaglebone_defconfig: *defconfig
|
||||
beaglebone_qt5_defconfig: *defconfig
|
||||
chromebook_snow_defconfig: *defconfig
|
||||
ci20_defconfig: *defconfig
|
||||
csky_gx6605s_defconfig: *defconfig
|
||||
cubieboard2_defconfig: *defconfig
|
||||
firefly_rk3288_defconfig: *defconfig
|
||||
firefly_rk3288_demo_defconfig: *defconfig
|
||||
|
@ -612,6 +612,8 @@ F: package/liquid-dsp/
|
||||
|
||||
N: Guo Ren <ren_guo@c-sky.com>
|
||||
F: arch/Config.in.csky
|
||||
F: board/csky/
|
||||
F: configs/csky_*
|
||||
|
||||
N: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
F: arch/Config.in.powerpc
|
||||
|
25
board/csky/gx6605s/gdbinit
Normal file
25
board/csky/gx6605s/gdbinit
Normal file
@ -0,0 +1,25 @@
|
||||
tar jtag jtag://127.0.0.1:1025
|
||||
reset
|
||||
|
||||
# setup CCR (Cache Config Reg)
|
||||
# 0-1:MP,2:IE,3:DE,4:WB,5:RS,6:Z,7:BE
|
||||
set $cr18 = 0x7d
|
||||
|
||||
# vendor custom setup, double cache line & preload
|
||||
set $cr30 = 0xc
|
||||
|
||||
# pin mux for serial8250
|
||||
set *(unsigned int *) 0xa030a14c |= (1 << 22) | (1 << 23)
|
||||
|
||||
# pass devicetree blob
|
||||
# r2 is magic
|
||||
# r3 is address
|
||||
set $r2 = 0x20150401
|
||||
set $r3 = 0x92000000
|
||||
restore gx6605s.dtb binary 0x92000000
|
||||
|
||||
# flush cache
|
||||
set $cr17 = 0x33
|
||||
|
||||
load
|
||||
|
87
board/csky/readme.txt
Normal file
87
board/csky/readme.txt
Normal file
@ -0,0 +1,87 @@
|
||||
C-SKY Development Kit
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
C-SKY is a CPU Architecture from www.c-sky.com and has it own instruction set.
|
||||
Just like arm and mips in linux/arch, it named as 'csky'.
|
||||
|
||||
gx6605s develop board is made by Hangzhou Nationalchip and C-SKY.
|
||||
|
||||
Hardware Spec:
|
||||
* CPU: ck610 up to 594Mhz
|
||||
* Integrate with 64MB ddr2 in SOC.
|
||||
* Integrate with hardware Jtag.
|
||||
* Integrate with usb-to-serial chip.
|
||||
* USB ehci controller in SOC.
|
||||
* Power Supply: DC 5V from two micro-usb.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot
|
||||
-------------------
|
||||
|
||||
The csky_gx6605s_defconfig configuration is a sample configuration with
|
||||
all that is required to bring the gx6605s Development Board:
|
||||
|
||||
$ make csky_gx6605s_defconfig
|
||||
|
||||
Build everything
|
||||
----------------
|
||||
|
||||
Note: you will need to have access to the network, since Buildroot will
|
||||
download the packages' sources.
|
||||
|
||||
$ make
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, you should obtain this tree:
|
||||
|
||||
output/images/
|
||||
├── vmlinux
|
||||
├── rootfs.ext2
|
||||
└── <board name>.dtb
|
||||
|
||||
How to run it
|
||||
=============
|
||||
|
||||
Prepare Jtag-Server
|
||||
-------------------
|
||||
|
||||
Download the Jtag-Server here:
|
||||
|
||||
https://github.com/c-sky/tools/raw/master/DebugServerConsole-linux-x86_64-V4.2.00-20161213.tar.gz
|
||||
|
||||
Go to the unpacked directory:
|
||||
|
||||
$./DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025
|
||||
|
||||
Perhaps you need to use "sudo", which need libusb to detect c510:b210
|
||||
|
||||
$ sudo ./DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025
|
||||
|
||||
Prepare USB drive
|
||||
-----------------
|
||||
|
||||
You sould determine which device associated to the usb drive
|
||||
carefully. eg:
|
||||
|
||||
$ cat /proc/partitions
|
||||
8 48 1971712 sdd
|
||||
8 49 976720 sdd1
|
||||
|
||||
$ sudo dd if=rootfs.ext2 of=/dev/sdd1
|
||||
$ sudo sync
|
||||
|
||||
Run
|
||||
---
|
||||
|
||||
Plug the usb drive on gx6605s dev board.
|
||||
|
||||
Setup the Console with the rate 115200/8-N-1.
|
||||
|
||||
$ ./output/host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit output/images/vmlinux
|
||||
|
17
configs/csky_gx6605s_defconfig
Normal file
17
configs/csky_gx6605s_defconfig
Normal file
@ -0,0 +1,17 @@
|
||||
BR2_csky=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/c-sky/tools/raw/master/csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz"
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="csky-linux"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_4_5=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/c-sky/linux-4.9.y/archive/314c498ddc8c43a66ca96ff3af7da98e10fa1cc6.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="gx66xx"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="gx6605s"
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
Loading…
Reference in New Issue
Block a user