mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
All architectures: Add logic to automatically register /dev/ptmx a boot time
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user