[U-Boot] [PATCH 0/4] Support nds32 pre-build toolchain

From: Rick Chen rick@andestech.com
1. Support nds32 pre-build toolcahin for buildman. 2. Fix some bugs about fpu and toolchain issues.
Rick Chen (4): .travis.yml: Support nds32 prebuilt toolchain nds32: Remove gcc unused option nds32: Generate SW fpu instruction. nds32: Fix boot fail issue when build with elf-mculib.
.travis.yml | 9 +++++++++ arch/nds32/config.mk | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-)

From: Rick Chen rick@andestech.com
Download nds32 prebuild toolchain from github which is base on gcc 8.0.1 version for regression.
Signed-off-by: Rick Chen rick@andestech.com Cc: Greentime Hu greentime@andestech.com --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/.travis.yml b/.travis.yml index 321fd79..4b7c696 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,6 +78,11 @@ before_script: wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/d... && tar -C /tmp -xf arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz; fi + - if [[ "${TOOLCHAIN}" == "nds32" ]]; then + wget https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/201... && + tar -C /tmp -xf nds32le-linux-glibc-v3-upstream.tar.gz && + echo -e "\n[toolchain-prefix]\nnds32 = /tmp/nds32le-linux-glibc-v3-upstream/bin/nds32le-linux-" >> ~/.buildman; + fi - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then wget https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-20... && tar -C /tmp -xf x86_64-2018.02-${TOOLCHAIN}.tar.gz && @@ -311,6 +316,10 @@ matrix: env: - BUILDMAN="riscv" TOOLCHAIN="riscv" + - name: "buildman nds32" + env: + - BUILDMAN="nds32" + TOOLCHAIN="nds32"
# QA jobs for code analytics # static code analysis with cppcheck (we can add --enable=all later)

From: Rick Chen rick@andestech.com
-G0 is an old option, not support now, So remove it. It can help to fix compile error when build with nds32 pre-build toolchain.
Signed-off-by: Rick Chen rick@andestech.com Cc: Greentime Hu greentime@andestech.com --- arch/nds32/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk index 12cec36..a0f14ae 100644 --- a/arch/nds32/config.mk +++ b/arch/nds32/config.mk @@ -17,6 +17,6 @@ LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds
PLATFORM_RELFLAGS += -fno-common -mrelax PLATFORM_RELFLAGS += -gdwarf-2 -PLATFORM_CPPFLAGS += -D__nds32__ -G0 -ffixed-10 -fpie +PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie
LDFLAGS_u-boot = --gc-sections --relax -pie

From: Rick Chen rick@andestech.com
Force it to generate SW fup instruction. It help to avoid bugs when running on no-HW-fpu board, but compile with v3f which support HW fpu instruction.
Signed-off-by: Rick Chen rick@andestech.com Cc: Greentime Hu greentime@andestech.com --- arch/nds32/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk index a0f14ae..4e10de0 100644 --- a/arch/nds32/config.mk +++ b/arch/nds32/config.mk @@ -15,8 +15,8 @@ endif CONFIG_STANDALONE_LOAD_ADDR = 0x300000 LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds
-PLATFORM_RELFLAGS += -fno-common -mrelax +PLATFORM_RELFLAGS += -fno-common -mrelax -mno-ext-fpu-dp -mfloat-abi=soft PLATFORM_RELFLAGS += -gdwarf-2 PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie
-LDFLAGS_u-boot = --gc-sections --relax -pie +LDFLAGS_u-boot = --gc-sections --relax -pie --mabi=AABI

From: Rick Chen rick@andestech.com
Add -mcmodel=large can let elf-mculib have the same default behavior just like linux-glibc. And it help to pass U-Boot booting sequence.
Signed-off-by: Rick Chen rick@andestech.com Cc: Greentime Hu greentime@andestech.com --- arch/nds32/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk index 4e10de0..a1c3371 100644 --- a/arch/nds32/config.mk +++ b/arch/nds32/config.mk @@ -17,6 +17,6 @@ LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds
PLATFORM_RELFLAGS += -fno-common -mrelax -mno-ext-fpu-dp -mfloat-abi=soft PLATFORM_RELFLAGS += -gdwarf-2 -PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie +PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie -mcmodel=large
LDFLAGS_u-boot = --gc-sections --relax -pie --mabi=AABI
participants (1)
-
Andes