Skip to content

Commit 70b0057

Browse files
committed
chore: 将工具链更新到2024-07-23
1 parent 634349e commit 70b0057

File tree

110 files changed

+226
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+226
-190
lines changed

.github/workflows/cache-toolchain.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ jobs:
5151
5252
cargo install cargo-binutils
5353
rustup toolchain install nightly-x86_64-unknown-linux-gnu
54-
rustup toolchain install nightly-2023-01-21-x86_64-unknown-linux-gnu
54+
rustup toolchain install nightly-2024-07-23-x86_64-unknown-linux-gnu
5555
rustup toolchain install nightly-2023-08-15-x86_64-unknown-linux-gnu
56-
rustup component add rust-src --toolchain nightly-2023-01-21-x86_64-unknown-linux-gnu
56+
rustup component add rust-src --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
5757
rustup component add rust-src --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
58-
rustup target add x86_64-unknown-none --toolchain nightly-2023-01-21-x86_64-unknown-linux-gnu
58+
rustup target add x86_64-unknown-none --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
5959
rustup target add x86_64-unknown-none --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
6060
61-
rustup toolchain install nightly-2023-01-21-riscv64gc-unknown-linux-gnu --force-non-host
61+
rustup toolchain install nightly-2024-07-23-riscv64gc-unknown-linux-gnu --force-non-host
6262
rustup toolchain install nightly-2023-08-15-riscv64gc-unknown-linux-gnu --force-non-host
63-
rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2023-01-21-riscv64gc-unknown-linux-gnu
64-
rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2023-01-21-riscv64gc-unknown-linux-gnu
63+
rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2024-07-23-riscv64gc-unknown-linux-gnu
64+
rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2024-07-23-riscv64gc-unknown-linux-gnu
6565
rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2023-08-15-riscv64gc-unknown-linux-gnu
6666
rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2023-08-15-riscv64gc-unknown-linux-gnu
6767
@@ -71,9 +71,9 @@ jobs:
7171
7272
rustup component add rustfmt
7373
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
74-
rustup component add rustfmt --toolchain nightly-2023-01-21-x86_64-unknown-linux-gnu
74+
rustup component add rustfmt --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
7575
rustup component add rustfmt --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
76-
rustup component add rustfmt --toolchain nightly-2023-01-21-riscv64gc-unknown-linux-gnu
76+
rustup component add rustfmt --toolchain nightly-2024-07-23-riscv64gc-unknown-linux-gnu
7777
rustup component add rustfmt --toolchain nightly-2023-08-15-riscv64gc-unknown-linux-gnu
7878
7979
rustup default nightly
@@ -86,6 +86,12 @@ jobs:
8686
rustup toolchain install ${userapp_musl_toolchain}
8787
rustup component add --toolchain ${userapp_musl_toolchain} rust-src
8888
rustup target add --toolchain ${userapp_musl_toolchain} x86_64-unknown-linux-musl
89+
90+
userapp_musl_toolchain="nightly-2024-07-23-x86_64-unknown-linux-gnu"
91+
92+
rustup toolchain install ${userapp_musl_toolchain}
93+
rustup component add --toolchain ${userapp_musl_toolchain} rust-src
94+
rustup target add --toolchain ${userapp_musl_toolchain} x86_64-unknown-linux-musl
8995
9096
9197

build-scripts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ fmt:
55
clean:
66
@cargo clean
77
check:
8-
@cargo +nightly-2023-08-15 check --workspace $(CARGO_ZBUILD) --message-format=json
8+
@cargo +nightly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json

build-scripts/kernel_build/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(cfg_target_abi)]
2-
31
#[macro_use]
42
extern crate lazy_static;
53
extern crate cc;

kernel/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ members = [
1616
]
1717

1818
[features]
19-
default = ["backtrace", "kvm"]
19+
default = ["backtrace", "kvm", "fatfs", "fatfs-secure"]
2020
# 内核栈回溯
2121
backtrace = []
2222
# kvm
2323
kvm = []
2424

25+
fatfs = []
26+
fatfs-secure = ["fatfs"]
27+
2528

2629
# 运行时依赖项
2730
[dependencies]

