WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Latest kernel version building for new audio card driver module  (Read 5391 times)

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
I need to add new drivers for my audio card. I've used the kernel patch which works well in the Rasbian.
Guess that the kernel source is the same and after patching when I'll use the .config for TC than it may work.
There need to be some additional setup, or script to modify the kernel structure hence the system runs in the RAM and that the modules format is different. I may try-fail test a lot, but the only side effect is that the kernel make takes around 10 hours.

Regards,

Jan

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Latest kernel version building for new audio card driver module
« Reply #1 on: May 10, 2015, 02:57:10 AM »
piCore is running on stock Raspberry Pi kernel, the only patch is the 192kbps/24bit HDMI audio patch, with a different .config than Raspbian has.

10hours? Is it on Raspberry? I'm crosscompiling kernel on x86 machine. It takes 10 minutes on my current machine, less than an hour on my old Linux server.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #2 on: May 10, 2015, 07:53:35 AM »
Yes, I'm compiling it on Raspberry. Don't have PC for cross compilation.
What's the difference between the Rasbian and TC then, when the kernel is the same?
As we've discussed some time ago, the modules are different because the kernel is different. But now you say that it's the same.

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #3 on: May 10, 2015, 08:43:14 AM »
For Rasbian kernel build I've used these steps:

Code: (bash) [Select]
git clone --depth=1 https://github.com/raspberrypi/linux
cd linux
git am /home/pi/*.patch
make bcmrpi_defconfig
make
sudo make modules_install
mkknlimg arch/arm/boot/zImage /boot/kernel.img

But this gives regular kernel image with the overlay support and regular .ko modules.


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Latest kernel version building for new audio card driver module
« Reply #4 on: May 10, 2015, 07:22:05 PM »
As we've discussed some time ago, the modules are different because the kernel is different. But now you say that it's the same.

In the opening post you were talking about kernel source. piCore kernel source is the same as Raspbian source from GitHub, as I wrote already. Of course compiled kernel is different and modules are not compatible.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #5 on: May 11, 2015, 03:13:15 AM »
OK than, if the kernel source is the same, the kernel compilation need to be different to get different results. What setup to use to get the difference? Is somewhere tutorial what to modify for the kernel compilation? I was looking in the forum, but lo lucky.
BTW, is there some difference from standard setup when cross-compiling on the PC booted live TC from CD?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Latest kernel version building for new audio card driver module
« Reply #6 on: May 11, 2015, 03:51:59 AM »
What difference? As I already wrote few posts back the .config and the HDMI audio patch. For info on cross compilation see

http://elinux.org/Raspberry_Pi_Kernel_Compilation#2._Cross_compiling_from_Linux
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #7 on: May 11, 2015, 10:01:56 AM »
The different dedicated setup to get the TC kernel and modules and not Rasbian kernel file and modules.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1266
Re: Latest kernel version building for new audio card driver module
« Reply #8 on: May 11, 2015, 12:58:22 PM »
The different dedicated setup to get the TC kernel and modules and not Rasbian kernel file and modules.

You are just getting hung up in terminology.

TC uses the identical Kernel Code that Rasbian uses.   However it is compiled with a different .config.   As many items are compiled as modules to reduce the kernel size, and then the initrd only includes the bare minimum modules to start the Rpi

In theory, if you have a new kernel module for your sound card, it should be simple to just compile that modules and then build and extension and load it.....however kernels are very finicky when you try to add modules that were compiled on a different machine.  A number of us have tried and have been spotty at results.

So that leaves you with remastering piCore.   Replacing the kernel and the initrd on the boot SDcard with your kernel and all of your modules.   Take a look at remastering in the wiki.  http://wiki.tinycorelinux.net/wiki:remastering

You will also have to rebuild any kernel module extensions.   Like alsa-modules.


Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #9 on: May 11, 2015, 01:57:50 PM »
Hence I have the kernel patch, I need to patch the kernel and than make modules. I've made it with Rasbian and it works.
 The same I need for TC. Hence I already have patched kernel source for Rasbian, the only what I need is the .config file for TC to make new kernel and modules. But how to get this .config? I was looking for it, but no lucky. If you have it, please share, or provide more info where to get it.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Latest kernel version building for new audio card driver module
« Reply #10 on: May 11, 2015, 02:02:58 PM »
Kernel source, config, etc is available for armv6 at:

http://tinycorelinux.net/6.x/armv6/release/src/kernel/

Alternativele execute

Code: [Select]
zcat /proc/config.gz
in a terminal on running system. Please note armv6 and armv7 kernels are different with different .config file.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #11 on: May 12, 2015, 03:50:09 AM »
Yes, I know about this source, but for this patch I need to update to the latest kernel, means 3.18.12.
I've used the kernel source from github.com/raspberrypi/linux and .config genereated by running:
Code: (bash) [Select]
make bcmrpi_defconfigMay I use you 3.18.10 .config even for this last kernel?


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Latest kernel version building for new audio card driver module
« Reply #12 on: May 12, 2015, 04:14:23 AM »
May I use you 3.18.10 .config even for this last kernel?

Yes
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Latest kernel version building for new audio card driver module
« Reply #13 on: May 13, 2015, 02:36:05 AM »
After several hours of compilation i fails with error:
Code: (bash) [Select]
scripts/link-vmlinux.sh: trap: line 113: ERR: invalid signal specification
Makefile:923: receipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

Any idea what's wrong?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Latest kernel version building for new audio card driver module
« Reply #14 on: May 13, 2015, 05:56:54 AM »
That script requires bash.
The only barriers that can stop you are the ones you create yourself.