Compile a kernel module

Discussion about U-Boot and the kernel.

Compile a kernel module

Postby atlaware » Wed Nov 13, 2013 8:58 am

hardware: cubieboard2, arm7, kernel 3.3.0-4 (default arch).

Hello...
I need some help for use an external usb sound adapter (0d8c:000c): in other linux (dockstar and standard debian) work great with load of kernel module: snd-usb-audio, unfortunately this module on cubieboard2 kernel isn't compiled and/or set as kernel option:
$this->bbcode_second_pass_code('', '
zcat /proc/config.gz |grep -i snd_usb
[root@dunz usb]# zcat /proc/config.gz |grep -i snd_usb
CONFIG_SND_USB=y
# CONFIG_SND_USB_AUDIO is not set
...etc...
')
How is the best (and possible easy) way to compile this module? I need to recompile all the kernel?

Thank you in advance and thank you for the great archlinuxarm project!

Atla
atlaware
 
Posts: 8
Joined: Fri Nov 05, 2010 9:37 am

Re: Compile a kernel module

Postby WarheadsSE » Wed Nov 13, 2013 12:39 pm

Easiest? Update the config from PKGBUILDs and do a pull request :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Compile a kernel module

Postby atlaware » Wed Nov 13, 2013 2:12 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'E')asiest? Update the config from PKGBUILDs and do a pull request :)

hum good :) I will do this on github :)

UPDATE: pull request submitted :)

Meanwhile I have rebuild the complete kernel, and the module work good :)
(easier than I expected)
$this->bbcode_second_pass_code('', '
[root@dunz ~]# aplay -l
card 2: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

[root@dunz boot]# zcat /proc/config.gz |grep -i snd_usb
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
')

Thank You :)
atlaware
 
Posts: 8
Joined: Fri Nov 05, 2010 9:37 am

Re: Compile a kernel module

Postby eomanis » Wed Nov 13, 2013 9:40 pm

Hello,

I am in need of the modules ath9k and ath9k_htc so I can use a Cubieboard2 to make a wireless access point and I just saw this post, and its topic fits exactly.

However before I try to do a pull request on github I guess I should at least check if the modules work, so I wanted to compile core/linux-sun7i myself first with the appropriate flags enabled.
So I cloned into https://github.com/archlinuxarm/PKGBUILDs.git, grabbed the PKGBUILDs/core/linux-sun7i dir, cd'd into it and ran $this->bbcode_second_pass_code('', 'makepkg --nobuild')
However, makepkg complains that the file "config" does not pass the validity check:
$this->bbcode_second_pass_code('', '
[defaultuser@cubie2 linux-sun7i]$ makepkg --nobuild
==> Making package: linux-sun7i 3.3.0-5 (Wed Nov 13 14:26:42 MST 2013)
==> Retrieving sources...
-> Found e906c090ca17ed30ed0e826df3c4d095e5f5c865.tar.gz
-> Found config
==> Validating source files with md5sums...
e906c090ca17ed30ed0e826df3c4d095e5f5c865.tar.gz ... Passed
config ... FAILED
==> ERROR: One or more files did not pass the validity check!
')
How would I go about resolving this problem, and is what I do even the right thing for what I intend to do (build the kernel with ath9k and ath9k_htc support)?
eomanis
 
Posts: 3
Joined: Sun Nov 10, 2013 8:08 pm

Re: Compile a kernel module

Postby WarheadsSE » Wed Nov 13, 2013 10:10 pm

Just a matter of an md5sum, easy enough to see in the PKGBUILD, which you should be reading
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Compile a kernel module

Postby eomanis » Thu Nov 14, 2013 7:52 am

I exchanged the corresponding MD5 hash in the PKGBUILD and now it appears to be working.
Thank you for pointing that out.
eomanis
 
Posts: 3
Joined: Sun Nov 10, 2013 8:08 pm

Re: Compile a kernel module

Postby eomanis » Thu Nov 14, 2013 10:54 pm

I've got the kernel built with CONFIG_ATH9K* support (except the DEBUG stuff) and now hostapd is working. Very nice.

After this I copied the modified config file back into the git checkout path, and because the FAQ of github said so, https://help.github.com/articles/creating-a-pull-request, I created a new branch, committed the change to it, and tried to push it to github using my login there. However I do not have permissions to do that (well that does not surprise me much).
This is also the first time I am using github and git for anything else than pulling in stuff.

So basically I would like to submit a pull request, but can't right now because of lack of permissions and also most likely severe lack of git/github knowledge.
I don't want to break stuff and given the latter I don't really want write permission to the Arch Linux ARM repo.

Could anyone get the following change to core/linux-sun7i/config committed?
$this->bbcode_second_pass_code('', '1422,1423c1422,1431
< # CONFIG_ATH9K is not set
< # CONFIG_ATH9K_HTC is not set
---
> CONFIG_ATH9K_HW=m
> CONFIG_ATH9K_COMMON=m
> CONFIG_ATH9K=m
> CONFIG_ATH9K_AHB=y
> # CONFIG_ATH9K_DEBUGFS is not set
> CONFIG_ATH9K_DFS_CERTIFIED=y
> CONFIG_ATH9K_RATE_CONTROL=y
> CONFIG_ATH9K_BTCOEX_SUPPORT=y
> CONFIG_ATH9K_HTC=m
> # CONFIG_ATH9K_HTC_DEBUGFS is not set
2524a2533
> CONFIG_SND_HWDEP=m
')
This would be really great.

Thanks a lot for the help.
eomanis
 
Posts: 3
Joined: Sun Nov 10, 2013 8:08 pm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 2 guests