Skip to contentSkip to conversation

csky: Add new architecture

PATCH New Guo Ren 3 participants 8 messages Mar 3, 2017 – Mar 6, 2017 C-sky architecture

lore
Share & tools
lore

Guo Ren

author
#0 lore raw

PATCH 1/2 csky: Add new architecture

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

---
 DEVELOPERS          |  3 +++
 arch/Config.in      | 12 ++++++++++++
 arch/Config.in.csky | 45 +++++++++++++++++++++++++++++++++++++++++++++
 toolchain/Config.in |  1 +
 4 files changed, 61 insertions(+)
 create mode 100644 arch/Config.in.csky
DEVELOPERS +3 -0
index 678a9a9..361f902 100644
@@ -593,6 +593,9 @@ F:	package/sdl2/
 N:	Guillaume William Brs <[email protected]>
 F:	package/liquid-dsp/
 
+N:	Guo Ren <[email protected]>
+F:	arch/Config.in.csky
+
 N:	Gustavo Zacarias <[email protected]>
 F:	arch/Config.in.powerpc
 F:	board/qemu/
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

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
#1 lore raw

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

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

---
 DEVELOPERS                     |   2 +
 board/csky/gx6605s/gdbinit     |  25 ++++++++++
 board/csky/post-image.sh       |   4 ++
 board/csky/readme.txt          | 106 +++++++++++++++++++++++++++++++++++++++++
 configs/csky_gx6605s_defconfig |  19 ++++++++
 5 files changed, 156 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 +2 -0
index 361f902..3b4dd58 100644
@@ -595,6 +595,8 @@ F:	package/liquid-dsp/
 
 N:	Guo Ren <[email protected]>
 F:	arch/Config.in.csky
+F:	board/csky
+F:	configs/csky_*
 
 N:	Gustavo Zacarias <[email protected]>
 F:	arch/Config.in.powerpc
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
#2 lore raw

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

Hi Guo,

Guo Ren wrote,

Quoted 1 line

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

I tried your patchset, the toolchain is not downloadable, empty files in github.

WARNING: no hash file for csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz
mkdir -p /home/wbx/buildroot/output/build/toolchain-external-custom touch /home/wbx/buildroot/output/build/toolchain-external-custom/.stamp_downloaded

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

toolchain-external-custom Extracting
mkdir -p /home/wbx/buildroot/output/build/toolchain-external-custom

gzip -d -c /home/wbx/buildroot/dl/csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz | tar --strip-components=1 -C /home/wbx/buildroot/output/build/toolchain-external-custom
--exclude='usr/lib/locale/*' -xf -

gzip:
/home/wbx/buildroot/dl/csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz:
not in gzip format

Can the c-sky devboards be bought anywhere in Europe?

best regards
Waldemar

author
#3 lore raw

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

Hi, Waldemar

Quoted 10 lines
Quoted 1 line

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

I tried your patchset, the toolchain is not downloadable, empty files in github.

WARNING: no hash file for csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz
mkdir -p /home/wbx/buildroot/output/build/toolchain-external-custom touch /home/wbx/buildroot/output/build/toolchain-external-custom/.stamp_downloaded

I use git-lfs to put these tools two days ago and i've tested it, but now it seems invalid.

https://github.com/c-sky/tools

I'll look into it right way.

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

toolchain-external-custom Extracting
mkdir -p /home/wbx/buildroot/output/build/toolchain-external-custom

gzip -d -c /home/wbx/buildroot/dl/csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz | tar --strip-components=1 -C /home/wbx/buildroot/output/build/toolchain-external-custom
--exclude='usr/lib/locale/*' -xf -

Quoted 5 lines

gzip:
/home/wbx/buildroot/dl/csky-linux-tools-x86_64-glibc-linux-4.9.2-20170227.tar.gz:
not in gzip format

Can the c-sky devboards be bought anywhere in Europe?

We have a taobao shop: https://shop145257746.taobao.com

And you can get some info from: www.c-sky.com

Best Regards

Guo Ren

author
#4 lore raw

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

In reply to Waldemar Brodkorb

Thx, Waldemar

Quoted 2 lines

I tried your patchset, the toolchain is not downloadable, empty files in github.

Thx for your feedback, the reason of this is our git-lfs out of bandwith.

We've purchased 2-data-packs/month about 100GB/month.

Now It've been solved, and I've tested it again.
Please have a another try, and sorry for that.

Quoted 1 line

Can the c-sky devboards be bought anywhere in Europe?

Now we just sold it on taobao in china.

But we are preparing the csky-qemu instead.

Best Regards

guoren

#5 lore raw

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

In reply to Guo Ren

Hello,

Quoted 10 lines · Guo Ren

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

---
 DEVELOPERS                     |   2 +
 board/csky/gx6605s/gdbinit     |  25 ++++++++++
 board/csky/post-image.sh       |   4 ++
 board/csky/readme.txt          | 106 +++++++++++++++++++++++++++++++++++++++++
 configs/csky_gx6605s_defconfig |  19 ++++++++
 5 files changed, 156 insertions(+)

This is almost good, but there are still a few minor issues.

board/csky/post-image.sh line 2

Quoted 8 lines
board/csky/post-image.sh new file +2 -0
new file mode 100755
index 0000000..7bead4f
@@ -0,0 +1,4 @@
+#!/bin/sh
+# copy board/csky/xxx/gdbinit to images/.gdbinit for

Comment not really needed.

board/csky/post-image.sh line 4

Quoted 2 lines
board/csky/post-image.sh new file +2 -0
+BOARD_DIR="$(dirname $0)"
+cp -af $BOARD_DIR/${2}/gdbinit $BINARIES_DIR/.gdbinit

Just hardcode the path here:

install -D -m 0644 board/csky/gx6605s/gdbinit ${BINARIES_DIR}/.gdbinit

If more boards are added later, this can be adjusted, but for now, there's only one board, so let's keep things simple.

Why is the file being copied as .gdbinit? This makes it hidden, not very easy for the users to notice there's this file in ${BINARIES_DIR}.

Quoted 9 lines
board/csky/post-image.sh new file +9 -0
+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'.
+
+For C-SKY linux kernel it's made up of three components:
+1. linux/arch/csky contains the CPU related linux arch implement, eg: mmu,
+   task-switch, cache control, ... default git repo is here:
+
+   http://github.com/c-sky/csky-linux
+

board/csky/post-image.sh

Quoted 10 lines
board/csky/post-image.sh new file +10 -0
+2. linux/addons contains the SOC's drivers which haven't committed in official
+   linux source code, but we really need them to make the board run.
+   Here is the default addons git repo:
+
+   http://github.com/c-sky/csky-addons
+
+   Some C-SKY soc vendor has it own addons git repo. And you can specify
+   the git-repo in buildroot configuration.
+
+3. Official Linux kernel source from www.kernel.org :)

All of this is no longer correct, you're now providing a proper Git tree for the Linux kernel source code.

board/csky/post-image.sh

Quoted 3 lines
board/csky/post-image.sh new file +3 -0
+Buildroot will download cross compiler tools and make them together building,
+finally setup the rootfs with the packages which spicified in buildroot 
+configuration.

Not needed.

Quoted 9 lines
board/csky/post-image.sh new file +9 -0
+
+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:

board/csky/post-image.sh

Quoted 10 lines
board/csky/post-image.sh new file +10 -0
+
+  $ make csky_gx6605s_defconfig
+
+Build everything
+----------------
+
+Note: you will need to have access to the network, since Buildroot will
+download the packages' sources.
+
+  $ make # All will be done, just wait :)

You can remove the comment here.

Quoted 7 lines
board/csky/post-image.sh new file +7 -0
+Result of the build
+-------------------
+
+After building, you should obtain this tree:
+
+    output/images/
+    ??? vmlinux

board/csky/post-image.sh

Quoted 10 lines
board/csky/post-image.sh new file +10 -0
+    ??? rootfs.tar
+    ??? <board name>.dtb
+    ??? .gdbinit
+
+How to run it
+=============
+
+1. Download the Jtag-Server here:
+
+   https://pan.baidu.com/s/1o7VEPbO

This is a big binary blob, that you want users to run as root. To be honest, I would not accept to run this random binary blob hosted on baidu.com on my machine.

So I think it should:

1/ Be hosted in a more official location

2/ Not require to run as root

3/ Preferably come with the source code.

Also, if it's using the JTAG, do you need some additional hardware than the board?

Your readme.txt should ideally point to a website that gives more details about the board.

Quoted 9 lines
board/csky/post-image.sh new file +9 -0
+   install it and run it:
+
+   $ DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025
+
+2. Prepare the nfs-server in your linux PC. You can get the step in google, we
+   don't mention it here.
+
+   Then extract output/images/rootfs.tar to your nfsroot.
+

board/csky/post-image.sh

