Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Recently I've got hold of a thin client from HP, the t5325. This has a soundcard on-board and the latest snapshot of the linux kernel supports all the hardware for this device and I've got it all working, except the sound. I've built the kernel on a X86 system, crosscompiling it with the latest toolchain available.
The kernel supports the soundcard of the t5325, but won't play any sound. After Googling around, I found out that the needed ALSA version is 1.0.24 and Debian Sid delivers version 1.0.23, which lacks this support.
I've started compiling the sources from Alsa (on the HP) and the driver package already throws me an error stating:
checking for built-in ALSA... yes
configure: error: You have built-in ALSA in your kernel.
The error is pretty straight forward and built another kernel and left ALSA support out, in the .config I've commented all out.
When built and rebooted the HP with this new kernel, it throws the exact same error, however, that is impossible as I left alsa support out of this kernel. Even in /dev, there are no audio devices shown. I even completely purge the ALSA packages that Debian installed for me, but to no avail.
Does anyone have any tips on how to compile alsa for this device? I can try cross-compiling the alsa source on my X86 box, but not very sure on how to accomplish this.
Any help is appreciated and if any extra info is needed, let me know!
Are you sure it boots the newly compiled kernel and not the old one?
Did you add the kernel to the bootloader?
Maybe you can list the original .config file or a diff of the exact adjustments you made?
Kernel
You can build a kernel using the kirkwood kernelconfig, there is one major point to look out for and that is the XGI display driver, since this driver is staging, this needs to be extra specified in Device Drivers -> Staging Drivers, and disable the option “Disallow staging drivers from being built”, once disabled, you’ll see all the staging (testing) drivers in the current kernel, there is your XGI display driver. Also, if you want to have sound on the t5325, enable Alsa and enable the SoC audio options for the t5325 (you’ll notice the options directly).
I’ve also shared my working kernel for the t5325 on my Downloads page, check it out, if you don’t want to compile a kernel of your own.
I've come further with cross compiling the driver, but when make is issued, I see that it does not see the arch correctly:
Code:
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
/root/linux-3.0//include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
Obviously there should be "arch/arm" between the double slashes " // ". I've exported ARCH=arm, but does not work, my configure command is:
With the kernel sources being in /root/linux-3.0/ my soundcard being a kirkwood-soc-t5325 and only need the soc card options as mentioned, rest is hda related and not used on this platform.
The make process goes abit further now, but hangs on:
Code:
copying file alsa-kernel/usb/usx2y/usx2yhwdeppcm.c
patching file usx2yhwdeppcm.c
Hunk #2 succeeded at 153 (offset 1 line).
Hunk #3 succeeded at 233 (offset 1 line).
Hunk #4 succeeded at 267 (offset 1 line).
Hunk #5 succeeded at 307 (offset 1 line).
Hunk #6 succeeded at 328 (offset 1 line).
Hunk #7 succeeded at 454 (offset 1 line).
Hunk #8 succeeded at 482 (offset 1 line).
Hunk #9 succeeded at 715 (offset 1 line).
Hunk #10 succeeded at 728 (offset 1 line).
Hunk #11 succeeded at 803 (offset 1 line).
make[3]: Leaving directory `/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/usb/usx2y'
make[2]: Leaving directory `/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/usb'
make[1]: Leaving directory `/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70'
make -C /root/linux-3.0 SUBDIRS=/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70 CPP="gcc -E" CC="gcc" modules
make[1]: Entering directory `/root/linux-3.0'
CC [M] /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.o
In file included from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:293:1: warning: "GFP_DMA32" redefined
In file included from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:63,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
include/linux/gfp.h:147:1: warning: this is the location of the previous definition
In file included from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:752: error: static declaration of ‘jiffies_to_msecs’ follows non-static declaration
include/linux/jiffies.h:296: note: previous declaration of ‘jiffies_to_msecs’ was here
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:771: error: static declaration of ‘msecs_to_jiffies’ follows non-static declaration
include/linux/jiffies.h:298: note: previous declaration of ‘msecs_to_jiffies’ was here
In file included from include/linux/scatterlist.h:6,
from include/linux/dma-mapping.h:7,
from include/asm-generic/pci-dma-compat.h:7,
from /root/linux-3.0/arch/arm/include/asm/pci.h:5,
from include/linux/pci.h:1293,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:872,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
include/linux/mm.h:290: error: conflicting types for ‘snd_compat_vmalloc_to_page’
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:673: note: previous declaration of ‘snd_compat_vmalloc_to_page’ was here
In file included from /root/linux-3.0/arch/arm/include/asm/pci.h:5,
from include/linux/pci.h:1293,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:872,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
include/asm-generic/pci-dma-compat.h:110: error: expected identifier or ‘(’ before numeric constant
In file included from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h: In function ‘snd_pci_orig_save_state’:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:1121: error: too many arguments to function ‘pci_save_state’
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h: In function ‘snd_pci_orig_restore_state’:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:1125: error: too many arguments to function ‘pci_restore_state’
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:1125: error: void value not ignored as it ought to be
In file included from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:1526:1: warning: "page_to_pfn" redefined
In file included from /root/linux-3.0/arch/arm/include/asm/memory.h:304,
from /root/linux-3.0/arch/arm/include/asm/system.h:165,
from /root/linux-3.0/arch/arm/include/asm/bitops.h:27,
from include/linux/bitops.h:22,
from include/linux/kernel.h:17,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:63,
from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
include/asm-generic/memory_model.h:72:1: warning: this is the location of the previous definition
In file included from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h: At top level:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:1697: error: static declaration of ‘pci_ioremap_bar’ follows non-static declaration
include/linux/pci.h:1444: note: previous declaration of ‘pci_ioremap_bar’ was here
In file included from /root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:19:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/include/adriver.h:1927: error: static declaration of ‘vzalloc’ follows non-static declaration
include/linux/vmalloc.h:54: note: previous declaration of ‘vzalloc’ was here
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c: In function ‘snd_compat_vmalloc_to_page’:
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:38: error: implicit declaration of function ‘VMALLOC_VMADDR’
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:40: error: ‘init_mm’ undeclared (first use in this function)
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:40: error: (Each undeclared identifier is reported only once
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:40: error: for each function it appears in.)
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:44: error: implicit declaration of function ‘pte_offset’
/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.c:44: warning: assignment makes pointer from integer without a cast
make[3]: *** [/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore/memory_wrapper.o] Error 1
make[2]: *** [/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70/acore] Error 2
make[1]: *** [_module_/root/alsa-driver-1.0.24.47.gfa552.1132.g89a70] Error 2
make[1]: Leaving directory `/root/linux-3.0'
make: *** [compile] Error 2
Before this error there is alot of messages of foldes that are being worked through and alot of patches being applied.
Stupidly enough this also occurs when cross-compiling this driver. I've also emailed this to the alsa mailing list, but no answers yet.
From what I can make of it, it seems to be related to some memory related functions given in the kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.