ソースを参照

mikrotik-rb532: add some required patches to LTS kernel

Waldemar Brodkorb 2 週間 前
コミット
c0c5641f23

+ 2 - 2
mk/linux-ver.mk

@@ -52,10 +52,10 @@ KERNEL_VERSION:=	$(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
 KERNEL_HASH:=		4f2afffbeddaad6b8527d41a3e3a82646d3cf5dfd0acbb6c4e8a99fc70461b96
 endif
 ifeq ($(ADK_TARGET_LINUX_KERNEL_VERSION_5_10),y)
-KERNEL_FILE_VER:=	5.10.236
+KERNEL_FILE_VER:=	5.10.253
 KERNEL_RELEASE:=	1
 KERNEL_VERSION:=	$(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
-KERNEL_HASH:=		6da5cc8f7d39ed3acb4d59129a3f1570d981526ebbf58ea82595b7b6e000fb89
+KERNEL_HASH:=		ec0724928050e8e2f6226fe8bbb206f42a951c0ed2dbb533c5462789f6d75ac8
 endif
 ifeq ($(ADK_TARGET_LINUX_KERNEL_VERSION_5_4),y)
 KERNEL_FILE_VER:=	5.4.292

+ 1 - 0
target/linux/Config.in.kernelcfg

@@ -76,6 +76,7 @@ config ADK_TARGET_LINUX_KERNEL_DEFCONFIG
 	default "hp6xx_defconfig" if ADK_TARGET_SYSTEM_HP_JORNADA
 	default "pic32mzda_defconfig" if ADK_TARGET_SYSTEM_MICROCHIP_PIC32
 	default "mvebu_v5_defconfig" if ADK_TARGET_SYSTEM_SHEEVAPLUG
+	default "rb532_defconfig" if ADK_TARGET_SYSTEM_MIKROTIK_RB532
 	default ""
 
 config ADK_TARGET_LINUX_KERNEL_CUSTOMCONFIG_PATH

+ 1 - 1
target/linux/Config.in.kernelversion

@@ -105,7 +105,7 @@ config ADK_TARGET_LINUX_KERNEL_VERSION_5_15
 	depends on !ADK_TARGET_ARCH_METAG
 
 config ADK_TARGET_LINUX_KERNEL_VERSION_5_10
-	bool "5.10.236"
+	bool "5.10.253"
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_C6X

+ 17 - 0
target/linux/patches/4.19.320/MIPS-rb532-Fix-MMIO-UART-resource-registration.patch

@@ -0,0 +1,17 @@
+diff -Nur linux-4.19.320.orig/arch/mips/rb532/devices.c linux-4.19.320/arch/mips/rb532/devices.c
+--- linux-4.19.320.orig/arch/mips/rb532/devices.c	2024-08-19 05:32:18.000000000 +0200
++++ linux-4.19.320/arch/mips/rb532/devices.c	2026-04-19 09:36:30.112899077 +0200
+@@ -225,11 +225,11 @@
+ static struct plat_serial8250_port rb532_uart_res[] = {
+ 	{
+ 		.type           = PORT_16550A,
+-		.membase	= (char *)KSEG1ADDR(REGBASE + UART0BASE),
++		.mapbase        = REGBASE + UART0BASE,
+ 		.irq		= UART0_IRQ,
+ 		.regshift	= 2,
+ 		.iotype		= UPIO_MEM,
+-		.flags		= UPF_BOOT_AUTOCONF,
++		.flags		= UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+ 	},
+ 	{
+ 		.flags		= 0,

+ 12 - 0
target/linux/patches/4.19.320/mips-vdso-gcc15.patch

@@ -0,0 +1,12 @@
+diff -Nur linux-4.19.320.orig/arch/mips/vdso/Makefile linux-4.19.320/arch/mips/vdso/Makefile
+--- linux-4.19.320.orig/arch/mips/vdso/Makefile	2024-08-19 05:32:18.000000000 +0200
++++ linux-4.19.320/arch/mips/vdso/Makefile	2026-04-19 09:15:00.183108904 +0200
+@@ -18,7 +18,7 @@
+ 	-O2 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
+ 	-DDISABLE_BRANCH_PROFILING \
+ 	$(call cc-option, -fno-asynchronous-unwind-tables) \
+-	$(call cc-option, -fno-stack-protector)
++	$(call cc-option, -fno-stack-protector) -std=gnu11
+ aflags-vdso := $(ccflags-vdso) \
+ 	-D__ASSEMBLY__ -Wa,-gdwarf-2
+ 

+ 0 - 0
target/linux/patches/5.10.236/arc.patch → target/linux/patches/5.10.253/arc.patch


+ 0 - 0
target/linux/patches/5.10.236/darwin-dtc.patch → target/linux/patches/5.10.253/darwin-dtc.patch


+ 0 - 0
target/linux/patches/5.10.236/dtc-noyaml.patch → target/linux/patches/5.10.253/dtc-noyaml.patch


+ 0 - 0
target/linux/patches/5.10.236/nds32-ag101p.patch → target/linux/patches/5.10.253/nds32-ag101p.patch


+ 0 - 0
target/linux/patches/5.10.236/or1k-more-ram.patch → target/linux/patches/5.10.253/or1k-more-ram.patch


+ 0 - 0
target/linux/patches/5.10.236/relocs.patch → target/linux/patches/5.10.253/relocs.patch


+ 0 - 0
target/linux/patches/5.10.236/startup.patch → target/linux/patches/5.10.253/startup.patch


+ 17 - 0
target/linux/patches/5.4.292/MIPS-rb532-Fix-MMIO-UART-resource-registration.patch

@@ -0,0 +1,17 @@
+diff -Nur linux-4.19.320.orig/arch/mips/rb532/devices.c linux-4.19.320/arch/mips/rb532/devices.c
+--- linux-4.19.320.orig/arch/mips/rb532/devices.c	2024-08-19 05:32:18.000000000 +0200
++++ linux-4.19.320/arch/mips/rb532/devices.c	2026-04-19 09:36:30.112899077 +0200
+@@ -225,11 +225,11 @@
+ static struct plat_serial8250_port rb532_uart_res[] = {
+ 	{
+ 		.type           = PORT_16550A,
+-		.membase	= (char *)KSEG1ADDR(REGBASE + UART0BASE),
++		.mapbase        = REGBASE + UART0BASE,
+ 		.irq		= UART0_IRQ,
+ 		.regshift	= 2,
+ 		.iotype		= UPIO_MEM,
+-		.flags		= UPF_BOOT_AUTOCONF,
++		.flags		= UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+ 	},
+ 	{
+ 		.flags		= 0,

+ 12 - 0
target/linux/patches/5.4.292/mips-vdso-gcc15.patch

@@ -0,0 +1,12 @@
+diff -Nur linux-4.19.320.orig/arch/mips/vdso/Makefile linux-4.19.320/arch/mips/vdso/Makefile
+--- linux-4.19.320.orig/arch/mips/vdso/Makefile	2024-08-19 05:32:18.000000000 +0200
++++ linux-4.19.320/arch/mips/vdso/Makefile	2026-04-19 09:15:00.183108904 +0200
+@@ -18,7 +18,7 @@
+ 	-O2 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
+ 	-DDISABLE_BRANCH_PROFILING \
+ 	$(call cc-option, -fno-asynchronous-unwind-tables) \
+-	$(call cc-option, -fno-stack-protector)
++	$(call cc-option, -fno-stack-protector) -std=gnu11
+ aflags-vdso := $(ccflags-vdso) \
+ 	-D__ASSEMBLY__ -Wa,-gdwarf-2
+