Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support
v5 cover Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support
v5:
1) add toolchain-external-andes-nds32/*
2) add autobuild configs support
v4:
1) removed BR2_ANDES_NDS32_FPU option
2) removed test the Andes nds32 toolchain patch
Nylon Chen (4):
arch: add support for Andes 32-bit(nds32) configs/andes_nds32_ae3xx: new defconfig toolchain-external-andes-nds32: new package support/config-fragments/autobuild: test the Andes nds32 toolchain
DEVELOPERS | 6 +++ 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 ++++++ .../autobuild/andes-nds32.config | 3 ++ .../autobuild/toolchain-configs.csv | 1 + toolchain/toolchain-external/Config.in | 3 ++ .../toolchain-external-andes-nds32/Config.in | 9 ++++ .../Config.in.options | 14 ++++++ .../toolchain-external-andes-nds.hash | 2 + .../toolchain-external-andes-nds.mk | 10 ++++ 14 files changed, 163 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 create mode 100644 support/config-fragments/autobuild/andes-nds32.config create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.hash create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk
Signature · 1 line
2.18.0
PATCH v5 1/4 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
@@ -1665,6 +1665,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
Thomas Petazzoni
AppliedPATCH v5 1/4 arch: add support for Andes 32-bit(nds32)
Quoted 11 lines · On Tue, 16 Apr 2019 15:25:42 +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]>--- DEVELOPERS | 3 +++ arch/Config.in | 12 ++++++++++++ arch/Config.in.nds32 | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 arch/Config.in.nds32
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v5 2/4 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
@@ -1667,6 +1667,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 v5 2/4 configs/andes_nds32_ae3xx: new defconfig
Hello,
Quoted 5 lines · On Tue, 16 Apr 2019 15:25:43 +0800 Nylon Chen <[email protected]> wrote:
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]>
The commit title was not matching the name of the defconfig file being added, so I fixed that up.
Quoted 6 lines
configs/andes_ae3xx_defconfig new file +0
-0
configs/andes_ae3xx_defconfig line 8
Quoted 8 lines
configs/andes_ae3xx_defconfig new file +8
-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
This should have used the external toolchain package that you added, so I fixed that as well.
Applied with those two issues fixed.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v5 3/4 toolchain-external-andes-nds32: new package
In reply to Nylon ChenThis commit adds a new package for the Andes external toolchain for the nds32 Little Endian architecture.
--- DEVELOPERS | 1 + toolchain/toolchain-external/Config.in | 3 +++ .../toolchain-external-andes-nds32/Config.in | 9 +++++++++ .../Config.in.options | 14 ++++++++++++++ .../toolchain-external-andes-nds.hash | 2 ++ .../toolchain-external-andes-nds.mk | 10 ++++++++++ 6 files changed, 39 insertions(+) create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.hash create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk
DEVELOPERS +1 -0
@@ -1669,6 +1669,7 @@ N: Nylon Chen <[email protected]> F: arch/Config.in.nds32 F: board/andes F: configs/andes_ae3xx_defconfig +F: toolchain/toolchain-external/toolchain-external-andes-nds32/ N: Olaf Rempel <[email protected]> F: package/ctorrent/
toolchain/toolchain-external/Config.in +3 -0
@@ -124,6 +124,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config # ARC source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options" +# Andes +source "toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options" + # ARM source "toolchain/toolchain-external/toolchain-external-arm-arm/Config.in.options" source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32 + depends on BR2_nds32 + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + help + nds32 toolchain for the nds32 architecture. It uses GCC 8.2.1, + GDB 8.1.1, glibc 2.28, Binutils 2.30. It generates code that + runs on ae3xx platform
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options new file +14 -0
@@ -0,0 +1,14 @@ +if BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32 + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "nds32le-linux" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-andes-nds32" + +config BR2_TOOLCHAIN_EXTERNAL_URL + string "Toolchain URL" + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + URL of the custom toolchain tarball to download and install. +endif
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.hash new file +2 -0
@@ -0,0 +1,2 @@ +# From https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz +sha256 6050601df85ad93a4c211c1d57ed3773edb62aa505f7e07d7d555652e83af2cc nds32le-linux-glibc-v3-upstream.tar.gz
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk new file +10 -0
@@ -0,0 +1,10 @@ +################################################################################ +# +# toolchain-external-andes-nds32 +# +################################################################################ +TOOLCHAIN_EXTERNAL_ANDES_NDS32_SITE = https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/$(TOOLCHAIN_EXTERNAL_ANDES_NDS32_SOURCE) +TOOLCHAIN_EXTERNAL_ANDES_NDS32_SOURCE = nds32le-linux-glibc-v3-upstream.tar.gz + +$(eval $(toolchain-external-package)) +
Signature · 1 line
2.18.0
PATCH v5 3/4 toolchain-external-andes-nds32: new package
Hello,
Quoted 8 lines · On Tue, 16 Apr 2019 15:25:44 +0800 Nylon Chen <[email protected]> wrote:
This commit adds a new package for the Andes external toolchain for the nds32 Little Endian architecture.
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>
First of all, this patch should have been *before* the defconfig patch, and the defconfig should have used this external toolchain package.
In addition, this patch had many problems. It was clearly not tested properly, see below for the details.
toolchain/toolchain-external/Config.in source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config · line 128
Quoted 10 lines
toolchain/toolchain-external/Config.in +2
-0@@ -124,6 +124,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config # ARC source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options" +# Andes +source "toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options"
You forgot to also include the Config.in file, so the toolchain could not be visible in menuconfig.
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in line 1
Quoted 7 lines
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in new file +1
-0@@ -0,0 +1,9 @@ +config BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32
This was missing:
bool "Andes nds32"
so that the toolchain has a visible option.
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in line 5
Quoted 4 lines
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in new file +4
-0+ depends on BR2_nds32 + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
The toolchain provides RPC and SSP support, so this is missing:
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_TOOLCHAIN_HAS_SSP
Quoted 9 lines
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options new file +3
-0@@ -0,0 +1,14 @@ +if BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32 + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options line 13
Quoted 10 lines
toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options new file +10
-0+ default "nds32le-linux" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-andes-nds32" + +config BR2_TOOLCHAIN_EXTERNAL_URL + string "Toolchain URL" + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + URL of the custom toolchain tarball to download and install.
This option is totally unnecessary, the toolchain URL is defined in the .mk and should not be configurable.
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.hash
Quoted 1 line
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.hash +0
-0
This file should have been named toolchain-external-andes-nds32.hash to match the package name.
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk
Quoted 8 lines
new file mode 100644
index 0000000000..4314bb1f55toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.hash new file +2
-0@@ -0,0 +1,2 @@ +# From https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz +sha256 6050601df85ad93a4c211c1d57ed3773edb62aa505f7e07d7d555652e83af2cc nds32le-linux-glibc-v3-upstream.tar.gztoolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk +0
-0
This file should have been named toolchain-external-andes-nds32.mk to match the package name.
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk line 5
Quoted 10 lines
new file mode 100644
index 0000000000..c0df49e716toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk new file +5
-0@@ -0,0 +1,10 @@ +################################################################################ +# +# toolchain-external-andes-nds32 +# +################################################################################
Missing empty line here.
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk line 6
Quoted 1 line
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk new file +1
-0+TOOLCHAIN_EXTERNAL_ANDES_NDS32_SITE = https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/$(TOOLCHAIN_EXTERNAL_ANDES_NDS32_SOURCE)
This URL is wrong, as it finishes with the file name, while it should not. The download clearly doesn't work with this.
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk line 10
Quoted 4 lines
toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds.mk new file +4
-0+TOOLCHAIN_EXTERNAL_ANDES_NDS32_SOURCE = nds32le-linux-glibc-v3-upstream.tar.gz + +$(eval $(toolchain-external-package)) +
This empty line at the end of the file was causing a check-package warning.
I fixed all those issues and applied the patch. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v5 4/4 support/config-fragments/autobuild: test the Andes nds32 toolchain
In reply to Nylon Chen--- support/config-fragments/autobuild/andes-nds32.config | 3 +++ support/config-fragments/autobuild/toolchain-configs.csv | 1 + 2 files changed, 4 insertions(+) create mode 100644 support/config-fragments/autobuild/andes-nds32.config
support/config-fragments/autobuild/andes-nds32.config new file +3 -0
@@ -0,0 +1,3 @@ +BR2_nds32=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32=y
support/config-fragments/autobuild/toolchain-configs.csv +1 -0
@@ -22,6 +22,7 @@ support/config-fragments/autobuild/br-arm-full-static.config,x86_64 support/config-fragments/autobuild/sourcery-arm.config,x86 # Toolchains used by test-pkg only when the '-a' option is passed: +support/config-fragments/autobuild/andes-nds32.config,x86 support/config-fragments/autobuild/arm-aarch64.config,x86_64 support/config-fragments/autobuild/br-aarch64-glibc.config,x86_64 support/config-fragments/autobuild/br-arc-full-internal.config,any
Signature · 1 line
2.18.0
Thomas Petazzoni
AppliedPATCH v5 4/4 support/config-fragments/autobuild: test the Andes nds32 toolchain
Quoted 8 lines · On Tue, 16 Apr 2019 15:25:45 +0800 Nylon Chen <[email protected]> wrote:
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>--- support/config-fragments/autobuild/andes-nds32.config | 3 +++ support/config-fragments/autobuild/toolchain-configs.csv | 1 + 2 files changed, 4 insertions(+) create mode 100644 support/config-fragments/autobuild/andes-nds32.config
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v5 cover Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support
In reply to Nylon ChenHello Nylon,
Quoted 5 lines · On Tue, 16 Apr 2019 15:25:41 +0800 Nylon Chen <[email protected]> wrote:
Nylon Chen (4):
arch: add support for Andes 32-bit(nds32) configs/andes_nds32_ae3xx: new defconfig toolchain-external-andes-nds32: new package support/config-fragments/autobuild: test the Andes nds32 toolchain
Following the merge of the nds32 architecture, two types of build failures started to appear:
- The target binutils package failed to build, because binutils does not yet have support for nds32. I tried with the latest binutils release, 2.32, and it was the same. So for now, I have disabled binutils on nds32. However, in binutils source, I see that bfd/elf-nds32.c is present, so there at least the beginning of some support. Could you comment on the status of nds32 support in binutils upstream ?
Build failure: http://autobuild.buildroot.net/results/1b1/1b18acb11db4d6c4198deb7385aff3d4d524c37e/build-end.log
Commit to disable binutils on nds32: https://git.buildroot.org/buildroot/commit/?id=b45a703078e6f3be096f24ac63848490d32d0d29
- The libffi library does not have support for nds32 as well, so I made sure that we don't try to build configurations that include libffi on nds32. Are you planning on adding nds32 support to libffi upstream ?
Build failure: http://autobuild.buildroot.net/results/128/12803a705586e82fdfb49013da2eb3b9879ccd45/build-end.log
Commit to disable libffi on nds32: https://git.buildroot.org/buildroot/commit/?id=2e1f98d9509d869352080331e168abe5f1452e1a
Best regards,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v5 cover Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support
Hello Thomas:
Thanks for your question
Quoted 22 lines · Thomas Petazzoni
Hello Nylon,
Quoted 5 lines · On Tue, 16 Apr 2019 15:25:41 +0800 Nylon Chen <[email protected]> wrote:
Nylon Chen (4):
arch: add support for Andes 32-bit(nds32) configs/andes_nds32_ae3xx: new defconfig toolchain-external-andes-nds32: new package support/config-fragments/autobuild: test the Andes nds32 toolchainFollowing the merge of the nds32 architecture, two types of build failures started to appear:
- The target binutils package failed to build, because binutils does not yet have support for nds32. I tried with the latest binutils release, 2.32, and it was the same. So for now, I have disabled binutils on nds32. However, in binutils source, I see that
bfd/elf-nds32.cis present, so there at least the beginning of some support. Could you comment on the status of nds32 support in binutils upstream ?
Quoted 3 lines
Build failure: http://autobuild.buildroot.net/results/1b1/1b18acb11db4d6c4198deb7385aff3d4d524c37e/build-end.log
Commit to disable binutils on nds32: https://git.buildroot.org/buildroot/commit/?id=b45a703078e6f3be096f24ac63848490d32d0d29
I got two methods can resolve this problem
1.package/binutils/binutils.mk
+ifeq ($(BR2_nds32),y)
+GNU_TARGET_NAME=nds32le-linux
+endif
+
2.package/Makefile.in
+ifeq ($(BR2_nds32),y) +GNU_TARGET_NAME=$(ARCH)le-$(TARGET_OS)
+elseGNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) +endif
In addition to these methods, do you have any suggest?
Quoted 5 lines
- The libffi library does not have support for nds32 as well, so I made sure that we don't try to build configurations that include libffi on nds32. Are you planning on adding nds32 support to libffi upstream ?
We have no plans at the moment.
Quoted 10 lines
Build failure: http://autobuild.buildroot.net/results/128/12803a705586e82fdfb49013da2eb3b9879ccd45/build-end.log
Commit to disable libffi on nds32: https://git.buildroot.org/buildroot/commit/?id=2e1f98d9509d869352080331e168abe5f1452e1aBest regards,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v5 cover Add prebuilt nds32 toolchain, ae3xx board and autobuild configs support
Hello Nylon,
Quoted 17 lines · On Thu, 18 Apr 2019 16:39:10 +0800 Nylon Chen <[email protected]> wrote:
Quoted 3 lines
Build failure: http://autobuild.buildroot.net/results/1b1/1b18acb11db4d6c4198deb7385aff3d4d524c37e/build-end.log
Commit to disable binutils on nds32: https://git.buildroot.org/buildroot/commit/?id=b45a703078e6f3be096f24ac63848490d32d0d29I got two methods can resolve this problem
1.package/binutils/binutils.mk(quoted diff) +4
-0+ifeq ($(BR2_nds32),y) +GNU_TARGET_NAME=nds32le-linux +endif +2.package/Makefile.in
(quoted diff) +3
-0+ifeq ($(BR2_nds32),y) +GNU_TARGET_NAME=$(ARCH)le-$(TARGET_OS) +else
Quoted 2 lines
GNU_TARGET_NAME= $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) +endif
Ah, so the correct tuple for your architecture is nds32le, not nds32 ?
If that's correct, then the right change is:
arch/Config.in.nds32 +1 -1
@@ -1,5 +1,5 @@ config BR2_ARCH - default "nds32" + default "nds32le" config BR2_GCC_TARGET_ARCH default "v3"
So that ARCH is directly equal to nds32le. Since the architecture at the kernel level is known as nds32, you will also want the following change:
Makefile +1 -0
@@ -439,6 +439,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \ -e s/arceb/arc/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/aarch64.*/arm64/ \ + -e s/nds32.*/nds32/ \ -e s/or1k/openrisc/ \ -e s/parisc64/parisc/ \ -e s/powerpc64.*/powerpc/ \
Quoted 6 lines
Quoted 5 lines
- The libffi library does not have support for nds32 as well, so I made sure that we don't try to build configurations that include libffi on nds32. Are you planning on adding nds32 support to libffi upstream ?
We have no plans at the moment.
OK. I think you should plan to have libffi support. Without libffi, you can't build libglib, which means a huge set of Linux libraries/applications can't be built for your platform. Another thing that requires libffi is Python, so without libffi support for nds32, you can't build Python.
See https://github.com/libffi/libffi for the upstream source code. And see https://github.com/libffi/libffi/tree/master/src for all the folders containing architecture specific code. There is not that much architecture specific code.
Of course, there is no urgency: Buildroot autobuilders will not try to build any configuration that include libffi. But it means that a lot of packages are not tested, and also that a lot of the Linux software ecosystem is not usable on nds32.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com