Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhandzpx committed Jun 2, 2024
1 parent 15afeda commit 62288f1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ RAMDISK := sdcard

# Makefile for build oscomp testsuits on LoongArch platform

all: prepare busybox libc-bench lmbench unixbench interrupts-test libc-test lua netperf iperf rt-tests time-test true copy-file-range-test
# all: prepare busybox libc-bench lmbench unixbench interrupts-test libc-test lua netperf iperf rt-tests time-test true copy-file-range-test
all: prepare busybox libc-bench lmbench unixbench interrupts-test lua netperf iperf rt-tests time-test true copy-file-range-test

prepare:
mkdir -p $(RAMDISK)
Expand Down Expand Up @@ -79,7 +80,8 @@ iperf: .PHONY
cp scripts/iperf/iperf_testcode.sh $(RAMDISK)/

rt-tests: .PHONY
make -C rt-tests CC="$(MUSL_CROSS_COMPILER_GCC) -static" cyclictest hackbench
# make -C rt-tests CC="$(MUSL_CROSS_COMPILER_GCC) -static" cyclictest hackbench
make -C rt-tests CC="$(GNU_CROSS_COMPILER_GCC) -static" cyclictest hackbench
cp rt-tests/cyclictest rt-tests/hackbench $(RAMDISK)/
cp scripts/cyclictest/cyclictest_testcode.sh $(RAMDISK)/

Expand Down
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# TestSuits for OS Kernel 2024 On LoongArch64 Platform
# TestSuits for OS Kernel 2024 On LoongArch64 Platform (Final 2024)

## 简介

本仓库的测试集合主要是为全国大学生操作系统比赛,龙芯赛道提供比赛测试样例。
关于具体比赛访问 https://github.com/oscomp

StarryOS,一个基于ArceOS实现的宏内核,我们将其移植到LA64,次测试样例用于
测试StarryOS的功能,旨在更加完善系统功能。


## 测试样例(待定,后续继续补充)

- busybox
Expand All @@ -30,26 +26,20 @@ time-test 为测试Kernel的time函数是否准确,其结果只作为专家评
在libc-test样例中,包含动态链接的样例程序entry-dynamic.exe。此执行文件的动态链接解释器为/lib/ld-musl-loongarch64-sf.so.1,此文件为libc.so的动态链接。
由于Fat32文件系统不支持动态链接功能,因此比赛时各队伍请将/lib/ld-musl-loongarch64-sf.so.1当作/libc.so处理。

## 构建测试用例

## 用法

```shell
# 编译测试样例
make all
### 获取编译工具链

# 拷贝sdcard
cp -r sdcard StarryOS-LoongArch/testcases/
[该仓库](https://github.com/LoongsonLab/oscomp-toolchains-for-oskernel)中下载对应的工具链,具体链接为https://github.com/LoongsonLab/oscomp-toolchains-for-oskernel/releases/download/gcc-13.2.0-loongarch64/gcc-13.2.0-loongarch64-linux-gnu.tgz

# 构建镜像
cd StarryOS-LoongArch && ./build_img.sh sdcard

# 启动QEMU,运行内核
make run
### 常规决赛测试用例

```shell
# 编译测试样例,所有测试用例将会出现在sdcard/目录,将该目录拷贝至参赛OS的文件系统中即可
make all
```


## Linux Test Protect 编译
### Linux Test Protect 编译
LTP(Linux Test Project)是由SGI,OSDL和Bull发起的联合项目,由IBM,红帽,甲骨文等公司开发和维护。
该项目的目标是向开源社区提供测试,以验证Linux的可靠性,健壮性和稳定性。

Expand All @@ -60,6 +50,7 @@ LTP测试套件包含一系列用于测试Linux内核和相关功能的工具。
```shell

cd linux-test-project
# --prefix设置为你自己的构建路径
./configure --prefix=/home/airxs/user/os/gitlab/github/linux-test-project/local/ltp \
AR=loongarch64-linux-gnu-ar RANLIB=loongarch64-linux-gnu-ranlib --host=loongarch64-linux-gnu \
--target=loongarch64-linux-gnu CFLAGS=-static LDFLAGS=-static
Expand Down
2 changes: 1 addition & 1 deletion linux-test-project

0 comments on commit 62288f1

Please sign in to comment.