UPGRADE YOUR BROWSER
We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!
04-24-2016 02:14 PM
Hello,
I petalinux configure with PL bitstream create BOOT.bin.
I have created a linux application using xsdk. I copied all necessary file of petalinux to SD card and also copied liux_app.elf to SD card. I boot petalinux on zedboard its booting normally but i could not find the linux application which i have copied to SD card.
I tried to run using ./liux_app.elf but its not there.
I have attached the screen shot of SD card contents and highlited is the application which i have build using xsdk and copied to SD card.
How i can solve this problem?
Please help me.
04-25-2016 10:02 AM
There must be something as root otherwise Linux wouldn't be able to boot to a working shell.
Try some of the following:
pwd
ls / ls /dev/ which ls
If you have a dev node for SD, usually /dev/mmcblk* where * may have numbers and p's, try mounting it:
mkdir -p /mnt mount /dev/mmcblk<partition> /mnt
You should then see your elf in the /mnt dir.
HTH
04-24-2016 07:16 PM
what do you see if you ls the root dir in your booted system? Is the sd card mounted as root? Depending on configuration the SD card may or may not be root. E.g. you could be at the initramfs or initrd with the SD card unmounted.
04-25-2016 12:04 AM
Hi,
When i do ls root. it shows nothing. I have not mounted card as root. I simply format it and copied all files to it. is it problem?. How i can mount it as root?
04-25-2016 10:02 AM
There must be something as root otherwise Linux wouldn't be able to boot to a working shell.
Try some of the following:
pwd
ls / ls /dev/ which ls
If you have a dev node for SD, usually /dev/mmcblk* where * may have numbers and p's, try mounting it:
mkdir -p /mnt mount /dev/mmcblk<partition> /mnt
You should then see your elf in the /mnt dir.
HTH
04-25-2016 01:35 PM
Thanks for help.
Now i can access all files of SD card.
04-25-2016 02:01 PM
Can you help.
I tried to make application for linux using the struct and functions provided by XSDk. I have attached code but when i execute it shows following error.
/dev/uio0 opened.
segmentation fault.
i have checked uio0 is there in /dev.
04-26-2016 02:32 PM
Hello,
You are trying to mmap the uio file descriptor which is sure to cause problems. Also, just for reference the SD partitions are not mounted by default because of a problem in the mount script(at least in 2015.4) so you have to mount them manually.
jeff
04-26-2016 02:54 PM
Hi jeffdaq,
Thanks for help.
How i can over come this problem caused by mmap the uio file descriptor?
I cannot skip it is must for me.
04-26-2016 04:50 PM
Hello,
Actually, I looked at this again and i was wrong. In my UIO userspace code I did not map the uio fd because I had to access multiple devices so I just mmaped in /dev/mem. So you should NOT have a problem mmaping the uio fd. However, I don't think you allocated any memory for the alu pointer and you try to dereference when you make the mmap call.
jeff
04-27-2016 03:45 AM
Hello jeffdaq,
Thanks for reply.
By memory allocation mean, i should set it to base address and then call mmap or something else?
04-27-2016 01:04 PM
I mean a pointer has to be initialized to point to memory. Either you have to malloc memory or initialize the pointer to the adress of another variable. I don't remember seeing that in your code.
jeff
06-21-2016 12:28 PM
I too have tried to build and run ELF files on PetaLinux running on the target board. But none of the ways mentioned here worked out for me. I even tried chmod. Didn't work. When I executed the file, it displayed "Illegal Instruction".
The way to go around this is to create the application in PetaLinux SDK itself. When you build this application, it creates an executable which can be found in /bin.
06-21-2016 03:32 PM
Hi akshaykamathk,
Yes you can create an application using Petalinux. But you cannot debug when it has some problem. First you have to copy it in SD card and then insert card to board and if it doesn,t work then again you have to go for petalinux. Which is really time consuming process.
The most efficient way to copy elf file to running board is through SSH.
You can make application in XSDK then you should configure Ethernet port of board and make an SSH with board.
One thing you should keep in mind. You should enable drop bear while building kernel in petalinux.
I hope this will help you.
07-27-2019 06:44 AM
Hi all,
I move the elf file via ssh. but whenever I run the my_sys.elf I get the following error: my_sys.elf: error while loading shared libraries: libsds.so: cannot open shared object file: no such file or directory.
Please let me know how can I resolve this issue. Thanks in advance.
Best regards,