Thanks Gregory. I raised this as an issue on github and as a result
learned from Alan C. Assis that I was misdirected by the zero size:
static int binfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
{
DEBUGASSERT(buf != NULL);
/* It's a execute-only file system */
buf->st_mode = S_IFREG | S_IXOTH | S_IXGRP | S_IXUSR;
buf->st_size = 0;
buf->st_blksize = 0;
buf->st_blocks = 0;
return OK;
}
I had compared every config I could find and tried lots of things but by
relying on the 0 size as the indicator of success I would have missed
the relevant settings. I now have it working but haven't drilled down to
find exactly which config change fixed it: probably I hadn't set up the
ELF creation fully nor "selected Enable execution of program files"
(CONFIG_NSH_FILE_APPS).
Once I have had time to work out the exact settings needed I will update
BINFS documentation as it implies it will "just work". Nope!
Regards,
Tim.
On 05/06/2025 03:08, Gregory Nutt wrote:
I think that most built-in apps can be build as ELF modules. If that is true,
then they can be put on a ROMFS file system, mounted, and should execute.
You need to do more research. There are dozens of configuration that claim to
support the configuration that you want. Look at the defconfig for sim:nsh.
That used to work fine. If you are just having a configuration issue, then you
just need find the settings used by that configuration.
Another problem might be that the feature is just broken.
On Jun 4, 2025, 4:04 AM, at 4:04 AM, Tim Hardisty <timhardist...@gmail.com>
wrote:
If I mount binfs, all the builtin apps are listed but with 0 size, and
I
can't execute them from the mount location. They run fine directly from
NSH.
I cannot find any Kconfig magic settings that "fix" this.
Has anyone got any suggestions? I need it for BINFS thttp cgi
functions.
Thanks!