Port-RISCV archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xv6-riscv on NetBSD

Today I tried xv6-riscv work with qemu, and found that it is very easy
on NetBSD.

  0. git, gmake needed

      sudo pkg_add git-base
      sudo pkg_add gmake

  1. install qemu

      sudo pkg_add qemu

  2. build tools for riscv from NetBSD source tree

      cvs -d ':pserver:anoncvs%anoncvs.netbsd.org@localhost:/cvsroot' co -P src

      cd src
      sudo sh ./build.sh -m riscv -O /var/tmp/obj-tools \
                                          -T /usr/local/nbtools -u tools

  3. check out xv6-riscv

      git clone --depth=1 https://github.com/mit-pdos/xv6-riscv
     (GIT_SSL_NO_VERIFY=1 git clone ...)

  4. compile it and run

      cd xv6-riscv
      gmake TOOLPREFIX=/usr/local/nbtools/riscv64--netbsd/bin/ \
                      CC=/usr/local/nbtools/bin/riscv64--netbsd-gcc qemu

  5. quit qemu-system-riscv64

      Ctrl-a x

It works. greate.


Home | Main Index | Thread Index | Old Index