Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mk/spksrc.cross-kernel-configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ ifeq ($(call version_lt, ${TC_KERNEL}, 3.8),1)
@$(MSG) "oldconfig OLD style... $(TC_KERNEL) < 3.8"
@$(RUN) yes "" | $(MAKE) oldconfig
else
@$(MSG) "make olddefconfig for kernel $(TC_KERNEL)"
@$(RUN) $(MAKE) olddefconfig
endif
# Call to make kernelversion is not available for kernel <= 3.0
Expand Down
28 changes: 24 additions & 4 deletions mk/spksrc.cross-kernel-module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,42 @@ pre_kernel_module_target: kernel_module_msg
kernel_module_prepare:
@$(MSG) "DISTRIB_DIR = $(DISTRIB_DIR)"
@$(MSG) "Prepare kernel source for module build"
@for module in $(REQUIRE_KERNEL_MODULE); \
do \
cd $(WORK_DIR)/$(PKG_DIR); scripts/config --module $${module%%:*} ; \
done
# olddefconfig is not available on kernels < 3.8
ifeq ($(call version_lt, ${TC_KERNEL}, 3.8),1)
@$(MSG) "make oldconfig OLD style... $(TC_KERNEL) < 3.8"
@$(RUN) yes "" | $(MAKE) oldconfig
else
@$(MSG) "make olddefconfig for kernel $(TC_KERNEL)"
@$(RUN) $(MAKE) olddefconfig
endif
@if [ -f $(WORK_DIR)/$(PKG_DIR)/tools/lib/subcmd/Makefile ]; then \
$(MSG) "- Disable gcc warnings as error in ./tools/lib/subcmd/Makefile (5.x kernels)." ; \
sed "s/-Wall //" -i.bak $(WORK_DIR)/$(PKG_DIR)/tools/lib/subcmd/Makefile ; \
fi
@if [ -f $(WORK_DIR)/$(PKG_DIR)/tools/objtool/Makefile ]; then \
$(MSG) "- Disable build of ./tools/objtool (5.x kernels)." ; \
echo "all:" > $(WORK_DIR)/$(PKG_DIR)/tools/objtool/Makefile ; \
fi
@$(RUN) $(MAKE) modules_prepare

.PHONY: kernel_module_target
kernel_module_target: $(PRE_KERNEL_MODULE_TARGET) kernel_module_prepare
@$(MSG) Compile kernel modules $(REQUIRE_KERNEL_MODULE)
@for module in $(REQUIRE_KERNEL_MODULE); \
do \
$(MAKE) kernel_module_compile module=$$module ; \
done

.PHONY: kernel_module_compile
kernel_module_compile:
@$(MSG) Compiling kernel module module=$(module)
@$(RUN) LDFLAGS="" $(MAKE) -C $(WORK_DIR)/$(PKG_DIR) INSTALL_MOD_PATH=$(STAGING_INSTALL_PREFIX) modules M=$(word 2,$(subst :, ,$(module))) $(firstword $(subst :, ,$(module)))=m $(lastword $(subst :, ,$(module))).ko
@$(MSG) Compile kernel module module=$(module)
@$(RUN) LDFLAGS="" $(MAKE) -C $(WORK_DIR)/$(PKG_DIR) M=$(word 2,$(subst :, ,$(module))) $(firstword $(subst :, ,$(module)))=m OBJECT_FILES_NON_STANDARD=y modules
@$(RUN) cat $(word 2,$(subst :, ,$(module)))/modules.order >> $(WORK_DIR)/$(PKG_DIR)/modules.order
@$(RUN) mkdir -p $(STAGING_INSTALL_PREFIX)/lib/modules/$(subst syno-,,$(NAME))/$(TC_KERNEL)/$(word 2,$(subst :, ,$(module)))
install -d $(STAGING_INSTALL_PREFIX)/lib/modules/$(subst syno-,,$(NAME))/$(TC_KERNEL)/$(word 2,$(subst :, ,$(module)))
install -m 644 $(WORK_DIR)/$(PKG_DIR)/$(word 2,$(subst :, ,$(module)))/$(lastword $(subst :, ,$(module))).ko $(STAGING_INSTALL_PREFIX)/lib/modules/$(subst syno-,,$(NAME))/$(TC_KERNEL)/$(word 2,$(subst :, ,$(module)))

post_kernel_module_target: $(KERNEL_MODULE_TARGET)
Expand All @@ -83,4 +104,3 @@ $(KERNEL_MODULE_COOKIE): $(POST_KERNEL_MODULE_TARGET)
else
kernel_module: ;
endif

