Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel sources for DSM 6.2.3 #4399

Merged
merged 25 commits into from
Jan 30, 2021
Merged

Add kernel sources for DSM 6.2.3 #4399

merged 25 commits into from
Jan 30, 2021

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Jan 20, 2021

Motivation: Been waiting for kernel sources for months for DSM-6.2.3 in order to get functional modules to run.
Linked issues: #4144

Checklist

  • Build rule all-supported completed successfully
  • Package upgrade completed successfully
  • New installation of package completed successfully

Changes

  • Now only does a modules_prepare instead of building all the modules by default
  • Only add + to EXTRAVERSION if kernel is > 4.x

Bug was introduced with PR#4320 creating a duplicate usage
of KERNEL_DIR (vs KERNELS_DIR) variable.  Changed the kernel
source dir to KERNEL_SOURCE_DIR in order to keep the new
variable aligned with other distrib vars
Copy link
Contributor

@ymartin59 ymartin59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor improvement proposal.

kernel/syno-armada375-6.2.3/Makefile Outdated Show resolved Hide resolved
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 24, 2021

@hgy59 and @ymartin59 I decided to go all-in and make all the in-dept changes to the kernel building process as there where way too much churn in the kernel Makefiles ...

Testing still under going to confirm it builds successfully on all 5.x+ DSM.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 24, 2021

@ymartin59 and @hgy59 May I suggest we remove entirely all kernels < DSM-6.1.
File size are just ridiculous, 1.5-1.6gb where a fraction actually is the kernel sources.
And honestly, I doubt they will ever be used again...

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 27, 2021

Honestly this was brutal... but it ends-up now working quite well.
There is only the obscure case of DSM-4.2 for pcc824 arch which fails to engage on make oldconfig.
Beyond that, I tested every single one of them (and have a feeling of having downloaded the entire sourceforge.net)

Now is pretty much the time to adjust variable names or any other change you see fit.
Otherwise, I think its good for a merge.

Copy link
Contributor

@ymartin59 ymartin59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job and big effort, really much more maintainable code !

@ymartin59
Copy link
Contributor

@th0ma7 I am interested in building some USB modules for my model, how should I process?
I searched in wiki but with no luck.
Notice there are old references to "REQ_KERNEL" in https://github.com/SynoCommunity/spksrc/wiki/Compile-and-build-rules
May you please write some detail about kernel module compilation?

th0ma7 referenced this pull request in publicarray/spksrc Jan 30, 2021
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 30, 2021

@ymartin59 I'll look into adjusting the wiki pages to reflect some of the change.
Honestly this PR was overdue for kernel dev to actually work.
There are two approach that can be taken: outside from kernel tree or in-tree.
My PR #4144 is using a mechanism that is out-of-tree which requires the kernel to be prepared first than new code is built against it.

Personally I'm more used to the in-tree by simply adapting the configuration to enable the needed device then building the needed pieces at the directory level or down to the driver specific level such as:

$ make modules_prepare
$ make modules M=drivers/i2c
$ make modules M=drivers/media/i2c
$ make modules M=drivers/media/dvb-frontends -j4
$ make modules M=drivers/media/tuners -j4
$ make modules M=drivers/media/usb/em28xx
$ make modules M=drivers/media -j4

After this PR we should be in good shape to enable this functionality through a wrapper of some sort... more work in perspective.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 30, 2021

BTW, I guess the configuration adjustment helper used busybox could in a form or another be reused for kernel configs... just a thought.

@th0ma7 th0ma7 merged commit 7de678c into SynoCommunity:master Jan 30, 2021
@th0ma7 th0ma7 deleted the dsm623 branch January 30, 2021 12:42
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 30, 2021

@ymartin59 forgot to mention, as the kernels are now built within the package directory tree (e.g. spksrc/spk/<package>/work*) this allows to play with the default kernel configuration without affecting the default kernel tree (spksrc/kernel/syno*). That should give much more flexibility to compile specific modules for various DSM kernels & versions.

@ymartin59
Copy link
Contributor

@th0ma7 Ok, my interest is to achieve the idea of simplifying PR #3787 to deliver first a single package with all USB serial drivers, and eventually a custom do-it-yourself one driver package (for advanced users)

@th0ma7 th0ma7 mentioned this pull request Jan 30, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants