Skip to content

Commit 9be47da

Browse files
committed
Enable toolchain for riscv64
* Add build for riscv64 toolchain * Enable riscv64-softmmu in qemu Signed-off-by: Kumar Gala <[email protected]>
1 parent 63f0927 commit 9be47da

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

.shippable.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
- TARGET=nios2
1212
- TARGET=arm
1313
- TARGET=riscv32
14+
- TARGET=riscv64
1415
- TARGET=mips
1516
- TARGET=arc
1617
- TARGET=xtensa

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Currently we build the following toolchains:
1313
- nios2
1414
- arm
1515
- riscv32
16+
- riscv64
1617
- mips
1718
- xtensa
1819

configs/riscv64.config

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
CT_CONFIG_VERSION="2"
2+
CT_OBSOLETE=y
3+
CT_EXPERIMENTAL=y
4+
CT_LOCAL_TARBALLS_DIR="${CT_PREFIX:-${HOME}/x-tools}/sources"
5+
# CT_PREFIX_DIR_RO is not set
6+
CT_PATCH_BUNDLED_LOCAL=y
7+
CT_LOCAL_PATCH_DIR="${CT_TOP_DIR}/../../patches"
8+
# CT_LOG_PROGRESS_BAR is not set
9+
CT_ARCH_RISCV=y
10+
CT_MULTILIB=y
11+
CT_ARCH_64=y
12+
CT_ARCH_ARCH="rv32ima"
13+
CT_ARCH_ABI="ilp32"
14+
CT_TARGET_VENDOR="zephyr"
15+
CT_LIBC_NEWLIB_TARGET_CFLAGS="-DMISSING_SYSCALL_NAMES"
16+
CT_LIBC_NEWLIB_IO_FLOAT=y
17+
# CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION is not set
18+
CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y
19+
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
20+
CT_LIBC_NEWLIB_LITE_EXIT=y
21+
# CT_LIBC_NEWLIB_MULTITHREAD is not set
22+
# CT_LIBC_NEWLIB_WIDE_ORIENT is not set
23+
CT_LIBC_NEWLIB_NANO_MALLOC=y
24+
CT_LIBC_NEWLIB_NANO_FORMATTED_IO=y
25+
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld --with-gnu-as --enable-initfini-array"
26+
CT_CC_LANG_CXX=y
27+
CT_DEBUG_GDB=y
28+
CT_ISL_V_0_18=y
29+
CT_LIBICONV_NEEDED=y

meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ inherit autotools pkgconfig
193193
#--disable-blobs : BIOS needed for x86
194194
#--disable-fdt: Cannot use if supporting ARM
195195

196-
QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu x86_64-softmmu"
196+
QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu x86_64-softmmu"
197197
QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-ng \
198198
--disable-libnfs --disable-libusb --disable-libiscsi --disable-usb-redir --disable-linux-aio\
199199
--disable-guest-agent --disable-libssh2 --disable-vnc-png --disable-seccomp \

scripts/make_zephyr_sdk.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ parse_toolchain_name file_gcc_mips mips
5757
parse_toolchain_name file_gcc_nios2 nios2
5858
parse_toolchain_name file_gcc_xtensa xtensa
5959
parse_toolchain_name file_gcc_riscv32 riscv32
60+
parse_toolchain_name file_gcc_riscv64 riscv64
6061
parse_toolchain_name file_gcc_x86_64 x86_64-zephyr-elf
6162
parse_toolchain_name file_hosttools hosttools
6263

@@ -130,6 +131,13 @@ if [ -n "$file_gcc_riscv32" ]; then
130131
echo "echo \"\"" >>$setup
131132
fi
132133

134+
if [ -n "$file_gcc_riscv64" ]; then
135+
echo "tar -C \$target_sdk_dir -jxf ./$file_gcc_riscv64 > /dev/null &" >> $setup
136+
echo "spinner \$! \"Installing riscv64 tools...\"" >> $setup
137+
echo "[ \$? -ne 0 ] && echo \"Error(s) encountered during installation.\" && exit 1" >>$setup
138+
echo "echo \"\"" >>$setup
139+
fi
140+
133141
if [ -n "$file_gcc_x86_64" ]; then
134142
echo "tar -C \$target_sdk_dir -jxf ./$file_gcc_x86_64 > /dev/null &" >> $setup
135143
echo "spinner \$! \"Installing x86_64 tools...\"" >> $setup

0 commit comments

Comments
 (0)