3 changes: 1 addition & 2 deletions spk/synocli-kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ SPK_ICON = src/synocli-kernel.png
DEPENDS = cross/usbutils cross/psmisc

MAINTAINER = th0ma7
DESCRIPTION = "SynoCli Kernel Tools provides a set of small command-line utilities: fuser, usb-devices, usbhid-dump"
OPTIONAL_DESC =
DESCRIPTION = "SynoCli Kernel Tools provides a set of small command-line utilities: fuser, usb-devices, usbhid-dump. Additionally the synocli-kernelmodule.sh script helps to install kernel modules of synokernel packages."
DISPLAY_NAME = SynoCli Kernel Tools
STARTABLE = no
CHANGELOG = "1. Add support for r1000 arch"
Expand Down
2 changes: 1 addition & 1 deletion spk/synocli-kernel/src/synocli-kernelmodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ get_ko_list() {

if [ "${SPK_CFG}" ]; then
# Check that configuration exists (if requested)
if [ ! -f ${SPK_CFG_PATH}/${SPK_CFG} ]; then
if [ ! -r ${SPK_CFG_PATH}/${SPK_CFG} ]; then
usage
echo -ne "\nERROR: Configuration file [${SPK_CFG_PATH}/${SPK_CFG}] does not exist or inaccessible...\n\n"
exit 1
Expand Down
13 changes: 4 additions & 9 deletions spk/synokernel-cdrom/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
SPK_NAME = synokernel-cdrom
SPK_VERS = 1.3
SPK_REV = 3
SPK_REV = 4
SPK_ICON = src/synokernel-cdrom.png

DEPENDS =

REQUIRE_KERNEL ?= 1
REQUIRE_KERNEL_MODULE = CONFIG_CDROM_PKTCDVD:drivers/cdrom:cdrom
REQUIRE_KERNEL_MODULE = CONFIG_CDROM_PKTCDVD:drivers/cdrom:cdrom
REQUIRE_KERNEL_MODULE += CONFIG_BLK_DEV_SR:drivers/scsi:sr_mod

MAINTAINER = th0ma7
DESCRIPTION = "Provides Synology kernel CD-ROM drivers cdrom.ko and sr_mod.ko"
CHANGELOG = "1. Support DSM-7.1 and DSM-7.2"
DESCRIPTION = "Provides Synology kernel CD-ROM drivers cdrom.ko and sr_mod.ko."
CHANGELOG = "Add support for Linux 5.x kernels."

UNSUPPORTED_ARCHS = $(PPC_ARCHS)
# archs with kernel 5.x fail to build
# error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel
# with installation of elfutils and libelf-dev to the development environment,
# it further fails with error: pointer may be used after ‘realloc’ [-Werror=use-after-free]
UNSUPPORTED_ARCHS += epyc7002 rtd1619b
# we only have ipq806x for SRM 1.2, but this fails with:
# /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
REQUIRED_MIN_SRM = 1.3
Expand Down
11 changes: 3 additions & 8 deletions spk/synokernel-usbserial/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = synokernel-usbserial
SPK_VERS = 1.2
SPK_REV = 9
SPK_REV = 10
SPK_ICON = src/synokernel-usbserial.png

DEPENDS =
Expand All @@ -15,15 +15,10 @@ REQUIRE_KERNEL_MODULE += CONFIG_USB_SERIAL_PL2303:drivers/usb/serial:pl2303
REQUIRE_KERNEL_MODULE += CONFIG_USB_SERIAL_TI:drivers/usb/serial:ti_usb_3410_5052

MAINTAINER = th0ma7
DESCRIPTION = "Provides usbserial.ko ch341.ko cp210x.ko pl2303.ko ti_usb3410_5052.ko and ftdi_sio.ko"
CHANGELOG = "1. Support DSM-7.1 and DSM-7.2"
DESCRIPTION = "Provides usbserial.ko ch341.ko cp210x.ko pl2303.ko ti_usb3410_5052.ko and ftdi_sio.ko."
CHANGELOG = "Add support for Linux 5.x kernels."

UNSUPPORTED_ARCHS = $(PPC_ARCHS)
# archs with kernel 5.x fail to build
# error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel
# with installation of elfutils and libelf-dev to the development environment,
# it further fails with error: pointer may be used after ‘realloc’ [-Werror=use-after-free]
UNSUPPORTED_ARCHS += epyc7002 rtd1619b
# we only have ipq806x for SRM 1.2, but this fails with:
# /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
REQUIRED_MIN_SRM = 1.3
Expand Down