Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Bringup suggestion when using Nuclei RISC-V CPU #21

Open
fanghuaqi opened this issue Mar 6, 2024 · 1 comment
Open

Linux Bringup suggestion when using Nuclei RISC-V CPU #21

fanghuaqi opened this issue Mar 6, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@fanghuaqi
Copy link
Member

fanghuaqi commented Mar 6, 2024

Nuclei RISC-V CPU IP user should following this guidance to port your SoC to enable quickly linux bringup and then you can port linux to your own linux sdk platform.

Nuclei Linux SDK is a really simple Linux SDK platform for customer to quickly bring up their SoC with Linux.

If you find there is something wrong with our document, please create a issue, and let us improve it.

Note

  • Make sure you have confirmed that your L1/L2 cache integration is correct and testing passed, please cowork with your team member to make sure it is ok. For software, you can disable L1 and L2 cache in freeloader to see whether cache is not ok which affect normal boot.
  • If you are using SMP core, please make sure single core version works by generate a single core version bitstream, and then port a smp version.
  • If you are using SMP core, you also need to update openocd configuration file, if you want to debug it, please contact with our AE for help about how to update this configuration file.
  • Please take care clint0 in dts should be nuclei timer base address + 0x1000, please check Nuclei ISA Spec
  1. Nuclei Linux SDK is developed for Nuclei evaluation SoC which is very simple, with SPI XIP Flash, UART, and SPI SDCard and DDR memory enabled evaluation SoC, for details about this SoC, please see our Nuclei_Eval_SoC_Intro.pdf
  2. Our evaluation SoC don't have a bootrom to do some basic SOC initialization and load image from flash or other storages to memory, so we create a software called freeloader to handle this.
  3. If your DDR memory need to be initialized, you can do this in freeloader code, just like fsl91030m's freeloader does in https://github.com/Nuclei-Software/freeloader/blob/8f27d8dc7d92ba13b4f6f62039dc09abbc5731cd/freeloader.S#L94-L176, this kind of asm code is generated from c code, and just disassemble it, and copy and adapted to freeloader code
  4. Nuclei Linux SDK has different branches to evaluate different Linux version and different features, see 关于各分支功能介绍 About each branch feature #2 , so you should choose a correct branch you want to use, and following the guidance in that branch
  5. For example, for dev_nuclei_5.10_v2 branch, you should check its README.md in https://github.com/Nuclei-Software/nuclei-linux-sdk/blob/dev_nuclei_5.10_v2/README.md, and it has a Port to your target section to tell you how to port your SoC to this linux SDK and help you to bringup.
  6. We strongly requested you to bring up your SoC using our Linux SDK, it will be easy to debug what is not acting as expected, if the bring up is done, then you can port it to your own SDK environment, it will be much easier.
  7. When you are expecting to use some higher level feature such as OpTEE, please make sure normal linux is already brought up, and then you can follow the guidance in OpTEE feature branch.

    NOTE: You may need to do two versions of bitstream, first version for normal boot, just configure cpu without any secure feature, and do a bitstream, when comes to optee related porting, then you can configure cpu with secure feature, and do a bitstream and port linux to it.

  8. About how to debug linux, uboot, opensbi, please check https://github.com/Nuclei-Software/nuclei-linux-sdk/wiki/Debug-Linuxsdk-using-NucleiStudio
  9. Regarding the frequently asked questions, please check Common Questions 常见问题 #12

Thanks

@fanghuaqi fanghuaqi added the documentation Improvements or additions to documentation label Mar 6, 2024
@fanghuaqi fanghuaqi self-assigned this Mar 6, 2024
@fanghuaqi
Copy link
Member Author

fanghuaqi commented Mar 6, 2024

Our own porting to fsl91030m is based on commit 00e1fc1, you can see all the changes we have made to it, see 00e1fc...feature/fsl, this porting is a best practice about this suggestion.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant