GP2X Help With Building A Kernel Module Fuse


Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,518
Location
Detroit, Michigan
Website
Visit site
This is a first for me, so im hoping I can get through some of my problems and learn how to build this kernel module. Its a requirement for another app I want to try on my GP2X.

First I know FUSE isnt in the kernel from GPH or open2x, as both are based on 2.4. If this was Pandora I would be set as this module is included in the 2.6 branch.
So I need to build the module, problem is I need the kernel source code.
Now my first concern is which source do I use, the GPH or open2x?
If I build for one kernel will it not work for the other one?

Right now when I configure the source its detecting my host system's kernel, I think found this to get around it:
CODE
--enable-kernel-module --with-kernel=KERNEL_SOURCE_DIR
 
Orkie said:
Open2x of course ;) . It will work on any filesystem, GPH or Open2x.

Well I want to use open2x, but I didnt want to build a module that woulnt work with the GPH kernel. I guess now I need to get the source code from the svn.
 
Last edited by a moderator:
You might be best to use GPH if you only want the module, but I am reasonably sure the Open2x kernel modules are mostly compatible with GPH if you use a 2.95 compiler.
 
Orkie said:
You might be best to use GPH if you only want the module, but I am reasonably sure the Open2x kernel modules are mostly compatible with GPH if you use a 2.95 compiler.

Well I guess I will assume they do. Im using open2x toolchain and kernel source.
Im running into issues with the fuse build.

At first the configure for fuse complained that it couldnt deteremine the version of the open2x kernel. The readme says I need to run 'make prepare', but it appears that option isnt included in the make file for the kernel.

So I decided instead to run the build script for the kernel. First confusing thing is that theres 2 very similar sh scripts. Which one is the latest? Ive run both and have this issue:
CODE
cc1: error: unrecognized command line option "-mapcs-32"
I also went back to try to compile fuse and now it can detect the kernel version, but I get a compilation error now:
CODE

/opt/projects/linux-open2x-2.4.26_FW2-3/include/asm/semaphore.h: In function queue_request':
/opt/projects/linux-open2x-2.4.26_FW2-3/include/asm/semaphore.h:110: error: unknown register name 'lr' in 'asm'


Can you help anymore with this Orkie?
Update: I just realized im using the app toolchain and not the kernel toolchain. I will download the kernel based one and report back
 
Last edited by a moderator:
Looks like you are using gcc4.1. You want to be using 2.95 if you want a module compatible with the GPH firmware (and anything above 3.4 won't work with any 2.4 kernel, and only 2.95 works with the GPH source).
 
Orkie said:
Looks like you are using gcc4.1. You want to be using 2.95 if you want a module compatible with the GPH firmware (and anything above 3.4 won't work with any 2.4 kernel, and only 2.95 works with the GPH source).
Yeah I caught the gcc problem a little before you posted, but with your suggestion im downloading both 2.95 and 3.4.4.
 
Last edited by a moderator:
Ok i have gcc 2.95 and get the following results:

Trying to build the open2x kernel using the 2.95 script. I didnt make any changes in the config menu that comes up.

CODE

In file included from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/wait.h:13,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/fs.h:12,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/capability.h:17,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/binfmts.h:5,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/sched.h:9,
from getconstants.c:11:
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:10: stdarg.h: No such file or directory
In file included from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/wait.h:13,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/fs.h:12,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/capability.h:17,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/binfmts.h:5,
from /opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/sched.h:9,
from getconstants.c:11:
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:74: parse error before `va_list'
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:74: warning: function declaration isn't a prototype
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:77: parse error before `va_list'
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:77: warning: function declaration isn't a prototype
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:81: parse error before `va_list'
/opt/projects/linux-open2x-2.4.26_FW2-3/include/linux/kernel.h:81: warning: function declaration isn't a prototype
make[2]: *** [constants.h] Error 1
make[2]: Leaving directory `/opt/projects/linux-open2x-2.4.26_FW2-3/arch/arm/tools'
make[1]: *** [dep] Error 2
make[1]: Leaving directory `/opt/projects/linux-open2x-2.4.26_FW2-3/arch/arm/tools'
make: *** [archdep] Error 2



And trying to configure FUSE:

CODE

configure:2102: checking for arm-linux-gcc
configure:2118: found /opt/open2x/gcc-2.95/bin//arm-linux-gcc
configure:2128: result: arm-linux-gcc
configure:2410: checking for C compiler version
configure:2413: arm-linux-gcc --version </dev/null >&5
2.95.3
configure:2416: $? = 0
configure:2418: arm-linux-gcc -v </dev/null >&5
Using builtin specs.
gcc version 2.95.3 20010315 (release)
configure:2421: $? = 0
configure:2423: arm-linux-gcc -V </dev/null >&5
arm-linux-gcc: argument to `-V' is missing
configure:2426: $? = 1
configure:2449: checking for C compiler default output file name
configure:2452: arm-linux-gcc -I/opt/open2x/gcc-2.95/include -s -static -L/opt/open2x/gcc-2.95/lib conftest.c >&5
/tmp/ccqCvzH1.s: Assembler messages:
/tmp/ccqCvzH1.s:1: Error: junk at end of line, first unrecognized character is `@'
/tmp/ccqCvzH1.s:9: Error: junk at end of line, first unrecognized character is `@'
/tmp/ccqCvzH1.s:10: Error: junk at end of line, first unrecognized character is `@'
/tmp/ccqCvzH1.s:11: Error: too many memory references for `mov'
/tmp/ccqCvzH1.s:12: Error: no such instruction: `stmfd sp!,{fp,ip,lr,pc}'
/tmp/ccqCvzH1.s:13: Error: too many memory references for `sub'
/tmp/ccqCvzH1.s:14: Error: expecting operand after ','; got nothing
/tmp/ccqCvzH1.s:15: Error: no such instruction: `b .L2'
/tmp/ccqCvzH1.s:17: Error: no such instruction: `ldmea fp,{fp,sp,pc}'
configure:2455: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "fuse"
| #define PACKAGE_TARNAME "fuse"
| #define PACKAGE_VERSION "2.5.3"
| #define PACKAGE_STRING "fuse 2.5.3"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "fuse"
| #define VERSION "2.5.3"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2494: error: C compiler cannot create executables
See `config.log' for more details.
 
Back
Top