Add prebuilt nds32 toolchain, ae3xx board
v4 cover Add prebuilt nds32 toolchain, ae3xx board
v4:
1) removed BR2_ANDES_NDS32_FPU option
2) removed test the Andes nds32 toolchain patch
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
Nylon Chen (2):
arch: add support for Andes 32-bit(nds32)
configs/andes_nds32_ae3xx: new defconfig
DEVELOPERS | 5 ++ arch/Config.in | 12 +++++ arch/Config.in.nds32 | 11 +++++ board/andes/ae3xx/ae3xx.fragment | 1 + ...0001-nds32-Fix-boot-messages-garbled.patch | 28 +++++++++++ board/andes/readme.txt | 49 +++++++++++++++++++ configs/andes_ae3xx_defconfig | 14 ++++++ 7 files changed, 120 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 board/andes/readme.txt create mode 100644 configs/andes_ae3xx_defconfig
Signature · 1 line
2.18.0
PATCH v4 1/2 arch: add support for Andes 32-bit(nds32)
This commit provides basic support for the Andes 32-bit(nds32) architecture.
--- DEVELOPERS | 3 +++ arch/Config.in | 12 ++++++++++++ arch/Config.in.nds32 | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 arch/Config.in.nds32
DEVELOPERS +3 -0
@@ -1655,6 +1655,9 @@ F: package/trousers/ N: Norbert Lange <[email protected]> F: package/tcf-agent/ +N: Nylon Chen <[email protected]> +F: arch/Config.in.nds32 + N: Olaf Rempel <[email protected]> F: package/ctorrent/
arch/Config.in +12 -0
@@ -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
arch/Config.in.nds32 new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_ARCH + default "nds32" + +config BR2_GCC_TARGET_ARCH + default "v3" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_READELF_ARCH_NAME + default "Andes Technology compact code size embedded RISC processor family"
Signature · 1 line
2.18.0
PATCH v4 1/2 arch: add support for Andes 32-bit(nds32)
Nylon, All,
On 2019-04-02 15:23 +0800, Nylon Chen spake thusly:
Quoted 5 lines
This commit provides basic support for the Andes 32-bit(nds32) architecture.
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>
Regards,
Yann E. MORIN.
Quoted 71 lines
--- DEVELOPERS | 3 +++ arch/Config.in | 12 ++++++++++++ arch/Config.in.nds32 | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 arch/Config.in.nds32DEVELOPERS +3
-0@@ -1655,6 +1655,9 @@ F: package/trousers/ N: Norbert Lange <[email protected]> F: package/tcf-agent/ +N: Nylon Chen <[email protected]> +F: arch/Config.in.nds32 + N: Olaf Rempel <[email protected]> F: package/ctorrent/arch/Config.in +12
-0@@ -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" endifarch/Config.in.nds32 new file +11
-0@@ -0,0 +1,11 @@ +config BR2_ARCH + default "nds32" + +config BR2_GCC_TARGET_ARCH + default "v3" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_READELF_ARCH_NAME + default "Andes Technology compact code size embedded RISC processor family"Signature · 1 line
2.18.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v4 1/2 arch: add support for Andes 32-bit(nds32)
In reply to Nylon ChenHello Nylon,
Thanks for this contribution!
Quoted 5 lines · On Tue, 2 Apr 2019 15:23:39 +0800 Nylon Chen <[email protected]> wrote:
This commit provides basic support for the Andes 32-bit(nds32) architecture.
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>
If we are adding a new architecture, we will need to test it in our autobuilders (http://autobuild.buildroot.org). Are you ready to spend some time to look at the build failures, and fix the ones that are related to the nds32 architecture ?
To make such testing happen, we will need to add a toolchain configuration in support/config-fragments/autobuild/, and add it in support/config-fragments/autobuild/toolchain-configs.csv.
This toolchain configuration can directly point to the pre-built toolchain you are using in PATCH 2/2.
Or, perhaps better, this pre-built toolchain can be added as a proper package in toolchain/toolchain-external/, and then both the defconfig and the autobuilder configuration can use it.
What do you think ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v4 1/2 arch: add support for Andes 32-bit(nds32)
On Wed, Apr 03, 2019 at 03:31:14PM +0800, Thomas Petazzoni wrote:
Hello Thomas, all
Quoted 9 lines
Hello Nylon,
Thanks for this contribution!
Quoted 2 lines · On Tue, 2 Apr 2019 15:23:39 +0800 Nylon Chen <[email protected]> wrote:
This commit provides basic support for the Andes 32-bit(nds32) architecture.
Quoted 9 lines
Quoted 3 lines
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>If we are adding a new architecture, we will need to test it in our autobuilders (http://autobuild.buildroot.org). Are you ready to spend some time to look at the build failures, and fix the ones that are related to the nds32 architecture ?
no problem, I'll help as mush as i can
Quoted 4 lines
To make such testing happen, we will need to add a toolchain configuration in support/config-fragments/autobuild/, and add it in support/config-fragments/autobuild/toolchain-configs.csv.
Quoted 9 lines
This toolchain configuration can directly point to the pre-built toolchain you are using in PATCH 2/2.
Or, perhaps better, this pre-built toolchain can be added as a proper package in toolchain/toolchain-external/, and then both the defconfig and the autobuilder configuration can use it.
What do you think ?
Thank you for your comment.
We prefer add toolchain/toolchain-external/toolchain-external-andes-nds32....
So we will submit these items in the next patch(v5).
1.add toolchain/toolchain-external/toolchain-external-andes-nds32
+-- Config.in +-- Config.in.options +-- toolchain-external-andes-nds32.hash +-- toolchain-external-andes-nds32.mk 2.add support/config-fragments/autobuild +--toolchain-configs.csv +--andes-nds32.config
Quoted 7 lines
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v4 1/2 arch: add support for Andes 32-bit(nds32)
Hello,
Quoted 4 lines · On Tue, 9 Apr 2019 17:26:56 +0800 Nylon Chen <[email protected]> wrote:
We prefer add toolchain/toolchain-external/toolchain-external-andes-nds32....
So we will submit these items in the next patch(v5).
Quoted 8 lines
1.add toolchain/toolchain-external/toolchain-external-andes-nds32
+-- Config.in +-- Config.in.options +-- toolchain-external-andes-nds32.hash +-- toolchain-external-andes-nds32.mk 2.add support/config-fragments/autobuild +--toolchain-configs.csv +--andes-nds32.config
Seems perfect!
Looking forward to your v5.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v4 2/2 configs/andes_nds32_ae3xx: new defconfig
In reply to Nylon ChenAdd Andes 32-bit defconfig for AE3XX platform.
--- 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
DEVELOPERS +2 -0
@@ -1657,6 +1657,8 @@ F: package/tcf-agent/ N: Nylon Chen <[email protected]> F: arch/Config.in.nds32 +F: board/andes +F: configs/andes_ae3xx_defconfig N: Olaf Rempel <[email protected]> F: package/ctorrent/
board/andes/ae3xx/ae3xx.fragment new file +1 -0
@@ -0,0 +1 @@ +CONFIG_NDS32_BUILTIN_DTB="ae3xx"
board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 90d52d180dcc5d1300dc352ca709eb6453894143 Mon Sep 17 00:00:00 2001 +From: Nylon Chen <[email protected]> +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 <[email protected]> +--- + 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 +
board/andes/readme.txt new file +49 -0
49 lines not on this page · raw message
configs/andes_ae3xx_defconfig new file +14 -0
@@ -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
Signature · 1 line
2.18.0
PATCH v4 2/2 configs/andes_nds32_ae3xx: new defconfig
Nylon, All,
On 2019-04-02 15:23 +0800, Nylon Chen spake thusly:
Quoted 5 lines
Add Andes 32-bit defconfig for AE3XX platform.
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>
Regards,
Yann E. MORIN.
Quoted 144 lines
--- 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_defconfigDEVELOPERS +2
-0@@ -1657,6 +1657,8 @@ F: package/tcf-agent/ N: Nylon Chen <[email protected]> F: arch/Config.in.nds32 +F: board/andes +F: configs/andes_ae3xx_defconfig N: Olaf Rempel <[email protected]> F: package/ctorrent/board/andes/ae3xx/ae3xx.fragment new file +1
-0@@ -0,0 +1 @@ +CONFIG_NDS32_BUILTIN_DTB="ae3xx"board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch new file +28
-0@@ -0,0 +1,28 @@ +From 90d52d180dcc5d1300dc352ca709eb6453894143 Mon Sep 17 00:00:00 2001 +From: Nylon Chen <[email protected]> +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 <[email protected]> +--- + 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 +board/andes/readme.txt new file +49
-0@@ -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 + $ cconfigs/andes_ae3xx_defconfig new file +14
-0@@ -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=ySignature · 1 line
2.18.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'