All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/3] Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support
@ 2019-03-07  2:11 Nylon Chen
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32) Nylon Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Nylon Chen @ 2019-03-07  2:11 UTC (permalink / raw)
  To: buildroot

v3:
    1) DEVELOPERS file must be alphabetic ordering of developer names
    2) removed BR2_TOOLCHAIN_HAS_NATIVE_RPC option
    3) removed package modifications because we do not support building nds32 toolchain by Buildroot
    4) replace BR2_LINUX_KERNEL_CUSTOM_VERSION and BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE with BR2_LINUX_KERNEL_CUSTOM_VERSION and BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
    5) add BR2_ANDES_NDS32_FPU option

v2:
    1) add BR2_GCC_TARGET_ARCH option
    2) add autobuild fragments
    3) replace BR2_LINUX_KERNEL_PATCH with BR2_GLOBAL_PATCH_DIR
    4) make savedefconfig  generate config file
    5) There can only be one author in DEVELOPERS file

Nylon Chen (3):
  arch: add support for Andes 32-bit (nds32) architecture
  configs/andes_nds32_ae3xx: new defconfig
  support/config-fragments: add Andes 32-bit (nds32) to autobuild
    configs

 DEVELOPERS                                    |  9 ++++++
 arch/Config.in                                | 13 ++++++++
 arch/Config.in.nds32                          | 31 +++++++++++++++++++
 board/andes/ae3xx/ae3xx.fragment              |  1 +
 ...0001-nds32-Fix-boot-messages-garbled.patch | 28 +++++++++++++++++
 configs/andes_ae3xx_defconfig                 | 14 +++++++++
 package/binutils/Config.in.host               |  2 ++
 package/gcc/Config.in.host                    |  4 +++
 package/linux-headers/Config.in.host          |  3 ++
 .../autobuild/br-andes-nds32-glibc.config     |  9 ++++++
 .../autobuild/toolchain-configs.csv           |  1 +
 11 files changed, 115 insertions(+)
 create mode 100644 arch/Config.in.nds32
 create mode 100644 board/andes/ae3xx/ae3xx.fragment
 create mode 100644 board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
 create mode 100644 configs/andes_ae3xx_defconfig
 create mode 100644 support/config-fragments/autobuild/br-andes-nds32-glibc.config

-- 
2.18.0

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

* [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32)
  2019-03-07  2:11 [Buildroot] [PATCH v2 0/3] Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support Nylon Chen
@ 2019-03-07  2:11 ` Nylon Chen
  2019-03-14 22:22   ` Yann E. MORIN
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 2/3] configs/andes_nds32_ae3xx: new defconfig Nylon Chen
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain Nylon Chen
  2 siblings, 1 reply; 15+ messages in thread
From: Nylon Chen @ 2019-03-07  2:11 UTC (permalink / raw)
  To: buildroot

This commit provides basic support for the Andes 32-bit(nds32) architecture.

Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Nylon Chen <nylon7@andestech.com>
---
 DEVELOPERS           |  3 +++
 arch/Config.in       | 12 ++++++++++++
 arch/Config.in.nds32 | 19 +++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 arch/Config.in.nds32

diff --git a/DEVELOPERS b/DEVELOPERS
index c17ba6db99..06a20c68b6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1605,6 +1605,9 @@ F:	package/trousers/
 N:	Norbert Lange <nolange79@gmail.com>
 F:	package/tcf-agent/
 
+N:	Nylon Chen <nylon7@andestech.com>
+F:	arch/Config.in.nds32
+
 N:	Olaf Rempel <razzor@kopf-tisch.de>
 F:	package/ctorrent/
 
diff --git a/arch/Config.in b/arch/Config.in
index f50760a0cf..d82803c828 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -154,6 +154,14 @@ config BR2_mips64el
 	  http://www.mips.com/
 	  http://en.wikipedia.org/wiki/MIPS_Technologies
 
+config BR2_nds32
+	bool "nds32"
+	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
+	select BR2_ARCH_HAS_MMU_MANDATORY
+	help
+	  nds32 is a 32-bit architecture developed by Andes Technology.
+	  https://en.wikipedia.org/wiki/Andes_Technology
+
 config BR2_nios2
 	bool "Nios II"
 	select BR2_ARCH_HAS_MMU_MANDATORY
@@ -419,6 +427,10 @@ if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
 source "arch/Config.in.mips"
 endif
 
+if BR2_nds32
+source "arch/Config.in.nds32"
+endif
+
 if BR2_nios2
 source "arch/Config.in.nios2"
 endif
diff --git a/arch/Config.in.nds32 b/arch/Config.in.nds32
new file mode 100644
index 0000000000..38b1c2d4eb
--- /dev/null
+++ b/arch/Config.in.nds32
@@ -0,0 +1,19 @@
+config BR2_ARCH
+	default "nds32"
+
+config BR2_ANDES_NDS32_FPU
+	bool "Enable FPU coprocessor"
+	help
+	  You can say y here if your Andes CPU have a Floating-Point Coprocessor
+	  or if you need FPU support for your user-space programs.
+
+config BR2_GCC_TARGET_ARCH
+	default "v3"  if !BR2_ANDES_NDS32_FPU
+	default "v3f" if BR2_ANDES_NDS32_FPU
+
+config BR2_ENDIAN
+	default "LITTLE"
+
+config BR2_READELF_ARCH_NAME
+	default "Andes Technology compact code size embedded RISC processor family"
+
-- 
2.18.0

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

* [Buildroot] [PATCH v3 2/3] configs/andes_nds32_ae3xx: new defconfig
  2019-03-07  2:11 [Buildroot] [PATCH v2 0/3] Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support Nylon Chen
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32) Nylon Chen
@ 2019-03-07  2:11 ` Nylon Chen
  2019-03-14 22:31   ` Yann E. MORIN
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain Nylon Chen
  2 siblings, 1 reply; 15+ messages in thread
From: Nylon Chen @ 2019-03-07  2:11 UTC (permalink / raw)
  To: buildroot

Add Andes 32-bit defconfig for AE3XX platform.

Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Nylon Chen <nylon7@andestech.com>
---
 DEVELOPERS                                    |  2 +
 board/andes/ae3xx/ae3xx.fragment              |  1 +
 ...0001-nds32-Fix-boot-messages-garbled.patch | 28 +++++++++++
 board/andes/readme.txt                        | 49 +++++++++++++++++++
 configs/andes_ae3xx_defconfig                 | 14 ++++++
 5 files changed, 94 insertions(+)
 create mode 100644 board/andes/ae3xx/ae3xx.fragment
 create mode 100644 board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
 create mode 100644 board/andes/readme.txt
 create mode 100644 configs/andes_ae3xx_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 06a20c68b6..71fc8062e7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1607,6 +1607,8 @@ F:	package/tcf-agent/
 
 N:	Nylon Chen <nylon7@andestech.com>
 F:	arch/Config.in.nds32
+F:	board/andes
+F:	configs/andes_ae3xx_defconfig
 
 N:	Olaf Rempel <razzor@kopf-tisch.de>
 F:	package/ctorrent/
diff --git a/board/andes/ae3xx/ae3xx.fragment b/board/andes/ae3xx/ae3xx.fragment
new file mode 100644
index 0000000000..3b13d10740
--- /dev/null
+++ b/board/andes/ae3xx/ae3xx.fragment
@@ -0,0 +1 @@
+CONFIG_NDS32_BUILTIN_DTB="ae3xx"
diff --git a/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch b/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
new file mode 100644
index 0000000000..adb60937bd
--- /dev/null
+++ b/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
@@ -0,0 +1,28 @@
+From 90d52d180dcc5d1300dc352ca709eb6453894143 Mon Sep 17 00:00:00 2001
+From: Nylon Chen <nylon7@andestech.com>
+Date: Wed, 28 Nov 2018 16:26:46 +0800
+Subject: [PATCH] nds32: Fix boot messages garbled
+
+In order to display uart correctly we have to pass the correct setting of uart to kernel by bootarg.
+This patch will provide such settings to set the correct uart baud rate.
+
+Signed-off-by: Nylon Chen <nylon7@andestech.com>
+---
+ arch/nds32/boot/dts/ae3xx.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/nds32/boot/dts/ae3xx.dts b/arch/nds32/boot/dts/ae3xx.dts
+index bb39749a6673..aefe2090926a 100644
+--- a/arch/nds32/boot/dts/ae3xx.dts
++++ b/arch/nds32/boot/dts/ae3xx.dts
+@@ -6,6 +6,7 @@
+ 	interrupt-parent = <&intc>;
+ 
+ 	chosen {
++		bootargs = "memblock=debug earlycon console=ttyS0,38400n8 debug loglevel=7";
+ 		stdout-path = &serial0;
+ 	};
+ 
+-- 
+2.18.0
+
diff --git a/board/andes/readme.txt b/board/andes/readme.txt
new file mode 100644
index 0000000000..0f95c65549
--- /dev/null
+++ b/board/andes/readme.txt
@@ -0,0 +1,49 @@
+Intro
+=====
+
+Andestech(nds32) AE3XX Platform
+
+The AE3XX prototype demonstrates the AE3XX example platform on the FPGA. 
+It is composed of one Andestech(nds32) processor and AE3XX.
+
+How to build it
+===============
+
+Configure Buildroot
+-------------------
+
+The andes_ae3xx_defconfig configuration is a sample configuration with
+all that is required to bring the FPGA Development Board:
+
+  $ make andes_ae3xx_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.cpio
+    +-- rootfs.tar
+
+How to run it
+=============
+
+Run
+---
+
+  Setup the Console with the rate 38400/8-N-1.
+
+  $ cd output/images
+  $ ../host/bin/nds32le-linux-gdb vmlinux
+  $ target remote [your host]
+  $ lo
+  $ c 
diff --git a/configs/andes_ae3xx_defconfig b/configs/andes_ae3xx_defconfig
new file mode 100644
index 0000000000..250e3ee157
--- /dev/null
+++ b/configs/andes_ae3xx_defconfig
@@ -0,0 +1,14 @@
+BR2_nds32=y
+BR2_GLOBAL_PATCH_DIR="board/andes/patches/"
+BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
+BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="nds32le-linux"
+BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_17=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/andes/ae3xx/ae3xx.fragment"
+BR2_TARGET_ROOTFS_INITRAMFS=y
-- 
2.18.0

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

* [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain
  2019-03-07  2:11 [Buildroot] [PATCH v2 0/3] Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support Nylon Chen
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32) Nylon Chen
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 2/3] configs/andes_nds32_ae3xx: new defconfig Nylon Chen
@ 2019-03-07  2:11 ` Nylon Chen
  2019-03-14 22:42   ` Yann E. MORIN
  2 siblings, 1 reply; 15+ messages in thread
From: Nylon Chen @ 2019-03-07  2:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Nylon Chen <nylon7@andestech.com>
---
 support/config-fragments/autobuild/br-andes-nds32.config | 9 +++++++++
 support/config-fragments/autobuild/toolchain-configs.csv | 1 +
 2 files changed, 10 insertions(+)
 create mode 100644 support/config-fragments/autobuild/br-andes-nds32.config

diff --git a/support/config-fragments/autobuild/br-andes-nds32.config b/support/config-fragments/autobuild/br-andes-nds32.config
new file mode 100644
index 0000000000..cd093a20f9
--- /dev/null
+++ b/support/config-fragments/autobuild/br-andes-nds32.config
@@ -0,0 +1,9 @@
+BR2_nds32=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
+BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
+BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"
+BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_17=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="nds32le-linux"
diff --git a/support/config-fragments/autobuild/toolchain-configs.csv b/support/config-fragments/autobuild/toolchain-configs.csv
index 3681bc519f..7a3b91df27 100644
--- a/support/config-fragments/autobuild/toolchain-configs.csv
+++ b/support/config-fragments/autobuild/toolchain-configs.csv
@@ -25,6 +25,7 @@ support/config-fragments/autobuild/armv5-ctng-linux-gnueabi.config,x86
 support/config-fragments/autobuild/arm-aarch64.config,x86_64
 support/config-fragments/autobuild/armv7-ctng-linux-gnueabihf.config,x86
 support/config-fragments/autobuild/br-aarch64-glibc.config,x86_64
+support/config-fragments/autobuild/br-andes-nds32.config,x86
 support/config-fragments/autobuild/br-arc-full-internal.config,any
 support/config-fragments/autobuild/br-arc-internal-glibc.config,any
 support/config-fragments/autobuild/br-arcle-hs38.config,x86_64
-- 
2.18.0

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

* [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32)
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32) Nylon Chen
@ 2019-03-14 22:22   ` Yann E. MORIN
  2019-03-21  2:36     ` Nylon Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2019-03-14 22:22 UTC (permalink / raw)
  To: buildroot

Nylon, All,

On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> This commit provides basic support for the Andes 32-bit(nds32) architecture.

Out of curiosity, and just for my information: do you have examples of
products shipping with an nds32 CPU?

I have a few comments (the last one very minor), see below...

> Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
> Signed-off-by: Greentime Hu <greentime@andestech.com>
> Signed-off-by: Nylon Chen <nylon7@andestech.com>
> ---
>  DEVELOPERS           |  3 +++
>  arch/Config.in       | 12 ++++++++++++
>  arch/Config.in.nds32 | 19 +++++++++++++++++++
>  3 files changed, 34 insertions(+)
>  create mode 100644 arch/Config.in.nds32
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index c17ba6db99..06a20c68b6 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1605,6 +1605,9 @@ F:	package/trousers/
>  N:	Norbert Lange <nolange79@gmail.com>
>  F:	package/tcf-agent/
>  
> +N:	Nylon Chen <nylon7@andestech.com>
> +F:	arch/Config.in.nds32
> +
>  N:	Olaf Rempel <razzor@kopf-tisch.de>
>  F:	package/ctorrent/
>  
> diff --git a/arch/Config.in b/arch/Config.in
> index f50760a0cf..d82803c828 100644
> --- a/arch/Config.in
> +++ b/arch/Config.in
> @@ -154,6 +154,14 @@ config BR2_mips64el
>  	  http://www.mips.com/
>  	  http://en.wikipedia.org/wiki/MIPS_Technologies
>  
> +config BR2_nds32
> +	bool "nds32"
> +	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT

It would be nice that you provide a package for a pre-built toolchain,
like we have for a few of them, see:

    toolchain/toolchain-external/

This is not mandatory, but would be a good addition.

It would even make the defconfig in your second patch a bit simpler.

> +	select BR2_ARCH_HAS_MMU_MANDATORY
> +	help
> +	  nds32 is a 32-bit architecture developed by Andes Technology.
> +	  https://en.wikipedia.org/wiki/Andes_Technology
> +
>  config BR2_nios2
>  	bool "Nios II"
>  	select BR2_ARCH_HAS_MMU_MANDATORY
> @@ -419,6 +427,10 @@ if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
>  source "arch/Config.in.mips"
>  endif
>  
> +if BR2_nds32
> +source "arch/Config.in.nds32"
> +endif
> +
>  if BR2_nios2
>  source "arch/Config.in.nios2"
>  endif
> diff --git a/arch/Config.in.nds32 b/arch/Config.in.nds32
> new file mode 100644
> index 0000000000..38b1c2d4eb
> --- /dev/null
> +++ b/arch/Config.in.nds32
> @@ -0,0 +1,19 @@
> +config BR2_ARCH
> +	default "nds32"
> +
> +config BR2_ANDES_NDS32_FPU
> +	bool "Enable FPU coprocessor"
> +	help
> +	  You can say y here if your Andes CPU have a Floating-Point Coprocessor
> +	  or if you need FPU support for your user-space programs.

So, the situation about FPU is always a bit icky for me.

If you say 'n' above, does that mean that you need to do a pure
soft-float build, or that the FP instrcution get trapped an emulated
by the kernel?

If the former, then you may want to check whether you need to select
BR2_SOFT_FLOAT (a few packages have conditions based on that).

> +config BR2_GCC_TARGET_ARCH
> +	default "v3"  if !BR2_ANDES_NDS32_FPU
> +	default "v3f" if BR2_ANDES_NDS32_FPU

I always find it nicer to have the positive logic come first. Also,
kconfig will stop on the first default stanza which condition is true,
so:

    config BR2_GCC_TARGET_ARCH
        default "v3f" if BR2_ANDES_NDS32_FPU
        default "v3"

> +config BR2_ENDIAN
> +	default "LITTLE"
> +
> +config BR2_READELF_ARCH_NAME
> +	default "Andes Technology compact code size embedded RISC processor family"
> +
> -- 
> 2.18.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 2/3] configs/andes_nds32_ae3xx: new defconfig
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 2/3] configs/andes_nds32_ae3xx: new defconfig Nylon Chen
@ 2019-03-14 22:31   ` Yann E. MORIN
  0 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2019-03-14 22:31 UTC (permalink / raw)
  To: buildroot

Nylon, All,

On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> Add Andes 32-bit defconfig for AE3XX platform.
> 
> Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
> Signed-off-by: Greentime Hu <greentime@andestech.com>
> Signed-off-by: Nylon Chen <nylon7@andestech.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

If you were to add a pre-built toolchain package, you could use it in
this defconfig.

Regards,
Yann E. MORIN.

> ---
>  DEVELOPERS                                    |  2 +
>  board/andes/ae3xx/ae3xx.fragment              |  1 +
>  ...0001-nds32-Fix-boot-messages-garbled.patch | 28 +++++++++++
>  board/andes/readme.txt                        | 49 +++++++++++++++++++
>  configs/andes_ae3xx_defconfig                 | 14 ++++++
>  5 files changed, 94 insertions(+)
>  create mode 100644 board/andes/ae3xx/ae3xx.fragment
>  create mode 100644 board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
>  create mode 100644 board/andes/readme.txt
>  create mode 100644 configs/andes_ae3xx_defconfig
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 06a20c68b6..71fc8062e7 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1607,6 +1607,8 @@ F:	package/tcf-agent/
>  
>  N:	Nylon Chen <nylon7@andestech.com>
>  F:	arch/Config.in.nds32
> +F:	board/andes
> +F:	configs/andes_ae3xx_defconfig
>  
>  N:	Olaf Rempel <razzor@kopf-tisch.de>
>  F:	package/ctorrent/
> diff --git a/board/andes/ae3xx/ae3xx.fragment b/board/andes/ae3xx/ae3xx.fragment
> new file mode 100644
> index 0000000000..3b13d10740
> --- /dev/null
> +++ b/board/andes/ae3xx/ae3xx.fragment
> @@ -0,0 +1 @@
> +CONFIG_NDS32_BUILTIN_DTB="ae3xx"
> diff --git a/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch b/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
> new file mode 100644
> index 0000000000..adb60937bd
> --- /dev/null
> +++ b/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch
> @@ -0,0 +1,28 @@
> +From 90d52d180dcc5d1300dc352ca709eb6453894143 Mon Sep 17 00:00:00 2001
> +From: Nylon Chen <nylon7@andestech.com>
> +Date: Wed, 28 Nov 2018 16:26:46 +0800
> +Subject: [PATCH] nds32: Fix boot messages garbled
> +
> +In order to display uart correctly we have to pass the correct setting of uart to kernel by bootarg.
> +This patch will provide such settings to set the correct uart baud rate.
> +
> +Signed-off-by: Nylon Chen <nylon7@andestech.com>
> +---
> + arch/nds32/boot/dts/ae3xx.dts | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/arch/nds32/boot/dts/ae3xx.dts b/arch/nds32/boot/dts/ae3xx.dts
> +index bb39749a6673..aefe2090926a 100644
> +--- a/arch/nds32/boot/dts/ae3xx.dts
> ++++ b/arch/nds32/boot/dts/ae3xx.dts
> +@@ -6,6 +6,7 @@
> + 	interrupt-parent = <&intc>;
> + 
> + 	chosen {
> ++		bootargs = "memblock=debug earlycon console=ttyS0,38400n8 debug loglevel=7";
> + 		stdout-path = &serial0;
> + 	};
> + 
> +-- 
> +2.18.0
> +
> diff --git a/board/andes/readme.txt b/board/andes/readme.txt
> new file mode 100644
> index 0000000000..0f95c65549
> --- /dev/null
> +++ b/board/andes/readme.txt
> @@ -0,0 +1,49 @@
> +Intro
> +=====
> +
> +Andestech(nds32) AE3XX Platform
> +
> +The AE3XX prototype demonstrates the AE3XX example platform on the FPGA. 
> +It is composed of one Andestech(nds32) processor and AE3XX.
> +
> +How to build it
> +===============
> +
> +Configure Buildroot
> +-------------------
> +
> +The andes_ae3xx_defconfig configuration is a sample configuration with
> +all that is required to bring the FPGA Development Board:
> +
> +  $ make andes_ae3xx_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.cpio
> +    +-- rootfs.tar
> +
> +How to run it
> +=============
> +
> +Run
> +---
> +
> +  Setup the Console with the rate 38400/8-N-1.
> +
> +  $ cd output/images
> +  $ ../host/bin/nds32le-linux-gdb vmlinux
> +  $ target remote [your host]
> +  $ lo
> +  $ c 
> diff --git a/configs/andes_ae3xx_defconfig b/configs/andes_ae3xx_defconfig
> new file mode 100644
> index 0000000000..250e3ee157
> --- /dev/null
> +++ b/configs/andes_ae3xx_defconfig
> @@ -0,0 +1,14 @@
> +BR2_nds32=y
> +BR2_GLOBAL_PATCH_DIR="board/andes/patches/"
> +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="nds32le-linux"
> +BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
> +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_17=y
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/andes/ae3xx/ae3xx.fragment"
> +BR2_TARGET_ROOTFS_INITRAMFS=y
> -- 
> 2.18.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain
  2019-03-07  2:11 ` [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain Nylon Chen
@ 2019-03-14 22:42   ` Yann E. MORIN
  2019-03-21  2:51     ` Nylon Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2019-03-14 22:42 UTC (permalink / raw)
  To: buildroot

Nylon, All,

On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
> Signed-off-by: Greentime Hu <greentime@andestech.com>
> Signed-off-by: Nylon Chen <nylon7@andestech.com>
> ---
>  support/config-fragments/autobuild/br-andes-nds32.config | 9 +++++++++
>  support/config-fragments/autobuild/toolchain-configs.csv | 1 +
>  2 files changed, 10 insertions(+)
>  create mode 100644 support/config-fragments/autobuild/br-andes-nds32.config
> 
> diff --git a/support/config-fragments/autobuild/br-andes-nds32.config b/support/config-fragments/autobuild/br-andes-nds32.config
> new file mode 100644
> index 0000000000..cd093a20f9
> --- /dev/null
> +++ b/support/config-fragments/autobuild/br-andes-nds32.config
> @@ -0,0 +1,9 @@
> +BR2_nds32=y
> +BR2_TOOLCHAIN_EXTERNAL=y
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"

I was going to add my reviewd-by tag, but then I notice that this
repository does not seem to be affilated with AndesTech, but it
looks like a "random" guy dropped a bunch of stuff.

Yet, there are release notes to explain how to reproduce the toolchain:

    https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases

    1. The source code of each component for this toolchain are located at
    the following path.
    a. gcc:
    path: https://github.com/andestech/gcc.git
    branch: nds32-8.1.0-upstream
    b. binutils
    path: https://github.com/andestech/binutils.git
    branch: nds32-binutils-2.30-branch-open
    c. glibc
    path: https://github.com/andestech/glibc.git
    branch: nds32-glibc-2.27-v0
    d. Linux
    path: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
    branch: master

    2. User can manually generate this toolchain though build-toochain.sh
    in following git repo.
    https://github.com/andestech/build_script.git

    3. The git commit ID of each component in Andes internel git tree.
    binutils-2.30 : ee457e8114f09c1b4df7c834ad58b02c9f43c139
    gcc-8.1.0: 260e4b4bbb7f32b483482573c92c8caacf5c17ab
    linux-v4.17-rc3: 6da6c0db5316275015e8cc2959f12a17584aeb64
    glibc-2.27: e9f2165793aaf2f033a6cebff389ebbba5d799bd

The instructions in 2. do not seem to deconected from what we do. There
is this one weird trick about build ing libgcc, but maybe it can be
coaxed into working to build with the Buildroot internal toolchain?

Apart from the weird location of the toolchain:

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> +BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
> +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_17=y
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="nds32le-linux"
> diff --git a/support/config-fragments/autobuild/toolchain-configs.csv b/support/config-fragments/autobuild/toolchain-configs.csv
> index 3681bc519f..7a3b91df27 100644
> --- a/support/config-fragments/autobuild/toolchain-configs.csv
> +++ b/support/config-fragments/autobuild/toolchain-configs.csv
> @@ -25,6 +25,7 @@ support/config-fragments/autobuild/armv5-ctng-linux-gnueabi.config,x86
>  support/config-fragments/autobuild/arm-aarch64.config,x86_64
>  support/config-fragments/autobuild/armv7-ctng-linux-gnueabihf.config,x86
>  support/config-fragments/autobuild/br-aarch64-glibc.config,x86_64
> +support/config-fragments/autobuild/br-andes-nds32.config,x86
>  support/config-fragments/autobuild/br-arc-full-internal.config,any
>  support/config-fragments/autobuild/br-arc-internal-glibc.config,any
>  support/config-fragments/autobuild/br-arcle-hs38.config,x86_64
> -- 
> 2.18.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32)
  2019-03-14 22:22   ` Yann E. MORIN
@ 2019-03-21  2:36     ` Nylon Chen
  2019-03-21 11:18       ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Nylon Chen @ 2019-03-21  2:36 UTC (permalink / raw)
  To: buildroot

