This is driving me crazy spent two days on it so far and I know I must be close but I am just not getting it
I am trying to compile a driver module for a wireless USB device for use with my SGS2
So I have set up unbuntu in a VM. I have downloaded and installed codesourcery and the android sdk and installed git-core and cloned the repository in this thread and the correct jdk. edited supercurio's build-kernel script and run it
(I also modded it to do make headers_install and make prepare_modules)
Which seemed to build the kernel fine (zImage is 7245808 bytes so about right?) so I am guessing I did the set up stuff right using defaults for a first attempt.
Anyway so now I should have the headers for this kernel in $TOP_DIR/usr/include
right? and there are certainly some in there.
So then I edit the Makefile for the driver and run that to point at those includes and try to compile my driver
Which always fails with :-
make: Entering directory `/root/sgskernelsrc/samsung-kernel-galaxysii/usr/include'
make: *** No rule to make target `modules'. Stop.
make: Leaving directory `/root/sgskernelsrc/samsung-kernel-galaxysii/usr/include'
rt2570.ko failed to build!
make: *** [module] Error 1
Someone has said I have to build my driver with my kernel but I don't know if that is true or how to begin to do that
the modified build script I am using is
# supercurio's note:
# This is original Samsung build script, you better make c1_defconfig and not use it
# Set Default Path
# TODO: Set toolchain and root filesystem path
# Copy Kernel Configuration File
cp -f $KERNEL_PATH/arch/arm/configs/c1_defconfig $KERNEL_PATH/.config
make -C $KERNEL_PATH oldconfig || exit -1
make -C $KERNEL_PATH ARCH=arm CROSS_COMPILE=$TOOLCHAIN CONFIG_INITRAMFS_SOURCE="$ROOTFS_PATH" || exit -1
make -C $KERNEL_PATH ARCH=arm CROSS_COMPILE=$TOOLCHAIN headers_install || exit -1
make -C $KERNEL_PATH ARCH=arm CROSS_COMPILE=$TOOLCHAIN modules_prepare || exit -1
# Copy Kernel Image
cp -f $KERNEL_PATH/arch/arm/boot/zImage .
please someone help me out here?