Buildroot Packages

From ArmadeusWiki
Revision as of 20:14, 19 May 2008 by Salocin68 (Talk | contribs)

Jump to: navigation, search

In this page you will learn how to add a new package or a new application to the Armadeus buildroot

Preliminary work

$ mkdir buildroot/package/toto
  • 4] In this folder, create a new Makefile "toto.mk" and a new config file "Config.in". If you need some tips on how to write these files, take a look here: package/sdl/
  • 5] Modify Config.in according to the description of the "Toto" package:


  • 6] Modify toto.mk

This Makefile contains several steps:

  • software download
  • untar the archive
  • apply patches to the sources if necessary
  • configure the sources
  • build
  • install in the rootfs

This makefile has to contain one target toto-clean to clean up the sources after a build and an other one toto-dirclean to remove the folder from the overall compilation process

Compilation test of the package

Try this:

$ make -C buildroot/ toto

If this command works, test your package on an Armadeus plateform. If it's ok you can jump to the next chapter and proceed with the integration into buildroot. Otherwise it is perhaps necessary to do some modifications of the sources/Makefile. Start by creating a new folder containing the package to modify:

$ cd buildroot/build_arm
$ cp -Rf toto toto.org 

Now perform the modifications in the toto directory until you get a running package. Once done, one or several patches will be probably required against the original sources:

$  diff -rup toto.org/fichier toto/fichier > ../package/toto/toto.0.patch
 

These patches will be applied by the toto.mk file. Save your work and check it:

$ mv toto toto.ok
$ cd ../..
$ make -C buildroot/ toto

if it is ok, remove the directories buildroot/build_arm/toto.org and buildroot/build_arm/toto.ok which are now useless


Integration of the package into Buildroot

Once the package or the application successfully tested, add a reference to package/toto/Config.in.

$ cp buildroot/package/Config.in  buildroot/package/Config.org

then perform the modifications in the Config.in and start buildroot menuconfig

$ make menuconfig

Select your package in the menu "package", save the configuration et retry the installation:

$ make toto-dirclean
$ make 

As soon as all is ok, you need to create the configuration patch for buildroot:( file buildroot/package/Config.in) with the same method as before

$ diff -rup buildroot/package/Config.org  buildroot/package/Config.in > patches/numero_buildroot_nompaquet.diff

Add the new package to the Armadeus distro

All the files located in buildroot/package/toto and the patches (buildroot configuration) as well have to be added to SVN

$ svn add -N fichiers
$ svn commit -m [BUILDROOT PACKAGE] Adding an usefull toto package  files --non-interactive 


And now check with a fresh developpement tree...