Author Topic: Custom Kernel Compile  (Read 4669 times)

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« on: January 30, 2006, 02:22:33 pm »
I've been trying to compile a custom kernel for my 3100 (need to get Socket Low power card to work with Kismet)

I downloaded the sources, applied the patches on my linux laptop, copied over the patched sources to my Z, ran make menuconfig fine; saved it but when I run make dep I get the following error:
Code: [Select]
# make dep
  Making asm-arm/arch -> asm-arm/arch-pxa symlink
  Making asm-arm/proc -> asm-arm/proc-armv symlink
rm -f include/asm
( cd include; ln -sf asm-arm asm)
make[1]: Entering directory `/mnt/ide2/linux/arch/arm/tools'
/mnt/ide2/linux/scripts/mkdep -D__KERNEL__ -I/mnt/ide2/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float -Uarm  -- getconstants.c |\
 sed s,getconstants.o,constants.h, > .depend
make all
make[2]: Entering directory `/mnt/ide2/linux/arch/arm/tools'
arm-linux-gcc -D__KERNEL__ -I/mnt/ide2/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float -Uarm -S -o constants.h.tmp.1 getconstants.c
make[2]: arm-linux-gcc: Command not found
make[2]: *** [constants.h] Error 127
make[2]: Leaving directory `/mnt/ide2/linux/arch/arm/tools'
make[1]: *** [dep] Error 2
make[1]: Leaving directory `/mnt/ide2/linux/arch/arm/tools'
make: *** [archdep] Error 2

I have zgcc 3.4.5 mounted
Code: [Select]
/dev/loop0 on /opt/native/arm/3.4.5-xscale-softvfp type cramfs (rw)
What am I missing?
« Last Edit: January 30, 2006, 10:31:47 pm by jerrybme »
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Custom Kernel Compile
« Reply #1 on: January 30, 2006, 02:55:50 pm »
Quote
What am I missing?

the fact that the kernel needs to be compiled with gcc 2.95 hard float, which is not available as a native compiler for pdaxrom.
SLC-860 cacko / senao wifi

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« Reply #2 on: January 30, 2006, 03:25:45 pm »
Quote
Quote
What am I missing?

the fact that the kernel needs to be compiled with gcc 2.95 hard float, which is not available as a native compiler for pdaxrom.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=113016\"][{POST_SNAPBACK}][/a][/div]
Thanks pgas! I guess it's back to the laptop where I had gotten a similar error even though I did have the hardfloat gcc installed there, I'll recheck the config.

Cheers,

Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« Reply #3 on: January 30, 2006, 05:08:14 pm »
Anyone know how to setup the cross-compile tool chain for cross compiling the 3100 kernel? I'm trying to use: arm-cacko-linux-gnu-2.95.3-2.15-2.2.5-hardfloat-10.48_20.12.05.tar.bz2

There is no runzgcc as there is in the soft float versions, I've googled and can't any direction on setting it up.

Do I need to setup the pdaxrom-builder and point it somehow to the hard float tools? That seems overkill as I'm not trying to rebuild the whole ROM only the kernel. If I get this to work, I promise to write up a how to on the Wiki...

**update**
Crap, can't get pdaxrom-builder to work, I copied the xtools config from the akita directory, then ran make menuconfig resulted in following errors:
Code: [Select]
[/home/jerry/pdaxrom/pdaXrom-builder] > make menuconfig
cd scripts/lxdialog && ln -s -f ../ptx-modifications/Makefile.lxdialog.ptx Makefile
make -C scripts/lxdialog lxdialog
make[1]: Entering directory `/home/jerry/pdaxrom/pdaXrom-builder/scripts/lxdialog'
make[1]: `lxdialog' is up to date.
make[1]: Leaving directory `/home/jerry/pdaxrom/pdaXrom-builder/scripts/lxdialog'
cd scripts/kconfig && ln -s -f ../ptx-modifications/Makefile.kconfig.ptx Makefile
make -C scripts/kconfig libkconfig.so
make[1]: Entering directory `/home/jerry/pdaxrom/pdaXrom-builder/scripts/kconfig'
make[1]: `libkconfig.so' is up to date.
make[1]: Leaving directory `/home/jerry/pdaxrom/pdaXrom-builder/scripts/kconfig'
make -C scripts/kconfig mconf
make[1]: Entering directory `/home/jerry/pdaxrom/pdaXrom-builder/scripts/kconfig'
gcc -O2 -Wall -g -fPIC -c mconf.c -o mconf.o
mconf.c:91: error: static declaration of ‘current_menu’ follows non-static declaration
lkc.h:63: error: previous declaration of ‘current_menu’ was here
make[1]: *** [mconf.o] Error 1
make[1]: Leaving directory `/home/jerry/pdaxrom/pdaXrom-builder/scripts/kconfig'
make: *** [scripts/kconfig/mconf] Error 2


TIA,
Jerry
« Last Edit: January 30, 2006, 06:10:00 pm by jerrybme »
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« Reply #4 on: January 30, 2006, 10:45:21 pm »
Getting further but still no joy  

The important step I missed was passing the PATH statement to the hard float cross tools before running make dep
Code: [Select]
export PATH=$PATH:/opt/cross/arm/2.95.3-2.15/binAnd make clean ran without error, but it crapped out on make zImage
Code: [Select]
make[2]: ***[double_cpo.o] Error 1
make[2]: Leaving directory 'home/jerry/pdaxrom/linux/arch/arm/nwfpe'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory '/home/jerry/pdaxrom/linux/arch/arm/nwfpe'
make: *** [_dir_arch/arm/arm/nwfpe] Error 2

So close yet so far...

I'm probably missing something simple..
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Custom Kernel Compile
« Reply #5 on: January 31, 2006, 03:06:30 am »
is there no patched kernel source for pdaxrom?  surely this would be something handy to post somewhere?
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

anunakin

  • Sr. Member
  • ****
  • Posts: 340
    • View Profile
    • http://vivaphp.net
Custom Kernel Compile
« Reply #6 on: January 31, 2006, 05:46:54 am »
[img]http://www.vivaphp.net/imagens/rev2.jpg\" border=\"0\" class=\"linked-sig-image\" /]
Anunakin (Marcus Fazzi)

Nokia N900 32GB + microSD 2GB
Nokia N810 w/ microSD 8GB
Nokia 5310 XpressMusic w/ microSD 1GB
HP48GX->Psion Sienna->Palm m130->Tungsten T->Zaurus SL-5500->C3000->C3100 ALL SOLD

My FEED(On Line AGAIN!!!)

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Custom Kernel Compile
« Reply #7 on: January 31, 2006, 06:22:31 am »
Quote
is there no patched kernel source for pdaxrom? surely this would be something handy to post somewhere?
in:
http://mail.pdaxrom.org/1.1.0beta1/src/

linux-C1000...tar.gz etc might be what you are looking for.

Quote
Try use OZ, 2.6 patches! I think this works with pdaX.

If it works, I doubt that it will work without problems
« Last Edit: January 31, 2006, 06:22:59 am by pgas »
SLC-860 cacko / senao wifi

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« Reply #8 on: January 31, 2006, 10:09:32 am »
Thanks to pgas' help on #cacko, we determined that part of my problem is that I'm compiling on Ubuntu, Breezy which uses gcc 4.

Next step is to try the pdaXrom live CD with build environment already setup correctly.

The saga continues.....  Fingers & toes crossed  
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« Reply #9 on: January 31, 2006, 05:03:27 pm »
Crossed fingers & toes didn't help  

I downloaded the vmware player and the pdaXrom virtual files. Ran the distro fine under windows. I used an USB drive to transfer the tar ball of the pdaXrom-builder into the VM. I was able to run the make menuconfig fine and had copied the config file for kernel compile from the sys-config directory. However, make kernel_compile errored out trying to download glibc-2.2.5.tar.bz2 from gnu.org (no such file).

So I copied the kernel sources and arm-cacko-linux-gnu-2.95.3-2.15-2.2.5-hardfloat-10.48_20.12.05.tar.bz2 from the USB; untarred them. Applied all of the patches in the patches-local/linux-c3100-rom directory. Ran menuconfig and used a config that cjb had used for his c-1000 (this might be my problem). make dep and make zImage all ran fine.

I copied the zImage to my USB drive swapped out the zImage.bin from the c-3100 folder of tools.tar, retarred it up and reflashed.... wouldn't boot arrgh.

Now I'm recompiling using borzoi kernel config found in pdaXrom builder with the offending Orinoco module not included.

Fingers & toes crossed again...

**Update**
   It worked! new kernel boots ok, now to test orinoco modules cjb compiled and see if I can finally use Kismet!!

Once I confirm they work I'll write this up on the Wiki.

One thing of interest is some of the kernel configs in pdaXrom builder, 2.6.14 for Borzoi for example.... Has anyone used any higher kernels than 2.4.20 for pdaXrom?
« Last Edit: January 31, 2006, 05:35:50 pm by jerrybme »
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Custom Kernel Compile
« Reply #10 on: January 31, 2006, 07:23:06 pm »
Quote
However, make kernel_compile errored out trying to download glibc-2.2.5.tar.bz2 from gnu.org (no such file).

I found a lot of the same - a number of the downloads are incorrect (e.g. looking for bzipped tarball when only gzipped tarball available). I just downloaded manually and put it in the source directory with the compression/name that the builder expected...

Quote
Has anyone used any higher kernels than 2.4.20 for pdaXrom?

As far as I know, the pdaXrom specific patches aren't available for newer kernels - you'd have to make sure these all work and update any broken bits.
SL6000-L, RC12

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Custom Kernel Compile
« Reply #11 on: January 31, 2006, 09:29:33 pm »
that would indeed be the tarball I was looking for. and in the obvious place, too:)
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Custom Kernel Compile
« Reply #12 on: February 01, 2006, 03:47:53 pm »
Finally got it to work            

Kismet is working thanks to cjb's compiled Orinoco drivers. I've written up the process and sent to pgas to include on the user contrib section http://mail.pdaxrom.org/contrib/

I'll update the OESF Wiki when a get a chance too.

Cheers,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Custom Kernel Compile
« Reply #13 on: February 02, 2006, 05:29:50 am »
SLC-860 cacko / senao wifi

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Custom Kernel Compile
« Reply #14 on: February 17, 2006, 01:04:02 am »
are the newer sources --like 2.4.32 patched and readily useable?  (plan to stick w/ the model specific version, but got curious)
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf