Embedded Freaks..

February 3, 2009

Preparing Kernel Header for TS-7260

Filed under: ARM9, linux-device-driver — Tags: , — kunilkuda @ 11:44 am

One of requirements of Linux device driver development in 2.6 kernel series is that we need its header (and some of its object files). Therefore, it’s necessary to compile the kernel first before it can be used as kernel header for device driver development.

For TS-7260, download the kernel from TS-Logic site (here). Note that you need the exact version of the kernel that run on your board to develop device driver that’s running on it.

Configuring The Kernel

  1. Untar the kernel: tar xvzf tskernel-2.6.21-ts-src.tar.gz
  2. Configure the kernel:
    kunil@cerpelai$ cd linux-2.6.21-ts/
    kunil@cerpelai$ make CROSS_COMPILE=$PREFIX distclean
    kunil@cerpelai$ make CROSS_COMPILE=$PREFIX ts72xx_defconfig

    Note: Replace $PREFIX with the correct prefix of the cross compiler.

  3. For cross-compiler with old-EABI, you need to turn off the new EABI features in the kernel. Otherwise, it won’t compile
    kunil@cerpelai$ make CROSS_COMPILE=$PREFIX menuconfig

    Disable the ‘Kernel Features’->’Use the ARM EABI to compile the kernel’. Save and exit.

  4. Compile the kernel
    kunil@cerpelai$ make CROSS_COMPILE=$PREFIX -j 50 all

That’s it. Your kernel tree now can be used as device driver development tree.

If you want to save space for your harddisk, you can extract the objects and headers that is needed for device driver development

kunil@cerpelai$ make CROSS_COMPILE=$PREFIX INSTALL_HDR_PATH=<your choosen header directory> headers_install

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: