ltib
[Top][All Lists]
Advanced

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

[Ltib] Re: Spec changes for later kernel header copies


From: Stuart Hughes
Subject: [Ltib] Re: Spec changes for later kernel header copies
Date: Sat, 07 Aug 2010 11:11:08 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Kevin,

I did some tests.  I think the patch below should be enough for
DirectFB.spec (it build okay).

Regarding the kernel headers from 'generated'.  That's more tricky.
Here's what I'm weighing up.

* Installing them into rootfs/usr/src/linux/include/generated would
require users to add a new -I path.  So I don't think that's the right
thing to do.

* Installing them to rootfs/usr/src/linux/include would not overwrite
anything, so no harm there.

* I don't know of anything that is looking for these files, so maybe
it's best not to do anything.

Overall the issue is not clean.  The headers we install in
rootfs/usr/src/linux/include are not pure userspace headers, they exist
to cope with some errant packages that want to reach inside kernel
header files and get at some parts they really should not (from
userspace).  This is why 'make headers_install' is not sufficient.  Also
bear in mind that the files in rootfs/usr/src/linux/include allow you to
match kernel headers to the actual kernel you're using, rather than
using the ones from the toolchain (in rootfs/usr/include/linux).

Overall I'm of the opinion it's probably best to do nothing to
kernel-common.tmpl.  I'm open to other ideas though.

Regards, Stuart

--- proposed DirectFB.spec patch ---

@@ -26,11 +26,11 @@

 %Build
 KHDR_DIR=$DEV_IMAGE/usr/src/linux/include
-if [ ! -f $KHDR_DIR/linux/autoconf.h ]
+if [ ! -d $KHDR_DIR ]
 then
     cat <<TXT

-No file: $KHDR_DIR/linux/autoconf.h
+$KHDR_DIR directory is missing



Kevin Wells wrote:
> Hi Stuart,
> 
> I like your suggestion better. I'll look into this a bit more from
> your questions below..
> 
> thanks,
> Kevin
> 
> 
>> Subject: Re: Spec changes for later kernel header copies
>>
>> Hi Kevin,
>>
>> Let me take a look and get back to you after I've done some building
>> and
>> looking.  My first thought is that in DirectFB, we can just test for
>> the
>> kernel headers directory, as you didn't change the 'make' target and
>> that still built (without needing to reference 'generated').
>>
>> In the mean time, do you know if the files that get build in
>> linux-2.6.34/include/generated are normally installed to userspace? for
>> example have you seen them in toolchains?  Have you seen anyone comment
>> otherwise about these.
>>
>> Also, do you know if any files in generated would clobber any existing
>> files in the rootfs if they were copied into
>> rootfs/usr/src/linux/include ?
>>
>> It seems to me that this may be a better place rather than adding a new
>> directory.  However I say this in ignorance of know what (if any)
>> custom
>> is not currently in force.  For example, what does "make
>> headers_install" do for ARM these days?
>>
>> Regards, Stuart
>>
>>
>> Kevin Wells wrote:
>>> Hi Staurt,
>>>
>>> The autoconf.h file is now located in the ./include/generated
>> directory
>>> instead of the ./include/linux directory in later kernel source. This
>>> breaks the directfb spec which searches for it in ./include/linux.
>>>
>>> address@hidden BUILD]$ pwd
>>> /home/usb10132/dev/ltib/rpm/BUILD
>>>
>>> address@hidden BUILD]$ find . -name autoconf.*
>>> ./linux-2.6.34/include/generated/autoconf.h
>>> ./linux-2.6.27.8/include/linux/autoconf.h
>>> address@hidden BUILD]$
>>>
>>> This currently seems to only break the directfb build for LPC32xx and
>>> LPC313x platforms using the later kernels (2.6.34 and 2.6.33(?)).
>>>
>>> I've attached a possible fix. This has been build tested with kernel
>>> Versions 2.6.34 (LPC32xx), 2.6.27 (LPC32xx), and 2.6.15 (epx93xx).
>>>
>>> Is this something that can be placed into the respective specs?
>>>
>>> thanks,
>>> Kevin
>>>
>>> Index: DirectFB/DirectFB.spec
>>> ===================================================================
>>> RCS file: /sources/ltib/ltib/dist/lfs-5.1/DirectFB/DirectFB.spec,v
>>> retrieving revision 1.5
>>> diff -U 4 -r1.5 DirectFB.spec
>>> --- DirectFB/DirectFB.spec  5 Dec 2008 16:32:13 -0000       1.5
>>> +++ DirectFB/DirectFB.spec  3 Aug 2010 17:25:33 -0000
>>> @@ -27,17 +27,20 @@
>>>  %Build
>>>  KHDR_DIR=$DEV_IMAGE/usr/src/linux/include
>>>  if [ ! -f $KHDR_DIR/linux/autoconf.h ]
>>>  then
>>> -    cat <<TXT
>>> +     if [ ! -f $KHDR_DIR/generated/autoconf.h ]
>>> +     then
>>> +        cat <<TXT
>>>
>>>  No file: $KHDR_DIR/linux/autoconf.h
>>>
>>>  You need to build the kernel and have 'Include kernel headers' set
>>>  to build this package
>>>
>>>  TXT
>>> -    exit 1
>>> +        exit 1
>>> +    fi
>>>  fi
>>>  export FREETYPE_CONFIG=${DEV_IMAGE}/usr/bin/freetype-config
>>>  export FREETYPE_CFLAGS="`${FREETYPE_CONFIG} --
>> prefix=${DEV_IMAGE}/%{_prefix} --cflags`"
>>>  export FREETYPE_LIBS="`${FREETYPE_CONFIG} --
>> prefix=${DEV_IMAGE}/%{_prefix} --libs`"
>>> Index: kernel/kernel-common.tmpl
>>> ===================================================================
>>> RCS file: /sources/ltib/ltib/dist/lfs-5.1/kernel/kernel-common.tmpl,v
>>> retrieving revision 1.9
>>> diff -U 4 -r1.9 kernel-common.tmpl
>>> --- kernel/kernel-common.tmpl       6 Jul 2009 07:52:02 -0000       1.9
>>> +++ kernel/kernel-common.tmpl       3 Aug 2010 17:25:33 -0000
>>> @@ -320,8 +320,14 @@
>>>              cp -a $KBOUT/include/asm/arch/*
>> $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch
>>>          else
>>>              echo "Don't know how to copy asm headers for this
>> kernel"
>>>          fi
>>> +
>>> +        if [ -d "$KBOUT/include/generated" ]
>>> +        then
>>> +            mkdir -p
>> $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/generated
>>> +            cp -a $KBOUT/include/generated/*
>> $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/generated
>>> +        fi
>>>      fi
>>>  fi
>>>
> 



reply via email to

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