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: litex_liteuart: add liteuart driver #33

Merged
merged 1 commit into from Jul 29, 2019

Conversation

@mateusz-holenko
Copy link
Collaborator

mateusz-holenko commented Jul 29, 2019

This adds LiteX UART (liteuart) driver and configures Linux to use this device as system console.

@enjoy-digital

This comment has been minimized.

Copy link
Member

enjoy-digital commented Jul 29, 2019

Thanks @mateusz-holenko! Can you explain how you tested it? I just re-compiled the images and tried it with the simulator but it does not seem to be working.

@enjoy-digital

This comment has been minimized.

Copy link
Member

enjoy-digital commented Jul 29, 2019

Sorry, that was just my computer that was a bit slow and logs messages appear a bit later than before, that's working fine, thanks!

@enjoy-digital enjoy-digital merged commit 7b7290f into litex-hub:master Jul 29, 2019
@mateusz-holenko

This comment has been minimized.

Copy link
Collaborator Author

mateusz-holenko commented Jul 30, 2019

Thanks!

FYI I've tested it on Arty board and in Renode.

@enjoy-digital

This comment has been minimized.

Copy link
Member

enjoy-digital commented Jul 30, 2019

Good, do you have instructions on how to run it with Renode? I'd like to test it and add instructions to the README for it.

@mateusz-holenko

This comment has been minimized.

Copy link
Collaborator Author

mateusz-holenko commented Jul 30, 2019

Renode supports litex with vexriscv.linux platform.

You can simulate it by starting Renode and typing in monitor:

start @scripts/single-node/litex_vexriscv_linux.resc

This will, however, use pre-defined binaries from our server.

If you want to use your own binaries, most probably from linux-on-litex-vexrsicv-prebuilt, you should clone the repo and execute the following commands in Renode monitor:

set kernel @path-to-repo/linux-on-litex-vexriscv-prebuilt/buildroot/Image
set rootfs @path-to-repo/linux-on-litex-vexriscv-prebuilt/buildroot/rootfs.cpio
set dtb @path-to-repo/linux-on-litex-vexriscv-prebuilt/buildroot/rv32.dtb
set emulator @path-to-repo/linux-on-litex-vexriscv-prebuilt/emulator/emulator.bin

start @scripts/single-node/litex_vexriscv_linux.resc

NOTE: You need to fix paths to match your setup.

NOTE2: You need to have the newest Renode from github, as only in this commit I added the option to provide custom binaries to the script. If you use the older version of Renode, you must change the litex_vexriscv_linux.resc script manually.

NOTE3: I noticed that the current version of DTB on linux-on-litex-vexrsicv-prebuilt is outdated. I created a PR fixing this: litex-hub/linux-on-litex-vexriscv-prebuilt#1.

More information on Renode can be found in README and the documentation.

@mithro

This comment has been minimized.

Copy link
Contributor

mithro commented Jul 30, 2019

@enjoy-digital There is also a tool which generates the Renode configuration from the LiteX CSV file @ https://github.com/litex-hub/litex-renode

@mithro

This comment has been minimized.

Copy link
Contributor

mithro commented Jul 30, 2019

@mateusz-holenko Can you update the README for the litex-renode repo to include some usage instructions?

@mithro

This comment has been minimized.

Copy link
Contributor

mithro commented Jul 30, 2019

@enjoy-digital - Oh FYI -- there is an example of the Linux.conf.au FPGA Miniconf tutorial using Renode + RISC-V (verse or1k and QEMU) avalible at https://github.com/timvideos/litex-buildenv/wiki/HowTo-LCA2018-FPGA-Miniconf-VexRiscv-Renode

@enjoy-digital

This comment has been minimized.

Copy link
Member

enjoy-digital commented Jul 30, 2019

Thanks @mateusz-holenko, @mithro, i'll test that very soon.

@mateusz-holenko

This comment has been minimized.

Copy link
Collaborator Author

mateusz-holenko commented Aug 1, 2019

@mithro I'll update the README today.

@mateusz-holenko mateusz-holenko deleted the antmicro:liteuart_driver branch Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.