<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 14/02/2020 16:29, Joel Sherrill wrote:<br>
</p>
<blockquote type="cite"
cite="mid:CAF9ehCWx1LpTt2EUX=yptVZW4C37krXWnsRXpy3Dp4TUpvtn+A@mail.gmail.com">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<blockquote type="cite">
<div>This filesystem is needed because some applications
want no filesystem but</div>
<div>you require one for device nodes. Even the IMFS is
subject to mallocs which</div>
<div>are undesired in the applications that this was
supporting.</div>
</blockquote>
<p>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:</p>
<p><a
href="https://git.rtems.org/rtems/commit/?id=a9df9169882c564af6714bbf121c278092d3c51c"
target="_blank" moz-do-not-send="true">https://git.rtems.org/rtems/commit/?id=a9df9169882c564af6714bbf121c278092d3c51c</a></p>
<p>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.<br>
</p>
</div>
</blockquote>
<div><br>
</div>
<div>OK. But that's maybe in the indefinite future and you broke
something today.</div>
</blockquote>
<p>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():</p>
<p>#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<br>
#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<br>
#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<br>
#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<br>
#4 0x00114802 in _IO_Initialize_all_drivers () at
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/sapi/src/io.c:33<br>
#5 0x0011472e in rtems_initialize_executive () at
/home/EB/sebastian_h/src/rtems/c/src/../../cpukit/sapi/src/exinit.c:128<br>
#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</p>
<p>It is not supported by the device filesystem and the example ends
up in a fatal error.</p>
<p>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.<br>
</p>
</body>
</html>