patacongo commented on issue #3737:
URL:
https://github.com/apache/incubator-nuttx/issues/3737#issuecomment-842799079
> ERROR: exec(errno) failed: 2
You can see the meaning of the error in include/errno.h:
#define ENOENT 2
#define ENOENT_STR "No such file or directory"
Which suggests that there is something wrong with your file system or file
search PATH. The ELF loader should only return the error 2 if the executable
file cannot be found.
That error is printed by nxflat_main.c:
234 errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);
Do you have a PATH variable set up in the environment? NO, it is not
defined in your defconfig file. So the following should be using the absolute
path /mnt/romfs/errno. That should work provided that /dev/ram0 is valid.
214 #ifdef CONFIG_LIB_ENVPATH
215 filename = dirlist[i];
216 #else
217 snprintf(fullpath, 128, "%s/%s", MOUNTPT, dirlist[i]);
218 filename = fullpath;
219 #endif
230 args[0] = NULL;
231 ret = exec(filename, args, g_nxflat_exports,
g_nxflat_nexports);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]