-
Notifications
You must be signed in to change notification settings - Fork 114
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
Support editing Linux image and toolchain configuration #66
Comments
ESP includes the entire Ariane's repo, including its submodules, but it only compiles RTL source files. The list of source files compiled is here. As you can see, we use Note that when compiling Ariane's source files, we set the flag to use the write-through cache subsystem and we keep the original AXI interface from Ariane, not the L1.5 adapter. The |
Thank you @paulmnt ! If I want to customize an ESP build with Ethernet and SPI disabled, and with Bootrom code modified, what's the best way to approach? I tried "make grlib-xconfig" but I wasn't able to find SPI options there. This is for an experiment with OpenOCD and GDB. Thanks. |
SPI is not enabled nor actually supported at the moment. We don't have the SPI controller instance in any of the ESP tiles. Ethernet, on the other hand, is required, because we use it as a debug interface. Without the Ethernet block, you would not be able to load programs in memory and reset the processor to start executing. You can disable Ethernet for Linux by removing it from the device tree OpenOCD and GDB cannot be used to load programs and debug the processor core at this time. If you wish for ESP to support that, feel free to open a new issue. This implies adding the RISC-V debug unit to the design and, while we can't guarantee an exact timeline, we will certainly add it to the list of features to implement. |
I see. Thank you very much for the info.! |
Not sure if this it the right pace for this question. If not, please let me know. After Linux has booted up, I issued command "lsmod" to see what modules are loaded and the following were listed.
I was expecting to find other drivers like networking or serial communications, etc. Are they not loaded or are built-in instead? And if I want to add functions like "modprobe" or "modinfo", what will be the right approach? Thanks a lot in advance! |
The modules you see with The other drivers that you mentioned are built-in, as you guessed. To enable
Then rebuild sysroot with |
Cool! Thank you!! How about those applications (e.g. FIO) that are not in busybox configuration files? |
By the way, I just made some adjustment in |
We are booting just the kernel with a minimal disk image, so there is no packet manager (e.g.apt). You need to get the source files and cross compile the application for RISC-V with the tool chain you built for ESP. Once you have the binary, you can just copy it into sysroot and rebuild Linux with ‘make Linux’. In general, Some applications might be available through buildroot, but I’m not sure about fio. |
To recover the original config file, just go to the Linux folder in esp/soft/ariane/linux, then use
Don’t forget the period at the end. If Linux was making interactive configuration questions, you probably changed something in the configuration manually that did not account for dependencies.
|
Update: Config issue with |
Thanks a lot @paulmnt ! |
Thanks a lot in advance. |
It appears socs//socgen/esp/riscv.dts is the file to edit nowadays. |
Yes, that's the new location of |
I see. Thank you @davide-giri !! |
I realize script, build_riscv_toolchain.sh by default only builds tools for riscv64. How can it install riscv32 instead, or as well? Thanks. |
There is another script for the riscv32imc toolchain. You need to run the script on a clean shell, where the RISCV variable is not defined, because the script is going to define it based on the target folder to install the toolchain (e.g. The 64 and 32 bits toolchains can coexist and ESP will use the appropriate compiler based on the target processor core. Note that the 32-bit script is configured to compile the toolchain for the Ibex core. If you need your gcc to support different ISA extensions, you may need to edit some of the flags passed to |
I see. Thank you @paulmnt for the info.!! |
Moving discussion from #61
The text was updated successfully, but these errors were encountered: