WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling a kernel (on VMware player)  (Read 9789 times)

Offline Eitan

  • Newbie
  • *
  • Posts: 12
Compiling a kernel (on VMware player)
« on: July 12, 2013, 05:35:28 AM »
Hi,
My goal is eventually play with the kernel/config file, but I'm starting small.

I read the wiki page wiki.tinycorelinux.net/wiki:custom_kernel
Since I wanted the simplest and fastest way to learn how to compile a kernel,
I've downloaded tinycorelinux.net/4.x/x86/release/src/kernel/config-3.0.21-tinycore
(renamed it to .config)
and /tinycorelinux.net/4.x/x86/release/src/kernel/linux-3.0.21-patched.txz
(both from tinycorelinux.net/4.x/x86/release/src/kernel/)

Next, I tried to use the "make" command but tc wouldn't recognize it.
Searched  a bit and found "compiletc.tcz", and loaded it.
Now my error is it says "no rule to make target XXXXX" (no matter what the XXXXX is substituted with).

I guess I'm missing something extremely elementary here, but I've no idea what.
Oh, and I unpacked the kernel and copied the .config file to both top directory (called it linux-3.0.21) and linux-3.0.21/kernel.

Thanks for any tip,
Eitan

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14750
Re: Compiling a kernel (on VMware player)
« Reply #1 on: July 12, 2013, 06:13:34 AM »
Code: [Select]
$ tce-load -i compiletc perl5 bash ncurses-dev
$ make mrproper
$ cp config-3.0.21-tinycore .config
$ make oldconfig
$ make

Offline Eitan

  • Newbie
  • *
  • Posts: 12
Re: Compiling a kernel (on VMware player)
« Reply #2 on: July 13, 2013, 05:05:36 AM »
ok,
so I tried to follow the first command "tce-load ..." but it said: perl5.tcz not found
so I downloaded perl5.tcz and submitted the command again.
In short, I downloaded bash.tcz and ncurses-dev.tcz, and then all the loading went ok.

But as I entered the "make" command I received again the "make: *** No rule to make target 'mrproper'. Stop."

Any other ideas? (I won't be offended if you explain as if to a five year old...)

To clarify, I wrote the command in /linuxxxx/kernel,
I know that in an other kernel I played with (some redhat8 compatible 2.4.xxxx kernel) there was a Rules.makefile file. Is it necessary? should it be in the patched kernel on this site?

Thanks again!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14750
Re: Compiling a kernel (on VMware player)
« Reply #3 on: July 13, 2013, 06:50:34 AM »
ok,
so I tried to follow the first command "tce-load ..." but it said: perl5.tcz not found
so I downloaded perl5.tcz and submitted the command again.
In short, I downloaded bash.tcz and ncurses-dev.tcz, and then all the loading went ok.

But as I entered the "make" command I received again the "make: *** No rule to make target 'mrproper'. Stop."

After loading the extensions, you need to:
Code: [Select]
$ tar xf linux-3.0.21-patched.txz
$ cd linux-3.0.21-patched
$ make mrproper
$ cp config-3.0.21-tinycore .config
$ make oldconfig
$ make

Offline Eitan

  • Newbie
  • *
  • Posts: 12
Re: Compiling a kernel (on VMware player)
« Reply #4 on: July 13, 2013, 08:11:23 AM »
I believe my problem is here: after the extraction I receive tar: short read
I haven't seen that last time..
So if the extraction isn't complete, how do I overcome this?

P.S this might be important: I made a 0.5GB hdd at first, and installed tc on it. later I expanded the hdd to 2GB, but without any partitioning or any operations on tc.
I don't know how to check how much free space I've got, and fluff says the kernel directory is about 69.1MB, so I don't know if it's the problem or not

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14750
Re: Compiling a kernel (on VMware player)
« Reply #5 on: July 13, 2013, 09:24:21 AM »
I don't know how to check how much free space I've got...

Code: [Select]
$ df -h /dev/sda1 [substitute your actual partition]

Offline Eitan

  • Newbie
  • *
  • Posts: 12
Re: Compiling a kernel (on VMware player)
« Reply #6 on: July 13, 2013, 12:27:53 PM »
so I still have 50% of my hdd (that's around 250MB out of 0.5GB).
So it's not it..

Does tar: short read necessarily mean I have a problem in extracting?
It doesn't say "unsuccessfully/abruptly/unexpectedly terminated".

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14750
Re: Compiling a kernel (on VMware player)
« Reply #7 on: July 13, 2013, 12:32:41 PM »
Does tar: short read necessarily mean I have a problem in extracting?

Yes, did you check the md5sum after downloading? Either you have a corrupted download or you don't have enough space to uncompress the file.

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: Compiling a kernel (on VMware player)
« Reply #8 on: July 14, 2013, 06:50:27 AM »
While in the directory you're extracting the tarball from:
Code: [Select]
df .

Offline Eitan

  • Newbie
  • *
  • Posts: 12
Re: Compiling a kernel (on VMware player)
« Reply #9 on: July 21, 2013, 01:52:41 PM »
Does tar: short read necessarily mean I have a problem in extracting?

Yes, did you check the md5sum after downloading? Either you have a corrupted download or you don't have enough space to uncompress the file.

I'm sorry if it's a stupid question, but what do I compare it with?
md5sum returns: 8095f9e785c15c0c784933f53d4df0ee

Update:
I changed the hdd to 2GB and RAM 1GB, this time it didn't say nothing (ie short read)
when I tried cp ../config-3.0.21-tinycore .config it said there isn't enough space on device..
I used mv instead and didn't receive any errors.

The use of make still gives me an error, I'll try a bit more (maybe I should make an even bigger hdd?) and I'll post again

Update 2: Attatched the error. it's different so at least something was corrected (or partially fixed)
« Last Edit: July 21, 2013, 02:57:52 PM by Eitan »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Compiling a kernel (on VMware player)
« Reply #10 on: July 21, 2013, 02:59:13 PM »
Make sure your source is on the hard disk and not in the RAM based root file system.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11512
Re: Compiling a kernel (on VMware player)
« Reply #11 on: July 21, 2013, 03:38:02 PM »
Hi Eitan
Quote
when I tried cp ../config-3.0.21-tinycore .config it said there isn't enough space on device..
I used mv instead and didn't receive any errors.
That config file is only 100k. If you run out of space copying it, that's a sign that you have a problem and need to allocate
a lot more space.

Offline Eitan

  • Newbie
  • *
  • Posts: 12
Re: Compiling a kernel (on VMware player)
« Reply #12 on: August 05, 2013, 05:03:14 PM »
I started over: made a new clean 2gb hdd and installed tc on it.
In the old hdd I kept all the extensions but deleted everything else so there isn't a chance to boot from it.

Now I followed the instructions::
1. load the extensions using:
$ tce-load -i compiletc perl5 bash ncurses-dev
2. Download the patched kernel and the matching config  file
3. extract using tar xf filename
4. $ make mrproper
5. $ cp config-3.0.21-tinycore .config
6. $ make silentoldconfig (It didn't display any questions/warnings/errors, so I decided to go with it instead of $ make oldconfig)
7. $ make

Half an hour later or so, the process is finished, no errors!
Of course it doesn't mean it works yet, but it does raise my hopes high.

Thanks everyone!