Elektranox
Well-Known Member
- Joined
- Dec 3, 2005
- Messages
- 1,805
- Age
- 34
- Location
- Oldenburg, Germany, Earth
- Website
- elektranox.dyndns.org
Would be really cool to have SDIO support in Open2X
Im glad your trying to use that one because it is the only one that really fits into the sd slot and only barely sticks out.ivanixgames posted on Mar 22 2007 at 05:05 AM said:OK, I've started the fun process of trying to port the 2.6 patches to 2.4.25 kernel
As I run into complications, I'll be asking for help from the dev/kernel experts.
I'm using the SPECTEC SDIO card for testing.
http://www.spectec.com.tw/sdw821.htm
Megatog615 posted on Mar 23 2007 at 01:00 AM said:Where can I buy that card?
ivanixgames posted on Mar 25 2007 at 10:43 AM said:Hello again.
Hoping some kernel hackers on this board can help.
I've got some of the free SDIO stack modules compiled for the 2.4 kernel, however some of the files for the wireless lan sample driver are giving me trouble.
In particular the compiler (ver 2.95.3) is reporting errors in file drivers/sdio/function/wlan/ar6000/hif/hif.c :
arm-linux-gcc -D__KERNEL__ -I/home/sandbox/projects/code/gp2xsdk/work/kernel/2.0.0/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float -Uarm -DMODULE -nostdinc -iwithprefix include -DKBUILD_BASENAME=hif -c -o hif.o hif.c
hif.c:54: unknown field `Version' specified in initializer
hif.c:54: warning: missing braces around initializer
hif.c:54: warning: (near initialization for `FunctionContext.function')
hif.c:55: unknown field `function' specified in initializer
hif.c:56: unknown field `function' specified in initializer
hif.c:57: unknown field `function' specified in initializer
hif.c:58: unknown field `function' specified in initializer
hif.c:59: unknown field `function' specified in initializer
hif.c:60: unknown field `function' specified in initializer
hif.c:61: unknown field `function' specified in initializer
hif.c:62: unknown field `function' specified in initializer
hif.c:63: unknown field `function' specified in initializer
hif.c:64: unknown field `function' specified in initializer
make[6]: *** [hif.o] Error 1
---------------------------
the section in hif.c looks like this:
TARGET_FUNCTION_CONTEXT FunctionContext = {
.function.Version = CT_SDIO_STACK_VERSION_CODE,
.function.pName = "sdio_wlan",
.function.Maevices = 1,
.function.NumDevices = 0,
.function.pIds = Ids,
.function.pProbe = hifDeviceInserted,
.function.pRemove = hifDeviceRemoved,
.function.pSuspend = NULL,
.function.pResume = NULL,
.function.pWake = NULL,
.function.pContext = &FunctionContext,
};
----------------
TARGET_FUNCTION_CONTEXT is defined is a local header file as:
typedef struct target_function_context {
SDFUNCTION function; /* function description of the bus driver */
OS_SEMAPHORE instanceSem; /* instance lock. Unused */
SDLIST instanceList; /* list of instances. Unused */
} TARGET_FUNCTION_CONTEXT;
-----------------
It looks like thee issue is gcc version related, as a newer gcc version 3.4.6 seems to get past this point. Of course these modules wont load with the stock gp2x kernel.
Any ideas on how to rewrite this section appreciated.
Is that declaration of FunctionContext a valid C construct? I've never seen that syntax in all my years of C and C++ programming. Try changing the declaration toivanixgames posted on Mar 25 2007 at 07:43 PM said:the section in hif.c looks like this:
TARGET_FUNCTION_CONTEXT FunctionContext = {
.function.Version = CT_SDIO_STACK_VERSION_CODE,
.function.pName = "sdio_wlan",
.function.Maevices = 1,
.function.NumDevices = 0,
.function.pIds = Ids,
.function.pProbe = hifDeviceInserted,
.function.pRemove = hifDeviceRemoved,
.function.pSuspend = NULL,
.function.pResume = NULL,
.function.pWake = NULL,
.function.pContext = &FunctionContext,
};
----------------
TARGET_FUNCTION_CONTEXT is defined is a local header file as:
typedef struct target_function_context {
SDFUNCTION function; /* function description of the bus driver */
OS_SEMAPHORE instanceSem; /* instance lock. Unused */
SDLIST instanceList; /* list of instances. Unused */
} TARGET_FUNCTION_CONTEXT;
-----------------
It looks like thee issue is gcc version related, as a newer gcc version 3.4.6 seems to get past this point. Of course these modules wont load with the stock gp2x kernel.
Any ideas on how to rewrite this section appreciated.
TARGET_FUNCTION_CONTEXT FunctionContext = {
{
CT_SDIO_STACK_VERSION_CODE,
"sdio_wlan",
1,
0,
Ids,
hifDeviceInserted,
hifDeviceRemoved,
NULL,
NULL,
NULL,
&FunctionContext,
}
};