Skip to content

Commit

Permalink
add 5690 kernel patches
Browse files Browse the repository at this point in the history
  • Loading branch information
fda77 committed Aug 22, 2024
1 parent fa95174 commit 760e0fd
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 1 deletion.
1 change: 0 additions & 1 deletion config/mod/source.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ config FREETZ_KERNEL_AVMDIFF_AVAILABLE
depends on ! FREETZ_KERNEL_VERSION_4_1_38 # 07_1X-final 7581/7582 (corrupt)
depends on !(FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_MAPLE && FREETZ_AVM_VERSION_07_2X_MAX) # 07_2X-final 7510/1209 (corrupt)
depends on ! FREETZ_KERNEL_VERSION_4_19_183 # 07_5X-final 7539 (corrupt)
depends on !(FREETZ_KERNEL_VERSION_5_4_213 && FREETZ_SYSTEM_TYPE_ALDER) # 07_5X-inhaus 5690 Pro
depends on ! FREETZ_KERNEL_VERSION_5_15_153 # 08_0X-labor 6591+6660+6690
default y
help
Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ Latest changes
* fakeroot 1.36
* python 3.12.5

- AVM sources:
* 5690-pro 7.62 - 5.4.213

- Patches:
* Various Fritzos 8.0 related changes

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- linux-5.4/.kernelvariables
+++ linux-5.4/.kernelvariables
@@ -26,7 +26,6 @@

EXTRA_CFLAGS =

-export AVM_KCONFIG_CONFIG = ../linux/avm/conf/linux-5.4.alder

# Enable reproducibility by setting 'reproducibility' to any nonempty value;
# defaults of KBUILD_BUILD_* and SOURCE_DATE_EPOCH match the variables that
11 changes: 11 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/010-shell_bash.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- linux-5.4/Makefile
+++ linux-5.4/Makefile
@@ -5,6 +5,8 @@
EXTRAVERSION =
NAME = Kleptomaniac Octopus

+SHELL := bash
+
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
# More info can be located in ./README
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- linux-5.4/Makefile
+++ linux-5.4/Makefile
@@ -484,7 +484,7 @@
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror=implicit-function-declaration -Werror=implicit-int \
- -Werror=return-type -Wno-format-security \
+ -Wno-format-security \
-Wno-unused-parameter \
-Wno-sign-compare \
-Wno-error=cpp \
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- linux-5.4/scripts/headers_install.sh
+++ linux-5.4/scripts/headers_install.sh
@@ -26,7 +26,7 @@
# SPDX-License-Identifier with GPL variants must have "WITH Linux-syscall-note"
if [ -n "$(sed -n -e "/SPDX-License-Identifier:.*GPL-/{/WITH Linux-syscall-note/!p}" $INFILE)" ]; then
echo "error: $INFILE: missing \"WITH Linux-syscall-note\" for SPDX-License-Identifier" >&2
- exit 1
+ echo "AVM rulez !!1" >&2
fi

sed -E -e '
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- linux-5.4/scripts/headers_install.sh
+++ linux-5.4/scripts/headers_install.sh
@@ -110,7 +110,7 @@

if [ "$leak_error" = 1 ]; then
echo "error: $INFILE: leak $c to user-space" >&2
- exit 1
+ echo "AVM rulez !!1" >&2
fi
done

12 changes: 12 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/100-evaloader.TODO.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- linux-5.4/arch/arm/Makefile
+++ linux-5.4/arch/arm/Makefile
@@ -317,6 +317,9 @@
KBUILD_IMAGE := $(boot)/zImage
endif

+vmlinux.eva_pad: vmlinux FORCE
+ cp $< $(boot)/$@
+
ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y)
prepare: stack_protector_prepare
stack_protector_prepare: prepare0
17 changes: 17 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/300-no_ccache_check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- linux-5.4/GNUmakefile
+++ linux-5.4/GNUmakefile
@@ -38,14 +38,6 @@
endif
export _kernelvariables_read := 1
-include $(kernelvariables)
-
-# Iff /GU/tmp/ is not available and CCACHE_DISABLE is not set, disable ccache
-ifeq ($(wildcard /GU/tmp/)$(CCACHE_DISABLE),)
-ifneq (,$(V))
-$(info /GU/tmp is not available, disabling ccache)
-endif
-export CCACHE_DISABLE = true
-endif
endif

# Prevent accidental influence of user space targeted settings in standard
14 changes: 14 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/310-no_diffconfig.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- linux-5.4/GNUmakefile
+++ linux-5.4/GNUmakefile
@@ -197,11 +197,6 @@

