WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling kernel and modules on TC  (Read 49869 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Compiling kernel and modules on TC
« Reply #45 on: April 09, 2015, 02:11:34 PM »
See the infinite directory loops... You are lucky that it was stopped instead of creating infinite levels of directories :)
Béla
Ham Radio callsign: HA5DI

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

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #46 on: April 09, 2015, 02:21:54 PM »
It did not stop. I pressed Ctrl+C. And then I removed the whole folder and tried again, and again it was in vain. Hm. I know little of such nuts as infinite loops; I don't even want to know more of them, goddamit. I want to know why did it happen, hmmm.
I did as I've read in the Wiki. And (sh)it happened. Why? ???

Hmmm.
« Last Edit: April 09, 2015, 02:24:06 PM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #47 on: April 09, 2015, 03:10:31 PM »
Now, now, I must calm down and stroke the problem. Sorry. I'm a bit frustrated.
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #48 on: April 10, 2015, 07:12:39 AM »
Quote
The process to create a custom kernel could in short be described as:

    Get the sources for the version of the standard Linux kernel that you are going to base your kernel on
    Get the patches you intend to apply - both TC kernel patches and possibly others (in my case the RT-patches)
    Unpack the linux sources and cd into the top level directory of the source package
    Apply the patches using (in most cases) “patch -p1 < patchfile” for each patch file
    Move the kernel config file from the standard TC kernel into the same directory and rename it to ”.config”
    Do “make oldconfig” and answer all questions, in case you have no clue on the answer just provide the default ones (i.e. just hit Return)
    Do “make menuconfig” and make any changes you need to the configuration
    Do “make bzImage” to build the kernel itself
    Do “make modules” to build the loadable modules
    Do “make INSTALL_MOD_PATH=/path modules_install firmware_install” where /path is a path to a directory where you expect to find the modules.

Quote
    Get the sources for the version of the standard Linux kernel that you are going to base your kernel on
config-3.16.6-tinycore, linux-3.16.6-patched.txz
Quote
    Get the patches you intend to apply - both TC kernel patches and possibly others (in my case the RT-patches)
fbcondecor.patch
Quote
    Unpack the linux sources and cd into the top level directory of the source package
cd Codez/kernel/ ;tar -xJ -f linux-3.16.6.txz
Quote
    Apply the patches using (in most cases) “patch -p1 < patchfile” for each patch file
cd linux-3.16.6 ;patch -p1 < ../fbcondecor.patch
Quote
    Move the kernel config file from the standard TC kernel into the same directory and rename it to ”.config”
cp ../config-3.16.6-tinycore ./.config
Quote
    Do “make oldconfig” and answer all questions, in case you have no clue on the answer just provide the default ones (i.e. just hit Return)
I had been doing this step, but in an another TC kernel manual on the forum I've read I can do the next step directly
Quote
    Do “make menuconfig” and make any changes you need to the configuration
make menuconfig
Quote
    Do “make bzImage” to build the kernel itself
    Do “make modules” to build the loadable modules
Hm... I did both "make" or "make all" as was said in that forum manual also; last time it was
make -j2 all
Quote
    Do “make INSTALL_MOD_PATH=/path modules_install firmware_install” where /path is a path to a directory where you expect to find the modules.
http://cs622929.vk.me/v622929788/2462e/WcaBla3ixVY.jpg
http://cs622929.vk.me/v622929788/24640/v-U-qwcqr7g.jpg

Am I doing wrong, really?
« Last Edit: April 10, 2015, 07:14:38 AM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Compiling kernel and modules on TC
« Reply #49 on: April 10, 2015, 07:19:20 AM »
You are just telling stories instead sharing what you are doing really. Without knowing commands and scripts you are using do not expect answer.

Your issue is not related to Tiny Core but a generic how to build kernel. Internet is full with docs, blogs and forums with the proper answer. Please do not spam here.
« Last Edit: April 10, 2015, 07:21:24 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

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

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #50 on: April 10, 2015, 08:19:44 AM »
You are just telling stories instead sharing what you are doing really. Without knowing commands and scripts you are using do not expect answer.

