This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SSH server on OMAP5432



My OMAP5432 run under GLSDK 6.02.01.02. I am trying to install SSH on the board.

For version 6.00.00.07 SSH installation do the script called "first-boot.sh".  For 6.02.01.02 I cannot fins this script.

Therefore I decided build SSH server manually (target # <this command is to be executed on the OMAP5432>):

1. Download SSH source:

target # cd /home/root

target # mkdir openSSH

target # cd  openSSH

target # wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.2p1.tar.gz

2. Extract SSH

target # gzip -dc < openssh-5.2p1.tar.gz | tar -xf -

target # cd openssh-5.2p1

3. Trying to build SSH:

target # ./configure --prefix=/usr --with-ssl-dir=/usr/ssl --with-4in6

On this step I have the error : no acceptable C compiler found in $PATH

What I do next. 

4. Downloading Lenaro Toolchain:

target # wget http://releases.linaro.org/13.11/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2013.11.tar.xz

5. Trying to uncompress it:

target # tar -zxvf gcc-linaro-4.8-2013.11.tar.xz

and get the error:

tar: invalid tar magic.

I am new with the board and a bit confused if my steps are correct. Is there the sense continue to fight with that or my way is wrong at the beginning? Can I build SSH on the target or I should build it at first on the host and than copy it to the board? 

Please advice.

Thank you,

Vadim

  • Vadim, 

    It is easier to cross-compile on your host and then transfer your software to the target.

    But for your case you can simply use opkg to install dropbear.

    opkg update

    opkg install dropbear

    reboot

    Regards,

    Boyko

  • Hi Vadim,

    contrary to GLSDK 6.00.00.07, the recent versions are based on Yocto, not on Ubuntu, so different procedures are required.

    First, please ensure you have setup your SDK according to the Software DEveloper's Guide [1]. Then, you can use scripts in the yocto-layers directory:

    • Ensure setting the environment variables PATH (point to Linaro toolchain) and GLSDK (point to the GLSDK installation base directory)
    • Build packages with the tool $GLSDK/yocto-layers/build-specific-recipe.sh

    On my compile machine, this command worked out:

    cd ${GLSDK}/yocto-layers
    ./build-specific-recipe.sh omap5-evm openssh
    

    The resulting files can be found at

    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-scp_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-dbg_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-ssh_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-keygen_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-sftp-server_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-misc_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-sshd_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-doc_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-dev_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    ./build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-vfp-neon/openssh-sftp_6.0p1-r3-arago0_armv7ahf-vfp-neon.ipk
    

    Cheers,
    Marc

     

    --

    [1] http://processors.wiki.ti.com/index.php/OMAP5_GLSDK_Software_Developers_Guide

  • Seems I was a bit too late, thanks Boyko ;). I forgot to mention that my description is for a compile host.

    Dropbear is an alternative, of course.

  • Hi Boyko,

    Just tried to reproduce your steps for dropbear installation and got the error: "Unknown package 'dropbear'. Collected errors: *opkg_install_cmd: Cannot install package dropbear'.

    Seems this package doesn't available for  GLSDK 6.02.01.02 or something like that..

    Vadim

  • Hi Marc,

    What I do:

    export GLSDK="${HOME}/ti-glsdk_omap5-uevm_6_02_01_02/"
    
    echo ${GLSDK}
    /home/vadimx64/ti-glsdk_omap5-uevm_6_02_01_02/
    
    export PATH=${HOME}/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:$PATH
    
    echo ${PATH}
    /home/vadimx64/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:/home/vadimx64/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/bin:/home/vadimx64/ti-glsdk_omap5-uevm_6_02_01_02/bin:/home/vadimx64/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

    Than reproduce your steps:

    cd ${GLSDK}/yocto-layers
    ./build-specific-recipe.sh omap5-evm openssh

    And get the error:

    [sudo] password for vadimx64: 
    [GLSDK]>
    [GLSDK]> Current Directory is /home/vadimx64/ti-glsdk_omap5-uevm_6_02_01_02/yocto-layers
    [GLSDK]> PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    [GLSDK]> Building on vadimx64-VirtualBox running Linux vadimx64-VirtualBox 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    [GLSDK]> Starting Yocto build at Tue Dec 17 14:31:57 EET 2013
    [GLSDK]>
    [GLSDK]> cd build
    [GLSDK]> cp conf/local.conf conf/local.conf.pristine
    [GLSDK]> echo ARAGO_BRAND = "glsdk" >> conf/local.conf
    [GLSDK]> . conf/setenv
    [GLSDK]> MACHINE=omap5-evm bitbake openssh
    Pseudo is not present but is required, building this first before the main build
    ERROR: No valid toolchain in PATH
    [GLSDK]>
    [GLSDK]> Completed Yocto build at Tue Dec 17 14:31:57 EET 2013
    [GLSDK]>
    

    Why do I get "ERROR: No valid toolchain in PATH" if

    echo ${PATH}
    /home/vadimx64/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:/home/vadimx64/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/bin:/home/vadimx64/ti-glsdk_omap5-uevm_6_02_01_02/bin:/home/vadimx64/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

    Thank you,

    Vadim



  • Vadim,

    you could try setting these environment variables as well:

    export GLSDK=[snip]/ti-glsdk_omap5-uevm_6_02_01_02
    export PATH=$PATH:/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:${GLSDK}/bin
    export CROSS_COMPILE=arm-linux-gnueabihf-
    export ARCH=arm
    

    This works at my desk.

    Cheers,
    Marc

  • Marc,

    What is arch of your host - x32 or x64?

    Thank you,

    Vadim

  • Architecture is x86_64.

    Cheers,

    Marc

  • Hi Vadim,

    Sorry for misleading you i thought the packet for dropbear is there as well.

    well you can try the steps described below:

    https://sites.google.com/site/al271828183x/techblog/dropbearhow-tosetupsshserveronembeddedlinuxtargets

    Regards,

    Boyko

  • hi marc,

     did the same and specific recipe for NANO works but now I am have many and not one IPK for my NANO.

    we moved one files to tarfget rootfs and try the to install one file with  OPKG INSTAL.  .....IPK than I am getting and  and erorr about invalid magic

    the rest of the step works. we just having a problem with new package install

     

    thank

    rico

  • Hi Rico,

    please post the error messages you're getting.

    If you don't mind the advantages of a package management system, you can decompress the .ipk files on your development host using the ar command, e.g.

    ar x somepackage.ipk

    I suggest doing such in a separate subdirectory. You will then find some files, including two archives control.tar.gz and data.tar.gz, where the latter contains the files that would be installed to the target filesystem upon running opkg on the target. The control.tar.gz contains pre- and post-install scripts like .deb or .rpm packages do as well.
    You can tar -xzf the data.tar.gz archives of all .ipk files you want to install and merge the content in a new subdirectory that you can then transfer to the target.

    Please keep in mind that this might mess up your target root filesystem. Use carefully.

    Regards,
    Marc

     

  • hi marc ,

    i used the ./build-specfic-recipe omap5-evm nano, and got all the files in the ..../deploy/arag.../cortex../ipk

    than run the opkg command on the header file and SOLVED.

    but when i did it for the openCV recipe he did not work because in the target omap5-evm ask for more packages like PYTHON-CORE.

    1. what i am doing wrong after i am getting all the ipk files in the /ipk folder ? do the recipe create HEADER ipk for the installation of the  package in the target ?

     

  • Hi and sorry for the late reply.

    If there are dependencies, my above description won't work as opkg uses a package database similar to what we know from Debian-based distributions (.deb and dpkg) or RPM.

    Unfortunately I cannot reproduce your issue on my system at the moment, but I'd suggest that you google for the opkg package database and find out how it can be achieved that opkg 'learns' your new packages or how the package dependencies can be resolved on the compile host (e.g. in the target filesystem that is built by yocto) - maybe somebody else can post a solution here?

    Regards,

    Marc

  •  Thank you , Now I have on target SSH and GDB as well