xref: /OK3568_Linux_fs/buildroot/board/csky/readme.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunC-SKY Development Kit
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunIntro
4*4882a593Smuzhiyun=====
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunC-SKY is a CPU Architecture from www.c-sky.com and has it own instruction set.
7*4882a593SmuzhiyunJust like arm and mips in linux/arch, it named as 'csky'.
8*4882a593Smuzhiyun
9*4882a593Smuzhiyungx6605s develop board is made by Hangzhou Nationalchip and C-SKY.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunHardware Spec:
12*4882a593Smuzhiyun  * CPU: ck610 up to 594Mhz
13*4882a593Smuzhiyun  * Integrate with 64MB ddr2 in SOC.
14*4882a593Smuzhiyun  * Integrate with hardware Jtag.
15*4882a593Smuzhiyun  * Integrate with usb-to-serial chip.
16*4882a593Smuzhiyun  * USB ehci controller in SOC.
17*4882a593Smuzhiyun  * Power Supply: DC 5V from two micro-usb.
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunHow to build it
20*4882a593Smuzhiyun===============
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunConfigure Buildroot
23*4882a593Smuzhiyun-------------------
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunThe csky_gx6605s_defconfig configuration is a sample configuration with
26*4882a593Smuzhiyunall that is required to bring the gx6605s Development Board:
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun  $ make csky_gx6605s_defconfig
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunBuild everything
31*4882a593Smuzhiyun----------------
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunNote: you will need to have access to the network, since Buildroot will
34*4882a593Smuzhiyundownload the packages' sources.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun  $ make
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunResult of the build
39*4882a593Smuzhiyun-------------------
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunAfter building, you should obtain this tree:
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun    output/images/
44*4882a593Smuzhiyun    +-- vmlinux
45*4882a593Smuzhiyun    +-- rootfs.ext2
46*4882a593Smuzhiyun    +-- <board name>.dtb
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunHow to run it
49*4882a593Smuzhiyun=============
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunPrepare Jtag-Server
52*4882a593Smuzhiyun-------------------
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun  Download the Jtag-Server here:
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun  https://github.com/c-sky/tools/raw/master/DebugServerConsole-linux-x86_64-V4.2.00-20161213.tar.gz
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun  Go to the unpacked directory:
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun  $./DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun  Perhaps you need to use "sudo", which need libusb to detect c510:b210
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun  $ sudo ./DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025
65*4882a593Smuzhiyun
66*4882a593SmuzhiyunPrepare USB drive
67*4882a593Smuzhiyun-----------------
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun  You sould determine which device associated to the usb drive
70*4882a593Smuzhiyun  carefully. eg:
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun  $ cat /proc/partitions
73*4882a593Smuzhiyun   8       48    1971712 sdd
74*4882a593Smuzhiyun   8       49     976720 sdd1
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun  $ sudo dd if=rootfs.ext2 of=/dev/sdd1
77*4882a593Smuzhiyun  $ sudo sync
78*4882a593Smuzhiyun
79*4882a593SmuzhiyunRun
80*4882a593Smuzhiyun---
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun  Plug the usb drive on gx6605s dev board.
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun  Setup the Console with the rate 115200/8-N-1.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun  $ cd output/images
87*4882a593Smuzhiyun  $ ../host/bin/csky-linux-gdb -x ../../board/csky/gx6605s/gdbinit vmlinux
88*4882a593Smuzhiyun
89