Package usage

From ArmadeusWiki
Revision as of 09:29, 4 June 2013 by JulienB (Talk | contribs) (Generate a package for your app)

Jump to: navigation, search

Even if Buildroot doesn't fully handle packages like debian/OpenEmbbeded and will probably never do ([1]), you can still generate a package for your custom application and use it to update it on field, thanks to opkg.

Install opkg on target

$ make menuconfig
Package Selection for the target  --->
    Package managers  --->
        [*] opkg
$ make
  • reflash the rootfs on your APF

Generate a package for your app

  • we assume that you already integrated your application in Buildroot and that buildroot/package/my_app/ is existing.
  • create a "control" file that will describe your application for opkg (buildroot/package/my_app/opkg/control):
Package: my-app
Version: 2.0.800
Description: My application
Section: applications
Priority: optional
Maintainer: Me
Architecture: arm
Homepage:
Source:
Depends:
  • add a new compile rule in buildroot/package/my_app/my_app.mk
MY_APP_PACKAGE_DIR = $(BUILD_DIR)/my_app_package

define MY_APP_BUILD_CMDS
        mkdir -p $(MY_APP_PACKAGE_DIR)/CONTROL
        cp ./package/my_app/opkg/control $(MY_APP_PACKAGE_DIR)/CONTROL/
        mkdir -p $(MY_APP_PACKAGE_DIR)/usr/local/bin
endef