Hello Yann,

sorry,i thought that i didn't send the letter successfully, so I sent it twice(the first time, i only sent to you ).

Thank you for your comment

On Fri, Mar 15, 2019 at 06:22:11AM +0800, Yann E. MORIN wrote:
> Nylon, All,
> 
> On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> > This commit provides basic support for the Andes 32-bit(nds32) architecture.
> 
> Out of curiosity, and just for my information: do you have examples of
> products shipping with an nds32 CPU?
> 
> I have a few comments (the last one very minor), see below...
> 
> > Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
> > Signed-off-by: Greentime Hu <greentime@andestech.com>
> > Signed-off-by: Nylon Chen <nylon7@andestech.com>
> > ---
> >  DEVELOPERS           |  3 +++
> >  arch/Config.in       | 12 ++++++++++++
> >  arch/Config.in.nds32 | 19 +++++++++++++++++++
> >  3 files changed, 34 insertions(+)
> >  create mode 100644 arch/Config.in.nds32
> > 
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index c17ba6db99..06a20c68b6 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -1605,6 +1605,9 @@ F:	package/trousers/
> >  N:	Norbert Lange <nolange79@gmail.com>
> >  F:	package/tcf-agent/
> >  
> > +N:	Nylon Chen <nylon7@andestech.com>
> > +F:	arch/Config.in.nds32
> > +
> >  N:	Olaf Rempel <razzor@kopf-tisch.de>
> >  F:	package/ctorrent/
> >  
> > diff --git a/arch/Config.in b/arch/Config.in
> > index f50760a0cf..d82803c828 100644
> > --- a/arch/Config.in
> > +++ b/arch/Config.in
> > @@ -154,6 +154,14 @@ config BR2_mips64el
> >  	  http://www.mips.com/
> >  	  http://en.wikipedia.org/wiki/MIPS_Technologies
> >  
> > +config BR2_nds32
> > +	bool "nds32"
> > +	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
> 
> It would be nice that you provide a package for a pre-built toolchain,
> like we have for a few of them, see:
> 
>     toolchain/toolchain-external/
> 
> This is not mandatory, but would be a good addition.
> 
> It would even make the defconfig in your second patch a bit simpler.
> 
Ok,i will try this method
> > +	select BR2_ARCH_HAS_MMU_MANDATORY
> > +	help
> > +	  nds32 is a 32-bit architecture developed by Andes Technology.
> > +	  https://en.wikipedia.org/wiki/Andes_Technology
> > +
> >  config BR2_nios2
> >  	bool "Nios II"
> >  	select BR2_ARCH_HAS_MMU_MANDATORY
> > @@ -419,6 +427,10 @@ if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
> >  source "arch/Config.in.mips"
> >  endif
> >  
> > +if BR2_nds32
> > +source "arch/Config.in.nds32"
> > +endif
> > +
> >  if BR2_nios2
> >  source "arch/Config.in.nios2"
> >  endif
> > diff --git a/arch/Config.in.nds32 b/arch/Config.in.nds32
> > new file mode 100644
> > index 0000000000..38b1c2d4eb
> > --- /dev/null
> > +++ b/arch/Config.in.nds32
> > @@ -0,0 +1,19 @@
> > +config BR2_ARCH
> > +	default "nds32"
> > +
> > +config BR2_ANDES_NDS32_FPU
> > +	bool "Enable FPU coprocessor"
> > +	help
> > +	  You can say y here if your Andes CPU have a Floating-Point Coprocessor
> > +	  or if you need FPU support for your user-space programs.
> 
> So, the situation about FPU is always a bit icky for me.
> 
> If you say 'n' above, does that mean that you need to do a pure
> soft-float build, or that the FP instrcution get trapped an emulated
> by the kernel?
> 
> If the former, then you may want to check whether you need to select
> BR2_SOFT_FLOAT (a few packages have conditions based on that).
> 
> > +config BR2_GCC_TARGET_ARCH
> > +	default "v3"  if !BR2_ANDES_NDS32_FPU
> > +	default "v3f" if BR2_ANDES_NDS32_FPU
> 
> I always find it nicer to have the positive logic come first. Also,
> kconfig will stop on the first default stanza which condition is true,
> so:
> 
>     config BR2_GCC_TARGET_ARCH
>         default "v3f" if BR2_ANDES_NDS32_FPU
>         default "v3"
> 
Here is my negligence, thank you for your suggestion, i will adopt
> > +config BR2_ENDIAN
> > +	default "LITTLE"
> > +
> > +config BR2_READELF_ARCH_NAME
> > +	default "Andes Technology compact code size embedded RISC processor family"
> > +
> > -- 
> > 2.18.0
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain
  2019-03-14 22:42   ` Yann E. MORIN
@ 2019-03-21  2:51     ` Nylon Chen
  2019-03-21  7:51       ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Nylon Chen @ 2019-03-21  2:51 UTC (permalink / raw)
  To: buildroot

Yann, All,

Again, Thank you for your comment.
On Fri, Mar 15, 2019 at 06:42:50AM +0800, Yann E. MORIN wrote:
> Nylon, All,
> 
> On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> > Signed-off-by: Che-Wei Chuang <cnoize@andestech.com>
> > Signed-off-by: Greentime Hu <greentime@andestech.com>
> > Signed-off-by: Nylon Chen <nylon7@andestech.com>
> > ---
> >  support/config-fragments/autobuild/br-andes-nds32.config | 9 +++++++++
> >  support/config-fragments/autobuild/toolchain-configs.csv | 1 +
> >  2 files changed, 10 insertions(+)
> >  create mode 100644 support/config-fragments/autobuild/br-andes-nds32.config
> > 
> > diff --git a/support/config-fragments/autobuild/br-andes-nds32.config b/support/config-fragments/autobuild/br-andes-nds32.config
> > new file mode 100644
> > index 0000000000..cd093a20f9
> > --- /dev/null
> > +++ b/support/config-fragments/autobuild/br-andes-nds32.config
> > @@ -0,0 +1,9 @@
> > +BR2_nds32=y
> > +BR2_TOOLCHAIN_EXTERNAL=y
> > +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> > +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> > +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"
I think I misunderstood the meaning of Thomas Petazzo.

