Skip to content

Commit

Permalink
Add OpenRISC 1000 (or1k) support
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Holdsworth <[email protected]>
  • Loading branch information
jhol committed Feb 18, 2025
1 parent fff0928 commit 191ca12
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ on:
- microblazeel-zephyr-elf
- mips-zephyr-elf
- nios2-zephyr-elf
- or1k-zephyr-elf
- riscv64-zephyr-elf
- sparc-zephyr-elf
- x86_64-zephyr-elf
Expand Down Expand Up @@ -169,6 +170,7 @@ jobs:
microblazeel-zephyr-elf) build_target_microblazeel_zephyr_elf="y";;
mips-zephyr-elf) build_target_mips_zephyr_elf="y";;
nios2-zephyr-elf) build_target_nios2_zephyr_elf="y";;
or1k-zephyr-elf) build_target_or1k_zephyr_elf="y";;
riscv64-zephyr-elf) build_target_riscv64_zephyr_elf="y";;
sparc-zephyr-elf) build_target_sparc_zephyr_elf="y";;
x86_64-zephyr-elf) build_target_x86_64_zephyr_elf="y";;
Expand Down Expand Up @@ -217,6 +219,7 @@ jobs:
build_target_microblazeel_zephyr_elf="y"
build_target_mips_zephyr_elf="y"
build_target_nios2_zephyr_elf="y"
build_target_or1k_zephyr_elf="y"
build_target_riscv64_zephyr_elf="y"
build_target_sparc_zephyr_elf="y"
build_target_x86_64_zephyr_elf="y"
Expand Down Expand Up @@ -305,6 +308,7 @@ jobs:
[ "${build_target_microblazeel_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"microblazeel-zephyr-elf",'
[ "${build_target_mips_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"mips-zephyr-elf",'
[ "${build_target_nios2_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"nios2-zephyr-elf",'
[ "${build_target_or1k_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"or1k-zephyr-elf",'
[ "${build_target_riscv64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"riscv64-zephyr-elf",'
[ "${build_target_sparc_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"sparc-zephyr-elf",'
[ "${build_target_x86_64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"x86_64-zephyr-elf",'
Expand Down Expand Up @@ -1551,6 +1555,9 @@ jobs:
nios2-zephyr-elf)
PLATFORM_ARGS+="-p qemu_nios2 "
;;
or1k-zephyr-elf)
PLATFORM_ARGS+="-p qemu_or1k "
;;
riscv64-zephyr-elf)
PLATFORM_ARGS+="-p qemu_riscv32 "
PLATFORM_ARGS+="-p qemu_riscv32e "
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The toolchains for the following target architectures are supported:
- Microblaze (32-bit)
- MIPS (32-bit and 64-bit)
- Nios II
- OpenRISC 1000
- RISC-V (32-bit and 64-bit; RV32I, RV32E, RV64I)
- SPARC (32-bit and 64-bit; SPARC V8, SPARC V9)
- x86 (32-bit and 64-bit)
Expand Down
1 change: 1 addition & 0 deletions cmake/zephyr/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(CROSS_COMPILE_TARGET_nios2 nios2-zephyr-elf)
set(CROSS_COMPILE_TARGET_riscv riscv64-zephyr-elf)
set(CROSS_COMPILE_TARGET_mips mips-zephyr-elf)
set(CROSS_COMPILE_TARGET_microblaze microblazeel-zephyr-elf)
set(CROSS_COMPILE_TARGET_or1k or1k-zephyr-elf)
set(CROSS_COMPILE_TARGET_xtensa xtensa-${SOC_TOOLCHAIN_NAME}_zephyr-elf)

# ARC uses the same source tree for both ARCv2 & ARCv3 architectures,
Expand Down
6 changes: 6 additions & 0 deletions configs/or1k-zephyr-elf.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CT_CONFIG_VERSION="3"
CT_EXPERIMENTAL=y
CT_ARCH_OR1K=y
CT_TARGET_CFLAGS="-ftls-model=local-exec"
CT_TARGET_VENDOR="zephyr"
CT_MULTILIB=y
2 changes: 1 addition & 1 deletion meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ inherit autotools pkgconfig
#--disable-fdt: Cannot use if supporting ARM
#--disable-kvm: AArch64 has a QEMU/KVM board

QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu mipsel-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu sparc-softmmu x86_64-softmmu"
QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu mipsel-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu sparc-softmmu x86_64-softmmu or1k-softmmu"
QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-ng \
--disable-libnfs --disable-libusb --disable-libiscsi --disable-usb-redir --disable-linux-aio\
--disable-guest-agent --disable-libssh --disable-vnc-png --disable-seccomp \
Expand Down

0 comments on commit 191ca12

Please sign in to comment.