当前位置:网站首页>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
参考
边栏推荐
- Nat address translation
- String type, constant type and container type of go language
- SQLite SQL exception near "with": syntax error
- Calculation of torque target value (ftorque) in servo torque control mode
- golang 客户端服务端登录
- pip相关命令
- [principle and technology of network attack and Defense] Chapter 6: Trojan horse
- socket編程之常用api介紹與socket、select、poll、epoll高並發服務器模型代碼實現
- Five network IO models
- 你真的理解粘包与半包吗?3分钟搞懂它
猜你喜欢

嵌入式C语言程序调试和宏使用的技巧

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%

手撕Nacos源码(先撕客户端源码)

Reinforcement learning - learning notes 8 | Q-learning

卖空、加印、保库存,东方甄选居然一个月在抖音卖了266万单书

Tear the Nacos source code by hand (tear the client source code first)

CVPR 2022 - learning non target knowledge for semantic segmentation of small samples

Will low code help enterprises' digital transformation make programmers unemployed?

海量数据去重的hash,bitmap与布隆过滤器Bloom Filter

行业案例|数字化经营底座助力寿险行业转型
随机推荐
The highest level of anonymity in C language
行业案例|数字化经营底座助力寿险行业转型
[trusted computing] Lesson 10: TPM password resource management (II)
CVPR 2022丨学习用于小样本语义分割的非目标知识
NAT地址转换
Kirk Borne的本周学习资源精选【点击标题直接下载】
Static routing configuration
元宇宙带来的创意性改变
Introduction de l'API commune de programmation de socket et mise en œuvre de socket, select, Poll et epoll
Thread pool and singleton mode and file operation
[demo] circular queue and conditional lock realize the communication between goroutines
Calculation of torque target value (ftorque) in servo torque control mode
Win11C盘满了怎么清理?Win11清理C盘的方法
Yearning-SQL审核平台
Wireshark analyzes packet capture data * cap
What are the financial products in 2022? What are suitable for beginners?
AI defeated mankind and designed a better economic mechanism
Tips of the week 136: unordered containers
The report of the state of world food security and nutrition was released: the number of hungry people in the world increased to 828million in 2021
Classification of regression tests