I thought that as long as the pre-build remote toolcahin is given.(So I used our own pre-build remote toolchain)

It may take a few more days, we will contribute glibc back to upstream, and then we can compile it internally using buildroot.

So in the next version(v4), I will remove this patch first.
> 
> I was going to add my reviewd-by tag, but then I notice that this
> repository does not seem to be affilated with AndesTech, but it
> looks like a "random" guy dropped a bunch of stuff.
> 
> Yet, there are release notes to explain how to reproduce the toolchain:
> 
>     https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases
> 
>     1. The source code of each component for this toolchain are located at
>     the following path.
>     a. gcc:
>     path: https://github.com/andestech/gcc.git
>     branch: nds32-8.1.0-upstream
>     b. binutils
>     path: https://github.com/andestech/binutils.git
>     branch: nds32-binutils-2.30-branch-open
>     c. glibc
>     path: https://github.com/andestech/glibc.git
>     branch: nds32-glibc-2.27-v0
>     d. Linux
>     path: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>     branch: master
> 
>     2. User can manually generate this toolchain though build-toochain.sh
>     in following git repo.
>     https://github.com/andestech/build_script.git
> 
>     3. The git commit ID of each component in Andes internel git tree.
>     binutils-2.30 : ee457e8114f09c1b4df7c834ad58b02c9f43c139
>     gcc-8.1.0: 260e4b4bbb7f32b483482573c92c8caacf5c17ab
>     linux-v4.17-rc3: 6da6c0db5316275015e8cc2959f12a17584aeb64
>     glibc-2.27: e9f2165793aaf2f033a6cebff389ebbba5d799bd
> 
> The instructions in 2. do not seem to deconected from what we do. There
> is this one weird trick about build ing libgcc, but maybe it can be
> coaxed into working to build with the Buildroot internal toolchain?
> 
> Apart from the weird location of the toolchain:
> 
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Regards,
> Yann E. MORIN.
> 
> > +BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
> > +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_17=y
> > +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
> > +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="nds32le-linux"
> > diff --git a/support/config-fragments/autobuild/toolchain-configs.csv b/support/config-fragments/autobuild/toolchain-configs.csv
> > index 3681bc519f..7a3b91df27 100644
> > --- a/support/config-fragments/autobuild/toolchain-configs.csv
> > +++ b/support/config-fragments/autobuild/toolchain-configs.csv
> > @@ -25,6 +25,7 @@ support/config-fragments/autobuild/armv5-ctng-linux-gnueabi.config,x86
> >  support/config-fragments/autobuild/arm-aarch64.config,x86_64
> >  support/config-fragments/autobuild/armv7-ctng-linux-gnueabihf.config,x86
> >  support/config-fragments/autobuild/br-aarch64-glibc.config,x86_64
> > +support/config-fragments/autobuild/br-andes-nds32.config,x86
> >  support/config-fragments/autobuild/br-arc-full-internal.config,any
> >  support/config-fragments/autobuild/br-arc-internal-glibc.config,any
> >  support/config-fragments/autobuild/br-arcle-hs38.config,x86_64
> > -- 
> > 2.18.0
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain
  2019-03-21  2:51     ` Nylon Chen
@ 2019-03-21  7:51       ` Thomas Petazzoni
  2019-03-21 11:12         ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2019-03-21  7:51 UTC (permalink / raw)
  To: buildroot

Hello Nylon,

On Thu, 21 Mar 2019 10:51:03 +0800
Nylon Chen <nylon7@andestech.com> wrote:

> > > diff --git a/support/config-fragments/autobuild/br-andes-nds32.config b/support/config-fragments/autobuild/br-andes-nds32.config
> > > new file mode 100644
> > > index 0000000000..cd093a20f9
> > > --- /dev/null
> > > +++ b/support/config-fragments/autobuild/br-andes-nds32.config
> > > @@ -0,0 +1,9 @@
> > > +BR2_nds32=y
> > > +BR2_TOOLCHAIN_EXTERNAL=y
> > > +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> > > +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> > > +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"  
> I think I misunderstood the meaning of Thomas Petazzo.
> 
> I thought that as long as the pre-build remote toolcahin is given.(So I used our own pre-build remote toolchain)
> 
> It may take a few more days, we will contribute glibc back to upstream, and then we can compile it internally using buildroot.

It is perfectly fine to use a pre-built toolchain, I think what Yann
explained is that since the source code of gcc/binutils/glibc/linux is
available, it makes sense to *also* support building the toolchain with
Buildroot.

Also, it is not mandatory for the glibc support to be in upstream
glibc. We support architectures for which the gcc, binutils or libc
support is not yet fully upstreamed. For example, for RISC-V 32-bit,
we're using a non-upstream glibc.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain
  2019-03-21  7:51       ` Thomas Petazzoni
@ 2019-03-21 11:12         ` Yann E. MORIN
  2019-03-22  8:45           ` Nylon Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2019-03-21 11:12 UTC (permalink / raw)
  To: buildroot

Nylon, Thomas, All,

On 2019-03-21 08:51 +0100, Thomas Petazzoni spake thusly:
> On Thu, 21 Mar 2019 10:51:03 +0800
> Nylon Chen <nylon7@andestech.com> wrote:
> 
> > > > diff --git a/support/config-fragments/autobuild/br-andes-nds32.config b/support/config-fragments/autobuild/br-andes-nds32.config
> > > > new file mode 100644
> > > > index 0000000000..cd093a20f9
> > > > --- /dev/null
> > > > +++ b/support/config-fragments/autobuild/br-andes-nds32.config
> > > > @@ -0,0 +1,9 @@
> > > > +BR2_nds32=y
> > > > +BR2_TOOLCHAIN_EXTERNAL=y
> > > > +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> > > > +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> > > > +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"  
> > I think I misunderstood the meaning of Thomas Petazzo.
> > 
> > I thought that as long as the pre-build remote toolcahin is given.(So I used our own pre-build remote toolchain)
> > 
> > It may take a few more days, we will contribute glibc back to upstream, and then we can compile it internally using buildroot.
> 
> It is perfectly fine to use a pre-built toolchain, I think what Yann
> explained is that since the source code of gcc/binutils/glibc/linux is
> available, it makes sense to *also* support building the toolchain with
> Buildroot.

Exactly, yes.

But that can come later, in a followup series.

Regards,
Yann E. MORIN.

> Also, it is not mandatory for the glibc support to be in upstream
> glibc. We support architectures for which the gcc, binutils or libc
> support is not yet fully upstreamed. For example, for RISC-V 32-bit,
> we're using a non-upstream glibc.
> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32)
  2019-03-21  2:36     ` Nylon Chen
