Skip to contentSkip to conversation

configs: add defconfig for Nationalchip gx6605s dev board.

PATCH New Guo Ren 2 participants 4 messages Mar 2, 2017 C-sky architecture

lore
Share & tools
lore

Guo Ren

author
#0 lore raw

PATCH 1/3 configs: add defconfig for Nationalchip gx6605s dev board.

gx6605s is a nice SOC for dvbs2 DVB product, and C-SKY inside.

---
 DEVELOPERS                     |   4 ++
 board/csky/gx6605s/gdbinit     |  25 ++++++++++
 board/csky/post-image.sh       |   4 ++
 board/csky/readme.txt          | 106 +++++++++++++++++++++++++++++++++++++++++
 configs/csky_gx6605s_defconfig |  19 ++++++++
 5 files changed, 158 insertions(+)
 create mode 100644 board/csky/gx6605s/gdbinit
 create mode 100755 board/csky/post-image.sh
 create mode 100644 board/csky/readme.txt
 create mode 100644 configs/csky_gx6605s_defconfig
DEVELOPERS +4 -0
index 1bf07c3..6495a9e 100644
@@ -592,6 +592,10 @@ F:	package/sdl2/
 N:	Guillaume William Brs <[email protected]>
 F:	package/liquid-dsp/
 
+N:	Guo Ren <[email protected]>
+F:	board/csky
+F:	configs/csky_*
+
 N:	Gustavo Zacarias <[email protected]>
 F:	arch/Config.in.powerpc
 F:	board/qemu/
board/csky/gx6605s/gdbinit new file +25 -0
new file mode 100644
index 0000000..0a6d8ab
@@ -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
+
board/csky/post-image.sh new file +4 -0
new file mode 100755
index 0000000..7bead4f
@@ -0,0 +1,4 @@
+#!/bin/sh
+# copy board/csky/xxx/gdbinit to images/.gdbinit for
+BOARD_DIR="$(dirname $0)"
+cp -af $BOARD_DIR/${2}/gdbinit $BINARIES_DIR/.gdbinit
board/csky/readme.txt new file +106 -0

106 lines not on this page · raw message

configs/csky_gx6605s_defconfig new file +19 -0
new file mode 100644
index 0000000..ad99b6c
@@ -0,0 +1,19 @@
+BR2_csky=y
+BR2_TOOLCHAIN_EXTERNAL=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_TARGET_GENERIC_GETTY_PORT="ttyS0"
+BR2_SYSTEM_DHCP="eth0"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/csky/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="gx6605s"
+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/3549ac308d427b0adb98b410d0acd82449fb5c13.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="gx66xx"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="gx6605s"
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 2/3 toolchain: only external toolchain option displayed

Currently csky architecture isn't support the "internal toolchain backend", so we disable it in config.

---
 toolchain/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/Config.in +1 -0
index de01585..652c9d8 100644
@@ -46,6 +46,7 @@ config BR2_TOOLCHAIN_BUILDROOT
 	depends on !BR2_bf607
 	depends on !BR2_bf608
 	depends on !BR2_bf609
+	depends on !BR2_csky
 
 config BR2_TOOLCHAIN_EXTERNAL
 	bool "External toolchain"
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 3/3 csky: Add new architecture

In reply to Guo Ren

This is a basic implement for C-SKY, we use pre-build-toolchain from url, and csky-toolchain open-source is on going.

---
 DEVELOPERS          |  1 +
 arch/Config.in      | 12 ++++++++++++
 arch/Config.in.csky | 45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 arch/Config.in.csky
DEVELOPERS +1 -0
index 6495a9e..cd4402f 100644
@@ -593,6 +593,7 @@ N:	Guillaume William Brs <[email protected]>
 F:	package/liquid-dsp/
 
 N:	Guo Ren <[email protected]>
+F:	arch/Config.in.csky
 F:	board/csky
 F:	configs/csky_*
 
arch/Config.in +12 -0
index 7149b2c..65a33fb 100644
@@ -85,6 +85,14 @@ config BR2_bfin
 	  http://www.analog.com/
 	  http://en.wikipedia.org/wiki/Blackfin
 
+config BR2_csky
+	bool "csky"
+	select BR2_ARCH_HAS_MMU_MANDATORY
+	help
+	  csky is processor IP from china.
+	  http://www.c-sky.com/
+	  http://www.github.com/c-sky
+
 config BR2_i386
 	bool "i386"
 	select BR2_ARCH_HAS_MMU_MANDATORY
@@ -369,6 +377,10 @@ if BR2_bfin
 source "arch/Config.in.bfin"
 endif
 
+if BR2_csky
+source "arch/Config.in.csky"
+endif
+
 if BR2_m68k
 source "arch/Config.in.m68k"
 endif
arch/Config.in.csky new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
1.9.1
#3 lore raw

PATCH 1/3 configs: add defconfig for Nationalchip gx6605s dev board.

In reply to Guo Ren

Hello,

Quoted 3 lines · Guo Ren

gx6605s is a nice SOC for dvbs2 DVB product, and C-SKY inside.

Thanks again for your patch series, but you did not read carefully enough the comments in my previous review.

Your patch 1/3 is adding board configuration for an architecture for which the support is only added in patch 2/3. This doesn't make any
sense: I should be able to apply any number of the first patches in your series, and still get something that make sense.

So:

* Please merge patches 2/3 and 3/3 in just one patch, and make them the first patch.

* Please move your current patch 1/3 as the second patch of your series.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com