WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: EDIT !! Progress : Raspberry kernel on linuxbox-crosscompiler for newbie(s)  (Read 5224 times)

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Hi all TC's  ;D

As i stated in another thread, i start a new thread, hoping to guide me through the process of making my own kernel for my Raspberry PI.

I use this as my guideiance :: http://elinux.org/RPi_Kernel_Compilation, but its not very detailed!

In section 2 Crosscompiling :
I have downloaded the https://github.com/raspberrypi/tools/archive/master.tar.gz (tools-master)
Extracted it into (I renamed the tools-master to tools!), so my path for the cross-compiler is now :

CONFIG_CROSS_COMPILE="/home/jesper/rpi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-"

Now i get back to section 1, where compilation is explained :

1. Get the latest raspberrypi kernel source (https://github.com/raspberrypi/linux)

This i did like :
mkdir ~/rpi3.11.y 
cd rpi3.11.y
git init
git fetch git://github.com/raspberrypi/linux.git rpi-3.11.y:refs/remotes/origin/rpi-3.11.y
git checkout rpi-3.11.y

Now i grabbed the /proc/.config from Steens running PiCoreplayer V1.09, and pasted that into my rpi3.11.y directory.
(Actually i used SCP for grabbing it via my network)

Now i pasted my CONFIG_CROSS_COMPILE="/home/jesper/rpi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-"  into the .config file (There is a line already for that)

Then i did make oldconfig ARCH=arm and then make menuconfig ARCH=arm
(-For testing right now, i just enabled some i2c stuff in kernel)

At this moment my pc is compiling my new kernel!

So this is great for now :)



// Jesper





« Last Edit: December 28, 2013, 03:17:50 AM by lykkedk »

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Hi all TC's  ;D

I use this as my guideiance :: http://elinux.org/RPi_Kernel_Compilation, but its not very detailed!

Now i get back to section 1, where compilation is explained :

1. Get the latest raspberrypi kernel source (https://github.com/raspberrypi/linux) - Well, i think i will need the TC kernel here ? And NOT the raspberrypi kernel.

// Jesper

Hi Jesper.

No that is wrong. You will need to get the files from the raspberry github, and then you make the compilation. The resulting "image" file (as described in the link you provide above), is your new kernel which you simply rename to something like piCore.img and use as a kernel for your new TC system.

Next you will need to build the modules - and here Courtjester wrote two very detailed "how-to" in this thread: http://forum.tinycorelinux.net/index.php/topic,14634.15.html  SO please read them, and you should be able to make the modules as well.

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Just curious why do you need a new kernel.
Béla
Ham Radio callsign: HA5DI

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

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Hello Steen, Bmarkus  :)

Just awake from yesterday's christmasparty  ??? ...

Bmarkus, i do not need a new kernel, but i think it is very interessting to learn it the TC-way!
- And i would like to compile a lightweight kernel, without any modules, but only with the buildin stuff i need, for a running squeezelite player, lirc/gpio, maybe lowlatency and ofcause alsa(might be modules) etc....
Mainreason is for learning through!

Steen, i see that you use the prefab. .config, from the kernel... Is it right, that because of some tc-specific things one need to have thoose things specific for a tc-kernel ?

Also, i thought that the kernel needed some patches for running in tc-enviroment!

I have been reading a lot, and i think i am beginning to understand howto do this.

Thank you all.

/ Jesper

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum

Bmarkus, i do not need a new kernel, but i think it is very interessting to learn it the TC-way!

...

Also, i thought that the kernel needed some patches for running in tc-enviroment!

Fine, learning how to make a new (working) kernel is a good training always :)

There are no patches used, just the original RPi kernels from GitHub.
Béla
Ham Radio callsign: HA5DI

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

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Cool...

Where do i find / download .config files for defferents kernels (The .config the kernels for the PiCores are compiled) - OR if there is a documentation, of which things must be enabled in the kernel ?

I just did a git fetch git://github.com/raspberrypi/linux.git rpi-3.12.y:refs/remotes/origin/rpi-3.12.y
- Just for trying it out.

/ Jesper

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1242
Cool...

Where do i find / download .config files for defferents kernels (The .config the kernels for the PiCores are compiled) - OR if there is a documentation, of which things must be enabled in the kernel ?

I just did a git fetch git://github.com/raspberrypi/linux.git rpi-3.12.y:refs/remotes/origin/rpi-3.12.y
- Just for trying it out.

/ Jesper

The easiest way is to get the config from a working version.  It should be gzipped in the /proc directory.   Look for the file config.gz

The unzip the file and copy it into the root directory of the kernel source.  (Rename the file to .config)

Then run "make oldconfig"  this will use the old config file, and prompt you for any new kernel options......normally just accept the defaults for the new options.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Thanks Paul_123.

So as you see, i EDITed the first post, in this thread, as my progress is moving along.

I extracted the running .config from Steens PiCoreplayer V1.09 into my kernel-directory as stated.

Now i would like to know, if there is any kind of dokumentation, of which things has to be set in kernel for a picore system, or if i can download some .config files somewhere ?

I need a .config for a 3.12.y kernel.

I know, i can make a working config, just as to run make menuconfig, but i am not sure, which things to set for TC-enviroment!

/ Jesper.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1242
Thanks Paul_123.

So as you see, i EDITed the first post, in this thread, as my progress is moving along.

I extracted the running .config from Steens PiCoreplayer V1.09 into my kernel-directory as stated.

Now i would like to know, if there is any kind of dokumentation, of which things has to be set in kernel for a picore system, or if i can download some .config files somewhere ?

I need a .config for a 3.12.y kernel.

I know, i can make a working config, just as to run make menuconfig, but i am not sure, which things to set for TC-enviroment!

/ Jesper.

That config is just fine.....nothing really changes.  There is really nothing tc specific in the kernel......     I think what you are really getting at, is how to install the new kernel, and that is a whole different procedure, that I've never done myself