Quoted 10 lines
board/csky/post-image.sh new file +10 -0
+3. Modified the bootargs in board/csky/<board>/<board>.dts'. You should
+   specify the correct nfsroot= and ip=, for example in gx6605s.dts:
+
+	chosen {
+   		bootargs = "console=ttyS0,115200 init=/sbin/init root=/dev/nfs\
+rw nfsroot=192.168.101.230:/opt/nfs/test,v3,tcp,nolock ip=192.168.101.25";
+	}
+
+   You need cd to buildroot dir and '$ make' again to update the dts in
+   output/images

Our defconfig typically don't use NFS. Could you instead provide a defconfig that uses a SD card, or instructions to flash on eMMC/NAND ?

board/csky/post-image.sh

Quoted 7 lines
board/csky/post-image.sh new file +7 -0
+
+4. Setup the Console with the rate 115200/8-N-1.
+
+5. cd to the output/images and run.
+
+   For gx6605s, you need plug a usb ethernet card:
+   $csky-linux-gdb vmlinux

Why does it need a "usb ethernet card" ?

board/csky/post-image.sh

Quoted 11 lines
board/csky/post-image.sh new file +11 -0
+Finish
+======
+
+Any question contact me here:
+
+ren_guo at c-sky.com
+
+-----------
+Best Regards
+
+Guo Ren

You can remove this "Finish" section entirely.

Quoted 9 lines
configs/csky_gx6605s_defconfig new file +3 -0
new file mode 100644
index 0000000..ad99b6c
@@ -0,0 +1,19 @@
+BR2_csky=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y

configs/csky_gx6605s_defconfig line 13

Quoted 10 lines
configs/csky_gx6605s_defconfig new file +10 -0
+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"

This line can be removed once you change the post-image.sh as suggested above.

configs/csky_gx6605s_defconfig line 19

Quoted 6 lines
configs/csky_gx6605s_defconfig new file +6 -0
+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"

Thanks!

Thomas

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

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

Hello, Thomas

Quoted 10 lines

board/csky/post-image.sh line 2

Quoted 8 lines
board/csky/post-image.sh new file +2 -0
new file mode 100755
index 0000000..7bead4f
@@ -0,0 +1,4 @@
+#!/bin/sh
+# copy board/csky/xxx/gdbinit to images/.gdbinit for

Comment not really needed.

ok.

Quoted 8 lines

board/csky/post-image.sh line 4

Quoted 2 lines
board/csky/post-image.sh new file +2 -0
+BOARD_DIR="$(dirname $0)"
+cp -af $BOARD_DIR/${2}/gdbinit $BINARIES_DIR/.gdbinit

Just hardcode the path here:

install -D -m 0644 board/csky/gx6605s/gdbinit ${BINARIES_DIR}/.gdbinit

If more boards are added later, this can be adjusted, but for now, there's only one board, so let's keep things simple.

ok

Quoted 2 lines

Why is the file being copied as .gdbinit? This makes it hidden, not very easy for the users to notice there's this file in ${BINARIES_DIR}.

.gdbinit is the default script to csky-linux-gdb, I've update readme.txt to emphasize this.

Quoted 13 lines
Quoted 13 lines
board/csky/post-image.sh new file +13 -0
+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'.
+
+For C-SKY linux kernel it's made up of three components:
+1. linux/arch/csky contains the CPU related linux arch implement, eg: mmu,
+   task-switch, cache control, ... default git repo is here:
+
+   http://github.com/c-sky/csky-linux
+
+2. linux/addons contains the SOC's drivers which haven't committed in official
+   linux source code, but we really need them to make the board run.
+   Here is the default addons git repo:
+
Quoted 8 lines

board/csky/post-image.sh

Quoted 6 lines
board/csky/post-image.sh new file +6 -0
+   http://github.com/c-sky/csky-addons
+
+   Some C-SKY soc vendor has it own addons git repo. And you can specify
+   the git-repo in buildroot configuration.
+
+3. Official Linux kernel source from www.kernel.org :)

All of this is no longer correct, you're now providing a proper Git tree for the Linux kernel source code.

Yes, you are right. I've changed it.

Quoted 4 lines

board/csky/post-image.sh

Quoted 3 lines
board/csky/post-image.sh new file +3 -0
+Buildroot will download cross compiler tools and make them together building,
+finally setup the rootfs with the packages which spicified in buildroot
+configuration.

Not needed.

ok, remove it.

Quoted 12 lines
Quoted 12 lines
board/csky/post-image.sh new file +12 -0
+
+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
+
Quoted 8 lines

board/csky/post-image.sh