@ 2019-03-21 11:18       ` Yann E. MORIN
  2019-03-22  8:39         ` Nylon Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2019-03-21 11:18 UTC (permalink / raw)
  To: buildroot

Nylon, All,

On 2019-03-21 10:36 +0800, Nylon Chen spake thusly:
> On Fri, Mar 15, 2019 at 06:22:11AM +0800, Yann E. MORIN wrote:
> > On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> > > This commit provides basic support for the Andes 32-bit(nds32) architecture.
[--SNIP--]
> > > +config BR2_nds32
> > > +	bool "nds32"
> > > +	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
> > It would be nice that you provide a package for a pre-built toolchain,
> > like we have for a few of them, see:
> > 
> >     toolchain/toolchain-external/
> > 
> > This is not mandatory, but would be a good addition.
> > 
> > It would even make the defconfig in your second patch a bit simpler.
> > 
> Ok,i will try this method

As I said: it is not mandatory; we can accept adding the nds32
architecture without an external-toolchain package.

It would be _nice_, though, but that can come later, in a followup
series.

> > > +config BR2_ANDES_NDS32_FPU
> > > +	bool "Enable FPU coprocessor"
> > > +	help
> > > +	  You can say y here if your Andes CPU have a Floating-Point Coprocessor
> > > +	  or if you need FPU support for your user-space programs.
> > 
> > So, the situation about FPU is always a bit icky for me.
> > 
> > If you say 'n' above, does that mean that you need to do a pure
> > soft-float build, or that the FP instrcution get trapped an emulated
> > by the kernel?
> > 
> > If the former, then you may want to check whether you need to select
> > BR2_SOFT_FLOAT (a few packages have conditions based on that).

This is an important question, but you did not reply to it.

> > > +config BR2_GCC_TARGET_ARCH
> > > +	default "v3"  if !BR2_ANDES_NDS32_FPU
> > > +	default "v3f" if BR2_ANDES_NDS32_FPU
> > 
> > I always find it nicer to have the positive logic come first. Also,
> > kconfig will stop on the first default stanza which condition is true,
> > so:
> > 
> >     config BR2_GCC_TARGET_ARCH
> >         default "v3f" if BR2_ANDES_NDS32_FPU
> >         default "v3"
> > 
> Here is my negligence, thank you for your suggestion, i will adopt

This was not about neglicence on your side, don't worry! ;-)

It is just about some (mostly-unwritten) conventional rules, with a bit
of personal preferences, so nothing you could have known.

This patchset is pretty good, now, and we're now looking at the minor
details.

Regards,
Yann E. MORIN.

> > > +config BR2_ENDIAN
> > > +	default "LITTLE"
> > > +
> > > +config BR2_READELF_ARCH_NAME
> > > +	default "Andes Technology compact code size embedded RISC processor family"
> > > +
> > > -- 
> > > 2.18.0
> > > 
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/buildroot
> > 
> > -- 
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32)
  2019-03-21 11:18       ` Yann E. MORIN
@ 2019-03-22  8:39         ` Nylon Chen
  2019-03-22 11:40           ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Nylon Chen @ 2019-03-22  8:39 UTC (permalink / raw)
  To: buildroot

Yann, All,

Again, thank you for your comment

On Thu, Mar 21, 2019 at 07:18:54PM +0800, Yann E. MORIN wrote:
> Nylon, All,
> 
> On 2019-03-21 10:36 +0800, Nylon Chen spake thusly:
> > On Fri, Mar 15, 2019 at 06:22:11AM +0800, Yann E. MORIN wrote:
> > > On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> > > > This commit provides basic support for the Andes 32-bit(nds32) architecture.
> [--SNIP--]
> > > > +config BR2_nds32
> > > > +	bool "nds32"
> > > > +	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
> > > It would be nice that you provide a package for a pre-built toolchain,
> > > like we have for a few of them, see:
> > > 
> > >     toolchain/toolchain-external/
> > > 
> > > This is not mandatory, but would be a good addition.
> > > 
> > > It would even make the defconfig in your second patch a bit simpler.
> > > 
> > Ok,i will try this method
> 
> As I said: it is not mandatory; we can accept adding the nds32
> architecture without an external-toolchain package.
> 
> It would be _nice_, though, but that can come later, in a followup
> series.
>
Ok, thanks
> > > > +config BR2_ANDES_NDS32_FPU
> > > > +	bool "Enable FPU coprocessor"
> > > > +	help
> > > > +	  You can say y here if your Andes CPU have a Floating-Point Coprocessor
> > > > +	  or if you need FPU support for your user-space programs.
> > > 
> > > So, the situation about FPU is always a bit icky for me.
> > > 
> > > If you say 'n' above, does that mean that you need to do a pure
> > > soft-float build, or that the FP instrcution get trapped an emulated
> > > by the kernel?
> > > 
> > > If the former, then you may want to check whether you need to select
> > > BR2_SOFT_FLOAT (a few packages have conditions based on that).
> 
> This is an important question, but you did not reply to it.
>
Sorry I'm missing this comment.

BR2_ANDES_NDS32_FPU are selector,we can depend on it switch v3 or v3f toolcahin

