Giter Site home page Giter Site logo

linux_for_riscv_em's Introduction

linux_for_riscv_em

Scripts to automate building linux images for my emulator riscv_em

This was tested in ubuntu 20.04 and ubuntu 21.10

Howto RISCV64 (NOMMU build)

  1. Install my latest riscv64 baremetal toolchain from here (the download can take a while to react, as the zip file is generated on the go):
    https://nightly.link/franzflasch/gcc-build-tools/workflows/riscv64-baremetal/main/toolchain_built_from_tar

And add its bin folder to $PATH

  1. Install prerequisites
sudo apt install -y git build-essential wget cpio unzip rsync bc libncurses5-dev screen bison file flex  

Hopefully I did not forget any...

  1. Build rootfs and linux with:
./riscv_em_nommu_linux.sh  

The result will be a merged (linux+rootfs) flat binary:

output/linux/loader_64.bin

Howto RISCV32 (MMU build)

  1. Install my latest riscv32 toolchain from here (the download can take a while to react, as the zip file is generated on the go):
    https://nightly.link/franzflasch/gcc-build-tools/workflows/riscv32/main/toolchain_built_from_tar

And add its bin folder to $PATH

  1. Install prerequisites
sudo apt install -y git build-essential wget cpio unzip rsync bc libncurses5-dev screen bison file flex 

Hopefully I did not forget any...

  1. Build rootfs and linux with:
./riscv_em_rv32_mmu_linux.sh  

The result will be a merged (linux+rootfs) binary, inside the opensbi build folder:

output_mmu_rv32/opensbi/build/platform/generic/firmware/fw_payload.bin

linux_for_riscv_em's People

Contributors

franzflasch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.