WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to recompile the kernel?  (Read 15748 times)

Offline lid

  • Jr. Member
  • **
  • Posts: 62
How to recompile the kernel?
« on: September 03, 2014, 06:45:11 PM »
Hi,

I have a microcore pxebooted. Now I need to enable TPM and TELNETD in the kernel support.  I think I will need to recompile the kernel source with updated .config. Can anyone show me if there is a Tinycore Linux wiki link how to do this? I searched around the wiki pages but haven't been able to find it yet. 

Also am I right that TELNETD should be enabled this way? I can't find a telnet extension.

Thanks.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to recompile the kernel?
« Reply #1 on: September 03, 2014, 07:01:14 PM »
Telnet is not provided in the repo.  I suggest you use dropbear or openssh instead.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: How to recompile the kernel?
« Reply #2 on: September 03, 2014, 08:04:02 PM »
Hi lid
Are you looking for  telnetd ? It's in inetutils-servers.tcz

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to recompile the kernel?
« Reply #3 on: September 04, 2014, 11:28:29 AM »
Hi lid
Are you looking for  telnetd ? It's in inetutils-servers.tcz

Found it! Thanks.

Any idea where to find the kernel source tree used by Tinycore?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: How to recompile the kernel?
« Reply #4 on: September 04, 2014, 02:51:42 PM »
Hi lid
Kernel source and config files can be found here:
http://tinycorelinux.net/5.x/x86/release/src/kernel/

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to recompile the kernel?
« Reply #5 on: September 04, 2014, 05:35:16 PM »
Hi lid
Are you looking for  telnetd ? It's in inetutils-servers.tcz

I packaged it as a second initrd. I do see the files after bootup but this doesn't seem to work correctly. For instance, I don't see "telnetd" after booting up.  syslog doesn't show any errors.

I suspect that the tcz wasn't loaded because it has dependencies such as ncurses.tcz that might also be needed. The question is Should I package all the dependencies in the same initrd? My device is embedded and it does't have the outside network connections.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to recompile the kernel?
« Reply #6 on: September 04, 2014, 05:42:16 PM »
You are pxe booting, so use nfs based persistence as described here:
http://wiki.tinycorelinux.net/wiki:netbooting

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to recompile the kernel?
« Reply #7 on: September 04, 2014, 07:00:45 PM »
Hi lid
Kernel source and config files can be found here:
http://tinycorelinux.net/5.x/x86/release/src/kernel/

Rich,

A few questions how to rebuild the kernel for TC. My goal is to rebuild the "vmlinuz" image with updated .config file.

I downloaded linux-3.8.13-patched and unpacked it. I also downloaded config-3.8.13-tinycore64 as .config file and made a few changes.  My target platform is x86_64. 

Questions are:
1. Did I download the right files?
2. Are there any specific steps to build the kernel image for TC? E.g. should I just do "make ARCH=x86_64"?

Thanks!


Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: How to recompile the kernel?
« Reply #8 on: September 04, 2014, 08:08:47 PM »
Coreplayer2, You made an extension contianing a script for downloadin and/or using availabe data to populate the current Core kernel source files into the file system. I just have the script in my local bin dir. What's the nae of the TCZ?
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: How to recompile the kernel?
« Reply #9 on: September 04, 2014, 09:58:08 PM »
Yes it's "linux-kernel-sources-env.tcz"  (I wish I would have named it differently, but there you go..)  it has been updated to work in current 32bit and 64bit architectures.  I use it to prepare the system for building kernel modules in lieu of kernel headers, it can used or be modified or extended for this purpose too I guess
« Last Edit: September 04, 2014, 10:04:42 PM by coreplayer2 »

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to recompile the kernel?
« Reply #10 on: September 05, 2014, 04:08:37 PM »
Yes it's "linux-kernel-sources-env.tcz"  (I wish I would have named it differently, but there you go..)  it has been updated to work in current 32bit and 64bit architectures.  I use it to prepare the system for building kernel modules in lieu of kernel headers, it can used or be modified or extended for this purpose too I guess

Hi coreplayer2,

I downloaded your extension. My issue is that I don't have a TC environment as a build machine. I have a RHEL6 machine and need to cross-compile for the target machine which is x86_64.  Do you have the steps to do that?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: How to recompile the kernel?
« Reply #11 on: September 05, 2014, 05:33:24 PM »
You can build a temporary build system booting to  " TinyCorePure64-5.3.iso "  from http://tinycorelinux.net/5.x/x86_64/release/


Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to recompile the kernel?
« Reply #12 on: September 07, 2014, 10:44:22 AM »
You can build a temporary build system booting to  " TinyCorePure64-5.3.iso "  from http://tinycorelinux.net/5.x/x86_64/release/

Ok, I will do that.

Just curious, are there any instructions that I can use to take a stock Linux kernel, patch and cross-build it for TC?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to recompile the kernel?
« Reply #13 on: September 07, 2014, 12:16:51 PM »

Offline lid

  • Jr. Member
  • **
  • Posts: 62