Free Sdio-stack Available


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
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.
 
Last edited by a moderator:
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.MaxDevices = 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.
 
Megatog615 posted on Mar 23 2007 at 01:00 AM said:
Where can I buy that card? :D

I'm not sure who its other distributors are. I got my direct from the company with the understanding that once the driver was working I would be buying in volume. So I hope to become one of their distributors in the near future.
 
Last edited by a moderator:
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.MaxDevices = 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.

as far as i know Open2X uses a newer gcc. Perhaps you should communicate with Open2X devs? :)
 
Last edited by a moderator:
i would love to have ccxstream client on the gp2x and stream movies/games/apps/emus to the 2x it would be a dream come true
 
ivanixgames 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.MaxDevices = 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 to

Code:
TARGET_FUNCTION_CONTEXT FunctionContext = {
  {
	CT_SDIO_STACK_VERSION_CODE,
	"sdio_wlan",
	1,
	0,
	Ids,
	hifDeviceInserted,
	hifDeviceRemoved,
	NULL,
	NULL,
	NULL,
	&FunctionContext,
  }
};
making sure that they are in the correct order in respect to the declaration of the SDFUNCTION struct.
 
Last edited by a moderator:
Back
Top