Skip to content

Commit 0e4c9ff

Browse files
committed
cleanup
1 parent 810e33c commit 0e4c9ff

File tree

13 files changed

+23
-836
lines changed

13 files changed

+23
-836
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ concurrency:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
arch: [riscv64, loongarch64]
13+
include:
14+
- arch: riscv64
15+
target: riscv64gc-unknown-none-elf
16+
- arch: loongarch64
17+
target: loongarch64-unknown-none-softfloat
1018
steps:
1119
- name: Checkout repository
1220
uses: actions/checkout@v4
@@ -20,75 +28,11 @@ jobs:
2028
- run: cargo install cargo-binutils
2129
- uses: arceos-org/setup-musl@v1
2230
with:
23-
arch: riscv64
24-
- uses: arceos-org/setup-musl@v1
25-
with:
26-
arch: loongarch64
31+
arch: ${{ matrix.arch }}
2732

2833
- name: Clippy
2934
run: |
30-
cargo clippy --target riscv64gc-unknown-none-elf -F qemu -- -D warnings
31-
cargo clippy --target loongarch64-unknown-none-softfloat -F qemu -- -D warnings
35+
cargo clippy --target ${{ matrix.target }} -F qemu -- -D warnings
3236
3337
- name: Build
34-
run: make all
35-
36-
sync:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Checkout source repository
40-
uses: actions/checkout@v4
41-
with:
42-
path: source
43-
submodules: recursive
44-
fetch-depth: 2
45-
46-
- uses: dtolnay/rust-toolchain@master
47-
with:
48-
toolchain: nightly-2025-01-18
49-
components: rust-src, llvm-tools
50-
targets: riscv64gc-unknown-none-elf, loongarch64-unknown-none-softfloat
51-
52-
- uses: Swatinem/rust-cache@v2
53-
with:
54-
cache-targets: false
55-
56-
- name: Prepare dependencies
57-
env:
58-
RUSTUP_TOOLCHAIN: nightly-2025-05-20 # prevent toolchain update
59-
run: |
60-
cd source
61-
cargo install cargo-vendor-filterer
62-
cargo vendor-filterer > cargo_config.toml
63-
64-
- name: Push to oscomp repo
65-
run: |
66-
git clone "${{ secrets.OSCOMP_REPO }}" oscomp
67-
cd oscomp
68-
69-
git config user.name ${{ secrets.OSCOMP_USER_NAME }}
70-
git config user.email ${{ secrets.OSCOMP_USER_EMAIL }}
71-
72-
if git rev-parse --verify origin/${{ github.ref_name }}; then
73-
git checkout ${{ github.ref_name }}
74-
else
75-
export SOURCE_PARENT=$(git -C ../source rev-parse HEAD^)
76-
export OSCOMP_PARENT=$(git log --pretty='%H' --grep "${SOURCE_PARENT}")
77-
if [ -z "$OSCOMP_PARENT" ]; then
78-
echo "No previous commit found for source parent $SOURCE_PARENT"
79-
exit 1
80-
fi
81-
if [ "$(echo "$OSCOMP_PARENT" | wc -l)" -gt 1 ]; then
82-
echo "Multiple commits found for source parent $SOURCE_PARENT"
83-
echo "$OSCOMP_PARENT"
84-
exit 1
85-
fi
86-
git checkout $OSCOMP_PARENT
87-
git checkout -b ${{ github.ref_name }}
88-
fi
89-
90-
rsync -a --exclude='.git' --delete ../source/ ./
91-
92-
git add -A
93-
git commit -m ${{ github.ref_name }}.${{ github.sha }}
94-
git push --set-upstream origin ${{ github.ref_name }}
38+
run: make ARCH=${{ matrix.arch }} build

Makefile

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export MEMTRACK := n
88
export BLK := y
99
export NET := y
1010
export MEM := 1G
11-
export TEST := pre
11+
export ICOUNT := n
1212

1313
# Generated Options
1414
export A := $(PWD)
@@ -20,38 +20,14 @@ ifeq ($(MEMTRACK), y)
2020
APP_FEATURES += starry-api/memtrack
2121
endif
2222

23-
export ICOUNT := n
24-
2523
DIR := $(shell basename $(PWD))
24+
IMG = rootfs-$(ARCH).img
2625

27-
all:
28-
@if [ -f cargo_config.toml ]; then \
29-
mkdir -p .cargo; \
30-
cp cargo_config.toml .cargo/config.toml; \
31-
fi
32-
RUSTUP_TOOLCHAIN=nightly-2025-05-20 \
33-
CARGO_PROFILE_RELEASE_LTO=true \
34-
CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 \
35-
$(MAKE) oscomp LOG=off BACKTRACE=n
36-
37-
oscomp:
38-
$(MAKE) ARCH=riscv64 BUS=mmio build
39-
cp $(DIR)_riscv64-qemu-virt.bin kernel-rv
40-
$(MAKE) ARCH=loongarch64 build
41-
cp $(DIR)_loongarch64-qemu-virt.elf kernel-la
42-
43-
IMG :=
44-
ifeq ($(ARCH), riscv64)
45-
IMG := sdcard-rv-$(TEST).img
46-
else ifeq ($(ARCH), loongarch64)
47-
IMG := sdcard-la-$(TEST).img
48-
endif
26+
defconfig:
27+
@make -C arceos $@
4928

50-
run: defconfig
51-
@if [ -f "$(IMG)" ]; then \
52-
cp $(IMG) arceos/disk.img; \
53-
fi
54-
@make -C arceos run
29+
build run justrun debug disasm: defconfig
30+
@make -C arceos $@
5531

5632
# Aliases
5733
rv:
@@ -60,19 +36,10 @@ rv:
6036
la:
6137
$(MAKE) ARCH=loongarch64 run
6238

63-
alpine:
64-
$(MAKE) TEST=alpine rv
65-
6639
vf2:
6740
$(MAKE) ARCH=riscv64 APP_FEATURES=vf2 MYPLAT=axplat-riscv64-visionfive2 BUS=dummy build
6841

6942
2k1000la:
7043
$(MAKE) ARCH=loongarch64 APP_FEATURES=2k1000la MYPLAT=axplat-loongarch64-2k1000la BUS=dummy build
7144

72-
build justrun debug disasm: defconfig
73-
@make -C arceos $@
74-
75-
defconfig:
76-
@make -C arceos $@
77-
78-
.PHONY: all build run justrun debug disasm clean
45+
.PHONY: build run justrun debug disasm clean

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
2-
# Starry Mix
3-
4-
基于 [starry-next](https://github.com/oscomp/starry-next)[arceos](https://github.com/oscomp/arceos) 的操作系统。
5-
6-
[初赛比赛文档](./初赛文档.pdf)
7-
8-
进展汇报幻灯片: https://cloud.tsinghua.edu.cn/f/924d8221719a49618ea0/
9-
10-
比赛演示视频: https://cloud.tsinghua.edu.cn/f/e96b194f650d4101a15b/
1+
# Starry OS

arceos

build.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ use alloc::{borrow::ToOwned, format, vec::Vec};
1313
use axfs_ng::FS_CONTEXT;
1414

1515
mod entry;
16-
mod test;
16+
17+
pub const CMDLINE: &[&str] = &["/bin/busybox", "sh", "--login"];
1718

1819
#[unsafe(no_mangle)]
1920
fn main() {
2021
starry_api::init();
2122

22-
let args = test::CMDLINE
23+
let args = CMDLINE
2324
.iter()
2425
.copied()
2526
.map(str::to_owned)

src/test/final.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/test/mod.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/test/on-site.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)