# riscv64linuxLearn **Repository Path**: llimite/riscv64linux-learn ## Basic Information - **Project Name**: riscv64linuxLearn - **Description**: No description available - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-16 - **Last Updated**: 2024-04-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # riscv64linuxLearn #### 介绍 riscv64的linux最小系统 #### 软件架构 qemu + linux kernel + busybox(as shell,and init) + lvglapp. 基于qemu-system-riscv64的virtio机器 #### 安装教程 1. 安装qemu. current v8.2.0 2. 安装linux(ubuntu22.04+)的虚拟机。wsl,virtualbox,qemu都可以 3. 下载linux kernel源码 4. 下载busybox源码 5. 下载lvgl源码(8.4.0) #### 使用说明 1. 在ubuntu中(VM),中安装riscv的交叉编译工具链(不用从源码构建)。 * binutils-riscv64-linux-gnu * gcc-riscv64-unknown-elf * gcc-riscv64-linux-gnu 2. 配置内核选项[驱动], 交叉编译器编译ricv64版本的linux. 配置文件在inux_config 3. 创建qemu的虚拟磁盘,在其内构建根文件系统。用来存放init,shell各种程序。进而构成操作系统(称其为R64L) 4. 为R64L编译应用程序Hello world(静态编译,因为R64L没用libc之类的动态库) 5. 拷贝引用Hello world程序到虚拟磁盘的文件系统,启动qemu。(shell 其实是可选的,但必须要有init程序) 6. 拷贝linux内核的显示模块到虚拟磁盘的文件系统,编译LVGLApp. #### 相关说明 drm是内核的显示子系统,libdrm是高级显示管理库。普通cpu绘制直接用/dev/fb0,写framebuffer。要使用宿主机的图形加速,要配置qemu的virtio gpu的加速支持。 virgl是基于mesa图形库的,mesa图形库是加速部分用的是需要libdrm。 evdev是内核的输入子系统. libevdev是对应的输入库。 #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)