Your issue is not related to Tiny Core but a generic how to build kernel. Internet is full with docs, blogs and forums with the proper answer. Please do not spam here.
I thought my last post was all about what I am doing ??? including exact commands. There aren't many of them. Let me see, these are listed exactly

Quote
cd kernel
tar -xJ -f linux-3.16.6.txz
cd linux-3.16.6
patch -p1 < ../fbcondecor.patch
cp ../config-3.16.6-tinycore ./.config
[make oldconfig] (one time I did it one time not)
make menuconfig
make -j2 all
mkdir initrd
make INSTALL_MOD_PATH=/home/tc/Codez/kernel/linux-3.16.6/initrd modules_install firmware_install
...
PROFIT! Oh... I mean...

If you name THIS "telling stories", then... um... I can't imagine what you consider as "sharing what I am doing". Maybe... I had a tea when making this? :o I didn't spill it onto my keyboard, really!

But, yeah. You're right. It's a generic issue. All but one. It's a TC patched kernel I am building and it's a TC Wiki manual I am reading. So, I'll do the simplest. I'll build a regular linux-3.16.6 kernel taking look into some else manual and look is the problem still there :) cheers
« Last Edit: April 10, 2015, 08:23:58 AM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14832
Re: Compiling kernel and modules on TC
« Reply #51 on: April 10, 2015, 09:22:04 AM »
I just tried:
Code: [Select]
$ tce-load -i compiletc bash perl5 ncurses-dev bc
$ make mrproper
$ cp config-3.16.6-tinycore .config
$ patch -Np1 -i ../fbcondecor-3.15.patch
$ make oldconfig
$ make menuconfig
set Enable Tile Blitting Support disabled
set Support for the Framebuffer Console Decoration enabled
$ make bzImage

..and it compiles

Once done, you rename arch/x86/boot/bzImage to vmlinuz, replace the tinycore vmlinuz and try it out.

See here for more details:

http://www.mepiscommunity.org/fbcondecor
« Last Edit: April 10, 2015, 09:58:20 AM by Juanito »

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #52 on: April 10, 2015, 10:12:30 AM »
I've also tried to build a non-TC kernel and succeeded without any trouble. I have no clues; all steps (wiki and mine) correspond exactly. I'll make just another attempt with TC.
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Compiling kernel and modules on TC
« Reply #53 on: April 11, 2015, 05:00:55 AM »
Well, it's clear the kernel doesn't like your chosen module install path. Try putting a path outside the kernel directory.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14832
Re: Compiling kernel and modules on TC
« Reply #54 on: April 11, 2015, 05:17:28 AM »
In this particular case, I don't believe any modules need to be compiled?

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #55 on: April 11, 2015, 07:00:03 AM »
Well, it's clear the kernel doesn't like your chosen module install path. Try putting a path outside the kernel directory.
Quite so! I came to the same conclusion yesterday... hmm... early this morning. I gave it another path and it worked. Now it's not booting properly, but I will handle it on my own.

Quote
In this particular case, I don't believe any modules need to be compiled?
What exactly are you talking about, sir?
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14832
Re: Compiling kernel and modules on TC
« Reply #56 on: April 11, 2015, 07:14:48 AM »
As far as I can see (I may be wrong), the patch does not affect any kernel modules.

If you're compiling linux-3.16.6-patched.txz after applying the framebuffer patch, then you only need the recompiled bzImage as mentioned above.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: Compiling kernel and modules on TC
« Reply #57 on: April 11, 2015, 07:26:23 AM »
As far as I can see (I may be wrong), the patch does not affect any kernel modules.

If you're compiling linux-3.16.6-patched.txz after applying the framebuffer patch, then you only need the recompiled bzImage as mentioned above.
I thought so, but the very first successfully built bzImage went into kernel panic complaining of some improper path (somewhere inside it). I thought it was because I built it as 3.16.6 and core.gz contained /lib/modules/3.16.6-tinycore. I rebuilt it as 3.16.6-tinycore and... went into some more error. I'll check one more time, just now I'm in hurry :-\
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.