Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ArceOS new config system #5

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -148,12 +148,19 @@ jobs:
- name: Build c/redis for x86_64-pc-oslab
run: make PLATFORM=x86_64-pc-oslab A=c/redis FEATURES=driver-ixgbe,driver-ramdisk SMP=4

- run: make PLATFORM=aarch64-raspi4 defconfig
- name: Build rust/helloworld for aarch64-raspi4
run: make PLATFORM=aarch64-raspi4 A=rust/helloworld
run: make PLATFORM=aarch64-raspi4 SMP=4 A=rust/helloworld
- name: Build rust/fs/shell for aarch64-raspi4
run: make PLATFORM=aarch64-raspi4 A=rust/fs/shell FEATURES=driver-bcm2835-sdhci
run: make PLATFORM=aarch64-raspi4 SMP=4 A=rust/fs/shell FEATURES=driver-bcm2835-sdhci BUS=mmio

- run: make PLATFORM=aarch64-bsta1000b defconfig
- name: Build rust/helloworld for aarch64-bsta1000b
run: make PLATFORM=aarch64-bsta1000b A=rust/helloworld
run: make PLATFORM=aarch64-bsta1000b SMP=8 A=rust/helloworld

- run: make PLATFORM=aarch64-phytium-pi defconfig
- name: Build rust/helloworld for aarch64-phytium-pi
run: make PLATFORM=aarch64-phytium-pi SMP=4 A=rust/helloworld

build-for-std:
runs-on: ${{ matrix.os }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@
/.vscode
/.arceos
/.cargo
/.axconfig.*
/.axroot
.DS_Store
Cargo.lock
*.o
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
A ?= rust/helloworld
AX_ROOT ?= $(PWD)/.arceos
AX_ROOT ?= $(shell cat .axroot 2>/dev/null)

APP := $(A)
ifeq ($(filter /%,$(A)),)
@@ -8,12 +8,14 @@ ifeq ($(filter /%,$(A)),)
endif
endif

$(if $(V), $(info AX_ROOT: "$(AX_ROOT)"))

all: build

ax_root:
chaxroot:
@./scripts/set_ax_root.sh $(AX_ROOT)

build run justrun debug disasm disk_img clean clean_c: ax_root
defconfig oldconfig build run justrun debug disasm disk_img clean clean_c:
@make -C $(AX_ROOT) A=$(APP) $@

test:
@@ -23,4 +25,4 @@ else
@./scripts/app_test.sh
endif

.PHONY: all ax_root build run justrun debug disasm disk_img clean clean_c test
.PHONY: all chaxroot defconfig oldconfig build run justrun debug disasm disk_img clean clean_c test
3 changes: 0 additions & 3 deletions scripts/get_deps.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,4 @@ AX_ROOT=.arceos
test ! -d "$AX_ROOT" && echo "Cloning repositories ..." || true
test ! -d "$AX_ROOT" && git clone https://github.com/arceos-org/arceos "$AX_ROOT" --depth=1 || true

echo "Copying Cargo.lock ..."
cp "$AX_ROOT/Cargo.lock" Cargo.lock

$(dirname $0)/set_ax_root.sh $AX_ROOT
3 changes: 3 additions & 0 deletions scripts/set_ax_root.sh
Original file line number Diff line number Diff line change
@@ -11,3 +11,6 @@ mkdir -p .cargo
sed -e "s|%AX_ROOT%|$AX_ROOT|g" scripts/config.toml.temp > .cargo/config.toml

echo "Set AX_ROOT (ArceOS directory) to $AX_ROOT"

cp "$AX_ROOT/Cargo.lock" Cargo.lock
echo "$1" > .axroot