Skip to content

2X-ercha/blogOS-armV8

Repository files navigation

blogOS armV8

star, 求star, 求star!这么一个造福同届和学弟学妹的实验记录仓库和较为完整的实验指导书怎么没人star呢?

前言

这个仓库是用于记录操作系统课程的实验。这里不得不吐槽一下课程,把blogos移植估计是湖大老师自己的操作。虽然说湖大开始用自己的东西是应该夸赞的,但是作为被试点的20级智能专业的学生是很不舒服的。起码需要的是个完备的实验指导书(我做这个实验的时候指导书还是缺了好多,以及细节部分的错误,还有版本不对应等等。

另外说的是这实验的前半部分也几乎照抄某个版本的leos。许多代码看起来像是多个文件整合在了一起,,当然后面就有所不同了。

如果这个仓库帮助到了你,可以留下一个star。感谢支持!


实验指导书(官方)

https://os2022exps-doc.readthedocs.io/zh_CN/latest/index.html


分支说明


实验环境

具体可看: lab1 part1 环境安装

rust版本及相关工具

cargo install cargo-binutils rustfilt
rustup install nightly-2021-11-20
rustup default nightly-2021-11-20

安装arm v8支持

rustup target add aarch64-unknown-none-softfloat

安装qemu模拟器

sudo apt-get install qemu qemu-system-aarch64

安装交叉编译工具链

wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz
tar -xf gcc-arm-10*
sudo cp gcc-arm-10*/bin/* /usr/local/bin/
rm -rf gcc-arm-10*

实验构建及运行

cargo build
qemu-system-aarch64 -machine virt,gic-version=2 -cpu cortex-a57 -nographic -kernel target/aarch64-unknown-none-softfloat/debug/blogos_armv8 -semihosting

如果你要进行gdb调试,可以在运行指令最后加上-S -s,默认端口为1234

然后新建终端后启动调试客户端,远程连接qemu进行调试

aarch64-none-elf-gdb target/aarch64-unknown-none-softfloat/debug/rui_armv8_os
(gdb) target remote localhost:1234