Add nds32 toolchain and ae3xx board support
A message that is not in the archive (sent off-list or not yet received): [email protected]
cover Add nds32 toolchain and ae3xx board support
Hello,
Quoted 8 lines · Nylon Chen
This patchset adds basic support for Andes's nds32 ISA and nds32 family's CPU IP based on ae3xx platform. The board is entirely supported since Linux 4.17.
Nylon Chen (3):
toolchain-external-andes-nds32: new package
arch: add support for Andes 32-bit (nds32) architecture configs/andes_nds32_ae3xx: new defconfig
Thanks a lot for this contribution!
What is the status of the support of this architecture in gcc, binutils, glibc and gdb ?
Also, when we add a new architecture in Buildroot, we do a lot of build testing for it using our autobuilder infrastructure (see
http://autobuild.buildroot.org). Are you willing to help fixing the build failures that may pop up when we will start building tons of packages for the NDS32 architecture ?
Best regards,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/3 toolchain-external-andes-nds32: new package
Hello,
Quoted 6 lines · Nylon Chen
This commit adds a new package for the nds32 external toolchain for the nds32 architecture.
Signed-off-by Che-Wei Chuang <[email protected]>Signed-off-by Greentime Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>
Quoted 12 lines
--- DEVELOPERS | 6 + toolchain/toolchain-external/Config.in | 6 + .../toolchain-external-andes-nds32/Config.in | 9 ++ .../Config.in.options | 145 ++++++++++++++++++ .../toolchain-external-andes.hash | 2 + .../toolchain-external-andes.mk | 9 ++ 6 files changed, 177 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.hash create mode 100644 toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes.mk
It is not clear what you are trying to do in this patch. It seems like you are simply duplicating the "toolchain-external-custom" package, which doesn't make a lot of sense.
You have two options:
- You want to add a new pre-defined external toolchain, like we already have for the Linaro toolchains, ARM toolchains, ARC toolchains, and more.
In this case, your package should reference a tarball of the pre-built toolchain, and tell Buildroot what is the configuration of this toolchain.
See toolchain/toolchain-external/toolchain-external-arm-arm/ for an example.
- You don't have such a pre-defined external toolchain publicly/easily available. In this case, just use the existing toolchain-external-custom package.
What you're doing in your patch is add another "toolchain-external-custom" package, just named differently.
DEVELOPERS F: package/qjson/ · line 2267
Quoted 12 lines
DEVELOPERS +4
-0@@ -2261,3 +2261,9 @@ F: package/qjson/ F: package/quazip/ F: package/shapelib/ F: package/tinc/ + +N: Che-Wei Chuang <[email protected]> +N: Greentime Hu <[email protected]> +N: Nylon Chen <[email protected]>
I don't think we support having multiple names like this, there should be a separate entry for each person.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/3 arch: add support for Andes 32-bit (nds32) architecture
Hello,
Quoted 2 lines · Nylon Chen
This enables a nds32 system to be built with a Buildroot generated toolchain (gcc >= 8.0.1, binutils >= 2.30, glibc only).
Ah, so there is upstream support for NDS, good!
This patch should be the first in the series.
DEVELOPERS N: Greentime Hu <[email protected]> · line 2272
Quoted 11 lines
DEVELOPERS +3
-0@@ -2267,3 +2267,7 @@ N: Greentime Hu <[email protected]> N: Nylon Chen <[email protected]> F: toolchain/toolchain-external/toolchain-external-andes-nds32 F: toolchain/toolchain-external +F: toolchain/toolchain-buildroot +F: arch/Config.in +F: arch/Config.in.nds32
Again, one entry per person, I don't think the get-developers script supports having multiple names in the same entry (or at least, verify if it does).
Quoted 6 lines
arch/Config.in.nds32 new file +0
-0
arch/Config.in.nds32 line 8
Quoted 8 lines
arch/Config.in.nds32 new file +8
-0@@ -0,0 +1,13 @@ +config BR2_ARCH + default "nds32" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_READELF_ARCH_NAME + default "Andes Technology compact code size embedded RISC processor family"
Do you have several variants of the CPU architecture, which correspond to some gcc march/mcpu flags ? If so they should be listed here, as a Config.in choice..endchoice block.
arch/Config.in.nds32 line 10
Quoted 2 lines
arch/Config.in.nds32 new file +2
-0+config BR2_TOOLCHAIN_HAS_NATIVE_RPC + bool
This should not be here, this Config.in option already exists elsewhere.
Also, in this patch introducing the architecture you need to:
- Restrict the gcc version that can be used for NDS32, so that people cannot try to build with a gcc version that didn't had NDS32 support. This must be done in package/gcc/Config.in.host
- Allow glibc to be selected for the NDS32 architecture by changing BR2_TOOLCHAIN_BUILDROOT_GLIBC in toolchain/toolchain-buildroot/Config.in.
- Restrict the binutils version that can be used for NDS32, which must be done in package/binutils/Config.in.host
- Restrict the kernel headers version that can be used, which msut be done in package/linux-headers/Config.in.host
As a separate patch, could you add a snippet of configuration in support/config-fragments/autobuild/ for your architecture, so that it gets tested by our autobuilder infrastructure ?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 3/3 configs/andes_nds32_ae3xx: new defconfig
Hello,
Note: I just realized that none of your patches made it to the Buildroot mailing list. Please make sure to subscribe to the mailing list before sending patches.
Please see some comments below about this specific patch.
configs/andes_ae3xx_defconfig
Quoted 5 lines · Nylon Chen
configs/andes_ae3xx_defconfig new file +0
-0
This file should be the output of "make savedefconfig". It clearly isn't the case here, with some fairly random options listed.
Quoted 1 line
+BR2_READELF_ARCH_NAME="Andes Technology compact code size embedded RISC processor family"
This clearly has no reason to be here, it's a blind Config.in option.
configs/andes_ae3xx_defconfig
Quoted 12 lines
configs/andes_ae3xx_defconfig new file +12
-0+BR2_nds32=y +BR2_TOOLCHAIN=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32=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_PREFIX="nds32le-linux" +BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL="toolchain-external-andes-nds32" +BR2_TOOLCHAIN_EXTERNAL_GCC_8=y +BR2_TOOLCHAIN_GCC_AT_LEAST_8=y +BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y +BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y
All of this will change once you had a proper package for your external toolchain.
configs/andes_ae3xx_defconfig
Quoted 2 lines
configs/andes_ae3xx_defconfig new file +2
-0+#Kernel +BR2_LINUX_KERNEL_PATCH="board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch"
Please instead use:
BR2_GLOBAL_PATCH_DIR="board/andes/patches/"
configs/andes_ae3xx_defconfig
Quoted 5 lines
configs/andes_ae3xx_defconfig new file +5
-0+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/andes/ae3xx.fragment" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ca9eb48fe01fa7fa60ff9f2196b1bd0d84dc81af"
Any reason to use this specific commit instead of a proper tag ?
configs/andes_ae3xx_defconfig
Quoted 7 lines
configs/andes_ae3xx_defconfig new file +7
-0+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_VMLINUX=y + +#Target packages + +BR2_PACKAGE_BUSYBOX=y +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox.config"
not needed, this is already the default.
configs/andes_ae3xx_defconfig
Quoted 2 lines
configs/andes_ae3xx_defconfig new file +2
-0+# Filesystem +BR2_TARGET_ROOTFS_INITRAMFS=y
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com