ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] updating the kernel


From: Peter Barada
Subject: Re: [Ltib] updating the kernel
Date: Thu, 23 Jul 2009 12:42:15 -0400

On Wed, 2009-07-22 at 18:27 -0400, B.J. Buchalter wrote:
So, related to, but different from my previous question: I am working  
with a freescale ltib BSP (for the MPC8377).

The kernel version in that BSP is 2.6.25

There has been a bunch of development in the firewire drivers in the  
kernel. Merging in the changes to FireWire into the 2.6.25 kernel  
looks to be non-trivial since there have been substantial changes to  
the kernel SPIs.

What is involved in bringing up a new version of the kernel within a  
given BSP or LTIB if there is no direct support for it yet?

Is it worth my time (as a relative newbie) to try to get 2.6.30  
building for my board? If so, is there any guide to doing it?

It looks to me like I will need to make changes to the FireWire driver  
in the kernel, but that seems to be kind of a waste of time if I make  
the changes on an old version of the kernel, as then there would be no  
real way to get the changes/fixes into the main line. But it doesn't  
make sense to be working on the head if I can't get it to build for my  
target...

Its pretty easy to add a new kernel to the LTIB world.

1) create a .spec file in dist/lfs-5.1/kernel named kernel-<version>-<platform>.spec.in, starting with the kernel .spec.in file you use currently. <version> is the new kernel version (2.6.30 from your email), and <platform> is the name of the platform/platform directory in LTIB.

2) Edit the spec file, and remove all the patches defined (you'll see to lists of patches, one near the top that has their names, and then in %Prep where it has the options passed to patch).

3) Change the dversion, bld_dir_name, kernel, Version, Release, etc necessary.  Here's a minimal kernel .spec.in that I've put together for my OMAP35x work:

# Template = kernel-common.tmpl

%define pfx /opt/freescale/rootfs/%{_target_cpu}
%define dversion 2.6.30
%define bld_dir_name linux-2.6.30
%define kernel arch/arm/boot/uImage
%define pkg_name linux

Summary         : Linux kernel (core of the Linux operating system)
Name            : kernel
Version         : 2.6.30
Release         : 0
License         : GPL
Vendor          : kernel.org + others
Packager        : Peter Barada
Group           : System Environment/Kernel
Source : linux-2.6.30.tar.bz2

BuildRoot       : %{_tmppath}/%{name}
Prefix          : %{pfx}

%Description
%{summary}

%Prep
%setup -n %{bld_dir_name}


3a), copy linux-2.6.30.tar.bz2 to /opt/ltib/pkgs.

4) In your config/platform/<platform>/main.lkc, add the following in the choice list following the comment "Choose your kernel":

config KERNEL99
        bool "Linux 2.6.30 for my board"
        help
            This is the 2.6.30 kernel for my board

5) In config/platform/<platform>/main.lkc, add the following to the config PKG_KENREL:

	default "linux-2.6.30 for <platform>" if KERNEL99

6) In config/platform<platform>/main.lkc add the following to the config PKG_KERNEL_PRECONFIG:

	default "linux-2.6.30-<platform>.config" if KERNEL99

And you'll want to copy the kernels' default config for your platform to config/platform<platform>/linux-2.6.30-<platform>.config

Then the next time you do "./ltib -c", you should, under "choose your kernel" have a choice for "linux-2.6.30", and if selected, you'll see the kernel preconfig string change to "linux-2.6.30-<platform>.config".  Then on save/exit, you should see the kernel source get unpacked, and the kernel be built...

Hopefully this helps...

   
Thanks!

B.J. Buchalter
Metric Halo
http://www.mhlabs.com
	




_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib
--
Peter Barada <address@hidden>
Logic Product Development, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]