LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   -sh: ./: Permission denied unable to run program on mini2440 target (https://www.linuxquestions.org/questions/linux-hardware-18/sh-permission-denied-unable-to-run-program-on-mini2440-target-4175489620/)

Shweitzer 12-30-2013 02:34 PM

-sh: ./: Permission denied unable to run program on mini2440 target
 
I would like to run a program on the mini2440. My OS is Ubuntu 12.04. When I attempt to run the program on the target board of the mini2440 I get the following error ?

-sh: ./: Permission denied

What am I missing ?? I believe that it has to something to do with the shell, yet I am at a loss as to what the solution would be ?

FriendlyARM login: root
[root@FriendlyARM /]# ls
bin etc lib linuxrc opt root sys usr www
dev home libexec mnt proc sbin tmp var
[root@FriendlyARM /]# cd /home/src/led
[root@FriendlyARM led]# ls
Makefile led.c
[root@FriendlyARM led]# ./ led
-sh: ./: Permission denied
[root@FriendlyARM led]# ls -l
-rwxrwxrwx 1 root root 175 Apr 13 2011 Makefile
-rwxrwxrwx 1 root root 1717 Jul 28 2011 led.c

custangro 12-30-2013 04:52 PM

You have a space after the "./"

Spect73 12-30-2013 05:38 PM

Quote:

Originally Posted by custangro (Post 5089272)
You have a space after the "./"

Great catch. I had to read that 3 times before I could see the problem.

Shweitzer 12-30-2013 06:27 PM

Missed that as well thx ! Now I get the following error ?? Checked my path and confirmed that it is correct for setting up my mini2440 kit. Not sure where to go from here ?? very new at this. I think it has something to with my shell configuration then again possibly a bug.

[root@FriendlyARM /]# cd /home/src/led
[root@FriendlyARM led]# ./led
-sh: ./led: not found
[root@FriendlyARM led]# ls
Makefile led.c

--- HERE IS MY PROFILE PATH ---

# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
PATH="$PATH:/usr/local/arm/4.3.2/bin"

mesg n

Shweitzer 12-30-2013 06:30 PM

My make is not creating an executable and not sure why ?

Shweitzer 12-30-2013 06:34 PM

[root@FriendlyARM /]# cd /home/src/led
[root@FriendlyARM led]# ls
Makefile led.c
[root@FriendlyARM led]# make
-sh: make: not found

custangro 12-31-2013 03:50 PM

Quote:

Originally Posted by Shweitzer (Post 5089316)
[root@FriendlyARM /]# cd /home/src/led
[root@FriendlyARM led]# ls
Makefile led.c
[root@FriendlyARM led]# make
-sh: make: not found

do a

Code:

which make
and display the output

prabhuraj 01-08-2014 02:00 AM

You need to have the compiler in mini2440 to do make and create the executable. Better way is to set up the cross compiler in your PC, cross compile and run the executable on the device.


All times are GMT -5. The time now is 11:02 AM.