Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
curioct
Old
#91  
Senior Member
Thanks Meter 24
Posts: 173
Join Date: Jan 2011
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 :-

Quote:
make[1]: Entering directory `/root/sgskernelsrc/samsung-kernel-galaxysii/usr/include'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: 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
Code:
#!/bin/bash

# supercurio's note:
# This is original Samsung build script, you better make c1_defconfig and not use it

# Set Default Path
TOP_DIR=$PWD
KERNEL_PATH=$TOP_DIR

# TODO: Set toolchain and root filesystem path
TOOLCHAIN="/root/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-"
ROOTFS_PATH="/root/sgs2initramssrc/initramfs-galaxysii/i9100-2.3.3-xwke8"

# 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?
 
yy1155
Old
#92  
Junior Member
Thanks Meter 0
Posts: 16
Join Date: Mar 2012
Well, this I need
:P
 
katun79
Old
(Last edited by katun79; 19th March 2012 at 03:31 PM.)
#93  
Senior Member
Thanks Meter 17
Posts: 143
Join Date: Apr 2010
Location: Firenze

 
DONATE TO ME
Default ICS sources released!!!



https://opensource.samsung.com/
Thanks button doesn't hurts
Changelog for LG 2X Cyanogen's nightly

If you want to make a donation click on this button and buy me a coffee
The Following 3 Users Say Thank You to katun79 For This Useful Post: [ Click to Expand ]
 
zylor
Old
#94  
zylor's Avatar
Senior Member
Thanks Meter 741
Posts: 2,120
Join Date: Oct 2010

 
DONATE TO ME
Quote:
Originally Posted by katun79 View Post
Looks like Samsung finally listened the devs


Current devices:

Samsung Galaxy Note (GT-N7000) (won in a contest on Stuff.TV) <- With eMMC Chip: (Type: V3U00M | Date: 08/2012 | FwRev: 0x0e)

I'M BRICKBUG FREE after 4 hardbricks

Please hit the BUTTON if my post helped you!
 
jazdw
Old
#95  
Junior Member
Thanks Meter 0
Posts: 26
Join Date: Sep 2011
Location: Newcastle
Finally! Downloading now. I'm guessing all the 3rd party ROM devs have been waiting for this too.
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...