Quoted 7 lines
board/csky/post-image.sh new file +7 -0
+Build everything
+----------------
+
+Note: you will need to have access to the network, since Buildroot will
+download the packages' sources.
+
+  $ make # All will be done, just wait :)

You can remove the comment here.

ok, remove it.

Quoted 21 lines
Quoted 7 lines
board/csky/post-image.sh new file +7 -0
+Result of the build
+-------------------
+
+After building, you should obtain this tree:
+
+    output/images/
+    ??? vmlinux

board/csky/post-image.sh

Quoted 10 lines
board/csky/post-image.sh new file +10 -0
+    ??? rootfs.tar
+    ??? <board name>.dtb
+    ??? .gdbinit
+
+How to run it
+=============
+
+1. Download the Jtag-Server here:
+
+   https://pan.baidu.com/s/1o7VEPbO

This is a big binary blob, that you want users to run as root. To be honest, I would not accept to run this random binary blob hosted on baidu.com on my machine.

Quoted 3 lines

So I think it should:

1/ Be hosted in a more official location

We've prepared the tar.gz on github instead of xxx.sh.

Quoted 1 line

2/ Not require to run as root

Now, you don't need sudo to install.
Perhaps you need run it with sudo ,it depends on libusb to detect c510:b210 csky usb jtag.

Quoted 1 line

3/ Preferably come with the source code.

No plan to release the source code, but we'll consider later.

Quoted 2 lines

Also, if it's using the JTAG, do you need some additional hardware than the board?

No need, it has integrated hardware Jtag.

Quoted 3 lines

Your readme.txt should ideally point to a website that gives more details about the board.

I've updated the readme with the introduction of gx6605s dev board.

Quoted 13 lines
Quoted 13 lines
board/csky/post-image.sh new file +13 -0
+   install it and run it:
+
+   $ DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025
+
+2. Prepare the nfs-server in your linux PC. You can get the step in google, we
+   don't mention it here.
+
+   Then extract output/images/rootfs.tar to your nfsroot.
+
+3. Modified the bootargs in board/csky/<board>/<board>.dts'. You should
+   specify the correct nfsroot= and ip=, for example in gx6605s.dts:
+
+	chosen {
Quoted 8 lines

board/csky/post-image.sh

Quoted 6 lines
board/csky/post-image.sh new file +6 -0
+   		bootargs = "console=ttyS0,115200 init=/sbin/init root=/dev/nfs\
+rw nfsroot=192.168.101.230:/opt/nfs/test,v3,tcp,nolock ip=192.168.101.25";
+	}
+
+   You need cd to buildroot dir and '$ make' again to update the dts in
+   output/images

Our defconfig typically don't use NFS. Could you instead provide a defconfig that uses a SD card, or instructions to flash on eMMC/NAND ?

ok, we use usb drive.

Quoted 8 lines

board/csky/post-image.sh

Quoted 7 lines
board/csky/post-image.sh new file +7 -0
+
+4. Setup the Console with the rate 115200/8-N-1.
+
+5. cd to the output/images and run.
+
+   For gx6605s, you need plug a usb ethernet card:
+   $csky-linux-gdb vmlinux

Why does it need a "usb ethernet card" ?

The gx6605s SOC has no mac controller, it need usb to support networking.

Quoted 4 lines
Quoted 4 lines
board/csky/post-image.sh new file +4 -0
+Finish
+======
+
+Any question contact me here:
Quoted 8 lines

board/csky/post-image.sh

Quoted 7 lines
board/csky/post-image.sh new file +7 -0
+
+ren_guo at c-sky.com
+
+-----------
+Best Regards
+
+Guo Ren

You can remove this "Finish" section entirely.

ok

Quoted 13 lines
Quoted 13 lines
configs/csky_gx6605s_defconfig new file +7 -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
Quoted 8 lines

configs/csky_gx6605s_defconfig line 13

Quoted 6 lines
configs/csky_gx6605s_defconfig new file +6 -0
+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"

This line can be removed once you change the post-image.sh as suggested above.

ok

Best Regards

guoren

#7 lore raw

PATCH 1/2 csky: Add new architecture

In reply to Guo Ren

Hello,

Quoted 11 lines · 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          |  3 +++
 arch/Config.in      | 12 ++++++++++++
 arch/Config.in.csky | 45 +++++++++++++++++++++++++++++++++++++++++++++
 toolchain/Config.in |  1 +
 4 files changed, 61 insertions(+)
 create mode 100644 arch/Config.in.csky

Applied to master, with some minor tweaks. Thanks!

Thomas

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