DailySchedule
DailySchedule copied to clipboard
试图重现rcore下跑musl libc-test的环境配置流程
过程
1、下载 rCore
在一个自己喜欢的目录下
git clone https://github.com/rcore-os/rCore.git
2、 下载 libc-test
cd rCore
cd user
git clone git://repo.or.cz/libc-test
3、配置 编译 libc-test的环境
安装 musl
apt-get install musl-tools musl-dev -y
4、 进入 libc-test 并编译
[参考自README]
cd libc-test
make
5、 验证编译结果
[参考自 #1 ] 验证多少个编译没有通过
make |grep FAIL|wc
rm src/*/*.err // 清理 运行 时 生成的结果文件
把附件
runtest.sh
拷贝到 libc-test目录下
下载文件为.txt (github上传的限制)、改为 .sh
[注]:runtest.sh 由llx小组书写、内容为运行测试用例命令、代替了make 的一部分作用、由自带的makefile中摘出、
6、把libc-test打包进入文件镜像
需要 在user目录下的 make file 里添加 一项
# makefile 里 添加内容
libc-test:
@echo Building libc-test
@mkdir -p $(out_dir)/libc-test
cp -r libc-test $(out_dir)
在makefile 里找到 build: pre alpine rust ucore biscuit ... 后缀 一项 libc-test
build: pre alpine rust ucore biscuit app busybox nginx redis iperf3 test musl-gcc make localtime musl-rust libc-test
7、 制作镜像
在 user 目录下
make sfsimg arch=x86_64
这步第一次 要下在好多软件、也很慢、超级慢、需要使用别的手段、目前还没研究
8、 去到kernel目录下 运行
cd ..
cd kernel
make run ARCH=x86_64
等待启动好了 qemu 里
cd libc-test
sh runtest.sh
查看结果、因该是 libc-test 运行正确 、检测出rcore的syscall的bug、体现在libc-test、具体文件的报错.