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: Fri, 14 Oct 2011 09:07:03 +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

Hi Magnus,

LTIB is not ever intended to be an IDE or development environment. However what it can help with is packaging up your work so you can build and deploy in a repeatable fashion onto a number of different target platforms.

With respect to developing your own package, you have 2 options.

1. The simplest, it to take the example 'helloworld' package and adapt that to use your own code.

The work-flow would be something like:

unpack the package: ./ltib -p helloworld -m prep

Once unpacked, you can pour your code into the directory: rpm/BUILD/helloworld-1.1 or even remove this and make rpm/BUILD/helloworld-1.1 a symlink to your code.

NOTE: ltib will not remove anything under rpm/BUILD

From there, to adapt how things build for this package, you would edit: dist/lfs-5.1/helloworld/helloworld.spe

To test-build your package you run: ./ltib -p helloworld -m scbuild
and to deploy it to the root file-system you're building: ./ltib -p helloworld -m scdeploy

There is some information in the docs directory, but fundamentally, for any package there are only a few key files you need:

dist/lfs-5.1/_my_package_name_/_my_package_name_.spec

an entry for this in config/userspace/packages.lkc:

config PKG_MYPACKAGE
    bool "mypackage"
    help
      my package does this....

and an entry to in config/userspace/pkg_map to relate the entry in packages.lkc to the spec file:

PKG_MYPACKAGE = _my_package_name_


2. The other way, which is more geared at real on-going package development is to use the directory-build process. I don't have time to describe this now, but the basics are shown in:

dist/lfs-5.1/u-boot/u-boot-dir-build.spec.in
dist/lfs-5.1/u-boot/u-boot-common.tmpl (this is an example, yours can be simpler)
config/userspace/u-boot-dir-build.lkc
config/platform/mpc8360epb/main.lkc (this is an example of how to wire in)

The idea is that you point at the directory you have under cvs/git/svn control and LTIB will build it for you with spoofing so you don't need any CFLAGS/LDFLAGS etc.

Sorry I don't have more time to explain, but I hope it gives a few clues.

Regards, Stuart



On 13/10/11 15:16, Magnus Therning wrote:
Hi all,

I've recently started using ltib, and there is one aspect of it that I
can't find any information on. I had no problems with getting a base
system up and running, but now I want to develop an application to run
on the system, ie I want to develop for the system that ltib helped me
build. How do I organise that most easily?

I have the impression that adding a package to the ltib system isn't
the way to go; packages are released versions, it's not an application
under development. Is this understanding correct?

At the moment I've located my development in a separate directory, but
then invoking the compiler is a bit of a pain (something along the
lines of 'configure CFLAGS="-I$/HOME}/ltib/rootfs/usr/include
-I${HOME}/ltib/rootfs/usr/src/linux/include"
--host=arm-none-linux-gnueabi' seems to be necessary). Is there not
some more convenient way of "developing inside ltib" so to speak?

Maybe this is documented somewhere, but I've missed it, a pointer
would be very appreciated in that case.

/M





reply via email to

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