From 385a5cc743e58165d508838384593fb0453203bc Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Sun, 11 May 2025 13:43:09 -0500 Subject: [PATCH 1/8] Create superbird_evt_512_defconfig Version 1 Config file for the Spotify Car Thing --- .../arm64/configs/superbird_evt_512_defconfig | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 arch/arm64/configs/superbird_evt_512_defconfig diff --git a/arch/arm64/configs/superbird_evt_512_defconfig b/arch/arm64/configs/superbird_evt_512_defconfig new file mode 100644 index 000000000000..969ad9a1f852 --- /dev/null +++ b/arch/arm64/configs/superbird_evt_512_defconfig @@ -0,0 +1,119 @@ +CONFIG_ARM64=y +CONFIG_ARCH_MESON=y +CONFIG_MESON_G12A=y +CONFIG_AMLOGIC_A1_CPUFREQ=y +CONFIG_SOC_AMLOGIC_S905D2=y + +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y + +CONFIG_EMBEDDED=y +CONFIG_BLK_DEV_INITRD=y + +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y + +CONFIG_KERNEL_XZ=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZ4=y +CONFIG_RD_ZSTD=y + +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y + +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_DEFAULT_CONSOLE_LOGLEVEL=7 + +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_FHANDLE=y +CONFIG_BLK_DEV=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_EFI_PARTITION=y + +CONFIG_EXT4_FS=y +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y + +CONFIG_MAGIC_SYSRQ=y +CONFIG_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_PROC_FS=y + +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MESON=y +CONFIG_SERIAL_MESON_CONSOLE=y + +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_INPUT_MOUSE=y +CONFIG_INPUT_MISC=y + +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_TOUCHSCREEN=y + +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_DWC2=y +CONFIG_USB_STORAGE=y +CONFIG_USB_HID=y + +CONFIG_HID=y +CONFIG_HID_GENERIC=y + +CONFIG_MMC=y +CONFIG_MMC_MESON_GX=y +CONFIG_MMC_BLOCK=y + +CONFIG_I2C=y +CONFIG_I2C_MESON=y + +CONFIG_SPI=y +CONFIG_SPI_MESON_SPICC=y +CONFIG_SPI_MESON_SPIFC=y + +CONFIG_DMADEVICES=y +CONFIG_AMLOGIC_Meson_DMA=y + +CONFIG_FB=y +CONFIG_FB_SIMPLE=y +CONFIG_DRM=y +CONFIG_DRM_MESON=y +CONFIG_DRM_MESON_DW_HDMI=y + +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MESON=y +CONFIG_SND_SOC_MESON_G12A_TOACODEC=y +CONFIG_SND_SOC_MESON_T9015=y + +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y + +CONFIG_GPIO_SYSFS=y + +CONFIG_CRYPTO_DEV_MESON=y + +CONFIG_ZSMALLOC=y +CONFIG_ZRAM=y +CONFIG_ZRAM_DEF_COMP_LZ4=y +CONFIG_ZRAM_WRITEBACK=y + +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y + +CONFIG_WATCHDOG=y +CONFIG_MESON_WATCHDOG=y From 4cb53fff502927a1e80d977b1a5bd8c39d2d9d74 Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 10:49:01 -0500 Subject: [PATCH 2/8] Updated exec.c Changed line 1235 From: strncpy(buf, tsk->comm, sizeof(tsk->comm)); To: strncpy(buf, tsk->comm, sizeof(buf)); --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index 3e2de29a5c29..5348594f73fc 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1232,7 +1232,7 @@ char *get_task_comm(char *buf, struct task_struct *tsk) { /* buf must be at least sizeof(tsk->comm) in size */ task_lock(tsk); - strncpy(buf, tsk->comm, sizeof(tsk->comm)); + strncpy(buf, tsk->comm, sizeof(buf)); task_unlock(tsk); return buf; } From 5ced901fc60d4286eff2e63fcadd5d5769f51d5d Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 10:56:46 -0500 Subject: [PATCH 3/8] Updated exec.c Changed line 1235 From: strncpy(buf, tsk->comm, sizeof(buf)); To: strncpy(buf, tsk->comm, TASK_COMM_LEN); buf[TASK_COMM_LEN - 1] = '\0'; // Ensure null-termination --- fs/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index 5348594f73fc..09577d6ebc6d 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1232,7 +1232,8 @@ char *get_task_comm(char *buf, struct task_struct *tsk) { /* buf must be at least sizeof(tsk->comm) in size */ task_lock(tsk); - strncpy(buf, tsk->comm, sizeof(buf)); + strncpy(buf, tsk->comm, TASK_COMM_LEN); + buf[TASK_COMM_LEN - 1] = '\0'; // Ensure null-termination task_unlock(tsk); return buf; } From fe2908796e0e0431ab4571e054d6fbac0fc60d18 Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 11:01:59 -0500 Subject: [PATCH 4/8] Updated extable.c Changed line 44 From: if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) To: if (main_extable_sort_needed && __stop___ex_table > __start___ex_table + 0) --- kernel/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/extable.c b/kernel/extable.c index 4f06fc34313f..2239498bd899 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -41,7 +41,7 @@ u32 __initdata __visible main_extable_sort_needed = 1; /* Sort the kernel's built-in exception table */ void __init sort_main_extable(void) { - if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { + if (main_extable_sort_needed && __stop___ex_table > __start___ex_table + 0) { pr_notice("Sorting __ex_table...\n"); sort_extable(__start___ex_table, __stop___ex_table); } From 0c3ad75e3ea859fea3aaf6f6a1d85eafe9c846ce Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 11:07:34 -0500 Subject: [PATCH 5/8] Updated extable.c Changed line 55 From: search_extable(__start___ex_table, __stop___ex_table-1, addr); To: search_extable(__start___ex_table, __stop___ex_table, addr); --- kernel/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/extable.c b/kernel/extable.c index 2239498bd899..2e1ec3c86dc4 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -52,7 +52,7 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr) { const struct exception_table_entry *e; - e = search_extable(__start___ex_table, __stop___ex_table-1, addr); + e = search_extable(__start___ex_table, __stop___ex_table, addr); if (!e) e = search_module_extables(addr); return e; From 94f9a87b145eee332297a3d30512ba4727ba9fbc Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 16:59:56 -0500 Subject: [PATCH 6/8] Updated Makefile Added: KBUILD_CFLAGS := $(filter-out -Werror,$(KBUILD_CFLAGS)) KBUILD_AFLAGS := $(filter-out -Werror,$(KBUILD_AFLAGS)) To the end of the file --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index cdea6ae34110..3457c8a4f2eb 100644 --- a/Makefile +++ b/Makefile @@ -1838,3 +1838,6 @@ FORCE: # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) + +KBUILD_CFLAGS := $(filter-out -Werror,$(KBUILD_CFLAGS)) +KBUILD_AFLAGS := $(filter-out -Werror,$(KBUILD_AFLAGS)) From 1566b1b5d79e5ea706ce17bae7c4054df7c62fa3 Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 17:10:25 -0500 Subject: [PATCH 7/8] Updated Makefile Commented out -Werror and moved it to the bottom of the KBUILD_CFLAGS and it is now on line 402 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3457c8a4f2eb..8d1045e3d226 100644 --- a/Makefile +++ b/Makefile @@ -398,8 +398,8 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration \ -Wno-format-security \ - -Werror \ -std=gnu89 $(call cc-option,-fno-PIE) + #-Werror \ KBUILD_CPPFLAGS := -D__KERNEL__ From d86fb5ead5ca2d99a601a8d11b48bd817e296ff2 Mon Sep 17 00:00:00 2001 From: TBNRBERRY <100874438+TBNRBERRY@users.noreply.github.com> Date: Mon, 12 May 2025 17:12:26 -0500 Subject: [PATCH 8/8] Updated Makefile Removed: KBUILD_CFLAGS := $(filter-out -Werror,$(KBUILD_CFLAGS)) KBUILD_AFLAGS := $(filter-out -Werror,$(KBUILD_AFLAGS)) --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 8d1045e3d226..263f280efabb 100644 --- a/Makefile +++ b/Makefile @@ -1838,6 +1838,3 @@ FORCE: # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) - -KBUILD_CFLAGS := $(filter-out -Werror,$(KBUILD_CFLAGS)) -KBUILD_AFLAGS := $(filter-out -Werror,$(KBUILD_AFLAGS))