WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: looking for the pciehp module  (Read 6220 times)

Offline med458

  • Newbie
  • *
  • Posts: 22
looking for the pciehp module
« on: February 20, 2013, 03:22:39 AM »
Helo my friends.  I have a PCI Express card that is not functioning in Tinycore.  I had the same problem with the same card in Debian, and solved it by using module "pciehp" (PCI Express Hotplug).  Thus, I strongly suspect the problem is that I do not have pciehp installed in Tinycore.  I looked in the extensions archive for a PCI Express hotplug module, and I could find only a PCI hotplug module (non Express).  It did not solve my problem.  I was also thinking about making a pciehp extension, but the source code has evaded me.
Thus, I am curious if anyone is aware of a pciehp extension that I overlooked.  Otherwise, I am wondering if anyone knows where the pciehp sources can be obtained for the purpose of creating an extension.  I tried to find pciehp, but was unsuccessful.
Thank you in advance for your time and thoughtfulness.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: looking for the pciehp module
« Reply #1 on: February 20, 2013, 03:53:56 AM »
It is a part of the kernel, and yes, it's disabled in our build.

So you'd need to build a custom kernel to get it right now.
The only barriers that can stop you are the ones you create yourself.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: looking for the pciehp module
« Reply #2 on: February 20, 2013, 02:45:09 PM »
Hi Curaga, thank you for helping me.
I am not an expert, but am willing to do what it takes.  I am not sure how to make a new kernel.  I would like to learn.  Can you please tell me, do you mean I should take Tinycore sources, add the files here:
http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/drivers/pci/hotplug/
and then "make" the Tinycore sources, along with the added files?

Alternatively, I am wondering if CorePlus has the pciehp module I seek, installed already.

Other other things I have considered:

Finding a large distribution such as knoppix or suse running a similar kernel, and just coping the pciehp files to Tinycore and making an extension, or is there something that will cause the pciehp module to not run on a different system, such as the need for unique lib files or something?

Otherwise, downloading the files at the fsu.edu link above, and trying to edit the strange incomplete Makefile, and trying to compile pciehp.c on Tinycore?

Any guidance would be very much appreciated, thanks agian!!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: looking for the pciehp module
« Reply #3 on: February 20, 2013, 04:23:22 PM »
No need to download any new files or hack makefiles. Also copying the module from some other distro will not work.

You only need a compile environment and our kernel source, linux-3.0.21-patched. For more detailed instructions please see the wiki and do a forum search, it's been written out many times before.
The only barriers that can stop you are the ones you create yourself.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: looking for the pciehp module
« Reply #4 on: February 20, 2013, 11:08:10 PM »
Thank you for this advice, I will try to learn how to do this.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: looking for the pciehp module
« Reply #5 on: February 24, 2013, 02:58:40 AM »
I was wondering if anyone would recommend an easy-to-understand, complete, and relatively recent link addressing this topic?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: looking for the pciehp module
« Reply #6 on: February 24, 2013, 04:24:52 AM »
something like:
Code: [Select]
$ sudo mkdir /usr/src
$ sudo chown tc:staff /usr/src
$ cd /usr/src
$ cp /path_to_file/linux-3.0.21-patched.txz ./
$ tar xf linux-3.0.21-patched.txz
$ rm linux-3.0.21-patched.txz
$ cd linux-3.0.21
$ tce-load -i compiletc bash perl5 ncurses-dev advcomp
$ make mrproper
$ cp /path_to_file/config-3.0.21-tinycore ./.config
$ make oldconfig
$ make menuconfig [navigate to the menu entry for pciehp, set it to "m", save and exit]
$ make
$ cp /path_to_file/pciehp.ko ./
$ gzip pciehp.ko
$ advdef -z4 pciehp.ko.gz
$ cp pciehp.ko.gz /path_to_safe_place

..and then decide where you would like to place the module in the filesystem and make an extension out of it.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: looking for the pciehp module
« Reply #7 on: February 24, 2013, 10:45:47 AM »
Thank you very much for this.  This advice is similar to a link I found: http://wiki.tinycorelinux.net/wiki:custom_kernel
However, may I please clarify one point?
This link I provided above, and your post requires that I type "make oldconfig"
However, when I typed this, it caused the terminal to ask many questions I did not understand.  Many many many questions.  I had to press down the "enter" key for a long time while these questions scrolled down the screen.  The end result was a corrupted kernel that did not boot.

On the other hand, this is another link I found: http://www.parkytowers.me.uk/thin/Linux/TinycoreCK.shtml
This link above seems to say that one can choose between "make config" "make xconfig" or "make menuconfig".
This link above makes no mention of "make oldconfig" and I have found that "make menuconfig" had an entry for the module I desire "PCIe hotplug".

So my question is, is "make oldconfig" really necessary.  I am sure it is or you would not have typed it.  However, is there some way to avoid having to answer questions I do not understand and also to cause it to make a noncorupted kernel?  (other methods I tried made a valid kernel, with no pciehp module, however).

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: looking for the pciehp module
« Reply #8 on: February 24, 2013, 10:56:12 AM »
You weren't instructed to use the kernel.
Just use the module.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: looking for the pciehp module
« Reply #9 on: February 24, 2013, 11:18:22 AM »
Ok I will give it another try, thank you again to everyone for volunteering to help a newbie like me :)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11625
Re: looking for the pciehp module
« Reply #10 on: February 24, 2013, 11:20:39 AM »
Hi med458
Quote
This link I provided above, and your post requires that I type "make oldconfig"
However, when I typed this, it caused the terminal to ask many questions I did not understand.
If it asks questions, you did something incorrectly.
Make sure the config file matches the kernel sources:
Code: [Select]
linux-3.0.21-patched.txz
config-3.0.21-tinycore
After you execute:
Code: [Select]
cp /path_to_file/config-3.0.21-tinycore ./.configyou should have a file called  .config  (note the leading period) in /usr/src/linux-3.0.21
Do NOT run  make mrproper  AFTER this step since that will delete your  .config  file.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: looking for the pciehp module
« Reply #11 on: February 24, 2013, 05:15:02 PM »
Gerald and Rich:
Thank you for your help.  I tried many different ways to get this working, not just one.  I always ask questions as a last resort, so my question pertained to one of my attempts that failed.
Juanito:
Thank you for these clear and concise directions.  It worked perfectly.  I now stored this pciehp.ko.gz file in /mnt/sda1/tmp.  My next two projects are turning this into an extension and having it load at boottime automatically.  I am going to begin trying to learn how to do these 2 projects now.  Thank you guys for getting me this far.