Add Build 7zip (for .7z files) to image

  • You need to look into README file for instructions. Try with

    Code
    .............
    PKG_TOOLCHAIN="manual"
    
    pre_make_target() {
      cp makefile.linux_amd64 makefile.machine
    }
    
    make_target() {
      make all2 CC=$CC CXX=$CXX
    }
  • You need to look into README file for instructions. Try with

    Code
    .............
    PKG_TOOLCHAIN="manual"
    
    pre_make_target() {
      cp makefile.linux_amd64 makefile.machine
    }
    
    make_target() {
      make all2 CC=$CC CXX=$CXX
    }

    I tried changing it, makefile.linux_amd64 -> makefile.linux_cross_aarch64

    Finished without error. Now how to add in system image? ( for /usr/bin )

    I don't know because I've never done it before.

  • Yes. p7zip, there is in the system tools but I want to run it independenly from kodi.

    Compile finished now I need to add the necessary files into the system image. What should I do?

  • p7zip from system tools will be the same as 7zip. Different programs with same functionality.

    What exactly are you trying to do? Avoid installing addon manually? Then just add it to the image. Which you still need instructions from us :)

  • I know that p7zip and 7zip are the same. No problem.

    I want make it like system application to unzip,tar etc. Because I'm stoping Kodi and running special scripts. I need extract .7z files.

    I want learn add custom application same time.

    I also added follow lines in package.mk and with the "scripts/build 7zip" command it creates "build_dir/7zip/.install_pkg/" folder. But with "make image" command doesn't build and add in image folder.

    I'm set OEM_SUPPORT="yes" in libreelec options file. Other packages are failing this time.

    Code
    makeinstall_target() {
      mkdir -p $INSTALL/usr/bin/
      cp -r bin/* $INSTALL/usr/bin/
    }
  • In your project options file (like projects/Generic/options) add

    Code
    ADDITIONAL_PACKAGES="7zip"

    and make image. And you will have your binaries in.

    For OEM you need to create new package named as your project is (like Generic).

  • In your project options file (like projects/Generic/options) add

    Code
    ADDITIONAL_PACKAGES="7zip"

    and make image. And you will have your binaries in.

    For OEM you need to create new package named as your project is (like Generic).

    It's working.

    I understand the oem.

    Thank you vpeter

    Thank you everyone.

  • Just to complete this thread I played a little how to include addon in the image. Zip file is saved to image and unpacked to /storage on first boot. Just a quick idea not fully tested and investigated. I'm sure there are better solutions :)

    packages/virtual/misc-packages/system.d/storage-addons-copy.service

    packages/virtual/misc-packages/package.mk

    packages/virtual/misc-packages/scripts/storage-addons-copy

  • System-tools was just an example. You just need to adjust names to include anything else.

    Hi, i tried your solution on latest "master" branch but the building process is failing. I was trying to add the LCDd addon (service.lcdd), but also failed with your code exemple.

    Sadly i can't find any proper build log, so i failed to investigate on the matter.

  • Seems there was some changes to build system which prevents package to be build because it doesn't build for me too. Will look again how to solve the issue.

  • Seems there was some changes to build system which prevents package to be build because it doesn't build for me too. Will look again how to solve the issue.

    Yesterday i managed to make it work, well ,sort of. First of i had to add "kodi" to PKG_DEPENDS_TARGET and also modify $ROOT/target/.

    But still had build failures at some point, so for testing purposes i removed the "pre_install" part and at this point the image was built successfully.

    However, for some reason, Libreelec fails to boot with this image (i'm testing on a USB stick with the "run" method) . I will have a look into it and update you with my findings.

    Edit: Libreelec fails to start because the addon (in my case service.lcdd) is enabled but not installed.

    So probably this means that storage-addons-copy.service script is not triggered or doesn't exist.

    Edited once, last by Pretoriano (August 29, 2019 at 10:52 AM).

  • Libreelec fails to start because the addon (in my case service.lcdd) is enabled but not installed.

    So probably this means that storage-addons-copy.service script is not triggered or doesn't exist.

    Yes, probably missing addon is the reason.

    Seems pre_install() or any other function can't create addon anymore and that's the main issue. You need to build addon manually before making image like

    Code
    PROJECT=... ./scripts/create_addon system-tools
    PROJECT=... make image

    You can check if all the files are available with

    Code
    ls -l build.LibreELEC*/image/system/usr/share/kodi/storage_addons
    ls -l build.LibreELEC*/image/system/usr/lib/systemd/system/storage-addons-copy.service
    ls -l build.LibreELEC*/image/system/usr/lib/libreelec/storage-addons-copy


    packages/virtual/misc-packages/package.mk

  • The issue with LibreELEC failure was on me, it was a typo that prevented the addon from being unpacked by your script.

    But i figured that out and also used your same approach, so i removed the addon building from the package.mk and created a script in $ROOT which will build the addon and LibreELEC image.

    Here's how it looks on my github - > Github Link

    BTW, the RTL8822BU WLAN driver is missing from LibreELEC, but it's working fine here with the master branch. Is there a way to have it added to Libreelec, officially?