Add dhcp option cmdline (129)

This commit is contained in:
Heinz Junkes
2021-01-15 17:22:58 +01:00
committed by Brendan Chandler
parent 25a072540f
commit 08b7dd1208
6 changed files with 22 additions and 12 deletions

View File

@@ -103,7 +103,7 @@
# Which target architectures to cross-compile for.
# Definitions in configure/os/CONFIG_SITE.<host>.Common
# may override this setting.
CROSS_COMPILER_TARGET_ARCHS=RTEMS-beatnik
CROSS_COMPILER_TARGET_ARCHS=RTEMS-qoriq_e500
#CROSS_COMPILER_TARGET_ARCHS=vxWorks-ppc32
# If only some of your host architectures can compile the

View File

@@ -9,7 +9,7 @@ RTEMS_BSP = qoriq_e500
RTEMS_TARGET_CPU = powerpc
GNU_TARGET = powerpc-rtems
# optimization trouble in postfix.c
#ARCH_DEP_CFLAGS += -DRTEMS_HAS_ALTIVEC
ARCH_DEP_CFLAGS += -DRTEMS_HAS_ALTIVEC
#will use bootp
#ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL

View File

@@ -16,6 +16,7 @@
#RTEMS_VERSION = 5
#RTEMS_BASE = /home/h1/DBG/rtems
#RTEMS_BASE = /home/ad/MVME6100/rtems/$(RTEMS_VERSION)
#RTEMS_BASE = /opt/RTEMS/qoriq/rtems/$(RTEMS_VERSION)
# APS:
#RTEMS_VERSION = 4.10.2

View File

@@ -54,7 +54,7 @@ typedef struct myPvt {
int resultFail;
} myPvt;
epicsEventId finished;
static epicsEventId finished;
static void myCallback(epicsCallback *pCallback)
{

View File

@@ -54,7 +54,7 @@ typedef struct myPvt {
int resultFail;
} myPvt;
epicsEventId finished;
static epicsEventId finished;
static void myCallback(epicsCallback *pCallback)

View File

@@ -66,7 +66,6 @@
#include <rtems/telnetd.h>
#if __RTEMS_MAJOR__ > 4
#include <rtems/printer.h>
#include <rtems/telnetd.h>
#endif
#include "epicsVersion.h"
#include "epicsThread.h"
@@ -238,6 +237,7 @@ initialize_local_filesystem(char **argv)
argv[0] = rtems_bsdnet_bootp_boot_file_name;
if (epicsRtemsMountLocalFilesystem(argv)==0) {
return 1; /* FS setup successful */
#ifdef RTEMS_LEGACY_STACK
} else if (_FlashSize && (_DownloadLocation || _FlashBase)) {
extern char _edata[];
size_t flashIndex = _edata - _DownloadLocation;
@@ -258,6 +258,7 @@ initialize_local_filesystem(char **argv)
}
printf ("***** Startup script (%s) not in IMFS *****\n", rtems_bsdnet_bootp_cmdline);
}
#endif /* only with old stack, check check libbsd dependency! */
}
return 0;
}
@@ -803,7 +804,9 @@ default_network_dhcpcd(void)
"option ntp_servers\n" \
"option rtems_cmdline\n" \
"option tftp_server_name\n" \
"option bootfile_name";
"option bootfile_name\n" \
"define 129 string rtems_cmdline\n";
"vendopt 129 string rtems_cmdline";
n = write(fd, fhi_cfg, sizeof(fhi_cfg) - 1);
assert(n == (ssize_t) sizeof(fhi_cfg) - 1);
@@ -882,7 +885,7 @@ rtems_telnetd_config_table rtems_telnetd_config = {
* RTEMS Startup task
*/
void *
POSIX_Init (__attribute__((unused)) void *argument)
POSIX_Init ( void *argument __attribute__((unused)))
{
int result;
char *argv[3] = { NULL, NULL, NULL };
@@ -1060,8 +1063,11 @@ POSIX_Init (__attribute__((unused)) void *argument)
rtems_bsdnet_synchronize_ntp (0, 0);
#endif // not RTEMS_LEGACY_STACK
/* show messages from network after initialization ? good idea? */
rtems_bsd_set_vprintf_handler(bsd_vprintf_handler_old);
printf("\n***** Setting up file system *****\n");
initialize_remote_filesystem(argv, initialize_local_filesystem(argv));
//???initialize_remote_filesystem(argv, initialize_local_filesystem(argv));
fixup_hosts();
/*
@@ -1091,9 +1097,9 @@ POSIX_Init (__attribute__((unused)) void *argument)
*/
#if __RTEMS_MAJOR__>4
// if telnetd is requested ...
printf(" Will try to start telnetd with prio %d ...\n", rtems_telnetd_config.priority);
result = rtems_telnetd_initialize();
printf (" telnetd initialized with result %d\n", result);
// printf(" Will try to start telnetd with prio %d ...\n", rtems_telnetd_config.priority);
// result = rtems_telnetd_initialize();
// printf (" telnetd initialized with result %d\n", result);
#endif
printf ("***** Preparing EPICS application *****\n");
@@ -1107,7 +1113,10 @@ POSIX_Init (__attribute__((unused)) void *argument)
printf ("***** IOC application terminating *****\n");
epicsThreadSleep(1.0);
epicsExit(result);
return NULL;
#if defined(__rtems__)
delayedPanic("will reset rtems ... end of POSIX_Init");
#endif
exit(0);
}
#if defined(QEMU_FIXUPS)