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

Update Linux kernel to 6.12 and Debian distribution to Bookworm #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
################################################################################
# For the following two check scripts/min-tool-version.sh of your kernel
# Rust toolchain version
RUST_VERSION=1.62.0
RUST_VERSION=1.78.0
# Bindgen version
BINDGEN_VERSION=0.56.0
BINDGEN_VERSION=0.65.1

KERNEL_SOURCE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.3.tar.xz
KERNEL_SOURCE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.12.tar.xz
KERNEL_ARCHIVE_NAME=$(echo ${KERNEL_SOURCE_URL} | rev | cut -d '/' -f 1 | rev)
KERNEL_BUILD_JOBS=4

Expand All @@ -32,7 +32,7 @@ RKB_UBUNTU_VERSION=22.04
RKB_UNAME="${DUNAME}"
RKB_UID=${DUID}
RKB_GID=${DGID}
RKB_WORKDIR="/home/${RKB_UNAME}/workspace"
RKB_WORKDIR="${PWD}"
RKB_DOCKER_RUN_ADD_OPT=""

################################################################################
Expand All @@ -45,10 +45,10 @@ RFS_UBUNTU_VERSION=22.04
RFS_UNAME="${DUNAME}"
RFS_UID=1000
RFS_GID=1000
RFS_WORKDIR="/home/${RFS_UNAME}/workspace"
RFS_WORKDIR="${PWD}"
RFS_DOCKER_RUN_ADD_OPT="${DOCKER_RUN_ADD_OPT}"
# https://www.debian.org/releases
RFS_DISTRIBUTION=bullseye
RFS_DISTRIBUTION=bookworm
RFS_PACKAGES=build-essential,vim,openssh-server,make,sudo,curl,tar,gcc,libc6-dev,time,strace,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default,firmware-atheros,openssl,plymouth,file
RFS_HOSTNAME=RoustKit
RFS_ARCH=x86_64
Expand All @@ -72,7 +72,7 @@ RKE_UBUNTU_VERSION=22.04
RKE_UNAME="${DUNAME}"
RKE_UID=${RFS_UID}
RKE_GID=${RFS_GID}
RKE_WORKDIR="/home/${RKE_UNAME}/workspace"
RKE_WORKDIR="${PWD}"
# Port mapping must patch the configuration in RKE_QEMU_NET
RKE_DOCKER_RUN_ADD_OPT="${DOCKER_RUN_ADD_OPT} -p 10021:10021"
RKE_QEMU_SMP=1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TODOs
src/*.mod*
src/.*.ko*
src/.*.o*
src/.Module.symvers*
src/Module.symvers
src/modules.order
kernel/linux
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ insmod /tmp/src/rust_oot.ko
- verify that the module has been correctly loaded:

```
dmes | grep rust_oot
dmesg | grep rust_oot
...
[ 72.263075] rust_oot: loading out-of-tree module taints kernel.
[ 72.267374] rust_oot: Rust OOT sample (init)
Expand Down Expand Up @@ -340,7 +340,7 @@ default is placed in directory `rootfs` with name

```bash
ls ./rootfs
bullseye-x86_64-ext4
bookworm-x86_64-ext4
```

Also, by default there are two users configured in the created filesystems:
Expand Down
2 changes: 1 addition & 1 deletion docker/rkbuilder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain ${RUST_VERSION} -y
ENV PATH="/home/${UNAME}/.cargo/bin:${PATH}"
RUN rustup component add rust-src && \
cargo install --locked --version ${BINDGEN_VERSION} bindgen && \
cargo install --locked --version ${BINDGEN_VERSION} bindgen-cli && \
rustup component add rustfmt && \
rustup component add clippy

Expand Down
6 changes: 3 additions & 3 deletions docker/rootfs/rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MNT_BASE=/rootfs
SEEK=3071
PKGS="build-essential,openssh-server,sudo,curl,tar,time,less,psmisc,openssl,plymouth,file"
ARCH=$(uname -m)
DIST=bullseye
DIST=bookworm
ROOTFS_DST_DIR="/rootfs"
ROOTFS_NAME=rootfs
USER=user
Expand All @@ -25,7 +25,7 @@ while (("$#")); do
shift 2
;;
-d | --distribution)
# Sets the debian distribution, which defaults to bullseye right now
# Sets the debian distribution, which defaults to bookworm right now
DIST=$2
shift 2
;;
Expand Down Expand Up @@ -155,7 +155,7 @@ sudo rm -rf $MNT >/dev/null
sudo mkdir -p $MNT >/dev/null
sudo chmod 0755 $MNT >/dev/null

DEBOOTSTRAP_PARAMS="--arch=$DEBARCH --include=$PKGS --components=main,contrib,non-free $DIST $MNT"
DEBOOTSTRAP_PARAMS="--arch=$DEBARCH --include=$PKGS --components=main,contrib,non-free-firmware $DIST $MNT"
if [ $FOREIGN = "true" ]; then
DEBOOTSTRAP_PARAMS="--foreign $DEBOOTSTRAP_PARAMS"
fi
Expand Down
6 changes: 3 additions & 3 deletions src/rust_oot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ impl kernel::Module for RustOot {
pr_info!("Rust OOT sample (init)\n");

let mut numbers = Vec::new();
numbers.try_push(72)?;
numbers.try_push(108)?;
numbers.try_push(200)?;
numbers.push(72, GFP_KERNEL)?;
numbers.push(108, GFP_KERNEL)?;
numbers.push(200, GFP_KERNEL)?;

Ok(RustOot { numbers })
}
Expand Down