当前位置:网站首页>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 install
sudo apt-get install libglib2.0-dev
sudo 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/rcS
etc/init.d/rcS
#!bin/sh
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/mdev -s
chmod +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
参考
边栏推荐
- 财富证券证券怎么开户?通过链接办理股票开户安全吗
- Skills of embedded C language program debugging and macro use
- More than 10000 units were offline within ten days of listing, and the strength of Auchan Z6 products was highly praised
- 讨论 | AR 应用落地前,要做好哪些准备?
- SQLite SQL exception near "with": syntax error
- [paddleseg source code reading] add boundary IOU calculation in paddleseg validation (1) -- val.py file details tips
- Hash, bitmap and bloom filter for mass data De duplication
- 单臂路由和三层交换的简单配置
- [network attack and defense principle and technology] Chapter 4: network scanning technology
- 行业案例|数字化经营底座助力寿险行业转型
猜你喜欢
Debian10 compile and install MySQL
Tsinghua, Cambridge and UIC jointly launched the first Chinese fact verification data set: evidence-based, covering many fields such as medical society
A few simple steps to teach you how to see the K-line diagram
[unity shader] insert pass to realize the X-ray perspective effect of model occlusion
[trusted computing] Lesson 12: TPM authorization and conversation
Save the memory of the model! Meta & UC Berkeley proposed memvit. The modeling time support is 30 times longer than the existing model, and the calculation amount is only increased by 4.5%
Kubernetes DevOps CD工具对比选型
[PaddleSeg源码阅读] PaddleSeg Validation 中添加 Boundary IoU的计算(1)——val.py文件细节提示
性能测试过程和计划
Tear the Nacos source code by hand (tear the client source code first)
随机推荐
【Unity Shader】插入Pass实现模型遮挡X光透视效果
Tsinghua, Cambridge and UIC jointly launched the first Chinese fact verification data set: evidence-based, covering many fields such as medical society
Five network IO models
Debian10 compile and install MySQL
【塔望方法论】塔望3W消费战略 - U&A研究法
Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
CVPR 2022 - learning non target knowledge for semantic segmentation of small samples
[tpm2.0 principle and Application guide] Chapter 5, 7 and 8
Static routing configuration
【软件测试】从企业版BOSS直聘,看求职简历,你没被面上是有原因的
[principle and technology of network attack and Defense] Chapter 1: Introduction
海量数据去重的hash,bitmap与布隆过滤器Bloom Filter
Year SQL audit platform
上市十天就下线过万台,欧尚Z6产品实力备受点赞
2022年推荐免费在线接收短信平台(国内、国外)
NAT地址转换
Calculation of torque target value (ftorque) in servo torque control mode
How to clean when win11 C disk is full? Win11 method of cleaning C disk
nest.js入门之 database
Disk storage chain B-tree and b+ tree