Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
@ 2017-03-06 11:52 Guo Ren
  2017-03-06 13:52 ` ren_guo
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Guo Ren @ 2017-03-06 11:52 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
---
 DEVELOPERS                     |  2 +
 board/csky/gx6605s/gdbinit     | 25 ++++++++++++
 board/csky/post-image.sh       |  7 ++++
 board/csky/readme.txt          | 92 ++++++++++++++++++++++++++++++++++++++++++
 configs/csky_gx6605s_defconfig | 18 +++++++++
 5 files changed, 144 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

diff --git a/DEVELOPERS b/DEVELOPERS
index ff72ca1..c1b181e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -597,6 +597,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
diff --git a/board/csky/gx6605s/gdbinit b/board/csky/gx6605s/gdbinit
new file mode 100644
index 0000000..0a6d8ab
--- /dev/null
+++ b/board/csky/gx6605s/gdbinit
@@ -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
+
diff --git a/board/csky/post-image.sh b/board/csky/post-image.sh
new file mode 100755
index 0000000..be71f51
--- /dev/null
+++ b/board/csky/post-image.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# .gdbinit is the csky-linux-gdb default init script. eg:
+# $ csky-linux-gdb vmlinux
+# Gdb will read .gdbinit to load vmlinux by default.
+# So, we need copy the gdbinit to the .gdbinit.
+
+install -D -m 0644 board/csky/gx6605s/gdbinit ${BINARIES_DIR}/.gdbinit
diff --git a/board/csky/readme.txt b/board/csky/readme.txt
new file mode 100644
index 0000000..764f565
--- /dev/null
+++ b/board/csky/readme.txt
@@ -0,0 +1,92 @@
+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
+    ??? .gdbinit
+
+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.
+
+  $ cd output/images
+
+  $ ../host/usr/bin/csky-linux-gdb vmlinux
+
+  (csky-linux-gdb use .gdbinit to load vmlinux)
+
diff --git a/configs/csky_gx6605s_defconfig b/configs/csky_gx6605s_defconfig
new file mode 100644
index 0000000..a509233
--- /dev/null
+++ b/configs/csky_gx6605s_defconfig
@@ -0,0 +1,18 @@
+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_ROOTFS_POST_IMAGE_SCRIPT="board/csky/post-image.sh"
+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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-06 11:52 [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board Guo Ren
@ 2017-03-06 13:52 ` ren_guo
  2017-03-08  0:54 ` ren_guo
  2017-03-20 21:48 ` Thomas Petazzoni
  2 siblings, 0 replies; 11+ messages in thread
From: ren_guo @ 2017-03-06 13:52 UTC (permalink / raw)
  To: buildroot

Here is the gx6605s Introduction video, hope it could help.

https://youtu.be/Y9gA1q9NA_Y

The goal of this development board is linux-kernel study for beginner.

On 2017?03?06? 19:52, Guo Ren wrote:

