[SOLVED] Raspberry pi module cross compile on Ubuntu

Status
Not open for further replies.

emresel

Full Member level 5
Joined
Feb 12, 2008
Messages
267
Helped
61
Reputation
122
Reaction score
61
Trophy points
1,308
Location
Turkiye
Activity points
2,862
Hi friends;
I am trying to cross compile (on ubuntu vbox) a wifi device driver for raspberry pi platform.
I plan to copy rasbian OS files from raspberry pi to Ubunutu PC (since module building process needs rasbian OS related files).
- But i amnot sure which folder should i copy (/lib and /usr/src ?).
- Is this convenient way? Some forums, it is said it is needed to rebuild rasbian kernel from source on Ubuntu PC via cross compiler tool chain.
After that i need to edit below scrip piece to set env.
- How should i point for KERNELDIR, LINUXDIR and ROOTDIR.
Code:
##
# You need to modify the exports below for your platform.
##

###################################################################
# setting the path for cross compiler
###################################################################
export LINUXVER=2.6.37
export KERNELDIR=
export CROSSTOOL=
export PATH=${CROSSTOOL}:$PATH
export LINUXDIR=${KERNELDIR}/stblinux-${LINUXVER}
export ROOTDIR=${KERNELDIR}/uclinux-rootfs
export LIBUSB_PATH=${ROOTDIR}/lib/libusb
export TARGETDIR=${LINUXVER}
###################################################################
# USBSHIM=1 if kernel is greater than or equal to 2.6.18
# USBSHIM=0 if kernel is less than 2.6.18 or using DBUS kernel object.
###################################################################
export USBSHIM=0

###################################################################
# Machine and Architecture specifics
# TARGETMACH=arm is BE
# TARGETMACH=arm_le is LE
###################################################################
export TARGETMACH=arm_le
export TARGETARCH=arm_le
export TARGETENV=linuxarm_le
export CC=arm-linux-gnueabi-gcc
export STRIP=arm-linux-gnueabi-strip
export CROSS_COMPILE=arm-linux-gnueabi-

###################################################################
# DO NOT MODIFY BELOW THIS LINE
###################################################################
source ./setenv.sh

Thanks
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…