当前位置:网站首页>RISCV64
RISCV64
2022-07-07 16:49:00 【InfoQ】
安装 Linux Lab
# 使用普通用户下载 Cloud Lab,然后再选择 linux-lab 仓库:
git clone https://gitee.com/tinylab/cloud-lab.git
cd cloud-lab/
# 启动 Linux Lab 并根据控制台上打印的用户名和密码登录实验环境
tools/docker/run linux-lab安装 qemu-system-riscv64
export QEMU_VERSION=5.0.0
wget https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz
tar xvJf qemu-${QEMU_VERSION}.tar.xz
cd qemu-${QEMU_VERSION}
./configure --target-list=riscv64-softmmu --prefix=/opt/qemu
make -j $(nproc)
sudo make installsudo apt-get install libglib2.0-devsudo apt-get install libpixman-1-dev下载最新的 Linux 源码
wget -c https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.18.9.tar.gz
tar xvf linux-5.18.9.tar.gz
cd linux-5.18.9
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j $(nproc)下载最新的 BusyBox
wget -c https://www.busybox.net/downloads/busybox-1.35.0.tar.bz2
tar xvf busybox-1.35.0.tar.bz2
cd busybox-1.35.0
cd busybox
CROSS_COMPILE=riscv64-linux-gnu- make defconfig
CROSS_COMPILE=riscv64-linux-gnu- make -j $(nproc)
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- install制作 rootfs
cd _install
mkdir proc sys dev etc etc/init.d
ls
# bin dev etc linuxrc proc sbin sys usr
sudo mknod dev/console c 5 1
sudo mknod dev/ram b 1 0
cat etc/init.d/rcSetc/init.d/rcS#!bin/sh
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/mdev -schmod +x etc/init.d/rcS
find -print0 | cpio -0oH newc | gzip -9 > ../rootfs.img运行
/opt/qemu/bin/qemu-system-riscv64 \
-nographic -machine virt \
-kernel linux-5.18.9/arch/riscv/boot/Image \
-initrd busybox-1.35.0/rootfs.img \
-bios fw_jump.elf \
-append "root=/dev/ram rdinit=/sbin/init"
uname
参考
边栏推荐
- Wireshark分析抓包数据*.cap
- What are the financial products in 2022? What are suitable for beginners?
- Will domestic software testing be biased
- 【软件测试】从企业版BOSS直聘,看求职简历,你没被面上是有原因的
- nest. Database for getting started with JS
- A few simple steps to teach you how to see the K-line diagram
- Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
- 【Unity Shader】插入Pass实现模型遮挡X光透视效果
- PIP related commands
- Nat address translation
猜你喜欢

Tsinghua, Cambridge and UIC jointly launched the first Chinese fact verification data set: evidence-based, covering many fields such as medical society

单臂路由和三层交换的简单配置

Redis
![[paper sharing] where's crypto?](/img/27/9b47bfcdff8307e63f2699d6a4e1b4.png)
[paper sharing] where's crypto?

Download, installation and development environment construction of "harmonyos" deveco

Nunjuks template engine

Yearning-SQL审核平台

【软件测试】从企业版BOSS直聘,看求职简历,你没被面上是有原因的

用存储过程、定时器、触发器来解决数据分析问题

Some key points in the analysis of spot Silver
随机推荐
[principle and technology of network attack and Defense] Chapter 1: Introduction
Learn to make dynamic line chart in 3 minutes!
Discuss | what preparations should be made before ar application is launched?
PIP related commands
强化学习-学习笔记8 | Q-learning
Classification of regression tests
Idea completely uninstalls installation and configuration notes
debian10系统问题总结
go语言的字符串类型、常量类型和容器类型
Tips of the week 136: unordered containers
idea彻底卸载安装及配置笔记
[论文分享] Where’s Crypto?
Using stored procedures, timers, triggers to solve data analysis problems
【C语言】字符串函数
Industry case | digital operation base helps the transformation of life insurance industry
Redis
五种网络IO模型
[sword finger offer] 59 - I. maximum value of sliding window
[principles and technologies of network attack and Defense] Chapter 5: denial of service attack
回归问题的评价指标和重要知识点总结