WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to use a newer kernel?  (Read 59345 times)

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #45 on: April 07, 2013, 09:57:31 AM »
Hi bmarkus and tinypoodle

You both focus on the module issue - so I confident that that is where my problem is.

As you probably already have figured out I'm not so familiar with linux, but lately I have been reading a lot about linux, and started to try to learn how to make a kernel for piCore.

So if I should fix this in a correct way I suppose that I need to make the modules for my newly build kernel?

From the raspberry page I have been using (http://elinux.org/RPi_Kernel_Compilation) I copied this:

Code: [Select]
Now you need to transfer the modules. Set an environment variable that points to a temporary module path.
export MODULES_TEMP=~/modules

In the build directory, run the following command [i](I changed it a bit because the CROSS_Compile path is in my .config file)[/i]:
make ARCH=arm INSTALL_MOD_PATH=${MODULES_TEMP} modules_install

The contents of this directory should then be copied into the RPi root directory.


This resulted in the following files:
Module.symvers
Stystem.map
modules.order
.vmlinux.cmd
.tmp_System.map
vmlinux
.tmp_kallsysms2.o
.tmp_vmlinux1
vmlinux.o
.version

Is that correct, and what should I do with these files?

Steen
 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: How to use a newer kernel?
« Reply #46 on: April 07, 2013, 10:14:22 AM »
This resulted in the following files:

Module.symvers
Stystem.map
modules.order
.vmlinux.cmd
.tmp_System.map
vmlinux
.tmp_kallsysms2.o
.tmp_vmlinux1
vmlinux.o
.version


And hopefully modules themselves. Are modules built?
Béla
Ham Radio callsign: HA5DI

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

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #47 on: April 07, 2013, 10:32:39 AM »
And hopefully modules themselves. Are modules built?

That is the question - where should I find the modules?

I think that I may have made it difficult for myself because of the directory structure I have been using.

I extracted the linux 3.6.11 to a directory called  linux-rpi-3.6.11
Then cd'ed into linux-rpi-3.6.11 whith all the directories already present from a linux system.

Standing in this directory I made the kernel which was found in /arch/erm/boot
but the modules I reaaly don't know where to find. I can see a lot of directories which time stamps indicate that they were changed at the time the modules were build. Like:
sound/usb
sound/drivers
sound/core
sound/arm

In these directories there are a lot of subdirectories and also files called something like:
snd-usbmidi-lib.ko
snd-usb-audio.ko
etc

Steen



Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to use a newer kernel?
« Reply #48 on: April 07, 2013, 10:58:47 AM »
I had a look much earlier at the link you posted and I think your chances are best when following all steps in detail.

.ko extension is file naming convention for kernel modules starting with Linux 2.6
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #49 on: April 08, 2013, 12:47:46 PM »
Hi I have not given up on learning to build a kernel with its modules - but it will take some time.
I don't know exactly what to do after having build the kernel - the modules should go into the piCore.gz?

In the meantime some info for bmarcus.
The problem I had with using a wifi-USB dongle and a USB-DAC at the same time could be solved by adding this line to the cmdline.txt: dwc_otg.speed=1


But also adding  "options snd-usb-audio nrpacks=1" to the /etc/modprobe.conf file seems to make it better.

Hopefully these USB problems will be solved at some time.

Steen

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to use a newer kernel?
« Reply #50 on: April 08, 2013, 02:55:07 PM »
I don't know exactly what to do after having build the kernel - the modules should go into the piCore.gz?

http://wiki.tinycorelinux.net/wiki:custom_kernel
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: How to use a newer kernel?
« Reply #51 on: April 08, 2013, 03:13:05 PM »
The problem I had with using a wifi-USB dongle and a USB-DAC at the same time could be solved by adding this line to the cmdline.txt: dwc_otg.speed=1


There are many issues with the Pi's USB stack, like USB keyboard breaks WiFi link, incompatibility wit keyboards, peformance isssue with playback, etc. affecting various distributions and applications. Also some kernel guys simply call is scrap.

dwc_otg.speed=1

limits USB speed to 12 Mbit/s which means less overhead for driver/CPU. In many cases it solves the problem, but it is limiting connected unit's performance too.

You may read this:

http://raspberrypi.stackexchange.com/questions/1886/what-kernel-parameters-are-available-for-fixing-usb-problems

Béla
Ham Radio callsign: HA5DI

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

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #52 on: April 14, 2013, 01:34:03 AM »
hi I hope you have not given up on me, I'm still trying and reading up on how to make a kernel + modules for raspberry.

The status now is:
I can build a functional kernel if I use the .config file from bmarcus's 3.6.11 kernel.

But after reading the tinycore wiki: http://wiki.tinycorelinux.net/wiki:custom_kernel
 I stumbled on the following sentence:

Code: [Select]
"The TC patches and other related files for the standard TC kernel are available at
http://tinycorelinux.net/4.x/x86/release/src/kernel/ "

Should I apply the TC-patches to the raspberry kernel before building the kernel, and can the patches from the x86 version be used on an ARM kernel?

And regarding the modules - this is where I think I have most problems:

Code: [Select]
When it comes to the modules and firmware files, you basically have two options, either let them be part of your initrd (a file named “tinycore.gz” in TC) or let them be part of extension files
(*.tcem). In most cases it is probably best to have some of them built into the initrd and some
available as loadable extensions. If you are unsure, build all of your files into the initrd.

I think the best option for me will be to put them in the tinycore.gz.
But I can't find any description on how to make the tinycore.gz

Do you have a step-by-step procedure?

Steen
« Last Edit: April 14, 2013, 03:11:02 AM by sbp »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: How to use a newer kernel?
« Reply #54 on: April 14, 2013, 01:57:11 AM »

Should I apply the TC-patches to the raspberry kernel before building the kernel, and can the patches from the x86 version be used on an ARM kernel?


No these are for x86. On RPi we are using the official RPi kernels.

Regarding initrd see http://wiki.tinycorelinux.net/wiki:remastering
Béla
Ham Radio callsign: HA5DI

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

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #55 on: April 14, 2013, 02:39:52 AM »
OK - no patches needed.

Regarding the remastering part - it is not completely clear for me.
After reading the wiki about a custom kernel I thought that the tinycore.gz should be created from scratch using the new modules. 

But after having read the remastering wiki it is more something like:
I reuse an existing tinycore.gz - unpack it and add the modules and then repack?

Steen

 

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14088
Re: How to use a newer kernel?
« Reply #56 on: April 14, 2013, 02:49:04 AM »
unpack it and add the modules and then repack?

..replace the modules and then repack would be a better description :)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to use a newer kernel?
« Reply #57 on: April 14, 2013, 02:55:30 AM »
Hmm, I just now realized that I had posted the "dynamic root filesystem remastering" wiki link without knowing anything about the RPi bootloader, so maybe not a good idea...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: How to use a newer kernel?
« Reply #58 on: April 21, 2013, 03:41:41 AM »
Now rpi-3.8-y alpha is available at http://elinux.org/RPi_Kernel_Compilation
Béla
Ham Radio callsign: HA5DI

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

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #59 on: June 12, 2013, 07:04:58 AM »
Hi bmarcus

I just wanted to update the kernel once again to the USB fiq_split version, which have fixed many of the previous problems. It is based on linux 3.8.13, the same as your newest kernel.

Therefore I took the .config file you have used, and started cross compiling on the fiq_spilt branch.

Inside the .config file I changed the path to my compiler, and then the compile started fine without asking any questions. But just as it was about to finish the compilation I got these errors and no image file was build:

Code: [Select]
.......
......
......
  CC      lib/vsprintf.o
  CC [M]  lib/crc-ccitt.o
  CC [M]  lib/crc7.o
  CC [M]  lib/ts_kmp.o
  CC [M]  lib/ts_bm.o
  CC [M]  lib/ts_fsm.o
  GEN     lib/crc32table.h
  CC      lib/crc32.o
  LD      lib/built-in.o
  AR      lib/lib.a
  LINK    vmlinux
: command not found
make: *** [vmlinux] Error 127

Can you see what is wrong?

Steen

Steen