Author Topic: How To Compile Modules?  (Read 21918 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« on: June 19, 2007, 09:04:32 pm »
I would like to be able to compile modules for pdaXrom, but don't know how. Could somebody post a how-to? Unless I'm mistaken, the process is different on pdaX than on a normal box. Links to the stuff necessary would be great.

Hopefully this isn't horribly obvious.

Thanks in advance.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
How To Compile Modules?
« Reply #1 on: June 19, 2007, 09:30:09 pm »
Quote
I would like to be able to compile modules for pdaXrom, but don't know how. Could somebody post a how-to? Unless I'm mistaken, the process is different on pdaX than on a normal box. Links to the stuff necessary would be great.

Hopefully this isn't horribly obvious.

Thanks in advance.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163415\"][{POST_SNAPBACK}][/a][/div]

for 2.6.x kernel you need to add the kernel headers to gcc 3.4.6
for 2.4.x kernel you need to use gcc 2.95.x (with fpa) and add the kernel headers for the appropriate model, ie Cxx00 use 2.4.20 kernel whereas cxx0 use 2.4.18 something kernel.
« Last Edit: June 19, 2007, 09:32:14 pm by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #2 on: June 19, 2007, 10:45:43 pm »
I feel like I've asked this before, but how do I get the kernel headers? And where exactly do I put them?

Thanks, and sorry for the (potentially) repeated question(s).
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #3 on: June 21, 2007, 06:45:34 pm »
Could somebody please post the answers to the questions above? I'm fairly certain somebody here knows the answers...
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
How To Compile Modules?
« Reply #4 on: June 21, 2007, 08:56:47 pm »
Quote
I feel like I've asked this before, but how do I get the kernel headers? And where exactly do I put them?

Thanks, and sorry for the (potentially) repeated question(s).
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

[a href=\"http://distro.ibiblio.org/pub/linux/distributions/pdaxrom/src/]http://distro.ibiblio.org/pub/linux/distri...ns/pdaxrom/src/[/url]

you need to configure the kernel but instead of compiling it, just copy the entire include subtree and whack it under the gcc include tree or symlink it....
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #5 on: June 23, 2007, 02:41:55 pm »
After trying to configure the kernel, I have a few more questions:

-Can I do the configure part on a desktop?

-Does it matter what I configure it with?

Thanks.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
How To Compile Modules?
« Reply #6 on: June 23, 2007, 03:21:08 pm »
1)install pdaxrom builder on a pc or virtual machine
2)follor the steps on note 101 upto when you start to actually build the romm (make all)
3)run make kernel_get
4)run make kernel_prepare

you now have the sources patched and ready to build in ~/<where you put your build>/build/linux-2.6.16.
with that you should be able tu build any modules.

Not sure if this is any easier that the other stuff ... but it's an alternative.
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
How To Compile Modules?
« Reply #7 on: June 23, 2007, 04:27:47 pm »
make kernel_prepare will perform make kernel_get

So you can skip step 3 :-)

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #8 on: June 23, 2007, 07:50:48 pm »
Quote
1)install pdaxrom builder on a pc or virtual machine
2)follor the steps on note 101 upto when you start to actually build the romm (make all)
3)run make kernel_get
4)run make kernel_prepare

you now have the sources patched and ready to build in ~/<where you put your build>/build/linux-2.6.16.
with that you should be able tu build any modules.

Not sure if this is any easier that the other stuff ... but it's an alternative.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163606\"][{POST_SNAPBACK}][/a][/div]
The sources at distro.ibiblio.../pdaxrom/src aren't patched? Does it matter? I'm trying to build the DM9601 module, and maybe packet-injection-patched hostap drivers, if it matters.

EDIT: Oh, and how hard is it to install the builder in a virtual machine and have networking support?
« Last Edit: June 23, 2007, 07:51:52 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
How To Compile Modules?
« Reply #9 on: June 24, 2007, 01:30:33 am »
Quote
The sources at distro.ibiblio.../pdaxrom/src aren't patched? Does it matter?
No ... they get patched with make kernel_prepare from the stuf in ~/pdaxrom_builder/trunk/local_patches/linux-2.6.16/arm/....
Quote
I'm trying to build the DM9601 module, and maybe packet-injection-patched hostap drivers, if it matters.
Once you have the whole kernel sources patched with the arm and pdaxrom patches you can do whatever you like: add other patches, change kernel setup, build kernel or build just modules. If you have no experience with this stuff read the README in the kernel sources.
Quote
EDIT: Oh, and how hard is it to install the builder in a virtual machine and have networking support?
It's a simple. I use vmware because xen is teased with the slackware non xen friendly Thread Safe Library so I can give you a quick overview for vmware:
install the vmware software (in this step you must decide what type of networking you are going to give to the virtual machines: (*)bridged or nat),
create a new virtual machine and give it decent resources (disk ram and cpu),
put the pdaxrom-builder.iso somewhere where the vmware virtual machine can see it,
set up the properties on the virtual machine so that it uses the iso image as CD image (not the physical dryve),
boot the virtual machine and setup the pdaxrom-builder to HD in the virtual machine,
setup the builder following note 101 (if I remember correctly).
There you are: 15 minutes work and you have the pdaxrom-builder working (understanding how it works is a different beast ... but you can bug the hell out of Adrian for that as he did the same to Sash in turn ;-) )

