How to cross compile
I want to cross compile a gpio driver pgm for leopard board DM355.Host is ubuntu (kernel is 2.6.38-8 generic) and target is leopard board(kernel is 2.6.10). i am using arm-linux-gnueabi-gcc.can anyone help me to create a makefile for compiling the driver.??
Check with the board vendor. They should have a How-To or FAQ to help do this. In any case, it depends upon the kernel Makefile. Example, in my ARM kernel Makefile (to build on my x86 system), the following symbols are defined:
and the ARM cross-compiler suite is in ../arm-none-linux-gnueabi
ARCH ?= arm
CROSS_COMPILE ?= ../arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
This is for a PC-104 ARM9 board from Technologic Systems, so it may not be compatible with your installation.
I have one more doubt. To which kernel we have to point(i mean current kernel or the kernel which is used by the arm board)??
The kernel used by the ARM board. It probably has some specialized hardware drivers that won't be in the standard kernel. I know that my PC-104 ARM board has such, so that the I/O ports and such are properly supported.
My leo board using arm_v5t_le gcc and ti-davinvi(kernel 2.6.10mvl)..So should i point to that gcc in makefile??
KDIR := /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci
PWD := $(shell pwd)
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Can you plz tell me that for crosscompilation what should i change in this makefile??