jacky

A technique blog for jacky

here are my artitles about work(embeded system develop, docker, etc.) and life(cook, hiking)


6.s081 Run xv6 riscv by qemu on ubuntu20.04

please refer offical site first

build&install toolchain

git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain/
./configure --prefix=/usr/local/opt/riscv-gnu-toolchain
make
sudo make install

build&install QEMU

wget https://download.qemu.org/qemu-5.1.0.tar.xz
cd qemu-5.1.0/
./configure --target-list=riscv64-softmmu
make
sudo make install

build&install riscv

git clone git://github.com/mit-pdos/xv6-riscv-fall19.git
cd xv6-riscv-fall19/
make

run xv6 on QEMU

cd xv6-riscv-fall19/
make qemu
qemu-system-riscv64 -machine virt -bios none -kernel kernel/kernel -m 128M -smp 1 -nographic -drive file=fs.img,if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0
xv6 kernel is booting

virtio disk init 0
init: starting sh
$ 

congratulations!

更早的文章

Android studio gradle connection refused

android studio compile errors查看详细的日志信息C:\Users\jacky\AppData\Local\Google\AndroidStudio4.2\logbug0: gradle connection refused这个问题困扰我很久了,最近在维护一个安卓app,经常改着改着就sync失败了,查看原因就是connection refused, 虽然明知道是网络问题,但明明setting-proxy没有问题,所以耽误了许多时间。今天在知乎上找到了答案,直接修...…

继续阅读