Skip to content

gktrk/marss-riscv-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

32-bit and 64-bit RISC-V Linux Disk Images and Bootloaders to be used with MARSS-RISCV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published