× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Thrass
Aspirant

Compiling Kernel with snd-usb-audio for RN102 6.1.4

Hi,

I bought this nas and originally it was a tradeoof for features and price, because I really would've liked to have one with audio capabilities...
now I got this usb soundcard and a little bit of searching showed, netgear has all the necessary stuff open sourced and I can connect and setup everything how I want...

I found threads like this one: http://www.readynas.com/forum/viewtopic.php?f=35&t=61970
and this one: http://www.readynas.com/forum/viewtopic.php?f=35&t=71941

but when I ssh onto my box wget the source, extract it and try to : $make oldconfig it gives me a ton of questions I am not exactly sure how to answer
In the end I'm getting the distinct feeling I missed something because all the tutorials kinda assume one is not asked questions at that point.


So, is there a complete tutorial for a readynas with an 6.* OS, which I can follow, or does anyone have an idea what I could be doing wrong?


Thanks in advance, Thrass

P.S. here is what make oldconfig shows including the first question:

root@nas:/usr/src/linux# make oldconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
*
* Restart config...
*
*
* Linux/arm 3.0.93 Kernel Configuration
*
Patch physical to virtual translations at runtime (EXPERIMENTAL) (ARM_PATCH_PHYS_VIRT) [N/y/?] (NEW)
Message 1 of 14
Thrass
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

...
I got everything to compile but modprobe won't load the soundcore.ko
# modprobe snd-pcm-oss
modprobe: can't load module soundcore (soundcore.ko): invalid module format

after modprobe I think it's no wonder:
# modinfo sound/soundcore.ko
filename: sound/soundcore.ko
description: Core sound module
author: Alan Cox
license: GPL
vermagic: 3.0.93.RNx86_64.2.1 mod_unload modversions ARMv5
depends:


for comparison:

# uname -a
Linux nas 3.0.93.RN_ARM.1 #1 Mon Sep 30 11:49:55 PDT 2013 armv7l GNU/Linux


I think it did build the module for a x86_64 kernel, which... I absolutely don't know why... I am compiling directly on the nas and I told it explicitly to build for ARCH=arm when I got stuck here

could anyone possibly help please?
Message 2 of 14
WhoCares_
Mentor

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Your base problem at least to me seems to be that the current GPL sources for the ReadyNAS OS 6 platform are missing the defconfig.arm kernel config file. The original .config file coming with the kernel source tree from NETGEAR as well as both readynas_defaultconfig files in the /arch subtree contain the configuration for x86_64 based systems which when used will of course result in kernel modules with the wrong "vermagic" and possibly some other differing settings being built.

I already contacted NETGEAR about this and I hope they can send me a copy of the kernel config for ARM or make it available by other means. Until there is a working kernel config for ARM I think it is next to impossible for you to build a working kernel module since that would require to find the right settings by trial and error 😕

In the meantime to further debug your problem you may also wish to run "dmesg" after the failed loading of the module. The dmesg output often gives more information about why a module won't load.

-Stefan
Message 3 of 14
Thrass
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

NOOO!
... It explains everything though... 😕

Thank you very much @WhoCares, also for the pm 😄

dmesg says the following:

soundcore: disagrees about version of symbol module_layout
[...]
soundcore: no symbol version for module_layout

