All architectures: Add logic to automatically register /dev/ptmx a boot time

This commit is contained in:
Gregory Nutt
2016-07-15 11:54:41 -06:00
parent 9ecd558002
commit d3b3c71d97
11 changed files with 265 additions and 32 deletions
+24
View File
@@ -50,6 +50,8 @@
#include <nuttx/net/tun.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>
#include <arch/board/board.h>
@@ -183,6 +185,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
#endif
/* Early initialization of the system logging device. Some SYSLOG channel
* can be initialized early in the initialization sequence because they
* depend on minimal OS initialization.
@@ -190,6 +198,22 @@ void up_initialize(void)
syslog_initialize(SYSLOG_INIT_EARLY);
#if defined(CONFIG_CRYPTO)
/* Initialize the HW crypto and /dev/crypto */
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
devcrypto_register();
#endif
#ifdef CONFIG_DEV_RANDOM
/* Initialize the Random Number Generator (RNG) */
up_rnginitialize();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */