From: seantywork Date: Wed, 29 Oct 2025 11:37:21 +0000 (+0900) Subject: readme name X-Git-Url: https://git.feebdaed.xyz/?a=commitdiff_plain;h=abb4b10834d723b318e9c20f4b020591d14229e6;p=linuxyz.git readme name --- diff --git a/kbuild-rt/2025-1029.xyz.md b/kbuild-rt/2025-1029.xyz.md new file mode 100644 index 0000000..cdff76c --- /dev/null +++ b/kbuild-rt/2025-1029.xyz.md @@ -0,0 +1,150 @@ +# + + +```shell +$ sudo apt update +$ sudo apt install build-essential git libssl-dev libelf-dev flex bison debhelper-compat bc + +``` + +```shell + +$ uname -a +Linux thy-Z370-HD3 6.14.0-33-generic #33~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 19 17:02:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux + + +``` + + +```shell +$ curl -L https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.8.2.tar.gz -o linux-6.8.2.tar.gz + +$ tar xzf linux-6.8.2.tar.gz +``` + +```shell + +$ curl -L https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.8/patch-6.8.2-rt11.patch.xz -o patch-6.8.2-rt11.patch.xz + +$ cd linux-6.8.2 + +``` + +```shell +$ xzcat ../patch-6.8.2-rt11.patch.xz | patch -p1 +... +patching file kernel/time/hrtimer.c +patching file kernel/time/tick-sched.c +patching file kernel/time/timer.c +patching file kernel/trace/trace.c +patching file kernel/trace/trace_output.c +patching file lib/dump_stack.c +patching file localversion-rt +patching file net/core/dev.c +patching file net/core/skbuff.c + +``` + +```shell +$ cp /boot/config-6.14.0-33-generic .config +$ make oldconfig +``` + +```shell +# choose 5 +Preemption Model + 1. No Forced Preemption (Server) (PREEMPT_NONE) +> 2. Voluntary Kernel Preemption (Desktop) (PREEMPT_VOLUNTARY) + 3. Preemptible Kernel (Low-Latency Desktop) (PREEMPT) + 4. Automagic preemption mode with runtime tweaking support (PREEMPT_AUTO) (NEW) + 5. Fully Preemptible Kernel (Real-Time) (PREEMPT_RT) (NEW) +choice[1-5?]: + +# hit enter until the end +Undefined behaviour sanity checker (UBSAN) [Y/n/?] y + Abort on Sanitizer warnings (smaller kernel but less verbose) (UBSAN_TRAP) [N/y/?] n + Perform array index bounds checking (UBSAN_BOUNDS) [Y/n/?] y + Perform checking for bit-shift overflows (UBSAN_SHIFT) [Y/n/?] y + Perform checking for integer divide-by-zero (UBSAN_DIV_ZERO) [N/y/?] n + Perform checking for non-boolean values used as boolean (UBSAN_BOOL) [Y/n/?] y + Perform checking for out of bounds enum values (UBSAN_ENUM) [Y/n/?] y + Perform checking for misaligned pointer usage (UBSAN_ALIGNMENT) [N/y/?] n + Enable instrumentation for the entire kernel (UBSAN_SANITIZE_ALL) [Y/n/?] (NEW) + Module for testing for undefined behavior detection (TEST_UBSAN) [N/m/?] n +# +# configuration written to .config +# +``` + +```shell +# delete value as below + +CONFIG_SYSTEM_TRUSTED_KEYS="" +CONFIG_MODULE_SIG_KEY="" +CONFIG_SYSTEM_REVOCATION_KEYS="" + +# comment out + +CONFIG_MODULE_SIG_FORCE +CONFIG_DEBUG_INFO_BTF +CONFIG_MODULE_SIG_ALL + +``` + +```shell +$ nproc +12 +``` + +```shell + +# $ make -j4 deb-pkg +$ make -j4 bindeb-pkg +``` + +```shell +$ ls ../ | grep '6.8.2' +... +linux-headers-6.8.2-rt11_6.8.2-1_amd64.deb +linux-image-6.8.2-rt11_6.8.2-1_amd64.deb +linux-image-6.8.2-rt11-dbg_6.8.2-1_amd64.deb +linux-libc-dev_6.8.2-1_amd64.deb +... +``` + + +```shell +$ sudo dpkg -i ../linux-headers-6.8.2-rt11_6.8.2-1_amd64.deb ../linux-image-6.8.2-rt11_6.8.2-1_amd64.deb ../linux-libc-dev_6.8.2-1_amd64.deb +... +Found linux image: /boot/vmlinuz-6.11.0-17-generic +Found initrd image: /boot/initrd.img-6.11.0-17-generic +Found linux image: /boot/vmlinuz-6.8.2-rt11 +Found initrd image: /boot/initrd.img-6.8.2-rt11 +Found linux image: /boot/vmlinuz-6.8.0-52-generic +Found initrd image: /boot/initrd.img-6.8.0-52-generic +Adding boot menu entry for UEFI Firmware Settings ... +done +Setting up linux-libc-dev:amd64 (6.8.2-1) ... +``` + +```shell +$ sudo vim /boot/grub/grub.cfg +# find menuentry `'Ubuntu, with Linux 6.8.2-rt11'` + +``` + +```shell +$ sudo vim /etc/default/grub + +# change `GRUB_DEFAULT` to the found entry +# GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 6.8.2-rt11' + +``` + + +```shell +$ uname -a +Linux thy-Z370-HD3 6.8.2-rt11 #1 SMP PREEMPT_RT Tue Oct 28 16:56:00 KST 2025 x86_64 x86_64 x86_64 GNU/Linux + + +``` \ No newline at end of file diff --git a/kbuild-rt/2510-29.xyz.md b/kbuild-rt/2510-29.xyz.md deleted file mode 100644 index cdff76c..0000000 --- a/kbuild-rt/2510-29.xyz.md +++ /dev/null @@ -1,150 +0,0 @@ -# - - -```shell -$ sudo apt update -$ sudo apt install build-essential git libssl-dev libelf-dev flex bison debhelper-compat bc - -``` - -```shell - -$ uname -a -Linux thy-Z370-HD3 6.14.0-33-generic #33~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 19 17:02:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux - - -``` - - -```shell -$ curl -L https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.8.2.tar.gz -o linux-6.8.2.tar.gz - -$ tar xzf linux-6.8.2.tar.gz -``` - -```shell - -$ curl -L https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.8/patch-6.8.2-rt11.patch.xz -o patch-6.8.2-rt11.patch.xz - -$ cd linux-6.8.2 - -``` - -```shell -$ xzcat ../patch-6.8.2-rt11.patch.xz | patch -p1 -... -patching file kernel/time/hrtimer.c -patching file kernel/time/tick-sched.c -patching file kernel/time/timer.c -patching file kernel/trace/trace.c -patching file kernel/trace/trace_output.c -patching file lib/dump_stack.c -patching file localversion-rt -patching file net/core/dev.c -patching file net/core/skbuff.c - -``` - -```shell -$ cp /boot/config-6.14.0-33-generic .config -$ make oldconfig -``` - -```shell -# choose 5 -Preemption Model - 1. No Forced Preemption (Server) (PREEMPT_NONE) -> 2. Voluntary Kernel Preemption (Desktop) (PREEMPT_VOLUNTARY) - 3. Preemptible Kernel (Low-Latency Desktop) (PREEMPT) - 4. Automagic preemption mode with runtime tweaking support (PREEMPT_AUTO) (NEW) - 5. Fully Preemptible Kernel (Real-Time) (PREEMPT_RT) (NEW) -choice[1-5?]: - -# hit enter until the end -Undefined behaviour sanity checker (UBSAN) [Y/n/?] y - Abort on Sanitizer warnings (smaller kernel but less verbose) (UBSAN_TRAP) [N/y/?] n - Perform array index bounds checking (UBSAN_BOUNDS) [Y/n/?] y - Perform checking for bit-shift overflows (UBSAN_SHIFT) [Y/n/?] y - Perform checking for integer divide-by-zero (UBSAN_DIV_ZERO) [N/y/?] n - Perform checking for non-boolean values used as boolean (UBSAN_BOOL) [Y/n/?] y - Perform checking for out of bounds enum values (UBSAN_ENUM) [Y/n/?] y - Perform checking for misaligned pointer usage (UBSAN_ALIGNMENT) [N/y/?] n - Enable instrumentation for the entire kernel (UBSAN_SANITIZE_ALL) [Y/n/?] (NEW) - Module for testing for undefined behavior detection (TEST_UBSAN) [N/m/?] n -# -# configuration written to .config -# -``` - -```shell -# delete value as below - -CONFIG_SYSTEM_TRUSTED_KEYS="" -CONFIG_MODULE_SIG_KEY="" -CONFIG_SYSTEM_REVOCATION_KEYS="" - -# comment out - -CONFIG_MODULE_SIG_FORCE -CONFIG_DEBUG_INFO_BTF -CONFIG_MODULE_SIG_ALL - -``` - -```shell -$ nproc -12 -``` - -```shell - -# $ make -j4 deb-pkg -$ make -j4 bindeb-pkg -``` - -```shell -$ ls ../ | grep '6.8.2' -... -linux-headers-6.8.2-rt11_6.8.2-1_amd64.deb -linux-image-6.8.2-rt11_6.8.2-1_amd64.deb -linux-image-6.8.2-rt11-dbg_6.8.2-1_amd64.deb -linux-libc-dev_6.8.2-1_amd64.deb -... -``` - - -```shell -$ sudo dpkg -i ../linux-headers-6.8.2-rt11_6.8.2-1_amd64.deb ../linux-image-6.8.2-rt11_6.8.2-1_amd64.deb ../linux-libc-dev_6.8.2-1_amd64.deb -... -Found linux image: /boot/vmlinuz-6.11.0-17-generic -Found initrd image: /boot/initrd.img-6.11.0-17-generic -Found linux image: /boot/vmlinuz-6.8.2-rt11 -Found initrd image: /boot/initrd.img-6.8.2-rt11 -Found linux image: /boot/vmlinuz-6.8.0-52-generic -Found initrd image: /boot/initrd.img-6.8.0-52-generic -Adding boot menu entry for UEFI Firmware Settings ... -done -Setting up linux-libc-dev:amd64 (6.8.2-1) ... -``` - -```shell -$ sudo vim /boot/grub/grub.cfg -# find menuentry `'Ubuntu, with Linux 6.8.2-rt11'` - -``` - -```shell -$ sudo vim /etc/default/grub - -# change `GRUB_DEFAULT` to the found entry -# GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 6.8.2-rt11' - -``` - - -```shell -$ uname -a -Linux thy-Z370-HD3 6.8.2-rt11 #1 SMP PREEMPT_RT Tue Oct 28 16:56:00 KST 2025 x86_64 x86_64 x86_64 GNU/Linux - - -``` \ No newline at end of file