From f715ed4591a6e24875e42a4ac2e628c02cf11243 Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Mon, 14 Jan 2019 13:36:15 +0800 Subject: [PATCH 1/5] .travis.yml: Support nds32 prebuilt toolchain Download nds32 prebuild toolchain from github which is base on gcc 8.0.1 version for regression. Signed-off-by: Rick Chen Cc: Greentime Hu --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8dfe4cfb15..59e615abb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,6 +79,11 @@ before_script: wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2018.09-release/arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz && 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/20180521/nds32le-linux-glibc-v3-upstream.tar.gz && + 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-2018.02-${TOOLCHAIN}.tar.gz && 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 28c107f05ede76924449fb214c02a826d2f7d02f Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Thu, 10 Jan 2019 11:22:43 +0800 Subject: [PATCH 2/5] nds32: Remove gcc unused option -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 Cc: Greentime Hu --- 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 12cec368d3..a0f14ae589 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 9135858fb861d4aa0c8521442cc20932c1e2e097 Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Tue, 15 Jan 2019 10:41:20 +0800 Subject: [PATCH 3/5] nds32: Generate SW fpu instruction. 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 Cc: Greentime Hu --- 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 a0f14ae589..4e10de072e 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 e690148223cb0828d601f43703e7fc238d85884d Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Tue, 15 Jan 2019 11:07:54 +0800 Subject: [PATCH 4/5] nds32: Fix boot fail issue when build with elf-mculib. 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 Cc: Greentime Hu --- 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 4e10de072e..a1c3371ddc 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 From 866ab879c94f837150af6c5094372de23ca3bd17 Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Tue, 15 Jan 2019 13:30:35 +0800 Subject: [PATCH 5/5] nds32: dts: Fix mmc node compatible string In the two commits: cf3922dddc44a968685b535f2af195f1e51f4a7b mmc: ftsdc010_mci: Sync compatible with DT mmc node c14e90e8445e7b1c3531b4bdeb778c47bd6570eb riscv: dts: Sync DT with Linux Kernel ftsdc010_mci's compatible has been modified as "andestech,atfsdc010" for RISC-V synchronization. But ae3xx.dts and ag101p.dts which are used for nds32 adp-ae3xx and adp-ag101p platforms did not be modified correctly at that time. It will cause mmc detection failure. Fix it here. Signed-off-by: Rick Chen Cc: Greentime Hu --- arch/nds32/dts/ae3xx.dts | 2 +- arch/nds32/dts/ag101p.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/nds32/dts/ae3xx.dts b/arch/nds32/dts/ae3xx.dts index b19ba988db..272eb3359a 100644 --- a/arch/nds32/dts/ae3xx.dts +++ b/arch/nds32/dts/ae3xx.dts @@ -70,7 +70,7 @@ }; mmc0: mmc@f0e00000 { - compatible = "andestech,atsdc010"; + compatible = "andestech,atfsdc010"; max-frequency = <100000000>; fifo-depth = <0x10>; reg = <0xf0e00000 0x1000>; diff --git a/arch/nds32/dts/ag101p.dts b/arch/nds32/dts/ag101p.dts index 7832efb12f..d2ed9efe93 100644 --- a/arch/nds32/dts/ag101p.dts +++ b/arch/nds32/dts/ag101p.dts @@ -62,7 +62,7 @@ }; mmc0: mmc@98e00000 { - compatible = "andestech,atsdc010"; + compatible = "andestech,atfsdc010"; max-frequency = <30000000>; fifo-depth = <0x10>; reg = <0x98e00000 0x1000>;