belgio99 / dsm7-dvb-drivers

Updated guide (and some compiled drivers) to make USB DVB devices work on Synology's DSM 7.
7 stars 2 forks source link

Compilation error: File not found: /lib/modules/4.4.302+/build/.config #2

Open Snafu opened 2 months ago

Snafu commented 2 months ago

Hi @belgio99, I stumbled upon your repo while searching for a way to build the v4l drivers for my Synology DS1821+ NAS (v1000 architecture) running DSM7. I followed the steps in your readme but created a V1000 config and board folder and files instead of the Geminilake ones. I also downloaded the v1000 files from https://archive.synology.com/download I can build the kernel, I manipulated the media_build repo, checked out the correct commit and disabled the git pull command to update, but when executing ./md_builder.sh -B media -d SYNO-V1000 again to build the v4l kernel modules, I get an error. Any advice? I'm compiling in an ubuntu docker container on the NAS itself.

root@07acd4a885d4:/compile/Embedded-MediaDrivers# ./md_builder.sh -B media -d SYNO-V1000
build media
Device: SYNO-V1000
custom environment
custom kernel build func
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  Building modules, stage 2.
  MODPOST 517 modules
custom media build func
make: Entering directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/v4l'
No version yet, using 4.4.302+
scripts/make_makefile.pl
Updating/Creating .config
make[1]: Entering directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/linux'
Applying patches for kernel 4.4.302+
patch -s -f -N -p1 -i ../backports/api_version.patch
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c
|index b6536bbad530..401ed65c834b 100644
|--- a/drivers/media/cec/core/cec-api.c
|+++ b/drivers/media/cec/core/cec-api.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
|index 3bae24b15eaa..7f7cc64c637c 100644
|--- a/drivers/media/mc/mc-device.c
|+++ b/drivers/media/mc/mc-device.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|index 54afc9c7ee6e..4572a87acc0b 100644
|--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
make[1]: *** [Makefile:132: apply_patches] Error 1
make[1]: Leaving directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/linux'
Preparing to compile for kernel version 4.4.302
File not found: /lib/modules/4.4.302+/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4.
Updating/Creating .config
make[1]: Entering directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/linux'
make[2]: Entering directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/linux'
Unapplying patches
make[2]: Leaving directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/linux'
Applying patches for kernel 4.4.302+
patch -s -f -N -p1 -i ../backports/api_version.patch
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c
|index b6536bbad530..401ed65c834b 100644
|--- a/drivers/media/cec/core/cec-api.c
|+++ b/drivers/media/cec/core/cec-api.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
|index 3bae24b15eaa..7f7cc64c637c 100644
|--- a/drivers/media/mc/mc-device.c
|+++ b/drivers/media/mc/mc-device.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|index 54afc9c7ee6e..4572a87acc0b 100644
|--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
make[1]: *** [Makefile:132: apply_patches] Error 1
make[1]: Leaving directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/linux'
Preparing to compile for kernel version 4.4.302
File not found: /lib/modules/4.4.302+/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4.
No kernel files. You need to run "make download untar" or "make dir DIR=<your_git_source_dir>" first!
exit 1
make: *** [Makefile:6: def] Error 1
make: Leaving directory '/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/v4l'
root@07acd4a885d4:/compile/Embedded-MediaDrivers#
Snafu commented 2 months ago

I got a bit further now, but still cannot compile the DVB modules. I forked you repo and changed the README.md in mine. In Step 5 I added the output of the terminal. https://github.com/Snafu/dsm7-dvb-drivers

belgio99 commented 2 months ago

Hi, I've seen your logs.

Your offending line seems:

make -C /compile/Embedded-MediaDrivers/build/SYNOV1000/linux-4.4.x M=/compile/Embedded-MediaDrivers/build/SYNOV1000/media_build/v4l modules

It seems that this command fails (that's the actual compilation call).

I would suggest you to try to run this command in a separate shell to check where it actually fails. Feel free to post the output if you can't spot the problem.

bashman83 commented 2 months ago

Hey guys. @Snafu did you ever end up getting this one sorted? I'm using a DS1522+ with the Hauppauge Dual wintv dongle. I've also run into the same error you had.

Snafu commented 2 months ago

Hi @belgio99 thanks for your help. I'll give it a shot when I have time again. @bashman83 I'm currently quite busy with work and couldn't continue yet. I'll post here as well if I make any progress