[rtems-libbsd commit] media01: Add network and SMP support
Sebastian Huber
sebh at rtems.org
Fri Sep 11 09:52:12 UTC 2015
Module: rtems-libbsd
Branch: master
Commit: 81edae464d7f464d74e6223847c8c734544f7cf2
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=81edae464d7f464d74e6223847c8c734544f7cf2
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Mar 31 09:42:01 2015 +0200
media01: Add network and SMP support
---
testsuite/media01/test_main.c | 47 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/testsuite/media01/test_main.c b/testsuite/media01/test_main.c
index 7f585a1..3d7f75f 100644
--- a/testsuite/media01/test_main.c
+++ b/testsuite/media01/test_main.c
@@ -34,11 +34,38 @@
#include <rtems/bdbuf.h>
#include <rtems/console.h>
+#include <rtems/ftpd.h>
#include <rtems/media.h>
#include <rtems/shell.h>
#define TEST_NAME "LIBBSD MEDIA 1"
+struct rtems_ftpd_configuration rtems_ftpd_configuration = {
+ /* FTPD task priority */
+ .priority = 100,
+
+ /* Maximum buffersize for hooks */
+ .max_hook_filesize = 0,
+
+ /* Well-known port */
+ .port = 21,
+
+ /* List of hooks */
+ .hooks = NULL,
+
+ /* Root for FTPD or NULL for "/" */
+ .root = NULL,
+
+ /* Max. connections */
+ .tasks_count = 4,
+
+ /* Idle timeout in seconds or 0 for no (infinite) timeout */
+ .idle = 5 * 60,
+
+ /* Access: 0 - r/w, 1 - read-only, 2 - write-only, 3 - browse-only */
+ .access = 0
+};
+
static rtems_status_code
media_listener(rtems_media_event event, rtems_media_state state,
const char *src, const char *dest, void *arg)
@@ -83,8 +110,12 @@ media_listener(rtems_media_event event, rtems_media_state state,
static void
test_main(void)
{
+ int rv;
rtems_status_code sc;
+ rv = rtems_initialize_ftpd();
+ assert(rv == 0);
+
sc = rtems_shell_init("SHLL", 16 * 1024, 1, CONSOLE_DEVICE_NAME,
false, true, NULL);
assert(sc == RTEMS_SUCCESSFUL);
@@ -117,11 +148,15 @@ early_initialization(void)
assert(sc == RTEMS_SUCCESSFUL);
}
-#include <bsp/nexus-devices.h>
+#define DEFAULT_NETWORK_DHCPCD_ENABLE
#define CONFIGURE_FILESYSTEM_DOSFS
-#include <rtems/bsd/test/default-init.h>
+#define CONFIGURE_SMP_APPLICATION
+
+#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 32
+
+#include <rtems/bsd/test/default-network-init.h>
#define CONFIGURE_SHELL_COMMANDS_INIT
@@ -131,7 +166,12 @@ early_initialization(void)
#define CONFIGURE_SHELL_USER_COMMANDS \
&bsp_interrupt_shell_command, \
- &rtems_shell_BSD_Command
+ &rtems_shell_BSD_Command, \
+ &rtems_shell_HOSTNAME_Command, \
+ &rtems_shell_PING_Command, \
+ &rtems_shell_ROUTE_Command, \
+ &rtems_shell_NETSTAT_Command, \
+ &rtems_shell_IFCONFIG_Command
#define CONFIGURE_SHELL_COMMAND_CPUUSE
#define CONFIGURE_SHELL_COMMAND_PERIODUSE
@@ -153,6 +193,7 @@ early_initialization(void)
#define CONFIGURE_SHELL_COMMAND_MALLOC_INFO
#define CONFIGURE_SHELL_COMMAND_FDISK
+#define CONFIGURE_SHELL_COMMAND_BLKSTATS
#define CONFIGURE_SHELL_COMMAND_BLKSYNC
#define CONFIGURE_SHELL_COMMAND_MSDOSFMT
#define CONFIGURE_SHELL_COMMAND_DF
More information about the vc
mailing list