After we add new defconfig(for v3f),I will be adding BR2_SOFT_FLOAT(-msoft-float) to arch/Config.in.nds32
> > > > +config BR2_GCC_TARGET_ARCH
> > > > +	default "v3"  if !BR2_ANDES_NDS32_FPU
> > > > +	default "v3f" if BR2_ANDES_NDS32_FPU
> > > 
> > > I always find it nicer to have the positive logic come first. Also,
> > > kconfig will stop on the first default stanza which condition is true,
> > > so:
> > > 
> > >     config BR2_GCC_TARGET_ARCH
> > >         default "v3f" if BR2_ANDES_NDS32_FPU
> > >         default "v3"
> > > 
> > Here is my negligence, thank you for your suggestion, i will adopt
> 
> This was not about neglicence on your side, don't worry! ;-)
> 
> It is just about some (mostly-unwritten) conventional rules, with a bit
> of personal preferences, so nothing you could have known.
> 
> This patchset is pretty good, now, and we're now looking at the minor
> details.
> 
> Regards,
> Yann E. MORIN.
> 
> > > > +config BR2_ENDIAN
> > > > +	default "LITTLE"
> > > > +
> > > > +config BR2_READELF_ARCH_NAME
> > > > +	default "Andes Technology compact code size embedded RISC processor family"
> > > > +
> > > > -- 
> > > > 2.18.0
> > > > 
> > > > _______________________________________________
> > > > buildroot mailing list
> > > > buildroot at busybox.net
> > > > http://lists.busybox.net/mailman/listinfo/buildroot
> > > 
> > > -- 
> > > .-----------------.--------------------.------------------.--------------------.
> > > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > > '------------------------------^-------^------------------^--------------------'
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain
  2019-03-21 11:12         ` Yann E. MORIN
@ 2019-03-22  8:45           ` Nylon Chen
  0 siblings, 0 replies; 15+ messages in thread
From: Nylon Chen @ 2019-03-22  8:45 UTC (permalink / raw)
  To: buildroot

Yann, Thomas, All,

On Thu, Mar 21, 2019 at 12:12:10PM +0100, Yann E. MORIN wrote:
> Nylon, Thomas, All,
> 
> On 2019-03-21 08:51 +0100, Thomas Petazzoni spake thusly:
> > On Thu, 21 Mar 2019 10:51:03 +0800
> > Nylon Chen <nylon7@andestech.com> wrote:
> > 
> > > > > diff --git a/support/config-fragments/autobuild/br-andes-nds32.config b/support/config-fragments/autobuild/br-andes-nds32.config
> > > > > new file mode 100644
> > > > > index 0000000000..cd093a20f9
> > > > > --- /dev/null
> > > > > +++ b/support/config-fragments/autobuild/br-andes-nds32.config
> > > > > @@ -0,0 +1,9 @@
> > > > > +BR2_nds32=y
> > > > > +BR2_TOOLCHAIN_EXTERNAL=y
> > > > > +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> > > > > +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> > > > > +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz"  
> > > I think I misunderstood the meaning of Thomas Petazzo.
> > > 
> > > I thought that as long as the pre-build remote toolcahin is given.(So I used our own pre-build remote toolchain)
> > > 
> > > It may take a few more days, we will contribute glibc back to upstream, and then we can compile it internally using buildroot.
> > 
> > It is perfectly fine to use a pre-built toolchain, I think what Yann
> > explained is that since the source code of gcc/binutils/glibc/linux is
> > available, it makes sense to *also* support building the toolchain with
> > Buildroot.
> 
> Exactly, yes.
> 
> But that can come later, in a followup series.
> 
> Regards,
> Yann E. MORIN.
>
In order to get rid of rework.

I prefer to send glibc to upstream and then come to this patch.
> > Also, it is not mandatory for the glibc support to be in upstream
> > glibc. We support architectures for which the gcc, binutils or libc
> > support is not yet fully upstreamed. For example, for RISC-V 32-bit,
> > we're using a non-upstream glibc.
> > 
> > Best regards,
> > 
> > Thomas
> > -- 
> > Thomas Petazzoni, CTO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32)
  2019-03-22  8:39         ` Nylon Chen
@ 2019-03-22 11:40           ` Yann E. MORIN
  0 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2019-03-22 11:40 UTC (permalink / raw)
  To: buildroot

Nylon, All,

On 2019-03-22 16:39 +0800, Nylon Chen spake thusly:
> On Thu, Mar 21, 2019 at 07:18:54PM +0800, Yann E. MORIN wrote:
> > On 2019-03-21 10:36 +0800, Nylon Chen spake thusly:
> > > On Fri, Mar 15, 2019 at 06:22:11AM +0800, Yann E. MORIN wrote:
> > > > On 2019-03-07 10:11 +0800, Nylon Chen spake thusly:
> > > > > +config BR2_ANDES_NDS32_FPU
> > > > > +	bool "Enable FPU coprocessor"
> > > > > +	help
> > > > > +	  You can say y here if your Andes CPU have a Floating-Point Coprocessor
> > > > > +	  or if you need FPU support for your user-space programs.
> > > > So, the situation about FPU is always a bit icky for me.
[--SNIP--]
> BR2_ANDES_NDS32_FPU are selector, we can depend on it switch v3 or v3f
> toolcahin
> 
> After we add new defconfig(for v3f),I will be adding BR2_SOFT_FLOAT
>(-msoft-float) to arch/Config.in.nds32

Then if the v3f is currently the only supported alternative, do not
offer the FPU choice in this initial integration.

Adding support for the v3 (not f) and the FPU selection can be done in a
later patch, then.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2019-03-22 11:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07  2:11 [Buildroot] [PATCH v2 0/3] Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support Nylon Chen
2019-03-07  2:11 ` [Buildroot] [PATCH v3 1/3] arch: add support for Andes 32-bit(nds32) Nylon Chen
2019-03-14 22:22   ` Yann E. MORIN
2019-03-21  2:36     ` Nylon Chen
2019-03-21 11:18       ` Yann E. MORIN
2019-03-22  8:39         ` Nylon Chen
2019-03-22 11:40           ` Yann E. MORIN
2019-03-07  2:11 ` [Buildroot] [PATCH v3 2/3] configs/andes_nds32_ae3xx: new defconfig Nylon Chen
2019-03-14 22:31   ` Yann E. MORIN
2019-03-07  2:11 ` [Buildroot] [PATCH v3 3/3] upport/config-fragments/autobuild: test the Andes nds32 toolchain Nylon Chen
2019-03-14 22:42   ` Yann E. MORIN
2019-03-21  2:51     ` Nylon Chen
2019-03-21  7:51       ` Thomas Petazzoni
2019-03-21 11:12         ` Yann E. MORIN
2019-03-22  8:45           ` Nylon Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.