WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to compile tinycore kernel ?  (Read 8383 times)

Offline development

  • WikiUser
  • *
  • Posts: 22
How to compile tinycore kernel ?
« on: January 02, 2009, 01:45:55 AM »
Dear All,

Thanks to tinycore team and all participant that developing nice, small, fast and extensible linux.
I want to customize tc to add a hardware loadable module, need to compile tinycore kernel. What I did :

1. install compiler tools, compiletc.tce with appbrowser

2. download linux kernel & patch file from :

http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/release/src/2.6.26-tinycore.patch
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/release/src/linux-2.6.26.tar.bz2

3. Patch kernel source

mkdir /usr/src
cp 6.26-tinycore.patch linux-2.6.26.tar.bz2 /usr/src
cd /usr/src
tar -jxf linux-2.6.26.tar.bz2
ln -sf linux-2.6.26 linux
cd linux-2.6.26
patch -p1 < ../2.6.26-tinycore.patch


But after last command , I can't continue, with this problem  :

root@box:/usr/src/linux-2.6.26# patch -p1 < ../2.6.26-tinycore.patch         
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- logo.old/Kconfig   Sun Jul 13 21:51:29 2008
|+++ logo/Kconfig       Wed Jul 23 10:29:09 2008
--------------------------
File to patch:


Could you please share your experience to compile tinycore kernel ?

Best Regards.
« Last Edit: January 02, 2009, 02:22:41 AM by development »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12995
Re: How to compile tinycore kernel ?
« Reply #1 on: January 02, 2009, 02:21:14 AM »
A couple of points:

Quote
ln -sf linux-2.6.26 linux
Whilst you needed to do this with the 2.4.x (and perhaps early 2.6.x) kernels, I believe you should not do this with the 2.6.x kernels.

Most patches are set up to be used as you tried (i.e. from the directory above the one containing the files to be patched), but if I remember correctly, this one is not. If you enter the absolute path to logo/Kconfig at the "File to patch: " prompt, the patch will succeed.

The absolute path to the file will be something like /usr/src/linux-2.6.26/../../logo/Kconfig where you will need to fill in /../../


Offline development

  • WikiUser
  • *
  • Posts: 22
Re: How to compile tinycore kernel ?
« Reply #2 on: January 02, 2009, 02:45:49 AM »
Thanks Juanito for your reply.
When I enter the absolute file, the same problem continue in the others next line.
Could you assist me what the correct patch command and the directory location ?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12995
Re: How to compile tinycore kernel ?
« Reply #3 on: January 02, 2009, 03:13:26 AM »
This works for me:
Code: [Select]
$ cp /path-to-file/2.6.26-tinycore.patch /usr/src/linux-2.6.26/drivers/video
$ cd /usr/src/linux-2.6.26/drivers/video/logo
$ patch -Np1 -i ../2.6.26-tinycore.patch

Offline development

  • WikiUser
  • *
  • Posts: 22
Re: How to compile tinycore kernel ?
« Reply #4 on: January 02, 2009, 03:59:39 AM »
Thanks.
I will continue to compile the kernel.