> gx6605s is a nice SOC for dvbs2 DVB product, and C-SKY inside.
>
> Signed-off-by: Guo Ren <ren_guo@c-sky.com>
> ---
>   DEVELOPERS                     |  2 +
>   board/csky/gx6605s/gdbinit     | 25 ++++++++++++
>   board/csky/post-image.sh       |  7 ++++
>   board/csky/readme.txt          | 92 ++++++++++++++++++++++++++++++++++++++++++
>   configs/csky_gx6605s_defconfig | 18 +++++++++
>   5 files changed, 144 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
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index ff72ca1..c1b181e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -597,6 +597,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
> diff --git a/board/csky/gx6605s/gdbinit b/board/csky/gx6605s/gdbinit
> new file mode 100644
> index 0000000..0a6d8ab
> --- /dev/null
> +++ b/board/csky/gx6605s/gdbinit
> @@ -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
> +
> diff --git a/board/csky/post-image.sh b/board/csky/post-image.sh
> new file mode 100755
> index 0000000..be71f51
> --- /dev/null
> +++ b/board/csky/post-image.sh
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +# .gdbinit is the csky-linux-gdb default init script. eg:
> +# $ csky-linux-gdb vmlinux
> +# Gdb will read .gdbinit to load vmlinux by default.
> +# So, we need copy the gdbinit to the .gdbinit.
> +
> +install -D -m 0644 board/csky/gx6605s/gdbinit ${BINARIES_DIR}/.gdbinit
> diff --git a/board/csky/readme.txt b/board/csky/readme.txt
> new file mode 100644
> index 0000000..764f565
> --- /dev/null
> +++ b/board/csky/readme.txt
> @@ -0,0 +1,92 @@
> +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
> +    ??? .gdbinit
> +
> +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.
> +
> +  $ cd output/images
> +
> +  $ ../host/usr/bin/csky-linux-gdb vmlinux
> +
> +  (csky-linux-gdb use .gdbinit to load vmlinux)
> +
> diff --git a/configs/csky_gx6605s_defconfig b/configs/csky_gx6605s_defconfig
> new file mode 100644
> index 0000000..a509233
> --- /dev/null
> +++ b/configs/csky_gx6605s_defconfig
> @@ -0,0 +1,18 @@
> +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_ROOTFS_POST_IMAGE_SCRIPT="board/csky/post-image.sh"
> +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
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-06 11:52 [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board Guo Ren
  2017-03-06 13:52 ` ren_guo
@ 2017-03-08  0:54 ` ren_guo
  2017-03-20 21:48 ` Thomas Petazzoni
  2 siblings, 0 replies; 11+ messages in thread
From: ren_guo @ 2017-03-08  0:54 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

Could you help to review the patch, thank you very much.

Best Regards

guoren

On 2017?03?06? 19:52, Guo Ren wrote:

> gx6605s is a nice SOC for dvbs2 DVB product, and C-SKY inside.
>
> Signed-off-by: Guo Ren <ren_guo@c-sky.com>
> ---
>   DEVELOPERS                     |  2 +
>   board/csky/gx6605s/gdbinit     | 25 ++++++++++++
>   board/csky/post-image.sh       |  7 ++++
>   board/csky/readme.txt          | 92 ++++++++++++++++++++++++++++++++++++++++++
>   configs/csky_gx6605s_defconfig | 18 +++++++++
>   5 files changed, 144 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
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index ff72ca1..c1b181e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -597,6 +597,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
> diff --git a/board/csky/gx6605s/gdbinit b/board/csky/gx6605s/gdbinit
> new file mode 100644
> index 0000000..0a6d8ab
> --- /dev/null
> +++ b/board/csky/gx6605s/gdbinit
> @@ -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
> +
> diff --git a/board/csky/post-image.sh b/board/csky/post-image.sh
> new file mode 100755
> index 0000000..be71f51
> --- /dev/null
> +++ b/board/csky/post-image.sh
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +# .gdbinit is the csky-linux-gdb default init script. eg:
> +# $ csky-linux-gdb vmlinux
> +# Gdb will read .gdbinit to load vmlinux by default.
> +# So, we need copy the gdbinit to the .gdbinit.
> +
> +install -D -m 0644 board/csky/gx6605s/gdbinit ${BINARIES_DIR}/.gdbinit
> diff --git a/board/csky/readme.txt b/board/csky/readme.txt
> new file mode 100644
> index 0000000..764f565
> --- /dev/null
> +++ b/board/csky/readme.txt
> @@ -0,0 +1,92 @@
> +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
> +    ??? .gdbinit
> +
> +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.
> +
> +  $ cd output/images
> +
> +  $ ../host/usr/bin/csky-linux-gdb vmlinux
> +
> +  (csky-linux-gdb use .gdbinit to load vmlinux)
> +
> diff --git a/configs/csky_gx6605s_defconfig b/configs/csky_gx6605s_defconfig
> new file mode 100644
> index 0000000..a509233
> --- /dev/null
> +++ b/configs/csky_gx6605s_defconfig
> @@ -0,0 +1,18 @@
> +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_ROOTFS_POST_IMAGE_SCRIPT="board/csky/post-image.sh"
> +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
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-06 11:52 [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board Guo Ren
  2017-03-06 13:52 ` ren_guo
  2017-03-08  0:54 ` ren_guo
@ 2017-03-20 21:48 ` Thomas Petazzoni
  2017-03-21  3:29   ` ren_guo
  2017-03-23  9:05   ` ren_guo
  2 siblings, 2 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2017-03-20 21:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  6 Mar 2017 19:52:32 +0800, Guo Ren wrote:
> gx6605s is a nice SOC for dvbs2 DVB product, and C-SKY inside.
> 
> Signed-off-by: Guo Ren <ren_guo@c-sky.com>
> ---
>  DEVELOPERS                     |  2 +
>  board/csky/gx6605s/gdbinit     | 25 ++++++++++++
>  board/csky/post-image.sh       |  7 ++++
>  board/csky/readme.txt          | 92 ++++++++++++++++++++++++++++++++++++++++++
>  configs/csky_gx6605s_defconfig | 18 +++++++++
>  5 files changed, 144 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

I've applied the patch after doing one change, see below.

> diff --git a/board/csky/post-image.sh b/board/csky/post-image.sh
> new file mode 100755
> index 0000000..be71f51
> --- /dev/null
> +++ b/board/csky/post-image.sh
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +# .gdbinit is the csky-linux-gdb default init script. eg:
> +# $ csky-linux-gdb vmlinux
> +# Gdb will read .gdbinit to load vmlinux by default.
> +# So, we need copy the gdbinit to the .gdbinit.
> +
> +install -D -m 0644 board/csky/gx6605s/gdbinit ${BINARIES_DIR}/.gdbinit

I've removed this entirely, and just changed the readme.txt
instructions to tell people to run:

  ./output/host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit output/images/vmlinux

By referencing the gdbinit file using the -x option, we don't have to
copy it around in an hidden file.

Thanks!

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-20 21:48 ` Thomas Petazzoni
@ 2017-03-21  3:29   ` ren_guo
  2017-03-23  9:05   ` ren_guo
  1 sibling, 0 replies; 11+ messages in thread
From: ren_guo @ 2017-03-21  3:29 UTC (permalink / raw)
  To: buildroot

Thx Thomas,

> I've removed this entirely, and just changed the readme.txt
> instructions to tell people to run:
>
>    ./output/host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit output/images/vmlinux
>
> By referencing the gdbinit file using the -x option, we don't have to
> copy it around in an hidden file.
>
"gdb -x" is great, I like it :)

Now I'm preparing more for this board, and it's a big encouragement for me.
Thanks for your careful reviewing.

Best Regards
guoren

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-20 21:48 ` Thomas Petazzoni
  2017-03-21  3:29   ` ren_guo
@ 2017-03-23  9:05   ` ren_guo
  2017-03-23  9:10     ` Thomas Petazzoni
  1 sibling, 1 reply; 11+ messages in thread
From: ren_guo @ 2017-03-23  9:05 UTC (permalink / raw)
  To: buildroot

Hello,

> I've removed this entirely, and just changed the readme.txt
> instructions to tell people to run:
>
>    ./output/host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit output/images/vmlinux
>
> By referencing the gdbinit file using the -x option, we don't have to
> copy it around in an hidden file.
>
gdbinit need load gx6605s.dtb to a memory address, so we need run it  in output/images like this:

$ cd output/images

$ ../host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit vmlinux

Best Regards

guoren

-- 
Guo Ren, Software Engineer, C-SKY
3 XiDoumen Rd,BldgA,15F,Hangzhou,China
P.C: 310012
http://www.c-sky.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-23  9:05   ` ren_guo
@ 2017-03-23  9:10     ` Thomas Petazzoni
  2017-03-23  9:16       ` ren_guo
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2017-03-23  9:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 23 Mar 2017 17:05:33 +0800, ren_guo wrote:

> > I've removed this entirely, and just changed the readme.txt
> > instructions to tell people to run:
> >
> >    ./output/host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit output/images/vmlinux
> >
> > By referencing the gdbinit file using the -x option, we don't have to
> > copy it around in an hidden file.
> >  
> gdbinit need load gx6605s.dtb to a memory address, so we need run it  in output/images like this:
> 
> $ cd output/images
> 
> $ ../host/usr/bin/csky-linux-gdb -x board/csky/gx6605s/gdbinit vmlinux

Or change gdbinit to:

restore output/images/gx6605s.dtb binary 0x92000000

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-23  9:10     ` Thomas Petazzoni
@ 2017-03-23  9:16       ` ren_guo
  2017-03-23  9:23         ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: ren_guo @ 2017-03-23  9:16 UTC (permalink / raw)
  To: buildroot

Hello,

> Or change gdbinit to:
>
> restore output/images/gx6605s.dtb binary 0x92000000
>
It won't work for "make O=/tmp/br".

Update readme.txt is OK.

-- 
Guo Ren, Software Engineer, C-SKY
3 XiDoumen Rd,BldgA,15F,Hangzhou,China
P.C: 310012
http://www.c-sky.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-23  9:16       ` ren_guo
@ 2017-03-23  9:23         ` Thomas Petazzoni
  2017-03-23  9:32           ` ren_guo
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2017-03-23  9:23 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 23 Mar 2017 17:16:14 +0800, ren_guo wrote:

> > Or change gdbinit to:
> >
> > restore output/images/gx6605s.dtb binary 0x92000000
> >  
> It won't work for "make O=/tmp/br".

Right, but the readme.txt instructions do assume anyway that the output
is in output/images. But OK, the user can easily adjust by himself the
instructions he is copy/pasting from readme.txt and be confused by a
hardcoded path in the gdbinit file.

> Update readme.txt is OK.

OK, then please send a patch, but you also need to change the relative
path to the gdbinit file, it was not correct in your example, it should
be:

	-x ../../board/csky/...

Best regards,

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-23  9:23         ` Thomas Petazzoni
@ 2017-03-23  9:32           ` ren_guo
  2017-03-23  9:46             ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: ren_guo @ 2017-03-23  9:32 UTC (permalink / raw)
  To: buildroot

Hello,

> OK, then please send a patch, but you also need to change the relative
> path to the gdbinit file, it was not correct in your example, it should
> be:
>
> 	-x ../../board/csky/...

Yes, it's wrong in my example, and I want use post-image.sh to copy the gdbinit to the output/images.

and the readme will be changed like this:

$ cd output/images

$ ../host/usr/bin/csky-linux-gdb -x gdbinit vmlinux

-- 
Guo Ren, Software Engineer, C-SKY
3 XiDoumen Rd,BldgA,15F,Hangzhou,China
P.C: 310012
http://www.c-sky.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board.
  2017-03-23  9:32           ` ren_guo
@ 2017-03-23  9:46             ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2017-03-23  9:46 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 23 Mar 2017 17:32:32 +0800, ren_guo wrote:

> Yes, it's wrong in my example, and I want use post-image.sh to copy the gdbinit to the output/images.

I think it's a bit annoying/useless to copy the gdbinit file around.
Why not keep it where it is?

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-23  9:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-06 11:52 [Buildroot] [PATCH 1/1] configs: add defconfig for Nationalchip gx6605s dev board Guo Ren
2017-03-06 13:52 ` ren_guo
2017-03-08  0:54 ` ren_guo
2017-03-20 21:48 ` Thomas Petazzoni
2017-03-21  3:29   ` ren_guo
2017-03-23  9:05   ` ren_guo
2017-03-23  9:10     ` Thomas Petazzoni
2017-03-23  9:16       ` ren_guo
2017-03-23  9:23         ` Thomas Petazzoni
2017-03-23  9:32           ` ren_guo
2017-03-23  9:46             ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox