rtems-examples hello no output devfs

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Mar 9 18:05:19 UTC 2020


On 14/02/2020 16:29, Joel Sherrill wrote:

>>     This filesystem is needed because some applications want no
>>     filesystem but
>>     you require one for device nodes. Even the IMFS is subject to
>>     mallocs which
>>     are undesired in the applications that this was supporting.
>
>     Termios uses malloc(), so I don't think this filesystem makes
>     sense for console drivers. I changed the clock driver to use a
>     simple system initialization handler. Some time ago I refactored
>     the IMFS mount operation to use statically allocated data:
>
>     https://git.rtems.org/rtems/commit/?id=a9df9169882c564af6714bbf121c278092d3c51c
>
>     With a bit of work the IMFS_make_generic_node() can be changed to
>     not allocate memory and instead use memory provided by the caller.
>     I spend a considerable amount of time to make it possible that
>     some time in the future we can have applications with purely
>     statically allocated resources.
>
>
> OK. But that's maybe in the indefinite future and you broke something 
> today.

I check in the patches which replace the device file system with a 
specialization of the IMFS. You can now install Termios device drivers 
with device filesystem (CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM). 
However, the example still doesn't work since the console driver uses 
link():

#0  rtems_filesystem_default_link (parentloc=0x204144 
<_ISR_Stack_area_begin+2820>, targetloc=0x20417c 
<_ISR_Stack_area_begin+2876>, name=0x11b811 "dev/console", namelen=11) 
at 
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libfs/src/defaults/default_link.c:30
#1  0x00101ee4 in link (path1=0x11b820 "/dev/ttyS0", path2=0x11b810 
"/dev/console") at 
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/link.c:47
#2  0x00100a9a in console_initialize (major=0, minor=0, arg=0x0) at 
/home/EB/sebastian_h/src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../../../../../../bsps/shared/dev/serial/console-termios-init.c:57
#3  0x00114868 in rtems_io_initialize (major=0, minor=0, argument=0x0) 
at 
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/sapi/src/ioinitialize.c:36
#4  0x00114802 in _IO_Initialize_all_drivers () at 
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/sapi/src/io.c:33
#5  0x0011472e in rtems_initialize_executive () at 
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/sapi/src/exinit.c:128
#6  0x00100c30 in boot_card (cmdline=0x0) at 
/home/EB/sebastian_h/src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../../../../../../bsps/shared/start/bootcard.c:55

It is not supported by the device filesystem and the example ends up in 
a fatal error.

What could be an option is to first install the console device under 
"/dev/console" and then try to link it to the other path, if this fails, 
then just continue.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200309/c4c86fbd/attachment-0001.html>


More information about the devel mailing list