Find the answer to your Linux question:
Results 1 to 5 of 5
Hi , 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    68

    How to cross compile


    Hi ,
    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.??

    Thanks

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,748
    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:
    Code:
    ARCH            ?= arm
    CROSS_COMPILE   ?= ../arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
    and the ARM cross-compiler suite is in ../arm-none-linux-gnueabi
    This is for a PC-104 ARM9 board from Technologic Systems, so it may not be compatible with your installation.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Nov 2011
    Posts
    68
    Thanks

    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)??

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,748
    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.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Nov 2011
    Posts
    68
    Thanks

    My leo board using arm_v5t_le gcc and ti-davinvi(kernel 2.6.10mvl)..So should i point to that gcc in makefile??

    Makefile

    obj-m:=khello.o
    KDIR := /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci
    PWD := $(shell pwd)

    default:
    $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

    Can you plz tell me that for crosscompilation what should i change in this makefile??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •