Nuclei-Software / nuclei-linux-sdk

Nuclei RISC-V Linux Software Development Kit
Apache License 2.0
41 stars 11 forks source link

关于各分支功能介绍 About each branch feature #2

Open fanghuaqi opened 4 years ago

fanghuaqi commented 4 years ago

请关注最新的issue评论,这里的文字说明可能不是最新版本,以具体代码为准

请注意 本issue与其他issue会经常更新,请点击上面的 edited 来获知最新的修改的变更

image

[!NOTE] 点击这里还可以看到更多 Nuclei Linux SDK使用的各种技巧和场景的文章,持续不断更新完善中

中文介绍

截止到2023.07号起更新的代码,分支特性说明如下:

主要支持如下SoC:

分支说明

请注意:切换分支或者切换启动模式(sd/flash), 需要清理 work目录,删掉或者重命名,且切换分支的时候,需要同时更新submodule的代码

请注意: 如果你打算在你自己的SOC上bringup Linux环境,请先阅读我们准备好的bringup建议 #21

目前活跃开发的分支为 dev_nuclei_5.10_v2, dev_nuclei_6.1_v2dev_nuclei_6.6_v2: 主要针对最新的900 CPU的FPGA evalsoc进行适配和优化。

提醒: 目前 dev_nuclei_6.6_v2 分支使用的是开发中的预编译好的gcc13 glibc工具链,其他分支暂时使用的都是预编译好的gcc10 glibc工具链或者buildroot生成的工具链,工具链的信息记录在 buildroot_initramfs_*_config文件中。

提醒: 计划使用 dev_nuclei_next / dev_nuclei_5.10分支的, 建议直接使用 dev_nuclei_5.10_v2 分支

提醒: 关于默认的CPU/Peripheral/Timer频率以选中的SoC中对应的dts(如nuclei_rv64imafdc.dts)和build.mk配置为准。

提醒: 请根据你当前拿到的bitstream的CPU版本以及CPU主频来选择分支,切换到对应分支,并确保代码是最新的,然后检查并修改对应的dts或者build.mk来满足你的bitstream的要求,再进行代码的构建。

文档做了更新的分支如下:

以下是各个分支的情况说明

fanghuaqi commented 4 years ago

Please pay attention to the latest issue comments, the text descriptions here may not be the latest version, refer to the specific code for accuracy.

Introduction

As of July 2023, the updated code features are as follows:

Mainly supports the following SoCs:

Branches introduction:

Please note: When switching branches or switching boot modes (sd/flash), you need to clean the work directory, delete or rename it. Also when switching branches, you need to update the submodule code at the same time. Please note: If you plan to bringup a Linux environment on your own SOC, please read our prepared bringup advice #21 first

Currently, actively development branches are dev_nuclei_5.10_v2 , dev_nuclei_6.1_v2 and dev_nuclei_6.6_v2

fanghuaqi commented 4 years ago

The documentation can be found in each branch's README.md, which can be reviewed online.

fanghuaqi commented 1 year ago

We have introduced OpTEE support, please check this issue https://github.com/OP-TEE/optee_os/issues/6173

The related branches:

feature/optee_5.10_wg branch introduce the support with world-guard and secure mode feature of Nuclei CPU. Currently only run on hardware, no qemu emulation support.

fanghuaqi commented 1 year ago

Since 2023.07, the ddr base address of our fpga emulation platform for 900 series changed from 0xA0000000 to 0x80000000, so we are able to have totally 2GB DDR RAM to use, instead of 1.5G.

If you want to try that features, please use these branches:

  • These two branches required a new version of Nuclei QEMU > 2022.12, please contact with our AE to get it.
  • These two branches are for Linux Kernel 5.10 LTS version and 6.1 LTS version.

There are also branches without _v2 naming in it, it is used for old DDR base is 0xA0000000

fanghuaqi commented 1 year ago

We have just introduced with no-mmu linux support for riscv64 processors.

You can evaluate it using Nuclei Qemu 2023.10 downloaded from https://www.nucleisys.com/upload/files/toochain/qemu/nuclei-qemu-2023.10-linux-x64.tar.gz

Just extract it, and add its binary path to existing system PATH.

You can find this feature in branch: https://github.com/Nuclei-Software/nuclei-linux-sdk/tree/dev_nuclei_6.1_nommu

The freeloader will consist with loader, dts and kernel binary, when you clone this repo, and switch to this branch, and update the submodule, then you can evaluate this on qemu or hardware.

export PATH=/path/to/qemu/bin:$PATH
# choose rv64imafdc
# clean previous build if existed
make CORE=ux900fd clean
# build freeloader is enough, no need to build boot images, sd card is not needed
# bitstream with 50MHz CPU is expected by default
make CORE=ux900fd freeloader
# run on qemu
make CORE=ux900fd run_qemu
# upload to hardware board, hardware need to be power on and jtag connected
# boot need a few minutes depended on cpu frequency
make CORE=ux900fd upload_freeloader

Sample output on qemu is attached here: rv64imafdc_nommu_linux_bootlog.txt

matthewgui commented 1 year ago

We have just introduced with preempt_rt linux support for riscv64 processors.

You can evaluate it using Nuclei Qemu 2023.10 downloaded from https://www.nucleisys.com/upload/files/toochain/qemu/nuclei-qemu-2023.10-linux-x64.tar.gz

Just extract it, and add its binary path to existing system PATH.

You can find this feature in branch: https://github.com/Nuclei-Software/nuclei-linux-sdk/tree/dev_nuclei_6.4_v2_rt

The freeloader will consist with loader, dts and kernel binary, when you clone this repo, and switch to this branch, and update the submodule, then you can evaluate this on qemu or hardware.

export PATH=/path/to/qemu/bin:$PATH
# choose rv64imafdc
# clean previous build if existed
make CORE=ux900fd clean
# build freeloader is enough, no need to build boot images, sd card is not needed
# bitstream with 50MHz CPU is expected by default
make CORE=ux900fd freeloader
# run on qemu
make CORE=ux900fd run_qemu
# upload to hardware board, hardware need to be power on and jtag connected
# boot need a few minutes depended on cpu frequency
make CORE=ux900fd upload_freeloader

Sample output on qemu is attached here: rv64imafdc_rt_linux_bootlog.txt

cyclictest program which we use to test rtlinux, is built from rt-test source code,

rt-test git source : git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git

here is our rv64fd binary built from rt-test 2.0 ,numa library is master branch cyclictest.gz

fanghuaqi commented 11 months ago

We just introduced support of Linux Kernel 6.6 in branch dev_nuclei_6.6_v2, which is using prebuilt gcc 13 + glibc 2.38 toolchain, the buildroot/uboot are also upgraded to latest stable branch.

The riscv features linux kernel 6.6 supported:

image

fanghuaqi commented 8 months ago

We introduced dev_nuclei_6.6_v2_customsoc branch, mainly used to demonstrate our Nuclei SoC IP linux driver code and how to use it.

fanghuaqi commented 3 months ago

We introduced Linux perf tool support which may cause cycle/instret not able to be read in user space, see https://github.com/Nuclei-Software/nuclei-linux-sdk/issues/26