kernel/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ check: ECHO
3636
# @echo "Checking kernel... ARCH=$(ARCH)"
3737
# @exit 1
3838
ifeq ($(ARCH), x86_64)
39-
@cargo +nightly-2023-08-15 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./src/$(TARGET_JSON)
39+
@cargo +nightly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./src/$(TARGET_JSON)
4040
else ifeq ($(ARCH), riscv64)
41-
@cargo +nightly-2023-08-15 check --workspace $(CARGO_ZBUILD) --message-format=json --target $(TARGET_JSON)
41+
@cargo +nightly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json --target $(TARGET_JSON)
4242
endif
4343

4444
test:
4545
# 测试内核库
46-
@cargo +nightly-2023-08-15 test --workspace --exclude dragonos_kernel
46+
@cargo +nightly-2024-07-23 test --workspace --exclude dragonos_kernel
4747

kernel/crates/bitmap/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![feature(core_intrinsics)]
33
#![allow(incomplete_features)] // for const generics
44
#![feature(generic_const_exprs)]
5+
#![allow(internal_features)]
56
#![allow(clippy::needless_return)]
67

78
#[macro_use]

kernel/crates/bitmap/src/static_bitmap.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ where
1414
core: BitMapCore<usize>,
1515
}
1616

17+
impl<const N: usize> Default for StaticBitmap<N>
18+
where
19+
[(); (N + usize::BITS as usize - 1) / (usize::BITS as usize)]:,
20+
{
21+
fn default() -> Self {
22+
Self::new()
23+
}
24+
}
25+
1726
impl<const N: usize> StaticBitmap<N>
1827
where
1928
[(); (N + usize::BITS as usize - 1) / (usize::BITS as usize)]:,

kernel/crates/bitmap/src/traits.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ macro_rules! bitops_for {
182182
}
183183
}
184184

185-
#[cfg(feature = "std")]
186-
fn to_hex(bits: &Self) -> String {
187-
format!("{:x}", bits)
188-
}
189-
190185
#[inline]
191186
fn bit_size() -> usize {
192187
<$target>::BITS as usize

kernel/crates/klog_types/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ impl MMLogCycle {
175175
}
176176
}
177177

178+
impl Default for MMLogCycle {
179+
fn default() -> Self {
180+
Self::new()
181+
}
182+
}
183+
178184
impl kdepends::thingbuf::Recycle<AllocatorLog> for MMLogCycle {
179185
fn new_element(&self) -> AllocatorLog {
180186
AllocatorLog::zeroed()

kernel/crates/rust-slabmalloc/src/pages.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl Bitfield for [AtomicU64] {
3838
fn initialize(&mut self, for_size: usize, capacity: usize) {
3939
// Set everything to allocated
4040
for bitmap in self.iter_mut() {
41-
*bitmap = AtomicU64::new(u64::max_value());
41+
*bitmap = AtomicU64::new(u64::MAX);
4242
}
4343

4444
// Mark actual slots as free
@@ -64,7 +64,7 @@ impl Bitfield for [AtomicU64] {
6464

6565
for (base_idx, b) in self.iter().enumerate() {
6666
let bitval = b.load(Ordering::Relaxed);
67-
if bitval == u64::max_value() {
67+
if bitval == u64::MAX {
6868
continue;
6969
} else {
7070
let negated = !bitval;
@@ -125,7 +125,7 @@ impl Bitfield for [AtomicU64] {
125125
#[inline(always)]
126126
fn is_full(&self) -> bool {
127127
self.iter()
128-
.filter(|&x| x.load(Ordering::Relaxed) != u64::max_value())
128+
.filter(|&x| x.load(Ordering::Relaxed) != u64::MAX)
129129
.count()
130130
== 0
131131
}
@@ -410,6 +410,7 @@ impl<'a, T: AllocablePage> PageList<'a, T> {
410410
}
411411

412412
/// Removes `slab_page` from the list.
413+
#[allow(clippy::manual_inspect)]
413414
pub(crate) fn pop<'b>(&'b mut self) -> Option<&'a mut T> {
414415
match self.head {
415416
None => None,
@@ -453,6 +454,7 @@ impl<'a, P: AllocablePage + 'a> Iterator for ObjectPageIterMut<'a, P> {
453454
type Item = &'a mut P;
454455

455456
#[inline]
457+
#[allow(clippy::manual_inspect)]
456458
fn next(&mut self) -> Option<&'a mut P> {
457459
unsafe {
458460
self.head.resolve_mut().map(|next| {

0 commit comments

Comments
 (0)