Which apparently tells me nothing new (just that the modules didn't (correctly) build for the (correct) kernel).
Message 4 of 14
WhoCares_
Mentor

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

I have successfully built the modules you're trying to build, just in case you don't succeed with my "hints" from the PM 😉

-Stefan
Message 5 of 14
Thrass
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

I made it :D, with your help and support!

You Sir are a Hero 😉

with the proper code and stuff provided making the modules was in fact quite unchallenging,
identifying the problem and getting the proper stuff, wasn't exactly trivial...

Thanks WhoCares,
Thanks Netgear (for the awesome product, and the sources)
Message 6 of 14
dtoasterw
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Hi,

i also want to compile the audio modules for the kernel.
Later i want to run "mopidy" to play my spotify music directly on my audio-receiver.

I have a RN104 with ReadyNASOS 6.1.8 (arm) and i have cross-compiled the modules in the development enviroment (http://apps.readynas.com/pages/?page_id=127)


- I copied this file /linux-3.0.101-0.15/arch/arm/configs/armada370_nas_defconfig to /linux-3.0.101-0.15/.config
- select the right modules with menuconfig and then i compile


When i copied the modules to my ReadyNas and run "modprobe snd-pcm-oss" i will get

modprobe: can't load module soundcore (soundcore.ko): invalid module format


modinfo sound/soundcore.ko
filename:       sound/soundcore.ko
description: Core sound module
author: Alan Cox
license: GPL
vermagic: 3.0.101 mod_unload ARMv7
depends:


uname -a
Linux nas 3.0.101.RN_ARM.1 #1 Mon Apr 14 17:24:16 PDT 2014 armv7l GNU/Linux



I read many tutorials, but the most gives only step by step instructions that dont help me solve the problem.

I think my cross-compiling worked fine because modinfo and uname shows the same arch and version of the kernel and the module.

Do you got any idea what went wrong? Or can u upload your compiled kernel modules for me?


I already tried for several weekends to finish this "little project". 😞

Thank you for your help

Sorry for my bad english :?
Message 7 of 14
WhoCares_
Mentor

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Have you checked the modinfo output for some other modules that come with the kernel? Is the "vermagic" really identical compared to your module?

-Stefan
Message 8 of 14
dtoasterw
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

For example, if i run modinfo on "/lib/modules/3.0.101.RN_ARM.1/kernel/fs/ufsd/ufsd.ko"
filename:       /lib/modules/3.0.101.RN_ARM.1/kernel/fs/ufsd/ufsd.ko
description: Paragon ufsd driver
author: Andrey Shedel & Alexander Mamaev
license: Commercial product
vermagic: 3.0.101.RN_ARM.1 mod_unload modversions ARMv7
depends:


filename:       sound/soundcore.ko
description: Core sound module
author: Alan Cox
license: GPL
vermagic: 3.0.101 mod_unload ARMv7
depends:


It might be not exactly the same. ".RN_ARM.1" and "modversions" is missing on my compiled soundcore.ko, but Kernel Version and architecure is the same.
I dont know if that could be the reason for my problem. But, if it was, what can i do to correct this?


In the .config i found this outcommented lines:

# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
Message 9 of 14
WhoCares_
Mentor

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

The difference in version is most likely what is causing your problems. Did you use the defconfig.arm provided with the ReadyNAS OS sources as starting point for your own kernel config? If so, it *should* have set the modversions correctly for you. Strong emphasis on the *should* here for NETGEAR doesn't always supply a correct defconfig file for the ARM architecture. If I recall correctly, there's a defconfig.arm file floating around here on the forums. If that one doesn't work for you or in case you can't find it, let me know. I may have a working version somewhere.

-Stefan
Message 10 of 14
dtoasterw
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Thx for your help. Can you pls upload the correct config file.
I tried to search for it but i can´t find.

Thank you very much.
Message 11 of 14
WhoCares_
Mentor

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Message 12 of 14
dtoasterw
Aspirant

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

Thank you very much for the correct config file.

I compiled the modules again, and the "vermagic" of my modules and the integrated kernel modules is exactly the same.

#modinfo sound/soundcore.ko
filename: sound/soundcore.ko
description: Core sound module
author: Alan Cox
license: GPL
vermagic: 3.0.101.RN_ARM.1 mod_unload modversions ARMv7
depends:


After i copied the files to my Readynas, i tried "depmod -a" and "modprobe snd-pcm-oss" but i still get the same error.

modprobe: can't load module soundcore (sound/soundcore.ko): invalid module format



Dmesg says:"soundcore: no symbol version for module_layout"

Any idea how can i fix this? :?


Slowly i begin to lose patience to really bring this project to an end. I already wasted to much time on this. :nashammer:
Message 13 of 14
WhoCares_
Mentor

Re: Compiling Kernel with snd-usb-audio for RN102 6.1.4

I'm currently on vacation in Greece but I'll give it a spin when I'm back. If you don't hear back from me within a week, give me a gentle nudge using this topic or a PM.

-Stefan
Message 14 of 14
Top Contributors
Discussion stats
  • 13 replies
  • 6186 views
  • 0 kudos
  • 3 in conversation
Announcements