ifeq ($(is-oot-kmod),)
@# Skip config diff for out-of-tree module builds
- ifeq ($(words $(wildcard $(sort $(AVM_KCONFIG_CONFIG) $(KCONFIG_CONFIG)))),2)
- $(if $(filter-out $(no-config-diff-targets),$@),\
- @scripts/diffconfig $(AVM_KCONFIG_CONFIG) $(KCONFIG_CONFIG) | \
- sed -re '1{s|^|Linux config has changed compared to $(AVM_KCONFIG_CONFIG):\n|}' >&2)
- endif
else
$(if $(filter modules_install,$@),\
@$(MAKE) --no-print-directory modules_install.post)
11 changes: 11 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/400-perl-lib-dir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- linux-5.4/drivers/char/avm_new/event/struct/avm_event_generate.pl
+++ linux-5.4/drivers/char/avm_new/event/struct/avm_event_generate.pl
@@ -2,7 +2,7 @@

use strict;
use warnings;
-
+use lib '.';
use input_enum;
use input_params;
use avm_event_generate_enum;
47 changes: 47 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/404-ftdi-ids.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
--- linux-5.4/drivers/usb/serial/ftdi_sio_ids.h
+++ linux-5.4/drivers/usb/serial/ftdi_sio_ids.h
@@ -542,6 +542,23 @@
#define FTDI_XF_640_PID 0xFC0E /* 640: Two line Display */
#define FTDI_XF_642_PID 0xFC0F /* 642: Two line Display */

+#define WBE_VID 0x104F
+
+#define WBE_SMARTMOUSE_PID1 0x0001 /* Smartmouse USB */
+#define WBE_SMARTMOUSE_PID2 0x0002 /* Smartmouse USB */
+#define WBE_SMARTMOUSE_PID3 0x0003 /* Smartmouse USB */
+#define WBE_SMARTMOUSE_PID4 0x0004 /* Smartmouse USB */
+
+#define QUADMOUSE_PID1 0x0001 /* Quadmouse USB */
+#define QUADMOUSE_PID2 0x0002 /* Quadmouse USB */
+#define QUADMOUSE_PID3 0x0003 /* Quadmouse USB */
+#define QUADMOUSE_PID4 0x0004 /* Quadmouse USB */
+
+#define FTDI_8U232AM_PID1 0x6001 /* FTDI USB2Serial */
+#define FTDI_8U232AM_PID2 0x6002 /* FTDI USB2Serial */
+#define FTDI_8U232AM_PID3 0x6003 /* FTDI USB2Serial */
+#define FTDI_8U232AM_PID4 0x6004 /* FTDI USB2Serial */
+
/*
* Video Networks Limited / Homechoice in the UK use an ftdi-based device
* for their 1Mb broadband internet service. The following PID is exhibited
--- linux-5.4/drivers/usb/serial/ftdi_sio.c
+++ linux-5.4/drivers/usb/serial/ftdi_sio.c
@@ -1055,6 +1055,18 @@
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_UNBUF_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+ { USB_DEVICE(WBE_VID, WBE_SMARTMOUSE_PID1) },
+ { USB_DEVICE(WBE_VID, WBE_SMARTMOUSE_PID2) },
+ { USB_DEVICE(WBE_VID, WBE_SMARTMOUSE_PID3) },
+ { USB_DEVICE(WBE_VID, WBE_SMARTMOUSE_PID4) },
+ { USB_DEVICE(FTDI_VID, QUADMOUSE_PID1) },
+ { USB_DEVICE(FTDI_VID, QUADMOUSE_PID2) },
+ { USB_DEVICE(FTDI_VID, QUADMOUSE_PID3) },
+ { USB_DEVICE(FTDI_VID, QUADMOUSE_PID4) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID1) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID2) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID3) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID4) },
{ } /* Terminating entry */
};

11 changes: 11 additions & 0 deletions make/kernel/patches/5.4.213/5690_07.62/560-fcommon_for_gcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- linux-5.4/scripts/dtc/Makefile
+++ linux-5.4/scripts/dtc/Makefile
@@ -9,7 +9,7 @@
dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o

# Source files need to get at the userspace version of libfdt_env.h to compile
-HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt
+HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt -fcommon

ifeq ($(shell pkg-config --exists yaml-0.1 2>/dev/null && echo yes),)
ifneq ($(CHECK_DTBS),)

0 comments on commit 760e0fd

Please sign in to comment.