09-19-2017 12:37 AM - edited 09-19-2017 12:52 AM
I compiled and generated an image file using following
export ARCH=arm export PATH=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi/bin/ export CROSS_COMPILE = arm-xilinx-linux-gnueabi Source /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/settings64.sh arm-xilinx-linux-gnueabi-gcc hello.c -o hello
and next i tried to send the image file to my board using scp commands as i have dropbear ssh and dropbear sftp on my zc706.
Firs it was tough to send using scp commands to my board with ip address 192.168.4.14 with an error message
[user@hostname ~]$ scp hello root@192.168.4.14:/usr/bin @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is 6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00. Please contact your system administrator. Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message. Offending RSA key in /var/lib/sss/pubconf/known_hosts:3 RSA host key for .... has changed and you have requested strict checking. Host key verification failed.
later i tried with sudo scp.. then the image hello is transferred but on /usr/bin I am not able to execute though i could find the image hello in my /usr/bin and when i run hello , it is showing an error message that command not found. Is that problem with petalinux2017.1? I didnot face problem when i worked on 2015.4 petalinux previously to send the images and run on my board.
And for a trial i tried to send the image which was generated from the cross compilation from 2015.4 version and sent using scp to the zc706 and tried to run but it didnot. Does the externally cross compiled files run on the petalinux running on the zc706?
09-22-2017 07:42 AM
I understood that why my previously cross compiled files for zedboard did not work for zc706 board. SCP and SSH are working perfectly but unable to run those files which are built outside petalinux but using Xilinx-linux-gnueabi-gcc tool chain (2015.4) and sent to this board.
Because it seems it needs armhf.
Though both (zedboard and zc706) have ARM cortex A9 with ARMv7-A (architecture) and also 32 bit. Found that this zc706 is not running externally compiled arm-xilinx-linux-gnueabi-gcc toolchain but it is running those from gnueabihf-gcc (gnueabi hard float for armhf) for the ZC706.
Got gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz from
https://releases.linaro.org/archive/14.04/components/toolchain/binaries/
But it is not present in Xilinx tool chain as arm-xilinx-gnueabihf-gcc but got it from linaro from. But don’t know why, petalinux has Xilinx-linux-gnueabi-gcc only but the images generated for arm and not armhf run over this zc706 board.
09-19-2017 12:55 AM
It's ssh connection issue.
Please remove incorrect ssh key information in known_host file.
After that you try "scp" command.
- Remove incorrect ssh key information in known_hosts file.
$ ssh-keygen -R 192.168.4.14
Thank you.
Best regards,
09-19-2017 01:17 AM - edited 09-19-2017 01:17 AM
Here is the attachment , i deleted the old RSA keys from hosts and generated new and transferred but still I am unable to run the image clustering though i found it in my /usr/bin.
09-19-2017 01:37 AM
Do i need any libraries to run externally compiled and generated images?
09-19-2017 02:05 AM
09-19-2017 02:20 AM
Could you confirm permission of "~/.ssh/known_hosts" ?
I guess you have permission issue, too.
Thank you.
Best regards,
09-20-2017 08:23 AM
09-20-2017 10:25 AM
Could you show the content of `/lib/` folder with ls -l options ? What error are you getting when you run ? Please show the screenshot with all the informations so that we can find a solution.
Best regards,
Abdul
09-21-2017 08:11 AM
You can set up an entry in your ssh config to allow it to ignore ssh host key errors. Just like the error message states, this can allow for a man-in-the-middle attack, but I think it's ok to do in a development environment when you know that the your host key changes on every reboot anyway.
Host zynq_device User root Hostname 10.0.0.1 ForwardX11 no ForwardAgent no StrictHostKeyChecking no UserKnownHostsFile /dev/null IdentityFile ~/.ssh/id_zynq_device_rsa
The lines of interest are StrictHostKeyChecking and UserKnownHostsFile
Setting up an SSH key to be automatically pushed to the root fs image is also worth doing to avoid needing to type a password every time.
To do that, create a petalinux app and make the recipe look something like this:
# # This file is the ssh key install recipe. # SUMMARY = "ssh key install" SECTION = "PETALINUX/apps" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = "file://id_zynq_device_rsa.pub" S = "${WORKDIR}" do_install() { install -d ${D}/home/root/.ssh install -m 0600 ${S}/id_zynq_device_rsa.pub ${D}/home/root/.ssh/authorized_keys } FILES_${PN} += "/home/root/"
And make sure your key is in the files/ directory.
09-22-2017 07:42 AM
I understood that why my previously cross compiled files for zedboard did not work for zc706 board. SCP and SSH are working perfectly but unable to run those files which are built outside petalinux but using Xilinx-linux-gnueabi-gcc tool chain (2015.4) and sent to this board.
Because it seems it needs armhf.
Though both (zedboard and zc706) have ARM cortex A9 with ARMv7-A (architecture) and also 32 bit. Found that this zc706 is not running externally compiled arm-xilinx-linux-gnueabi-gcc toolchain but it is running those from gnueabihf-gcc (gnueabi hard float for armhf) for the ZC706.
Got gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz from
https://releases.linaro.org/archive/14.04/components/toolchain/binaries/
But it is not present in Xilinx tool chain as arm-xilinx-gnueabihf-gcc but got it from linaro from. But don’t know why, petalinux has Xilinx-linux-gnueabi-gcc only but the images generated for arm and not armhf run over this zc706 board.