Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: hoogenboom on May 05, 2016, 06:59:45 AM

Title: Custom Kernel
Post by: hoogenboom on May 05, 2016, 06:59:45 AM
I figured that I'd start a new thread. Based on this:

TC 3 was the last kernel using the old IDE layer. Most likely your older thin client uses a rare ide chipset that's not well supported under the new ata layer, and if you built a custom kernel with the old ide driver for it, you could use TC 7.

Look into the TC 3 dmesg for any ide/ata messages.

I found this from the dmesg output (attached)

pci 0000:00:0f.2: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
pci 0000:00:0f.2: legacy IDE quirk: reg 0x14: [io  0x03f6]
pci 0000:00:0f.2: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
pci 0000:00:0f.2: legacy IDE quirk: reg 0x1c: [io  0x0376]

Another thing I should mention is when I was trying every downlevel iso of TC on this hardware. TC 4.1 was the last one that booted to the desktop. I would love to get TC 7 running on this. It would probably solve my touchscreen issue as well. Thank you. This community rocks!
Title: Re: Custom Kernel
Post by: curaga on May 05, 2016, 12:21:59 PM
Please post the dmesg from TC 3.8.4, the version that saw your IDE drives.
Title: Re: Custom Kernel
Post by: hoogenboom on May 05, 2016, 01:12:41 PM
Certainly!
Title: Re: Custom Kernel
Post by: Rich on May 05, 2016, 06:02:48 PM
Hi hoogenboom
From your TC 3.8.4 dmesg attachment:
Quote
ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
Try adding the boot code:
Code: [Select]
ide-generic.probe-mask=0x3ffound here:
http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt#1377
Title: Re: Custom Kernel
Post by: curaga on May 06, 2016, 01:14:47 AM
Yes, the cs5535 is experimental under ata, but stable under ide.

So in the kernel config, you need to say yes to "ATA/ATAPI/MFM/RLL support (DEPRECATED)" and "AMD CS5535 chipset support" under it.
Alternatively, say yes to the experimental cs5535 ata driver, but that may be risky.
Title: Re: Custom Kernel
Post by: hoogenboom on May 06, 2016, 12:38:23 PM
I've found the drivers and added them. When it came time to re compile the kernel it errors out right away:

x:~/2320/linux-4.2.9$ make bzImage
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
/bin/sh: bc: not found
  CC      arch/x86/kernel/asm-offsets.s
In file included from include/linux/ktime.h:25:0,
                 from include/linux/rcupdate.h:47,
                 from include/linux/srcu.h:33,
                 from include/linux/notifier.h:15,
                 from include/linux/memory_hotplug.h:6,
                 from include/linux/mmzone.h:797,
                 from include/linux/gfp.h:5,
                 from include/linux/slab.h:14,
                 from include/linux/crypto.h:24,
                 from arch/x86/kernel/asm-offsets.c:8:
include/linux/jiffies.h: In function '_msecs_to_jiffies':
include/linux/jiffies.h:326:10: error: 'MSEC_TO_HZ_MUL32' undeclared (first use in this function)
  return (MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) >> MSEC_TO_HZ_SHR32;
          ^
include/linux/jiffies.h:326:10: note: each undeclared identifier is reported only once for each function it appears in
include/linux/jiffies.h:326:33: error: 'MSEC_TO_HZ_ADJ32' undeclared (first use in this function)
  return (MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) >> MSEC_TO_HZ_SHR32;
                                 ^
include/linux/jiffies.h:326:54: error: 'MSEC_TO_HZ_SHR32' undeclared (first use in this function)
  return (MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) >> MSEC_TO_HZ_SHR32;
                                                      ^
include/linux/jiffies.h: In function '_usecs_to_jiffies':
include/linux/jiffies.h:381:10: error: 'USEC_TO_HZ_MUL32' undeclared (first use in this function)
  return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32)
          ^
include/linux/jiffies.h:381:33: error: 'USEC_TO_HZ_ADJ32' undeclared (first use in this function)
  return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32)
                                 ^
include/linux/jiffies.h:382:6: error: 'USEC_TO_HZ_SHR32' undeclared (first use in this function)
   >> USEC_TO_HZ_SHR32;
      ^
Kbuild:80: recipe for target 'arch/x86/kernel/asm-offsets.s' failed
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
Makefile:992: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
tc@box:~/2320/linux-4.2.9$


I'm following instructions from http://www.parkytowers.me.uk/thin/Linux/TinycoreCK.shtml and http://wiki.tinycorelinux.net/wiki:custom_kernel?s[]=kernel

Google turns up this: http://lkml.iu.edu/hypermail/linux/kernel/1301.1/02721.html not very helpful. I'm doing this procedure this from TC7 installed to a 4GB flash drive in a laptop AND a Virtual Box (1GB memory and disk) and getting the same error. I feel like its something painfully obvious.
Title: Re: Custom Kernel
Post by: andyj on May 06, 2016, 12:57:29 PM
It is. tce-load -iwl bc. Also in my experience you should compile the kernel from a bash shell vs. ash if you aren't already.
Title: Re: Custom Kernel
Post by: hoogenboom on May 06, 2016, 01:10:33 PM
Perfect. Thank you! Onward down the rabbit hole!
Title: Re: Custom Kernel
Post by: Juanito on May 06, 2016, 11:49:42 PM
To compile the kernel you need the compiletc, bash, perl5, ncurses-dev and bc extensions.