WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Custom kernel problem.  (Read 5514 times)

Offline oldpig

  • Newbie
  • *
  • Posts: 5
Custom kernel problem.
« on: May 26, 2014, 01:46:20 PM »
I am not sure this topic should be in TC base section or TC Extension section. Please forgive me if it was duplicate post.

hi TCers,

I am running corepure64 and it is flawless and awesome. Now I need a customized kernel which is going to remove the unnecessary device driver, especially Silicon Image 3124/3123 ATA driver. I followed the instruction to rebuild the kernel:

1. extract linux-3.8.13-patched.txz
2. copy config-3.8.13-tinycore64 to .config
3. make oldconfig
4. make menuconfig
5. uncheck that driver (default is built-in)
6. save and exit
7. make bzImage (original file is under arch/x86/boot, it is a softlink in arch/x86_64/boot/)
8. replace to vmlinuz64

After reboot, I got a kenel panic, the last error message is said "fixing recursive blablabla, need reboot". I did this rebuild under:
*. Ubuntu 14.01 x86_64
*. gcc 4.8.2 amd64

Then I have tried to compile inside TC.
1. Start original, corepure64 + vmlinuz
2. tc-load compiletc ncurses-dev bash perl5
3.repeat the same steps above

I got same problem, KP and same error message.

Then I gave a try to re-compile kernel 3.14.4. This time I got a little progress during boot. It said "blabla modprobe error" due to kernel signature is 3.14.4 and I was using modules64.gz which has indicated all modules are stay in /lib/modues/3.8.13-tinycore64.

My question is, I only want to remove unnecessary device drivers, and not add any new. I consider what I need is a new kernel without those drivers and probably I don't need to remaster modules.gz.

I used to be successful by this way on 32 bits earlier TC version many long before. I remember I compiled the kernel in VirtualBox using 32 bits Ubuntu 12.01.

Does anyone has similar isuuse? Any suggestion will be very appreciated.

Thanks in advance.

Offline oldpig

  • Newbie
  • *
  • Posts: 5
Re: Custom kernel problem.
« Reply #1 on: May 26, 2014, 11:52:51 PM »
Anyone can help?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Custom kernel problem.
« Reply #2 on: May 27, 2014, 02:19:40 AM »
I am running corepure64 and it is flawless and awesome. Now I need a customized kernel which is going to remove the unnecessary device driver, especially Silicon Image 3124/3123 ATA driver. I followed the instruction to rebuild the kernel:

My question is, I only want to remove unnecessary device drivers, and not add any new. I consider what I need is a new kernel without those drivers and probably I don't need to remaster modules.gz.

If you only need to add or remove driver modules, customized kernel is one method.  However, you need only to modify modules64.gz and/or corepure64.gz.  In which case may I suggest this script made to simplify the process for this exact reason (to add or remove driver modules)

see http://forum.tinycorelinux.net/index.php/topic,15493.msg102558.html#msg102558

please advise if successful
thanks
 
« Last Edit: May 27, 2014, 02:21:51 AM by coreplayer2 »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Custom kernel problem.
« Reply #3 on: May 27, 2014, 02:55:21 AM »

If you only need to add or remove driver modules, customized kernel is one method.  However, you need only to modify modules64.gz and/or corepure64.gz. 


What is about unneded kernel modules built into the kernel?
Béla
Ham Radio callsign: HA5DI

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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11047
Re: Custom kernel problem.
« Reply #4 on: May 27, 2014, 03:33:12 AM »
If you build a different version, you will need to include the modules.
The only barriers that can stop you are the ones you create yourself.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Custom kernel problem.
« Reply #5 on: May 27, 2014, 03:47:26 AM »

If you only need to add or remove driver modules, customized kernel is one method.  However, you need only to modify modules64.gz and/or corepure64.gz. 


What is about unneded kernel modules built into the kernel?

I'm sorry bmarkus, I don't follow the question..

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Custom kernel problem.
« Reply #6 on: May 27, 2014, 04:16:00 AM »
If a kernel module which is not needed built into the kernel and not as a module it can't be dropped from the initrd.
Béla
Ham Radio callsign: HA5DI

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

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Custom kernel problem.
« Reply #7 on: May 27, 2014, 04:55:03 AM »
ok I think I understand where you're coming from now..







Offline oldpig

  • Newbie
  • *
  • Posts: 5
Re: Custom kernel problem.
« Reply #8 on: May 27, 2014, 10:00:27 AM »
+coreplay2,

Thanks for your reply. You are genius and your script is awesome. It's my pleasure to test on my side and let you know. Thanks Again.

+bmarkus

We are on the same boat. In my case, the device driver which I am gonna to pull out was built in kernel and not a module. That's why I need re-compile the kernel. As I said, I used to re-compiled x86 kernel v2.6 and let it run on 32 bit TC 4.6 (or 4.7, I forgot due to it's been long time). The only thing I did, removed the particular device driver from "make menuconfig" and "make bzImage", no any change on modules.gz.

Now, I am worry about "config-3.8.13-tinycore64" is not "clean", and there is one or more "new modules" has been built-in the custom kernel during re-compiling. And they are not in the official modules64.gz.

I did another rebuild last night. This time, I copied from "config-3.8.13-tinycore64" to ".config" and "make bzImage" directly without any change. I still got "KP" (some register and memory was dumped). I gave myself enough patient this time. I've seen some thing interesting came out. It kept moving forward and recursive message had scrolled up, said "[nnn] modprob xxx error" and went into dead loop.

So let me clarify myself clearly:

Requirement: Remove the built-in driver (which is '*' but not 'M' when using make menuconfig) from kernel (3.8.13)
Concept: corepure64.gz = rootfs64.gz + modules64.gz
               tc (x86_64) = vmlinuz64 -> modules64.gz -> rootfs64.gz
               vmlinuz64 = linux core (x86_64) + statistic driver + dynamic driver (modules) + others

modules64.gz includes all "dynamic modules" base on your choice during compiling kernel. It is external. It should be OK if I remove some drivers from statistic part and official modules64.gz still contains all modules that kernel needs. If there is any module not found, the only reason is,  the new custom kernel is "bigger" than modules64.gz you are using.

I apologize for my bad English and please correct me if I am wrong. I am still looking for your help.

Regards,

« Last Edit: May 27, 2014, 10:04:47 AM by oldpig »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14824
Re: Custom kernel problem.
« Reply #9 on: June 03, 2014, 02:50:46 AM »
This might be due to a bug in either linux-3.8.x or gcc-4.7.x that prevents the kernel from compiling properly.

Could you try to use the toolchain64 extension in the x86 version of tc to see if that works?