当前位置:网站首页>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
参考
边栏推荐
- 2022年推荐免费在线接收短信平台(国内、国外)
- Yearning-SQL审核平台
- [principle and technology of network attack and Defense] Chapter 6: Trojan horse
- How to open an account for wealth securities? Is it safe to open a stock account through the link
- pip相关命令
- 清华、剑桥、UIC联合推出首个中文事实核查数据集:基于证据、涵盖医疗社会等多个领域
- [C language] string function
- [论文分享] Where’s Crypto?
- Unlike the relatively short-lived industrial chain of consumer Internet, the industrial chain of industrial Internet is quite long
- debian10系统问题总结
猜你喜欢

Discuss | what preparations should be made before ar application is launched?

Reinforcement learning - learning notes 8 | Q-learning

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

Skills of embedded C language program debugging and macro use

强化学习-学习笔记8 | Q-learning
![学习open62541 --- [67] 添加自定义Enum并显示名字](/img/98/e5e25af90b3f98c2be11d7d21e5ea6.png)
学习open62541 --- [67] 添加自定义Enum并显示名字

线程池和单例模式以及文件操作

Improve application security through nonce field of play integrity API

The performance and efficiency of the model that can do three segmentation tasks at the same time is better than maskformer! Meta & UIUC proposes a general segmentation model with better performance t

Will low code help enterprises' digital transformation make programmers unemployed?
随机推荐
CVPR 2022 - learning non target knowledge for semantic segmentation of small samples
现在网上期货开户安全吗?国内有多少家正规的期货公司?
【Unity Shader】插入Pass实现模型遮挡X光透视效果
Learn to make dynamic line chart in 3 minutes!
回归问题的评价指标和重要知识点总结
2022年理财有哪些产品?哪些适合新手?
[principle and technology of network attack and Defense] Chapter 7: password attack technology Chapter 8: network monitoring technology
Performance test process and plan
线程池的拒绝策略
[sword finger offer] 59 - I. maximum value of sliding window
伺服力矩控制模式下的力矩目标值(fTorque)计算
Nat address translation
企业展厅设计中常用的三种多媒体技术形式
What is the general yield of financial products in 2022?
Kirk borne's selection of learning resources this week [click the title to download directly]
Tsinghua, Cambridge and UIC jointly launched the first Chinese fact verification data set: evidence-based, covering many fields such as medical society
[论文分享] Where’s Crypto?
能同时做三个分割任务的模型,性能和效率优于MaskFormer!Meta&UIUC提出通用分割模型,性能优于任务特定模型!开源!...
【C语言】字符串函数
Some key points in the analysis of spot Silver