WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #30 on: March 30, 2013, 05:20:29 AM »
Hi I managed to build a newer version 3.2.27 kernel.

If I change the old kernel in picore.img with my own kernel, picore is starting fine and everything is working fine - so thank you for your help.

I didn't build any modules (I don't know what they are and where to put them anyway).

I tried to use the files like the newer start.elf etc, but then my kernel resulted in kernel panic.


Steen

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: How to use a newer kernel?
« Reply #31 on: March 30, 2013, 01:08:38 PM »
Hi as you might have seen in bmarkus thread about 3.6.11 I still have problems with the sound breaking up if I'm using it via wifi. On the other hand I have no problems if using the original rasbian image.

So I'm thinking it might be:
1. Either some setting that are different when building the kernel?
Or
2. The wifi packages?

Therefore, I could try to build a new kernel for picocore with the same settings as in the original rasbian kernel - and only change those that are essential for the microcore.

Do you know which settings are really essential for a working picore system?


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to use a newer kernel?
« Reply #32 on: March 30, 2013, 06:33:14 PM »
Hi as you might have seen in bmarkus thread about 3.6.11 I still have problems with the sound breaking up if I'm using it via wifi. On the other hand I have no problems if using the original rasbian image.

So I'm thinking it might be:
1. Either some setting that are different when building the kernel?
Or
2. The wifi packages?

Therefore, I could try to build a new kernel for picocore with the same settings as in the original rasbian kernel - and only change those that are essential for the microcore.

Do you know which settings are really essential for a working picore system?

initramfs and availability of loop block device.
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 #33 on: April 06, 2013, 09:11:11 AM »
Hi bmarcus

I'm still trying to learn how to make kernels for the PiCore. I think that I'm much closer than I ever have been, but still not quite there.

I have been using your recent 3.6.11 picore.img.  From this I extracted the file /proc/config.gz and used your .config file as follows:

1. I downloaded the linux-rpi-3.6.y.gz from the github - extracted it on my crosscompile computer.
2. Untarred the linux-rpi-3.6.y.gz
3. used the command make mrproper
4. Copied your .config file to the linux directory (only changed the path to my crosscompiler directory)
5. Started the crosscompilation by: make ARCH=arm
6. Copied the file arch/arm/boot/Image to the SD-card which was burned with your picore3.6.11.
7. Renamed the original kernel3.6.11a.img to old_kernel3.6.11a.img
8. Renamed my newly made Image to kernel3.6.11a.img

9. Put this SD-card into the raspberry - and it boots fine and picore is starting as well - but it is not quite there, because if I try to use the tce package manager it will find the correct package like ALSA and start downloading to a certain point:

Code: [Select]
alsa-utils.tcz.dep OK
alsa-plugins.tzc.dep OK
Downloading: libasound.tzc
Connecting to repro.tinycorelinux.net (89.22.99.37:80)
libasound.tcz      100% ************************************************************** 344k 0:00:00 ETA
Libasoundtcz: OK

Then I need to press "Ctr + c"  to continue.

Other packages have the same problem ??
So it seems like I'm missing a final part - can you see what I do wrong?


INFO: Using wget I can download other files from the internet.
Steen

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to use a newer kernel?
« Reply #34 on: April 06, 2013, 10:05:02 AM »
To use alsa you need the respective modules of specific kernel you are running.
A 'make oldconfig' could not harm.
"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 #35 on: April 06, 2013, 10:15:36 AM »
Thanks for the advise.

My thinking was that if I used the exact same .config file as bmarkus had used, then I would build an identical kernel. And this would be my first step, to be able to build a kernel that works.

I think you are correct about the modules, because I didn't do this part as otherwise described here http://elinux.org/RPi_Kernel_Compilation :

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:

make ARCH=arm CROSS_COMPILE=${CCPREFIX} INSTALL_MOD_PATH=${MODULES_TEMP} modules_install


But I have just tried this
export MODULES_TEMP=~/modules
make ARCH=arm INSTALL_MOD_PATH=${MODULES_TEMP} modules_install[/code]

And it runs -
But I don't know what to do next, I think it produced a file called "modules.order" and another ".missing-syscalls.d"

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to use a newer kernel?
« Reply #36 on: April 06, 2013, 10:45:02 AM »
My thinking was that if I used the exact same .config file as bmarkus had used, then I would build an identical kernel. And this would be my first step, to be able to build a kernel that works.
That's what I understood and why I said "could not harm" rather than "is required".  ;)
Depends though on the source being identical.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to use a newer kernel?
« Reply #37 on: April 06, 2013, 10:46:07 AM »
What is the output of

Code: [Select]
uname -a
when you are using your own kernel?
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 #38 on: April 06, 2013, 11:14:12 AM »
Thanks

There might be a problem here.
uname -a results in:

Linux box 3.6.113.6.11-piCore #1 PREEMPT Sat Apr 6 14.27:34 CEAT 2013 armv61 GNU/Linux

So it seems like I will need to build another kernel with the correct name?
 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to use a newer kernel?
« Reply #39 on: April 06, 2013, 11:46:15 AM »
Your kernel is 3.6.113.6.11-piCore which means that you need a new initrd with your own moduls and you can't use kernel modules from the repo.

Rebuild your kernel with -piCore local version in the config to get it as 3.6.11-piCore.
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 #40 on: April 07, 2013, 07:46:44 AM »
Thanks.

I managed to use your .config file and make a new functional kernel. Which seems to have the same problems as your original kernel - that is problems using a wifi-USB and a USB-DAC at the same time. The sound is breaking up.

If I use an original raspian image there is no problem using the same USB-wifi and USB-DAC.

So I tried to use a .config file from the rasbian build and change a few things in order to boot piCore. My hope was that maybe this would fix the USB wifi and USB-DAC problems in piCore.

So I made these changes to the original rasbian .config file:

Code: [Select]
Changed to: CONFIG_CROSS_COMPILE="/cross/tools-master/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-"

Changed to: CONFIG_LOCALVERSION="-piCore"

Changed to: CONFIG_BLK_DEV_INITRD=y
Added: CONFIG_INITRAMFS_SOURCE=""
Added: CONFIG_RD_GZIP=y

Changed to: CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait"

Changed to: CONFIG_CPU_FREQ_STAT=y

Changed to: CONFIG_USB_NET_CDC_NCM=y

Changed to: CONFIG_LOGO_LINUX_MONO=y
Changed to: CONFIG_LOGO_LINUX_VGA16=y

Changed to: CONFIG_SQUASHFS_EMBEDDED=y

Changed to: CONFIG_ZLIB_INFLATE=y

So besides these changes the .config file is identical to the Rasbian .config file.


The kernel made from this is almost fine; piCore boots fine, but once again the problem is with the tce package manager.
And also if I have the original TCE directory on the SD-card, where my previously downloaded ALSA, WiFi, Flac, Libmad are included, then piCore will hang during boot.
It is hanging only spinning and "loading extensions" forever.

So something is not quite right.

The uname - a command:
Linux box 3.6.11-piCore #1 PREEMPT Sun Apr 7 13:07:06 CEST 2013 armv61 GNU/Linux

Regards
Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to use a newer kernel?
« Reply #41 on: April 07, 2013, 08:22:21 AM »
Quote

And also if I have the original TCE directory on the SD-card, where my previously downloaded ALSA, WiFi, Flac, Libmad are included, then piCore will hang during boot.
It is hanging only spinning and "loading extensions" forever.


At which extension?

Quote
but once again the problem is with the tce package manager.

Please provide details.

Quote
So I made these changes to the original rasbian .config file

Which Raspbian? release/kernel?
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 #42 on: April 07, 2013, 09:50:24 AM »
Quote
At which extension?

I had installed Flac, ALSA, libmad, libvorbis, dropbear and wifi packages via TCE - using your 3.6.11-piCore image. I copied this tce directory to my new SD-card with my own modified rasbian kernel.

As stated is booted fine, but was hanging when loading extensions. By removing each extension I found that it could boot with these extensions in the tce/optional directory:
Alsa.tcz
Alsa-modules-3.6.11-piCore.tcz
Alsa-plugins.tcz
Alsa-utils.tcz

Flac.tcz

libiconv.tcz
libiw.tcz
libvorbis.tcz
openssl-1.0.0.tcz

wifi.tcz
wireless_tools.tcz
wireless-3.6.11-piCore.tcz
wpa_supplicant.tcz

However it fails to load if any of these packages are present:
Droppbear
libasound
libogg
libnl
libmad
 

But eventhough it seems like the wifi package is OK and piCore boots with the wifi package in the tce/optional directory it is not working. 

Quote
Which Raspbian? release/kernel?

The Rasbian 3.6.11 obtained from here:
Code: [Select]
https://github.com/raspberrypi/linux/archive/rpi-3.6.y.tar.gz as described from this page http://elinux.org/RPi_Kernel_Compilation


The problem with the TCE package manager is that it usualy does not finish:
If I try to install MC I get to here:
ncurses.tzc.dep OK
glib2.tcz.dep OK
libssh2.tcz.dep OK

If I try to install wifi (again) it find that it is already installed - but it is not working.

If I try to start wifi by
sudo /usr/local/bin/wifi.sh : command not found

If I delete the wifi package and try to install it via tce package manager I get to here:
wireless_tools.tcz.dep OK
wpa_supplicant.tcz.dep OK
Downloading: libnl.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
libnl.tcz   100% *********************************************************   232k 0:00:00 ETA
libnl.tcz: OK
And then I need to kill it because it hangs.

It might be important but my piCore could not boot fully if libnl.tcz was present in the tce/optional directory during boot.

Regards
Steen
« Last Edit: April 07, 2013, 09:53:55 AM by sbp »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to use a newer kernel?
« Reply #43 on: April 07, 2013, 10:53:57 AM »
Generally speaking, there is no guarantee a modular kernel would work properly when attempting to insert modules from a different build.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to use a newer kernel?
« Reply #44 on: April 07, 2013, 11:27:02 AM »
You can try to build your kernel without localversion to have to same version at least by name as original to try modules.
Béla
Ham Radio callsign: HA5DI

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