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

  • Hi everyone,


    I want opening .7z file in my libreelec_v9. I created package/7zip/package.mk but didn't compile. What should I do?


    package.mk;

    PKG_NAME="7zip"

    PKG_VERSION="16.02"

    PKG_SITE="https://github.com/btolab/p7zip"

    PKG_URL="https://github.com/btolab/p7zip/archive/$PKG_VERSION.tar.gz"

    PKG_DEPENDS_TARGET="toolchain zlib"

    PKG_LONGDESC="7zip Archive manager"

    PKG_TOOLCHAIN="cmake-make"

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

    Code
    1. .............
    2. PKG_TOOLCHAIN="manual"
    3. pre_make_target() {
    4. cp makefile.linux_amd64 makefile.machine
    5. }
    6. make_target() {
    7. make all2 CC=$CC CXX=$CXX
    8. }


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


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

    Code
    1. .............
    2. PKG_TOOLCHAIN="manual"
    3. pre_make_target() {
    4. cp makefile.linux_amd64 makefile.machine
    5. }
    6. make_target() {
    7. make all2 CC=$CC CXX=$CXX
    8. }

    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 :)


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


  • 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
    1. makeinstall_target() {
    2. mkdir -p $INSTALL/usr/bin/
    3. cp -r bin/* $INSTALL/usr/bin/
    4. }
  • In your project options file (like projects/Generic/options) add

    Code
    1. 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).


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


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

    Code
    1. 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


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


  • vpeter I think it's a good idea and developable. In this way, are we importing any addon.zip in the /kodi/addons folder into system image with firt boot? is this only valid for system-tools addons?

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


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


  • vpeter

    Changed the title of the thread from “Add Build 7zip (for .7z files)” to “Add Build 7zip (for .7z files) to image”.
  • 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.


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


  • 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 ().

  • 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
    1. PROJECT=... ./scripts/create_addon system-tools
    2. PROJECT=... make image

    You can check if all the files are available with

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



    packages/virtual/misc-packages/package.mk


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)


  • 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?