[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Ltib] Copying kernel headers fails in new kernel source trees
From: |
Kevin Wells |
Subject: |
RE: [Ltib] Copying kernel headers fails in new kernel source trees |
Date: |
Wed, 28 Jan 2009 17:54:20 +0100 |
Hi Stuart,
The patch seems to copy all(?) the header files from all the ARM platforms to
the root fs. I'm not an ARM Linux expert either, but I would guess that
platforms that run toolchains on their target hardware might need these files.
(I've think I've noticed a few packages automatically enable header copying
when they are selected).
This change seems to have occurred in kernel 2.6.26. Maybe adding a new
environment variable in main.lkc will fix this and allow compatability with the
pre-2.6.26 source tree. This would make the responsibility of making the kernel
copy option work with the platform developers (while not breaking any existing
platforms or pre-2.6.26 platforms).
Maybe something like this in main.lkc that's tagged from the selected kernel
build option..
***
config PKG_HDR_IF_CUSTOM
depends KERNEL_DIR_BUILD
bool "Custom kernel is 2.26 or later"
config PKG_HDR_USE_PLATFORM_NAME
default n
default n if PHY_KERNEL_2_6_10
default n if PHY_KERNEL_2_6_25
default y if PHY_KERNEL_2_6_26
default y if PHY_KERNEL_2_6_27_8
default PKG_HDR_IF_CUSTOM if KERNEL_DIR_BUILD
config PKG_LNX_ARCH_NAME
string "mach-lpc32xx"
And in the kernel template spec file, it would look for at
PKG_HDR_USE_PLATFORM_NAME tag and if set
if [ "${LINTARCH}" = "arm" ]
then
mkdir -p $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch
if [ "${ PKG_HDR_USE_PLATFORM_NAME }" = "n" ]
then
cp -a $KBOUT/include/asm/arch/*
$RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch
else
cp -a $mach_dir/include/mach/${PKG_LNX_ARCH_NAME}/include/arch
$RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch
fi
fi
fi
Sorry if my syntax is wrong on this.
thanks,
Kevin Wells
NXP
> -----Original Message-----
> Sent: Tuesday, January 27, 2009 4:02 AM
>
> Hi Kevin,
>
> I've checked in the attached patch to CVS. This will do the equivalent of
> earlier kernels with regard to these headers. However I'm not sure if
> this is the right thing to do as if you look you'll see that the asm/arch
> headers are no longer in the KBOUT (built output) area and so I've made
> the copy from the kernel source tree. My worry is whether these headers
> are supposed to be exported out of the kernel? I think this needs
> confirmation by some ARM experts.
>
> Regards, Stuart
>
> On Thu, 2009-01-22 at 16:26 +0000, Stuart Hughes wrote:
> > Hi Kevin,
> >
> > I see the problem, I will think about this and get back to you. In
> > the mean time do you know how this gets handled by other projects? is
> > it included as part of the userspace 'make headers_install' target?
> >
> > Regards, Stuart
> >
> > On Wed, 2009-01-21 at 22:27 +0100, Kevin Wells wrote:
> > > Somewhere between kernel 2.6.25 and 2.6.27.8, the architecture/board
> > > specific header files in the kernel source tree were moved from
> > >
> > > include/asm-arm/arch/mach-<board>/
> > >
> > > to
> > >
> > > arch/arm/mach-<chip>/include/mach/
> > >
> > >
> > >
> > > It seems that the symbolic link at include/asm/arch was also removed
> > > when all the platform header files were moved to the arch/arm area
> > > (I can't find the equivalent of this link in the newer kernel source
> > > trees).
> > >
> > >
> > >
> > > In the PKG_KERNEL_WANT_HEADERS option is enabled, the arm
> > > architecture specific copy of the platform files now fails in these
> > > newer kernel sources as the include/asm/arch link is no longer there.
> > >
> > >
> > >
> > > So the current copy command of (sorry about any typos, I'm hand
> > > typing
> > > this...):
> > >
> > > cp -a $KBOUT/include/asm/arch/*
> > > $RPM_BUILD_ROOT/%{pfx}/usr/src/linx/include/asm/arch
> > >
> > > needs to be replaced with
> > >
> > > cp -a
> > > $KBOUT/include/arch/arch/mach-<chip>/include/mach/*
> > > $RPM_BUILD_ROOT/%{pfx}/usr/src/linx/include/asm/arch
> > >
> > > on these newer source trees.
> > >
> > >
> > >
> > > Short of creating a few new flags in main.lkc to handle this and
> > > adding a new case in the kernel spec template, is there any other
> > > way to get this change handled in the spec file?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Kevin Wells
> > >
> > > NXP
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > LTIB home page: http://bitshrine.org
> > >
> > > Ltib mailing list
> > > address@hidden
> > > http://lists.nongnu.org/mailman/listinfo/ltib
> >
> >
> >
> > _______________________________________________
> > LTIB home page: http://bitshrine.org
> >
> > Ltib mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/ltib
> >