* Bridged is good if you can give your VM's real addresses belonging to the same address space of the host machine, nat is godd when you aonly have one address avalible on the network where the host is attached so the VM's get another IP address and get automatically natted (like masquerade) to the address of your host.
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #10 on: June 24, 2007, 11:54:03 am »
Quote
Quote
The sources at distro.ibiblio.../pdaxrom/src aren't patched? Does it matter?
No ... they get patched with make kernel_prepare from the stuf in ~/pdaxrom_builder/trunk/local_patches/linux-2.6.16/arm/....
Quote
I'm trying to build the DM9601 module, and maybe packet-injection-patched hostap drivers, if it matters.
Once you have the whole kernel sources patched with the arm and pdaxrom patches you can do whatever you like: add other patches, change kernel setup, build kernel or build just modules. If you have no experience with this stuff read the README in the kernel sources.
Quote
EDIT: Oh, and how hard is it to install the builder in a virtual machine and have networking support?
It's a simple. I use vmware because xen is teased with the slackware non xen friendly Thread Safe Library so I can give you a quick overview for vmware:
install the vmware software (in this step you must decide what type of networking you are going to give to the virtual machines: (*)bridged or nat),
create a new virtual machine and give it decent resources (disk ram and cpu),
put the pdaxrom-builder.iso somewhere where the vmware virtual machine can see it,
set up the properties on the virtual machine so that it uses the iso image as CD image (not the physical dryve),
boot the virtual machine and setup the pdaxrom-builder to HD in the virtual machine,
setup the builder following note 101 (if I remember correctly).
There you are: 15 minutes work and you have the pdaxrom-builder working (understanding how it works is a different beast ... but you can bug the hell out of Adrian for that as he did the same to Sash in turn ;-) )

* Bridged is good if you can give your VM's real addresses belonging to the same address space of the host machine, nat is godd when you aonly have one address avalible on the network where the host is attached so the VM's get another IP address and get automatically natted (like masquerade) to the address of your host.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163624\"][{POST_SNAPBACK}][/a][/div]
What about doing this under Bochs or QEMU? I've had a little more experience with them (and they're more free).

EDIT: I'll just try it. If it fails, I can just try another and/or VMWarePlayer.
« Last Edit: June 24, 2007, 11:56:36 am by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #11 on: June 24, 2007, 01:55:23 pm »
Now trying to follow the firections here (on a real HD):

http://www.pdaxrom.org/?q=node/93

But running setup does nothing. What's wrong? It's a SATA HD, if that matters.

Also, am I supposed to be able to boot from this partition? If so, what do I add to menu.lst?

Thanks.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
How To Compile Modules?
« Reply #12 on: June 24, 2007, 02:18:12 pm »
Quote
Now trying to follow the firections here (on a real HD):

http://www.pdaxrom.org/?q=node/93

But running setup does nothing. What's wrong? It's a SATA HD, if that matters.
Maybe pdaxrom doesn't have the drivers for SATA disks? Try "fdisk -l" and see if the HDD you want to use is listed.
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #13 on: June 24, 2007, 02:25:32 pm »
Quote
Quote
Now trying to follow the firections here (on a real HD):

http://www.pdaxrom.org/?q=node/93

But running setup does nothing. What's wrong? It's a SATA HD, if that matters.
Maybe pdaxrom doesn't have the drivers for SATA disks? Try "fdisk -l" and see if the HDD you want to use is listed.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163650\"][{POST_SNAPBACK}][/a][/div]
Yeah, it's there, and it shows up in /dev. The setup script implies that it supports SATA drives (it looks for sd* as well as hd* AFAICT).

EDIT: Rebooted and tried it without starting X, and it works. Stay tuned for the next problem!
« Last Edit: June 24, 2007, 03:16:09 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #14 on: June 24, 2007, 08:17:38 pm »
OK, I finally got the setup to wrk, but now when I try to do the

Code: [Select]
make virtual-xchain_install
it fails to connect to the server. I used wget to DL the GCC source, but then it fails saying there is no room to decompress the source ("no space left on device").

Also, the partition that I specified in the "setup" isn't mounted, so I mounted it on /mnt/hd.

What am I doing wrong now?
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo