Add an application to build

  • I have a functioning build environment set up in a VM, and I have added an application to my local build tree for LibreElec (Odroid C2) and have gotten the application configured to build successfully using

    Code
    PROJECT=Odroid_C2 ARCH=aarch64 ./scripts/build $APPNAME

    How do I add the application to the build list for a release or image build?

    Thanks for your time :)

  • I add OEM_SUPPORT=yes in project's options file.
    Then I create virtual package named as your project is (Generic for example) and set all the packages to be installed in PKG_DEPENDS_TARGET.

  • That's awesome, thank you both! I managed to get it working by cheating it into another package's dependencies, so now I'll go back and figure out why setting it as an OEM package caused a 'no package.mk' error on build.

    Given that my sources do not exist in a repository outside of my build environment is there anything I need to tell the system (besides an empty line in PKG_SITE="" and PKG_URL="") to keep from blowing out my source package unintentionally with the build system?

    I appreciate your patience. I'm no developer, so I'm trying to learn (the right way) as I go. Thanks again!

  • With empty PKG_URL you will not build anything. You can put source archive file to some web server or you can copy it directly to sources folder. Then you need to create md5 and url file.


  • With empty PKG_URL you will not build anything. You can put source archive file to some web server or you can copy it directly to sources folder. Then you need to create md5 and url file.

    Yes, thank you. The only problem I seem to be having is in my Makefile. The source tarball is being located and extracted into build, but once the program is finished compiling it is being installed in the host system, not into the target image.

    Code
    prefix=/usr
    <snip>
    
    
    .PHONY: install 
    install: hdrc 
    install -m 0755 hdrc $(prefix)/bin

    It seems simple enough, but for some reason I'm just not getting it. I compared the install locations from the Makefiles of a number of other applications that end up in the target's /usr/bin, but I'm clearly doing something wrong here.

  • OH! <lightbulb>

    So by calling g++ by name in the Makefile I was using the native host g++ to compile and overriding the build environment. The result was a native app, not a cross-compiled application and the install location was a byproduct of that. I think I get it now. Thank you so much :)

    ^ If I got that all wrong please correct me. I am trying hard to learn how the puzzle pieces all fit together :)