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

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #15 on: June 26, 2007, 12:36:57 pm »
Nobody has any thoughts on what could be going wrong?
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #16 on: June 26, 2007, 09:37:49 pm »
OK, I managed to get the kernel configured and on my Z. I have the makefile set up to look for the stuff in the kernel dir and, after copying some stuff around, seem to have it so that me build should work.

But it doesn't. I get an error saying that CLOCK_TICK_RATE is not defined from the file jiffies.h. How can I fix this?

Thanks.

EDIT: I still want the pdaX86 dev environment set up, mostly because it seems like a better way to do stuff, but also because it seems I need to totally recompile the kernel to get patched hostap drivers.

Please help!
« Last Edit: June 26, 2007, 10:02:32 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 #17 on: June 26, 2007, 09:51:57 pm »
Quote
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?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163673\"][{POST_SNAPBACK}][/a][/div]
That looks like the disk space you defined is too small ... or maybe your setup is not writing data to the HDU ?

In fact you added that some partition is not mounted .... I guess that's the snaze.
I've forgotten all the steps I did while setting up my virtual machine but this is what df says:
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/loop0              232704    232704         0 100% /
none                    452628    232912    219716  51% /boot/initrd/tmp
/dev/loop0              232704    232704         0 100% /
/dev/hda1             20806156   2197824  18398620  11% /dev/lazydisk
/dev/hda1             20806156   2197824  18398620  11% /var
/dev/hda1             20806156   2197824  18398620  11% /etc
/dev/hda1             20806156   2197824  18398620  11% /home
/dev/hda1             20806156   2197824  18398620  11% /lib/modules
/dev/hda1             20806156   2197824  18398620  11% /mnt
/dev/hda1             20806156   2197824  18398620  11% /tmp
none                    452628         0    452628   0% /dev/shm
/dev/hda1             20806156   2197824  18398620  11% /opt/cross
#

And here is what mount says:
# mount
rootfs on / type rootfs (rw)
/dev/root on /boot/initrd type ext2 (rw,nogrpid)
none on /boot/initrd/proc type proc (rw,nodiratime)
none on /boot/initrd/tmp type tmpfs (rw)
/dev/loop0 on / type squashfs (ro)
none on /dev type ramfs (rw)
none on /proc type proc (rw,nodiratime)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
/dev/hda1 on /dev/lazydisk type ext3 (rw,data=ordered)
/dev/hda1 on /var type ext3 (rw,data=ordered)
/dev/hda1 on /etc type ext3 (rw,data=ordered)
/dev/hda1 on /home type ext3 (rw,data=ordered)
/dev/hda1 on /lib/modules type ext3 (rw,data=ordered)
/dev/hda1 on /mnt type ext3 (rw,data=ordered)
/dev/hda1 on /tmp type ext3 (rw,data=ordered)
none on /dev/shm type tmpfs (rw)
/dev/hda1 on /opt/cross type ext3 (rw,data=ordered)
#
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

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
How To Compile Modules?
« Reply #18 on: June 26, 2007, 10:02:09 pm »
Quote
OK, I managed to get the kernel configured and on my Z. I have the makefile set up to look for the stuff in the kernel dir and, after copying some stuff around, seem to have it so that me build should work.

But it doesn't. I get an error saying that CLOCK_TICK_RATE is not defined from the file jiffies.h. How can I fix this?

Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163805\"][{POST_SNAPBACK}][/a][/div]
Unless you know exactly what you're doing you should be using the pdaxrom builder to download and patch things for you (with the steps I gave you + Adrians suggestion.

Maybe the note 101 still referes to the old SVN ... use the new one on sourceforge and things should work again.

Once you have the things downloaded and patched remember that when you want to do custom things you most likely need to setup the cross toolchain environment (you should have a runsdk.sh script somewhere (in the opt tree) to do that for you).

Before you make changes to suit your needts try getting the standard pdaxrom kernel for your Z model built ... to check that what you have is working correctly.
The add whatever module you need and change the kernel setup if you need.
allways keep a copy of your .config file (make mrproper will wipe the .config file).
You might haveto do a make clean if you patch your kernel befor building anything.
You might haveto build the whole kernel before you can get some modules built (a lot depends on how the kernel configuration is setup).
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 #19 on: June 26, 2007, 10:05:07 pm »
I defined either 20 or 40 GB for that partition, which should be enough. Setup made a .pdax86 folder on the partition, so I think it worked. I'll reboot and see if it auto-detects the drive this time...

EDIT: Did I just need to run setup, or setup-hd as well?

EDIT3: Ran setup-hd, and after symlinking sda to hda and redoing lilo, I can ALMOST get it to boot. Now it gives some error about not being able to mount the rootfs on (8,1) or something like that. I'll get the exact error later.

EDIT2: If somebody would be willing to help out on IRC sometime (assuming I don't get it sorted out), that would be great.

I think I'll write up an updated how-to after this so others won't run into the same issues...

Thanks for the help.
« Last Edit: June 26, 2007, 10:57:26 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 #20 on: June 27, 2007, 12:04:43 pm »
I'm now hopefully solving the SATA issue by using my main computer for the pdaX86 install, so hopefully there won't be more issues, but I suspect that thre will be.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
How To Compile Modules?
« Reply #21 on: June 27, 2007, 03:02:36 pm »
Quote
I think I'll write up an updated how-to after this so others won't run into the same issues...
That will be greatly appreciated.
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #22 on: June 27, 2007, 03:18:08 pm »
I've now got the kernel source patched and stuff...I'll try to compile my module in a bit. But first, I want to patch the kernel hostap driver to support packet injection (hostap is now in the kernel), but one patch for hostap_cs.c won't apply. It fails at 872, if that helps.

The question is: Are there any patches applied to the kernel that could cause this patch not to work? The rest patches just fine.

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

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
How To Compile Modules?
« Reply #23 on: June 27, 2007, 03:46:29 pm »
Quote
I've now got the kernel source patched and stuff...I'll try to compile my module in a bit. But first, I want to patch the kernel hostap driver to support packet injection (hostap is now in the kernel), but one patch for hostap_cs.c won't apply. It fails at 872, if that helps.

The question is: Are there any patches applied to the kernel that could cause this patch not to work? The rest patches just fine.

Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163867\"][{POST_SNAPBACK}][/a][/div]
Maybe ... look in praxrom_builder/trunk/patches_local/linux-2.6.16/.... /arm/
the names should partially speak for themselves ...
If I remember right there is some hostap patches.
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 #24 on: June 27, 2007, 04:04:56 pm »
I see one patch that doesn't look essential to me...I'll try copying the unmodified source for hostap into the patched kernel source and see if the patch will work then.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #25 on: June 27, 2007, 04:07:47 pm »
Are there any specific settings I need to enable when I build the kernel? I'm rather paranoid after foobaring one when installing Gentoo. Also, how do I go about building/installing the kernel?

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

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
How To Compile Modules?
« Reply #26 on: June 28, 2007, 11:14:45 am »
Quote
Are there any specific settings I need to enable when I build the kernel? I'm rather paranoid after foobaring one when installing Gentoo. Also, how do I go about building/installing the kernel?

Yes there are many ... I cannit recall them.
The best thing to do is let the pdaxrom builder build a kaenel for you (make kernel_compile) and then save the .config file in the kernel sources to somewhere safe.
Use the saved config as a starting point for whatever you want to add or remove to kernel configuration.

Keep in mind that for arm kernels you cannot carry the config across versions (ie from 2.6.16 to 2.6.17).
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 #27 on: June 28, 2007, 09:30:52 pm »
OK, I got the kernel compiled with packet injection support (I'll post it later), but I need to reflash my card's firmware to get it to work correctly. Is there package out there that works for downloading firmware to a card? I'm having issues compiling it into the kernel, and Beta 1's standard prism2_srec wouldn't work.

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

VirtusRex

  • Full Member
  • ***
  • Posts: 126
    • View Profile
How To Compile Modules?
« Reply #28 on: June 28, 2007, 09:58:14 pm »
Hey capn_fish,

I once updated my firmware on my linksys wcf12 compact flash card. I used the guide found on this page:

http://www.aircrack-ng.org/doku.php?id=pri...b87e59b4b29c33b

Maybe you can do the same with your card.

VirtusRex

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Modules?
« Reply #29 on: June 28, 2007, 10:03:32 pm »
Quote
Hey capn_fish,

I once updated my firmware on my linksys wcf12 compact flash card. I used the guide found on this page:

http://www.aircrack-ng.org/doku.php?id=pri...b87e59b4b29c33b

Maybe you can do the same with your card.

VirtusRex
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163938\"][{POST_SNAPBACK}][/a][/div]
Did you do it on your Z? If so, what ROM? My issue is that pdaXrom apparently doesn't support flashing cards ATM.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo