当前位置:网站首页>RISCV64
RISCV64
2022-07-07 18:55:00 【InfoQ】
install Linux Lab
# Use ordinary users to download Cloud Lab, Then choose linux-lab Warehouse :
git clone https://gitee.com/tinylab/cloud-lab.git
cd cloud-lab/
# start-up Linux Lab And log in to the experimental environment according to the user name and password printed on the console
tools/docker/run linux-lab
install 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
Download the latest Linux Source code
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)
Download the latest 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
Make 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
function
/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

Reference resources
边栏推荐
- [unity shader] insert pass to realize the X-ray perspective effect of model occlusion
- ip netns 命令(备忘)
- [demo] circular queue and conditional lock realize the communication between goroutines
- Do you really understand sticky bag and half bag? 3 minutes to understand it
- RIP和OSPF的区别和配置命令
- 伺服力矩控制模式下的力矩目标值(fTorque)计算
- DeSci:去中心化科学是Web3.0的新趋势?
- Summary of debian10 system problems
- 【C语言】字符串函数
- Kubernetes DevOps CD工具对比选型
猜你喜欢
Skills of embedded C language program debugging and macro use
DataSimba推出微信小程序,DataNuza接受全场景考验? | StartDT Hackathon
Some key points in the analysis of spot Silver
Discuss | frankly, why is it difficult to implement industrial AR applications?
Will low code help enterprises' digital transformation make programmers unemployed?
debian10编译安装mysql
现货白银分析中的一些要点
Differences between rip and OSPF and configuration commands
Simple configuration of single arm routing and layer 3 switching
【塔望方法论】塔望3W消费战略 - U&A研究法
随机推荐
『HarmonyOS』DevEco的下载安装与开发环境搭建
强化学习-学习笔记8 | Q-learning
Comparison and selection of kubernetes Devops CD Tools
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
【剑指 Offer】59 - I. 滑动窗口的最大值
2022年推荐免费在线接收短信平台(国内、国外)
Calculation of torque target value (ftorque) in servo torque control mode
Usage of PHP interview questions foreach ($arr as $value) and foreach ($arr as $value)
Year SQL audit platform
通过 Play Integrity API 的 nonce 字段提高应用安全性
Performance test process and plan
学习open62541 --- [67] 添加自定义Enum并显示名字
低代码助力企业数字化转型会让程序员失业?
你真的理解粘包与半包吗?3分钟搞懂它
小试牛刀之NunJucks模板引擎
Debian10 compile and install MySQL
Learn open62541 -- [67] add custom enum and display name
线程池和单例模式以及文件操作
Nunjuks template engine
Charles+drony的APP抓包