ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] Programming for an ltib system


From: Stuart Hughes
Subject: Re: [Ltib] Programming for an ltib system
Date: Tue, 18 Oct 2011 15:14:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 18/10/11 10:13, Magnus Therning wrote:
On Sat, Oct 15, 2011 at 15:32, Stuart Hughes<address@hidden>  wrote:
1. Adding an option for including my package to the config, and a path
entry in case the option is turned on.
2. Modifying 'ltib' itself so that the config variable holding the
path makes it into the environment for use in the spec file.
3. A spec file.

Thanks for the pointers, they really did help a lot.
You should not have to modify ltib itself.  If you need environment
variables passed to your spec file, if the keys set in the configuration
system have the pattern:

_PRECONFIG or _WANT_ or SYSCFG_

they will be automatically exported. Grep some .spec files in
dist/lfs-5.1 to see how they get used.
Ah, cool, I'll have to take a look at that then.

Another question I ran into was how to get to the kernel headers when
compiling my package. Should I point to the headers in
$LTIB/rpm/BUILD/linux/include or is there a better place to use? (I
didn't find such a pointer in the rpmbuild environment, it would be a
handy thing to have pre-defined, no?)
For well behaved userspace programs you normally get them from the root
filesystem staging area (rootfs/usr/include).  These are automatically
wired into the compiler spoofing and so you don't need to do anything
special for these (just use the normal #include<linux/...>)
It's a rather well-behaved userspace program which includes from
linux/..., but the headers didn't seem to get wired in properly in my
case. Is there something I need to think about configuring to get it
working properly in my case?  The headers need to remain so that I
have access to them when developing my application (i.e. in subsequent
calls to `ltib -m scbuild` and such).  This goes for headers for libs
too.

Hi Magnus,

Make sure that you can find rootfs/usr/src/linux under your ltib build area.

If it's not there, then you need to add the select PKG_KERNEL_WANT_HEADERS clause to your package section in packages.lkc.

In the mean time, you can just enable this manually by running: ./ltib --configure and then selecting:

 [*] Include kernel headers

Which is on the opening page under --- Choose your kernel

Regards, Stuart



reply via email to

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