From c578ed1d5d18ddfbe542a6684d2df5e744ba06ee Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Tue, 17 Jun 2025 10:12:16 -0400 Subject: [PATCH] linux: bump to 6.12 (turn off PREEMPT_RT) Upstream Linux doesn't support PREEMPT_RT for 32-bit ARM. Rather than patching, go with the default. PREEMPT_RT is available with nerves_system_rpi0_2 which runs a 64-bit kernel. --- README.md | 2 +- REUSE.toml | 3 +- linux-6.6.defconfig => linux-6.12.defconfig | 2 - ...-backing_dev_info-in-order-to-disabl.patch | 121 ------------------ mix.exs | 2 +- nerves_defconfig | 7 +- 6 files changed, 6 insertions(+), 131 deletions(-) rename linux-6.6.defconfig => linux-6.12.defconfig (98%) delete mode 100644 linux/0001-squashfs-provide-backing_dev_info-in-order-to-disabl.patch diff --git a/README.md b/README.md index 5705b08..c6bf638 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ with the USB port running in gadget mode. | CPU | 1.4 GHz quad-core ARM Cortex-A53| | Memory | 512 MB DRAM | | Storage | MicroSD | -| Linux kernel | 6.1 w/ Raspberry Pi patches | +| Linux kernel | 6.12 w/ Raspberry Pi patches | | IEx terminal | UART `ttyAMA0` Can be changed to HDMI | | GPIO, I2C, SPI | Yes - [Elixir Circuits](https://github.com/elixir-circuits) | | ADC | No | diff --git a/REUSE.toml b/REUSE.toml index 43ce81f..2f607b3 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -42,8 +42,7 @@ SPDX-License-Identifier = "GPL-2.0-or-later" # Linux kernel derived or related files [[annotations]] path = [ - "linux/*", - "linux-6.6.defconfig", + "linux-6.12.defconfig", "ramoops.dts" ] precedence = "override" diff --git a/linux-6.6.defconfig b/linux-6.12.defconfig similarity index 98% rename from linux-6.6.defconfig rename to linux-6.12.defconfig index 0424dc2..fe7c10a 100644 --- a/linux-6.6.defconfig +++ b/linux-6.12.defconfig @@ -25,7 +25,6 @@ CONFIG_ARCH_BCM2835=y # CONFIG_CACHE_L2X0 is not set CONFIG_SMP=y CONFIG_VMSPLIT_2G=y -# CONFIG_CPU_SW_DOMAIN_PAN is not set CONFIG_UACCESS_WITH_MEMCPY=y # CONFIG_ATAGS is not set CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" @@ -102,7 +101,6 @@ CONFIG_TUN=m # CONFIG_WLAN_VENDOR_ATH is not set # CONFIG_WLAN_VENDOR_ATMEL is not set CONFIG_BRCMFMAC=m -# CONFIG_WLAN_VENDOR_CISCO is not set # CONFIG_WLAN_VENDOR_INTEL is not set # CONFIG_WLAN_VENDOR_INTERSIL is not set # CONFIG_WLAN_VENDOR_MARVELL is not set diff --git a/linux/0001-squashfs-provide-backing_dev_info-in-order-to-disabl.patch b/linux/0001-squashfs-provide-backing_dev_info-in-order-to-disabl.patch deleted file mode 100644 index 94bd143..0000000 --- a/linux/0001-squashfs-provide-backing_dev_info-in-order-to-disabl.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 9eec1d897139e5de287af5d559a02b811b844d82 Mon Sep 17 00:00:00 2001 -From: Zheng Liang -Date: Fri, 14 Jan 2022 14:03:31 -0800 -Subject: [PATCH] squashfs: provide backing_dev_info in order to disable - read-ahead - -Commit c1f6925e1091 ("mm: put readahead pages in cache earlier") causes -the read performance of squashfs to deteriorate.Through testing, we find -that the performance will be back by closing the readahead of squashfs. - -So we want to learn the way of ubifs, provides backing_dev_info and -disable read-ahead - -We tested the following data by fio. -squashfs image blocksize=128K -test command: - - fio --name basic --bs=? --filename="/mnt/test_file" --rw=? --iodepth=1 --ioengine=psync --runtime=200 --time_based - - turn on squashfs readahead in 5.10 kernel - bs(k) read/randread MB/s - 4 randread 271 - 128 randread 231 - 1024 randread 246 - 4 read 310 - 128 read 245 - 1024 read 247 - - turn off squashfs readahead in 5.10 kernel - bs(k) read/randread MB/s - 4 randread 293 - 128 randread 330 - 1024 randread 363 - 4 read 338 - 128 read 360 - 1024 read 365 - - turn on squashfs readahead and revert the - commit c1f6925e1091("mm: put readahead - pages in cache earlier") in 5.10 kernel - bs(k) read/randread MB/s - 4 randread 289 - 128 randread 306 - 1024 randread 335 - 4 read 337 - 128 read 336 - 1024 read 338 - -Link: https://lkml.kernel.org/r/20211116113141.1391026-1-zhengliang6@huawei.com -Signed-off-by: Zheng Liang -Reviewed-by: Phillip Lougher -Cc: Zhang Yi -Cc: Hou Tao -Cc: Miao Xie -Signed-off-by: Andrew Morton -Signed-off-by: Linus Torvalds ---- - fs/squashfs/super.c | 33 +++++++++++++++++++++++++++++++++ - 1 file changed, 33 insertions(+) - -diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c -index bb44ff4c5cc6..b1b556dbce12 100644 ---- a/fs/squashfs/super.c -+++ b/fs/squashfs/super.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include "squashfs_fs.h" - #include "squashfs_fs_sb.h" -@@ -112,6 +113,24 @@ static const struct squashfs_decompressor *supported_squashfs_filesystem( - return decompressor; - } - -+static int squashfs_bdi_init(struct super_block *sb) -+{ -+ int err; -+ unsigned int major = MAJOR(sb->s_dev); -+ unsigned int minor = MINOR(sb->s_dev); -+ -+ bdi_put(sb->s_bdi); -+ sb->s_bdi = &noop_backing_dev_info; -+ -+ err = super_setup_bdi_name(sb, "squashfs_%u_%u", major, minor); -+ if (err) -+ return err; -+ -+ sb->s_bdi->ra_pages = 0; -+ sb->s_bdi->io_pages = 0; -+ -+ return 0; -+} - - static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc) - { -@@ -127,6 +146,20 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc) - - TRACE("Entered squashfs_fill_superblock\n"); - -+ /* -+ * squashfs provides 'backing_dev_info' in order to disable read-ahead. For -+ * squashfs, I/O is not deferred, it is done immediately in readpage, -+ * which means the user would always have to wait their own I/O. So the effect -+ * of readahead is very weak for squashfs. squashfs_bdi_init will set -+ * sb->s_bdi->ra_pages and sb->s_bdi->io_pages to 0 and close readahead for -+ * squashfs. -+ */ -+ err = squashfs_bdi_init(sb); -+ if (err) { -+ errorf(fc, "squashfs init bdi failed"); -+ return err; -+ } -+ - sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); - if (sb->s_fs_info == NULL) { - ERROR("Failed to allocate squashfs_sb_info\n"); --- -2.25.1 - diff --git a/mix.exs b/mix.exs index d8f11d5..0046687 100644 --- a/mix.exs +++ b/mix.exs @@ -113,7 +113,7 @@ defmodule NervesSystemRpi3a.MixProject do "fwup-ops.conf", "fwup.conf", "LICENSES/*", - "linux-6.6.defconfig", + "linux-6.12.defconfig", "mix.exs", "nerves_defconfig", "post-build.sh", diff --git a/nerves_defconfig b/nerves_defconfig index a3f39d2..bdd807c 100644 --- a/nerves_defconfig +++ b/nerves_defconfig @@ -29,10 +29,9 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="${NERVES_DEFCONFIG_DIR}/post-build.sh ${BR2_EXTERN BR2_ROOTFS_POST_IMAGE_SCRIPT="${NERVES_DEFCONFIG_DIR}/post-createfs.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/refs/tags/stable_20250127.tar.gz" -BR2_LINUX_KERNEL_PATCH="http://cdn.kernel.org/pub/linux/kernel/projects/rt/6.6/patch-6.6.74-rt48.patch.gz ${NERVES_DEFCONFIG_DIR}/linux" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/refs/tags/stable_20250916.tar.gz" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${NERVES_DEFCONFIG_DIR}/linux-6.6.defconfig" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${NERVES_DEFCONFIG_DIR}/linux-6.12.defconfig" BR2_LINUX_KERNEL_XZ=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-cm3 broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2710-rpi-zero-2-w" @@ -46,7 +45,7 @@ BR2_PACKAGE_ALSA_UTILS_APLAY=y BR2_PACKAGE_E2FSPROGS=y # BR2_PACKAGE_E2FSPROGS_FSCK is not set BR2_PACKAGE_RPI_FIRMWARE=y -BR2_PACKAGE_RPI_FIRMWARE_CUSTOM_VERSION="1.20250127" +BR2_PACKAGE_RPI_FIRMWARE_CUSTOM_VERSION="1.20250915" BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X=y BR2_PACKAGE_PIGPIO=y