Skip to content

pnoltes/Buildroot-Celix

 
 

Repository files navigation

Here is a full pre-configured Buildroot environment that will create a tar file with Celix and all that Celix need in it.
You just need to run the command "make" in the buildroot directory to launch the build.

If you want to create a Docker Image with this (You need to have docker):
When the build is finished :
  Import the built image of celix in docker :
  Go to the following directory : buildroot/output/images
  Enter the following command : docker import - name < rootfs.tar
  You will have a docker image that is smaller than 20 MB.

Here are the steps that I have followed to have this pre-configured buildroot with a Celix package :

1.If docker is already installed on your pc go to the next steps, other go to this website : https://docs.docker.com/userguide/, click on the install tab, choose your distribution and follow the steps.

2.Download buildroot on this page : http://buildroot.uclibc.org/download.html

3.Extract Buildroot where you want, named it buildroot

4.Create a new package "celix" for buildroot :
    a.create a directory named celix in : /buildroot/package
    b.create a makefile named celix.mk with gedit filled with the following lines : 
    
#############################################################
#
# CELIX
#
#############################################################
CELIX_VERSION = Latest 
CELIX_SOURCE = develop.tar.gz 
CELIX_SITE = https://github.com/apache/celix/archive/
CELIX_INSTALL_STAGING = YES
CELIX_INSTALL_TARGET = YES
CELIX_CONF_OPTS = -DWITH_APR=OFF -DCMAKE_EXE_LINKER_FLAGS="-ldl -lpthread" -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DBUILD_REMOTE_SHELL=ON
CELIX_DEPENDENCIES = libcurl zlib e2fsprogs

$(eval $(cmake-package))

    This makefile is based on an exemple find in the buildroot user manual (Part III, section 17.6 : Infrastructure for CMake-based packages).
    CELIX_VERSION define the version of celix
    CELIX_SOURCE define the name of the tarball
    CELIX_SITE define the site on which the tarball can be download
    CELIX_INSTALL_STAGING = YES : we tell Buildroot to install the package to the staging directory
    CELIX_INSTALL_TARGET = YES : we tell buildroot to install celix on the target
    CELIX_CONF_OPTS  =  -DWRITH_APR=OFF -DCMAKE_EXE_LINKER_FLAGS="-ldl -lpthread" -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DBUILD_REMOTE_SHELL=ON : In order : We tell buildroot that there no need of the APR library for celix, that the CMAKE file has to make a link for the ldl and lpthread libraries, and that we want the bundles DEPLOYMENT_ADMIN, SHELL, SHELL_TUI and REMOTE_SHELL for celix.
    CELIX_DEPENDENCIES = libcurl zlib e2fsprogs : define the dependencies that celix needs
    $(eval $(cmake-package)) : tells buildroot that celix can be build with cmake
    You can change the version, the source and the site if you want. Moreover, you can change the "-DWRITH_APR" variable to YES but you must add "apr" in the dependencies if you do so.
    
    c.save this makefile in buildroot/package/celix
    d.create the config file named Config.in with gedit filled with the following lines :
    
config BR2_PACKAGE_CELIX
    bool "celix"
    help
      Celix server
      
    e.Save this file in buildroot/package/celix
    
  5.Add this package in the menuconfig of buildroot
  In the buildroot directory enter the following command : echo 'source "package/celix/Config.in"' >> Config.in
  
  6.If you want to use dockerfile to build Celix automatically, In buildroot/package/fakeroot/fakeroot.mk, add the following line :
    HOST_FAKEROOT_CONF_OPTS = --with-ipc=tcp
    
  7.Run menuconfig
  In the buildroot directory enter the following command :make menuconfig
  
  8.Select the different options : (This are the options that I have chosen for the INAETICS project but you can choose others target architecture, c library or target packages but you have to enable celix in the main menu)
      Target Options :
                      Target Architecture : x86_64
                      Target Architecture Variant : atom
      Toolchain :
                      C library : glibc
                      Enable c++ support : Y
      Target Packages :
                      Libraries :
                                JSON/XML:
                                        jansson : Y
                                        libxml2 : Y
                                Networking:
                                        libcurl:Y
                                        curl binary : y
        celix : Y

  9.exit the menuconfig and save the configuration

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 70.0%
  • C 13.2%
  • Python 6.4%
  • Shell 6.3%
  • C++ 1.8%
  • Perl 1.5%
  • Other 0.8%