Skip to content

Commit 4a02cb6

Browse files
Merge pull request #27 from RusPiRo/maintenance/latest-nightly
update to compile with latest nightly
2 parents dc70a74 + 5960f58 commit 4a02cb6

File tree

12 files changed

+69
-106
lines changed

12 files changed

+69
-106
lines changed

.cargo/aarch64-ruspiro.json

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

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions-rs/toolchain@v1
2828
with:
2929
profile: minimal
30-
toolchain: nightly
30+
toolchain: nightly-2021-12-24
3131
override: true
3232
components: rust-src, llvm-tools-preview
3333
target: aarch64-unknown-none
@@ -44,7 +44,7 @@ jobs:
4444
cat Cargo.toml
4545
4646
- name: Compile
47-
run: cargo make pi3 --profile pipeline
47+
run: cargo make -t build --profile pipeline
4848

4949
publish_dry:
5050
name: Run Cargo Publish Dry-Run
@@ -62,7 +62,7 @@ jobs:
6262
uses: actions-rs/toolchain@v1
6363
with:
6464
profile: minimal
65-
toolchain: nightly
65+
toolchain: nightly-2021-12-24
6666
override: true
6767
components: rust-src, llvm-tools-preview
6868
target: aarch64-unknown-none
@@ -73,7 +73,7 @@ jobs:
7373
version: 'latest'
7474

7575
- name: Publish-Dry-Run
76-
run: cargo make publish_dry --profile pipeline
76+
run: cargo make -t publish_dry --profile pipeline
7777

7878
prepare_release:
7979
needs: [build, publish_dry]
@@ -152,7 +152,7 @@ jobs:
152152
uses: actions-rs/toolchain@v1
153153
with:
154154
profile: minimal
155-
toolchain: nightly
155+
toolchain: nightly-2021-12-24
156156
override: true
157157
components: rust-src, llvm-tools-preview
158158
target: aarch64-unknown-none
@@ -174,5 +174,7 @@ jobs:
174174
# and the README.md
175175
sed -i -e 's/||VERSION||/'$CRATE_VERSION'/g' README.md
176176
177-
- name: Publish-Dry-Run
178-
run: cargo make publish --env CRATES_TOKEN=${{ secrets.CRATES_TOKEN }} --profile pipeline
177+
- name: Publish
178+
env:
179+
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
180+
run: cargo make -t publish --profile pipeline

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Changelog
22

3-
## :dog: v0.5.3
3+
## :cat: v0.5.4
4+
5+
- ### :wrench: Maintenance
6+
7+
- update to compile with latest nightly and Rust edition 2021
8+
- minor clean ups in CI config and `Makefile`
9+
10+
- ### :bulb: Features
11+
12+
- place the default panic handler implementation behind a feature flag. This feature is enabled by default.
13+
14+
## :cat: v0.5.3
415

516
This release aims to fix the build issue on doc.rs while the crate is uploaded to crates.io
617

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "ruspiro-boot"
33
authors = ["André Borrmann <[email protected]>"]
4-
version = "0.5.3" # remember to update html_root_url
4+
version = "0.5.4" # remember to update html_root_url
55
description = """
66
Bare metal boot strapper code for the Raspberry Pi 3 to conviniently start a custom kernel within the Rust environment
77
without the need to deal with all the initial setup like stack pointers, switch to the appropriate exeption level and getting all cores kicked off for processing of code compiled from Rust.
@@ -12,7 +12,7 @@ documentation = "https://docs.rs/ruspiro-boot/||VERSION||"
1212
readme = "README.md"
1313
keywords = ["RusPiRo", "aarch64", "boot", "baremetal", "multicore"]
1414
categories = ["no-std", "embedded"]
15-
edition = "2018"
15+
edition = "2021"
1616
# define a linkage name to ensure this crate is ever beeing linked once into a final binary
1717
links = "ruspiro_boot"
1818
# compile the assembler parts before the rust compiler runs on this crate
@@ -29,18 +29,22 @@ cc = "~1.0"
2929

3030
[dependencies]
3131
log = { version = "~0.4.14", default-features = false }
32-
ruspiro-register = "~0.5.4"
32+
ruspiro-register = "~0.5.5"
3333
ruspiro-cache = "~0.4.1"
3434

3535
[features]
36+
default = ["panic"]
3637
# activate this feature to get multicore support
37-
multicore = [ ]
38+
multicore = []
39+
# activate this feature to provide a default panic handler
40+
panic = []
3841

3942
# ensure the required features of the crate are active for the doc.rs build
4043
[package.metadata.docs.rs]
4144
default-target = "aarch64-unknown-linux-gnu"
4245
features = [
43-
"multicore"
46+
"multicore",
47+
"panic"
4448
]
4549

4650
[patch.crates-io]

Makefile.toml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,28 @@ AR = "aarch64-linux-gnu-ar"
1313
CFLAGS = "-march=armv8-a -Wall -O3 -nostdlib -nostartfiles -ffreestanding -mtune=cortex-a53"
1414
RUSTFLAGS = "-C target-cpu=cortex-a53 -C target-feature=+strict-align,+a53,+fp-armv8,+neon -C link-arg=-T./link64.ld"
1515

16-
[tasks.build]
17-
command = "cargo"
18-
args = ["build", "--release", "--features", "${FEATURES}"]
19-
2016
[tasks.clippy]
21-
env = { FEATURES = "" }
17+
env = { FEATURES = "panic, multicore" }
2218
command = "cargo"
2319
args = ["clippy", "--features", "${FEATURES}"]
2420

2521
[tasks.doc]
26-
env = { FEATURES = "" }
22+
env = { FEATURES = "panic, multicore" }
2723
command = "cargo"
2824
args = ["doc", "--features", "${FEATURES}", "--open"]
2925

30-
[tasks.test]
31-
env = { FEATURES = "" }
26+
[tasks.singlecore]
27+
env = { FEATURES = "panic" }
3228
command = "cargo"
33-
args = ["test", "--features", "${FEATURES}"]
34-
35-
[tasks.pi3_singlecore]
36-
env = { FEATURES = "" }
37-
run_task = "build"
38-
dependencies = ["clean"]
29+
args = ["build", "--release", "--features", "${FEATURES}"]
3930

40-
[tasks.pi3_multicore]
41-
env = { FEATURES = "multicore" }
42-
run_task = "build"
43-
dependencies = ["clean"]
31+
[tasks.multicore]
32+
env = { FEATURES = "multicore, panic" }
33+
command = "cargo"
34+
args = ["build", "--release", "--features", "${FEATURES}"]
4435

45-
[tasks.pi3]
46-
dependencies = ["pi3_singlecore", "pi3_multicore"]
36+
[tasks.build]
37+
dependencies = ["singlecore", "multicore"]
4738

4839
[tasks.clean]
4940
command = "cargo"
@@ -55,6 +46,6 @@ command = "cargo"
5546
args = ["publish", "--dry-run", "--features", "${FEATURES}"]
5647

5748
[tasks.publish]
58-
env = { FEATURES = "" }
49+
env = { FEATURES = "panic, multicore" }
5950
command = "cargo"
6051
args = ["publish", "--token", "${CRATES_TOKEN}", "--allow-dirty", "--features", "${FEATURES}"]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ both architectures and the execution is tested on a Raspberry Pi 3 B+.
1919
Feature | Purpose
2020
-----------------|--------------------------
2121
`multicore` | Compiles the multi-core version of the crate, kicking off all 4 cores of the Raspberry Pi.
22+
`panic` | Enable the default panic handler. This feature is enabled by default.
2223

2324
## Usage
2425

aarch64-ruspiro.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@
1919
"target-family": "unix",
2020
"target-mcount": "\u0001_mcount",
2121
"target-pointer-width": "64",
22-
"unsupported-abis": [
23-
"stdcall",
24-
"fastcall",
25-
"vectorcall",
26-
"thiscall",
27-
"win64",
28-
"sysv64"
29-
],
3022
"vendor": "unknown",
3123
"panic-strategy": "abort",
3224
"disable-redzone": true,

rust-toolchain.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[toolchain]
2+
channel = "nightly-2021-12-24"
3+
components = [ "rustfmt", "clippy", "rust-src", "llvm-tools-preview" ]
4+
profile = "minimal"

src/asm/aarch64/bootstrap.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* License: Apache License 2.0 / MIT
1818
**********************************************************************************************************************/
1919

20-
.global __boot // global entry point
21-
.global __hang // helper to savely "hang" a core with nothing else to do
20+
.global __boot // global entry point
21+
.global __hang // helper to savely "hang" a core with nothing else to do
2222

2323
/***************************************************************************************************
2424
* main entry point using specific section that is ensured to be linked against the entrypoint
@@ -141,7 +141,7 @@ __switch_el2_to_el1:
141141
ret
142142

143143
/***************************************************************************************************
144-
* savely hang the core
144+
* safely hang the core
145145
* use the WFE instruction to save power while waiting for any event
146146
* wfe is triggered by any exception/interrupt raised, but as long as there is no event
147147
* the core sleeps....

0 commit comments

Comments
 (0)