GithubHelp home page GithubHelp logo

marss-riscv-images's Introduction

MARSS-RISCV Disk Images

This repository contains 32-bit and 64-bit RISC-V Linux disk images and bootloaders to be used with MARSS-RISCV.

Prerequisites

How to use?

Each directory represents a specific configuration and contains a userland disk image, bootloader, kernel and riscvemu config file. The disk images are compressed with xz for storage efficiency. The file PACKAGES lists the packages present in the image.

Follow the instructions below after cloning the repository to get started:

  • cd into the target directory
    $ cd riscv32-unknown-linux-gnu
    
  • Decompress the image using xz
    $ xz -d -k -T 0 riscv32.img.xz
    
  • Run MARSS-RISCV using the provided config file
    $ marss-riscv riscvemu.cfg
    

Note that the file system on the disk image has almost no space. To grow the file system follow the steps below:

  • Grow the image file to the desired size (1GB in this example):
    $ truncate --size 1G riscv32.img
    
  • Attach the disk image to a loopback device
    # losetup /dev/loop0 riscv32.img
    
  • Run fsck before growing the file system
    # e2fsck -f /dev/loop0
    
  • Grow the file system to its maximum size
    # resize2fs /dev/loop0
    
  • Run fsck post resize
    # e2fsck -f /dev/loop0
    
  • Detach the loopback device
    # losetup -d /dev/loop0
    

MARSS-RISCV does not propagate file changes to the disk image by default and discards them upon shutdown. For persistency, pass -rw to marss-riscv on the command line.

Available Configurations

riscv32-unknown-linux-gnu

A 32 bit Gentoo linux image cross-compiled using crossdev. Has a complete toolchain. Everything is compiled with the following flags:

CFLAGS="-O2 -pipe -fomit-frame-pointer -g -march=rv32g -mabi=ilp32d"
CXXLAGS="-O2 -pipe -fomit-frame-pointer -g"

Currently, gdb isn't functioning properly.

marss-riscv-images's People

Contributors

gkothar1 avatar gktrk avatar psarnai1 avatar

Watchers

 avatar

marss-riscv-images's Issues

Decompression fails

I tried following the readme on my system (Ubuntu 18.04 with XZ Utils 5.2.2) and got stuck on the decompression step. This is the error I get:

$ xz -d -k -T 0 riscv32.img.xz
xz: riscv32.img.xz: File format not recognized

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.