CUBELinux.0.1: name the release, and build with this box's rustc

The tree is Linux 6.19.3 with the changes this machine's toolchain needs, and
nothing else. No CUBE code yet — this is the base the coordinate interface will
be built on, so it starts from a known-good bootable kernel.

Naming:
- VERSION/PATCHLEVEL/SUBLEVEL stay 6.19.3 (visible in `make kernelversion`),
  while the release string setlocalversion composes is CUBELinux.0.1, so
  `uname -r` and /lib/modules report this product rather than a Linux point
  release. The SCM suffix still applies: a dirty tree says so.

rustc compatibility (rustc 1.100.0-nightly, clang 19.1.7):
- scripts/generate_rust_target.rs emitted `"rustc-abi": "x86-softfloat"`, which
  this rustc rejects; it is `softfloat` now.
- rust/Makefile's cmd_rustc_library did not pass -Zunstable-options, so the
  custom target spec would not load at all.
- the generated bindings declare `strlen` with the kernel target's `c_char`
  (u8, from -funsigned-char) while rustc expects `*const i8`; the newer
  suspicious_runtime_symbol_definitions lint fires on that and -D warnings makes
  it fatal. Scoped to bindings.o and uapi.o, not to handwritten code.
- three `'static` bounds the abstractions now need (irq handlers).
- str.rs imported alloc::flags::* which prelude::* already provides, and
  `#![feature(used_with_arg)]` is stale now that the feature is stable; both are
  unused-feature/unused-import errors under -D warnings.

Gates: bzImage builds (14,697,472 bytes) with CONFIG_RUST=y, virtio-blk and a
serial console built in. Boot test in QEMU is next.
This commit is contained in:
CUBELinux build
2026-09-18 20:11:45 -04:00
parent 598cf27219
commit e4ae67ea7f
6 changed files with 21 additions and 12 deletions
+3 -3
View File
@@ -261,7 +261,7 @@ impl<T: Handler + 'static> Registration<T> {
/// # Safety
///
/// This function should be only used as the callback in `request_irq`.
unsafe extern "C" fn handle_irq_callback<T: Handler>(_irq: i32, ptr: *mut c_void) -> c_uint {
unsafe extern "C" fn handle_irq_callback<T: Handler + 'static>(_irq: i32, ptr: *mut c_void) -> c_uint {
// SAFETY: `ptr` is a pointer to `Registration<T>` set in `Registration::new`
let registration = unsafe { &*(ptr as *const Registration<T>) };
// SAFETY: The irq callback is removed before the device is unbound, so the fact that the irq
@@ -480,7 +480,7 @@ impl<T: ThreadedHandler + 'static> ThreadedRegistration<T> {
/// # Safety
///
/// This function should be only used as the callback in `request_threaded_irq`.
unsafe extern "C" fn handle_threaded_irq_callback<T: ThreadedHandler>(
unsafe extern "C" fn handle_threaded_irq_callback<T: ThreadedHandler + 'static>(
_irq: i32,
ptr: *mut c_void,
) -> c_uint {
@@ -496,7 +496,7 @@ unsafe extern "C" fn handle_threaded_irq_callback<T: ThreadedHandler>(
/// # Safety
///
/// This function should be only used as the callback in `request_threaded_irq`.
unsafe extern "C" fn thread_fn_callback<T: ThreadedHandler>(_irq: i32, ptr: *mut c_void) -> c_uint {
unsafe extern "C" fn thread_fn_callback<T: ThreadedHandler + 'static>(_irq: i32, ptr: *mut c_void) -> c_uint {
// SAFETY: `ptr` is a pointer to `ThreadedRegistration<T>` set in `ThreadedRegistration::new`
let registration = unsafe { &*(ptr as *const ThreadedRegistration<T>) };
// SAFETY: The irq callback is removed before the device is unbound, so the fact that the irq
+2 -2
View File
@@ -40,8 +40,8 @@
// Expected to become stable.
#![feature(arbitrary_self_types)]
//
// To be determined.
#![feature(used_with_arg)]
// `used_with_arg` was stabilised; the attribute below is used without a gate now, and a
// stale `#![feature]` for it is an error under `-D warnings` on this rustc.
//
// `feature(derive_coerce_pointee)` is expected to become stable. Before Rust
// 1.84.0, it did not exist, so enable the predecessor features.
+1 -1
View File
@@ -3,7 +3,7 @@
//! String representations.
use crate::{
alloc::{flags::*, AllocError, KVec},
alloc::{AllocError, KVec},
error::{to_result, Result},
fmt::{self, Write},
prelude::*,