[x86-64] Open-iSCSI Support

  • Code
    Hello. I need support for iSCSI drives. I tried to compile the image from the source code, but it gives errors. I fixed some of the errors myself, but some I can’t. Please tell me what can be done. Sorry of my English.
  • If in your LibreELEC.tv directory you do the following, that patches to fix the compile error will be added.


    Code
    wget https://github.com/LibreELEC/LibreELEC.tv/pull/9163.patch
    git am 9163.patch

    # or the following if you are not using a git clone

    Code
    patch -p1 < 9163.patch
  • Thx.
    On the computer where I am building libreelec (x64 Ubuntu 22.04 - 64bit) is installed. At the moment I am compiling gcc-14, because... This fix, as I understand it, requires version 14. The terminal showed this: Application: open-iscsi: fix build with gcc-14.
    I try it and write here.

  • I update gcc and g++ to version 14.1.0.

    I tried lunch build (with fix and without fix(loading new git) ) , but not success.
    Now error cmake (013/313)

    I installed cmake, but not success.

  • Thx.
    On the computer where I am building libreelec (x64 Ubuntu 22.04 - 64bit) is installed. At the moment I am compiling gcc-14, because... This fix, as I understand it, requires version 14. The terminal showed this: Application: open-iscsi: fix build with gcc-14.
    I try it and write here.

    You won’t need gcc-14 to do the build (it will cause other issues), it looks like it has made your build host unstable.

    The patches themselves are for the LE build system (as we compile a copy of gcc during the build)

    The LE build will run with no problems on a “clean Ubuntu 22.04 or 24.04” system.

  • I update gcc and g++ to version 14.1.0.

    I tried lunch build (with fix and without fix(loading new git) ) , but not success.
    Now error cmake (013/313)

    I installed cmake, but not success.

    We build our own copy of cmake (it is failing for some reason)

    Details will be in the build.LibreELEC-Generic.x86_64-13.0-devel/.threads/logs/13.log log file


    1. But first go back to “your working machine” before you added gcc14. Ubuntu doesn’t have a gcc-14

    2. Check the build. Run something like the following commands

    cd /home/tod

    mv LibreELEC.tv old

    git clone https://github.com/LibreELEC/LibreELEC.tv.git

    cd LibreELEC.tv

    # wget … as above

    # git am … as above

    # we are not going to build open-iscsi yet

    # let’s test you build environment

    make image

    # share your success/logs

    # move on to scripts/build open-iscsi


    Booting an image with iscsi may not/probably won’t work (or you might need to do some/a lot of work) we haven’t tested an iscsi build for a long time.

  • I downgrading version gcc and g++ to default on my system, next this steps:

    1.cd ~
    2.git clone https://github.com/LibreELEC/LibreELEC.tv.git
    3. cd LibreELEC.tv
    4. wget https://github.com/LibreELEC/LibreELEC.tv/pull/9163.patch
    5. git am 9163.patch
    ============================
    Use: open-iscsi: fix build with gcc-14
    .git/rebase-apply/patch:37: trailing whitespace.

    .git/rebase-apply/patch:41: trailing whitespace.

    .git/rebase-apply/patch:43: trailing whitespace.

    .git/rebase-apply/patch:51: trailing whitespace.

    .git/rebase-apply/patch:67: trailing whitespace.

    warning: missed 2 errors in whitespace characters
    warning: 7 lines added errors in whitespace characters.
    ============================

    6.
    #I enabled ISCSI_SUPPORT="no" to "yes" (number of str 197) in /LibreELEC.tv/distributions/LibreELEC/options

    7. make -j 9 image

    ............a lot of processing.....
    and error
    [087/313] [FAIL] build gmp:host
    ----------------
    I study error, this way https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz is not availible. I searched source code and rewrite file /LibreELEC.tv/packages/devel/commons-lang3/package.mk . I changed in str 10 old web-site (https://gmplib.org/download/gmp) to https://ftp.gnu.org/gnu/gmp/ and go to terminal and run ---> make distclean

    8. I make again

    make -j 9 image

    ................a lot of processing
    and error
    [187/313] [FAIL] install nano:target

    Same error, I done same actions that was early. Changed https://www.nano-editor.org/dist/v$%7BPKG_VERSION%25%25.%2A} to https://ftp.gnu.org/pub/gnu/nano/ in file ./packages/tools/nano/package.mk
    After this i dont do -> make distclean, and simply run : make -j 9 image

    9. I looked, what process continues, and stop process ctrl-x, type ---> make distclean and begin of start

    make -j 9 image

    And... Many time and... Image has been building. Great !!:)
    Many thanks!! I will try this Image , check iSCSI ability and write here.
    I found image in folder /LibreELEC.tv/target/ His name LibreELEC-Generic.x86_64-13.0-devel-20240810073238-ce21c51.img.gz

  • Well. I booted from ISO , menu-setup not showed my target-iSCSI. I switched to concole, tried command :

    iscsiadm -m dicscovery -t sendtargets -p 192.168.1.97:3260

    Answer -
    iscsiadm: Could not perform SendTargets discovery: iSCSI driver not found. Please make sure it is loade and retry

    What I may do ?... May be need patch kernel or apply change in file kernel_options ?

  • 👍 Glad you got your build working.

  • This bit I can’t help with, as I haven’t used iscsi.

  • iSCSI options in kernel config got lost over time. Therefore this code has no effect any more.

    After manually enabling the options in projects/Generic/linux/linux.x86_64.conf iSCSI shoild work again.

  • iSCSI options in kernel config got lost over time. Therefore this code has no effect any more.

    After manually enabling the options in projects/Generic/linux/linux.x86_64.conf iSCSI shoild work again.

    Thanks. May be you ask me, wich modules need enabled? May make menu for this ?

  • The five being disabled in the code. Use CONFIG_<option>=y:

    Code
    CONFIG_SCSI_ISCSI_ATTRS
    CONFIG_ISCSI_TCP
    CONFIG_ISCSI_BOOT_SYSFS
    CONFIG_ISCSI_IBFT_FIND
    CONFIG_ISCSI_IBFT

    CONFIG_ISCSI_IBFT_FIND" not found in linux.x86_64.conf . May i build without it ?


    The five being disabled in the code. Use CONFIG_<option>=y:

    Code
    CONFIG_SCSI_ISCSI_ATTRS
    CONFIG_ISCSI_TCP
    CONFIG_ISCSI_BOOT_SYSFS
    CONFIG_ISCSI_IBFT_FIND
    CONFIG_ISCSI_IBFT

    It works. I builded image without CONFIG_ISCSI_IBFT_FIND and run iscsiadm in console, but cant make connection, becouse network card is not exist. Libreelec my network card not find.
    Where is I can enable my network card (Marvel Yukon) and another card? Thx!


    I marked params

    CONFIG_MARVELL_PHY=y
    CONFIG_MARVELL_10G_PHY=y
    CONFIG_MARVELL_88Q2XXX_PHY=y
    CONFIG_MARVELL_88X2222_PHY=y

    in projects/Generic/linux/linux.x86_64.conf

    No positive result.
    Console Libreelec not find my network adapter.

    What I must doing ?

    Edited 2 times, last by Kleiner: Merged a post created by Kleiner into this post. (August 11, 2024 at 3:49 AM).