Initial framework for the Redstone XP.

This commit is contained in:
Jeffrey Townsend
2016-01-05 19:37:23 +00:00
parent 69915dd07d
commit 779fc15187
32 changed files with 730 additions and 0 deletions

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1,2 @@
*x86*64*cel*redstone*xp*.mk
onlpdump.mk

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1 @@
!include $ONL_TEMPLATES/onlp-platform-any.yml PLATFORM=x86-64-cel-redstone-xp ARCH=amd64 TOOLCHAIN=x86_64-linux-gnu

View File

@@ -0,0 +1,2 @@
FILTER=src
include $(ONL)/make/subdirs.mk

View File

@@ -0,0 +1,45 @@
############################################################
# <bsn.cl fy=2014 v=onl>
#
# Copyright 2014 BigSwitch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.eclipse.org/legal/epl-v10.html
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the
# License.
#
# </bsn.cl>
############################################################
#
#
############################################################
include $(ONL)/make/config.amd64.mk
MODULE := libonlp-x86-64-cel-redstone-xp
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF x86_64_cel_redstone_xp onlplib
DEPENDMODULE_HEADERS := sff
include $(BUILDER)/dependmodules.mk
SHAREDLIB := libonlp-x86-64-cel-redstone-xp.so
$(SHAREDLIB)_TARGETS := $(ALL_TARGETS)
include $(BUILDER)/so.mk
.DEFAULT_GOAL := $(SHAREDLIB)
GLOBAL_CFLAGS += -I$(onlp_BASEDIR)/module/inc
GLOBAL_CFLAGS += -DAIM_CONFIG_INCLUDE_MODULES_INIT=1
GLOBAL_CFLAGS += -fPIC
GLOBAL_LINK_LIBS += -lpthread
include $(BUILDER)/targets.mk

View File

@@ -0,0 +1,46 @@
############################################################
# <bsn.cl fy=2014 v=onl>
#
# Copyright 2014 BigSwitch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.eclipse.org/legal/epl-v10.html
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the
# License.
#
# </bsn.cl>
############################################################
#
#
#
############################################################
include $(ONL)/make/config.amd64.mk
.DEFAULT_GOAL := onlpdump
MODULE := onlpdump
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF onlp x86_64_cel_redstone_xp onlplib onlp_platform_defaults sff cjson cjson_util timer_wheel OS
include $(BUILDER)/dependmodules.mk
BINARY := onlpdump
$(BINARY)_LIBRARIES := $(LIBRARY_TARGETS)
include $(BUILDER)/bin.mk
GLOBAL_CFLAGS += -DAIM_CONFIG_AIM_MAIN_FUNCTION=onlpdump_main
GLOBAL_CFLAGS += -DAIM_CONFIG_INCLUDE_MODULES_INIT=1
GLOBAL_CFLAGS += -DAIM_CONFIG_INCLUDE_MAIN=1
GLOBAL_LINK_LIBS += -lpthread -lm
include $(BUILDER)/targets.mk

View File

@@ -0,0 +1,9 @@
###############################################################################
#
#
#
###############################################################################
include $(ONL)/make/config.mk
MODULE := x86_64_cel_redstone_xp
AUTOMODULE := x86_64_cel_redstone_xp
include $(BUILDER)/definemodule.mk

View File

@@ -0,0 +1,9 @@
###############################################################################
#
# x86_64_cel_redstone_xp Autogeneration
#
###############################################################################
x86_64_cel_redstone_xp_AUTO_DEFS := module/auto/x86_64_cel_redstone_xp.yml
x86_64_cel_redstone_xp_AUTO_DIRS := module/inc/x86_64_cel_redstone_xp module/src
include $(BUILDER)/auto.mk

View File

@@ -0,0 +1,47 @@
###############################################################################
#
# x86_64_cel_redstone_xp Autogeneration Definitions.
#
###############################################################################
cdefs: &cdefs
- X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING:
doc: "Include or exclude logging."
default: 1
- X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT:
doc: "Default enabled log options."
default: AIM_LOG_OPTIONS_DEFAULT
- X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT:
doc: "Default enabled log bits."
default: AIM_LOG_BITS_DEFAULT
- X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT:
doc: "Default enabled custom log bits."
default: 0
- X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB:
doc: "Default all porting macros to use the C standard libraries."
default: 1
- X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS:
doc: "Include standard library headers for stdlib porting macros."
default: X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB
- X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI:
doc: "Include generic uCli support."
default: 0
definitions:
cdefs:
X86_64_CEL_REDSTONE_XP_CONFIG_HEADER:
defs: *cdefs
basename: x86_64_cel_redstone_xp_config
portingmacro:
X86_64_CEL_REDSTONE_XP:
macros:
- malloc
- free
- memset
- memcpy
- strncpy
- vsnprintf
- snprintf
- strlen

View File

@@ -0,0 +1,14 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
/* <--auto.start.xmacro(ALL).define> */
/* <auto.end.xmacro(ALL).define> */
/* <--auto.start.xenum(ALL).define> */
/* <auto.end.xenum(ALL).define> */

View File

@@ -0,0 +1,127 @@
/**************************************************************************//**
*
* @file
* @brief x86_64_cel_redstone_xp Configuration Header
*
* @addtogroup x86_64_cel_redstone_xp-config
* @{
*
*****************************************************************************/
#ifndef __X86_64_CEL_REDSTONE_XP_CONFIG_H__
#define __X86_64_CEL_REDSTONE_XP_CONFIG_H__
#ifdef GLOBAL_INCLUDE_CUSTOM_CONFIG
#include <global_custom_config.h>
#endif
#ifdef X86_64_CEL_REDSTONE_XP_INCLUDE_CUSTOM_CONFIG
#include <x86_64_cel_redstone_xp_custom_config.h>
#endif
/* <auto.start.cdefs(X86_64_CEL_REDSTONE_XP_CONFIG_HEADER).header> */
#include <AIM/aim.h>
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING
*
* Include or exclude logging. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING
#define X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING 1
#endif
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT
*
* Default enabled log options. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT
#define X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT AIM_LOG_OPTIONS_DEFAULT
#endif
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT
*
* Default enabled log bits. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT
#define X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT AIM_LOG_BITS_DEFAULT
#endif
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT
*
* Default enabled custom log bits. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT
#define X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT 0
#endif
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB
*
* Default all porting macros to use the C standard libraries. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB
#define X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB 1
#endif
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS
*
* Include standard library headers for stdlib porting macros. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS
#define X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB
#endif
/**
* X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI
*
* Include generic uCli support. */
#ifndef X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI
#define X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI 0
#endif
/**
* All compile time options can be queried or displayed
*/
/** Configuration settings structure. */
typedef struct x86_64_cel_redstone_xp_config_settings_s {
/** name */
const char* name;
/** value */
const char* value;
} x86_64_cel_redstone_xp_config_settings_t;
/** Configuration settings table. */
/** x86_64_cel_redstone_xp_config_settings table. */
extern x86_64_cel_redstone_xp_config_settings_t x86_64_cel_redstone_xp_config_settings[];
/**
* @brief Lookup a configuration setting.
* @param setting The name of the configuration option to lookup.
*/
const char* x86_64_cel_redstone_xp_config_lookup(const char* setting);
/**
* @brief Show the compile-time configuration.
* @param pvs The output stream.
*/
int x86_64_cel_redstone_xp_config_show(struct aim_pvs_s* pvs);
/* <auto.end.cdefs(X86_64_CEL_REDSTONE_XP_CONFIG_HEADER).header> */
#include "x86_64_cel_redstone_xp_porting.h"
#endif /* __X86_64_CEL_REDSTONE_XP_CONFIG_H__ */
/* @} */

View File

@@ -0,0 +1,26 @@
/**************************************************************************//**
*
* x86_64_cel_redstone_xp Doxygen Header
*
*****************************************************************************/
#ifndef __X86_64_CEL_REDSTONE_XP_DOX_H__
#define __X86_64_CEL_REDSTONE_XP_DOX_H__
/**
* @defgroup x86_64_cel_redstone_xp x86_64_cel_redstone_xp - x86_64_cel_redstone_xp Description
*
The documentation overview for this module should go here.
*
* @{
*
* @defgroup x86_64_cel_redstone_xp-x86_64_cel_redstone_xp Public Interface
* @defgroup x86_64_cel_redstone_xp-config Compile Time Configuration
* @defgroup x86_64_cel_redstone_xp-porting Porting Macros
*
* @}
*
*/
#endif /* __X86_64_CEL_REDSTONE_XP_DOX_H__ */

View File

@@ -0,0 +1,107 @@
/**************************************************************************//**
*
* @file
* @brief x86_64_cel_redstone_xp Porting Macros.
*
* @addtogroup x86_64_cel_redstone_xp-porting
* @{
*
*****************************************************************************/
#ifndef __X86_64_CEL_REDSTONE_XP_PORTING_H__
#define __X86_64_CEL_REDSTONE_XP_PORTING_H__
/* <auto.start.portingmacro(ALL).define> */
#if X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS == 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <memory.h>
#endif
#ifndef X86_64_CEL_REDSTONE_XP_MALLOC
#if defined(GLOBAL_MALLOC)
#define X86_64_CEL_REDSTONE_XP_MALLOC GLOBAL_MALLOC
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_MALLOC malloc
#else
#error The macro X86_64_CEL_REDSTONE_XP_MALLOC is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_FREE
#if defined(GLOBAL_FREE)
#define X86_64_CEL_REDSTONE_XP_FREE GLOBAL_FREE
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_FREE free
#else
#error The macro X86_64_CEL_REDSTONE_XP_FREE is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_MEMSET
#if defined(GLOBAL_MEMSET)
#define X86_64_CEL_REDSTONE_XP_MEMSET GLOBAL_MEMSET
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_MEMSET memset
#else
#error The macro X86_64_CEL_REDSTONE_XP_MEMSET is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_MEMCPY
#if defined(GLOBAL_MEMCPY)
#define X86_64_CEL_REDSTONE_XP_MEMCPY GLOBAL_MEMCPY
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_MEMCPY memcpy
#else
#error The macro X86_64_CEL_REDSTONE_XP_MEMCPY is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_STRNCPY
#if defined(GLOBAL_STRNCPY)
#define X86_64_CEL_REDSTONE_XP_STRNCPY GLOBAL_STRNCPY
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_STRNCPY strncpy
#else
#error The macro X86_64_CEL_REDSTONE_XP_STRNCPY is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_VSNPRINTF
#if defined(GLOBAL_VSNPRINTF)
#define X86_64_CEL_REDSTONE_XP_VSNPRINTF GLOBAL_VSNPRINTF
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_VSNPRINTF vsnprintf
#else
#error The macro X86_64_CEL_REDSTONE_XP_VSNPRINTF is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_SNPRINTF
#if defined(GLOBAL_SNPRINTF)
#define X86_64_CEL_REDSTONE_XP_SNPRINTF GLOBAL_SNPRINTF
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_SNPRINTF snprintf
#else
#error The macro X86_64_CEL_REDSTONE_XP_SNPRINTF is required but cannot be defined.
#endif
#endif
#ifndef X86_64_CEL_REDSTONE_XP_STRLEN
#if defined(GLOBAL_STRLEN)
#define X86_64_CEL_REDSTONE_XP_STRLEN GLOBAL_STRLEN
#elif X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB == 1
#define X86_64_CEL_REDSTONE_XP_STRLEN strlen
#else
#error The macro X86_64_CEL_REDSTONE_XP_STRLEN is required but cannot be defined.
#endif
#endif
/* <auto.end.portingmacro(ALL).define> */
#endif /* __X86_64_CEL_REDSTONE_XP_PORTING_H__ */
/* @} */

View File

@@ -0,0 +1,10 @@
###############################################################################
#
#
#
###############################################################################
THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
x86_64_cel_redstone_xp_INCLUDES := -I $(THIS_DIR)inc
x86_64_cel_redstone_xp_INTERNAL_INCLUDES := -I $(THIS_DIR)src
x86_64_cel_redstone_xp_DEPENDMODULE_ENTRIES := init:x86_64_cel_redstone_xp ucli:x86_64_cel_redstone_xp

View File

@@ -0,0 +1,9 @@
###############################################################################
#
# Local source generation targets.
#
###############################################################################
ucli:
@../../../../tools/uclihandlers.py x86_64_cel_redstone_xp_ucli.c

View File

@@ -0,0 +1,9 @@
###############################################################################
#
#
#
###############################################################################
LIBRARY := x86_64_cel_redstone_xp
$(LIBRARY)_SUBDIR := $(dir $(lastword $(MAKEFILE_LIST)))
include $(BUILDER)/lib.mk

View File

@@ -0,0 +1,76 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
/* <auto.start.cdefs(X86_64_CEL_REDSTONE_XP_CONFIG_HEADER).source> */
#define __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(_x) #_x
#define __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(_x) __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(_x)
x86_64_cel_redstone_xp_config_settings_t x86_64_cel_redstone_xp_config_settings[] =
{
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
#ifdef X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI
{ __x86_64_cel_redstone_xp_config_STRINGIFY_NAME(X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI), __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE(X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI) },
#else
{ X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI(__x86_64_cel_redstone_xp_config_STRINGIFY_NAME), "__undefined__" },
#endif
{ NULL, NULL }
};
#undef __x86_64_cel_redstone_xp_config_STRINGIFY_VALUE
#undef __x86_64_cel_redstone_xp_config_STRINGIFY_NAME
const char*
x86_64_cel_redstone_xp_config_lookup(const char* setting)
{
int i;
for(i = 0; x86_64_cel_redstone_xp_config_settings[i].name; i++) {
if(strcmp(x86_64_cel_redstone_xp_config_settings[i].name, setting)) {
return x86_64_cel_redstone_xp_config_settings[i].value;
}
}
return NULL;
}
int
x86_64_cel_redstone_xp_config_show(struct aim_pvs_s* pvs)
{
int i;
for(i = 0; x86_64_cel_redstone_xp_config_settings[i].name; i++) {
aim_printf(pvs, "%s = %s\n", x86_64_cel_redstone_xp_config_settings[i].name, x86_64_cel_redstone_xp_config_settings[i].value);
}
return i;
}
/* <auto.end.cdefs(X86_64_CEL_REDSTONE_XP_CONFIG_HEADER).source> */

View File

@@ -0,0 +1,10 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
/* <--auto.start.enum(ALL).source> */
/* <auto.end.enum(ALL).source> */

View File

@@ -0,0 +1,12 @@
/**************************************************************************//**
*
* x86_64_cel_redstone_xp Internal Header
*
*****************************************************************************/
#ifndef __X86_64_CEL_REDSTONE_XP_INT_H__
#define __X86_64_CEL_REDSTONE_XP_INT_H__
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
#endif /* __X86_64_CEL_REDSTONE_XP_INT_H__ */

View File

@@ -0,0 +1,18 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
#include "x86_64_cel_redstone_xp_log.h"
/*
* x86_64_cel_redstone_xp log struct.
*/
AIM_LOG_STRUCT_DEFINE(
X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT,
X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT,
NULL, /* Custom log map */
X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT
);

View File

@@ -0,0 +1,12 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#ifndef __X86_64_CEL_REDSTONE_XP_LOG_H__
#define __X86_64_CEL_REDSTONE_XP_LOG_H__
#define AIM_LOG_MODULE_NAME x86_64_cel_redstone_xp
#include <AIM/aim_log.h>
#endif /* __X86_64_CEL_REDSTONE_XP_LOG_H__ */

View File

@@ -0,0 +1,24 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
#include "x86_64_cel_redstone_xp_log.h"
static int
datatypes_init__(void)
{
#define X86_64_CEL_REDSTONE_XP_ENUMERATION_ENTRY(_enum_name, _desc) AIM_DATATYPE_MAP_REGISTER(_enum_name, _enum_name##_map, _desc, AIM_LOG_INTERNAL);
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp.x>
return 0;
}
void __x86_64_cel_redstone_xp_module_init__(void)
{
AIM_LOG_STRUCT_REGISTER();
datatypes_init__();
}
int __onlp_platform_version__ = 1;

View File

@@ -0,0 +1,50 @@
/**************************************************************************//**
*
*
*
*****************************************************************************/
#include <x86_64_cel_redstone_xp/x86_64_cel_redstone_xp_config.h>
#if X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI == 1
#include <uCli/ucli.h>
#include <uCli/ucli_argparse.h>
#include <uCli/ucli_handler_macros.h>
static ucli_status_t
x86_64_cel_redstone_xp_ucli_ucli__config__(ucli_context_t* uc)
{
UCLI_HANDLER_MACRO_MODULE_CONFIG(x86_64_cel_redstone_xp)
}
/* <auto.ucli.handlers.start> */
/* <auto.ucli.handlers.end> */
static ucli_module_t
x86_64_cel_redstone_xp_ucli_module__ =
{
"x86_64_cel_redstone_xp_ucli",
NULL,
x86_64_cel_redstone_xp_ucli_ucli_handlers__,
NULL,
NULL,
};
ucli_node_t*
x86_64_cel_redstone_xp_ucli_node_create(void)
{
ucli_node_t* n;
ucli_module_init(&x86_64_cel_redstone_xp_ucli_module__);
n = ucli_node_create("x86_64_cel_redstone_xp", NULL, &x86_64_cel_redstone_xp_ucli_module__);
ucli_node_subnode_add(n, ucli_module_log_node_create("x86_64_cel_redstone_xp"));
return n;
}
#else
void*
x86_64_cel_redstone_xp_ucli_node_create(void)
{
return NULL;
}
#endif

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1,2 @@
!include $ONL_TEMPLATES/platform-config-platform.yml ARCH=amd64 VENDOR=celestica PLATFORM=x86-64-cel-redstone-xp-r0

View File

@@ -0,0 +1,21 @@
serial --port=0x3f8 --speed=115200 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial
set timeout=5
menuentry OpenNetworkLinux {
search --no-floppy --label --set=root ONL-BOOT
echo 'Loading Open Network Linux ...'
insmod gzio
insmod part_msdos
linux /kernel-3.2-deb7-x86_64-all nopat console=ttyS0,115200n8 onl_platform=x86-64-cel-redstone-xp-r0
initrd /initrd-amd64
}
# Menu entry to chainload ONIE
menuentry ONIE {
search --no-floppy --label --set=root ONIE-BOOT
echo 'Loading ONIE ...'
chainloader1
}

View File

@@ -0,0 +1,6 @@
echo "pci0000:00/0000:00:14.0 ma1" > /etc/onl/net
echo "LABEL=FLASH * flash" > /etc/onl/mounts
echo "LABEL=FLASH2 * flash2" >> /etc/onl/mounts

View File

@@ -0,0 +1,15 @@
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
# Platform data goes here.
platform_installer() {
# Standard isntallation to an available GPT partition
installer_standard_gpt_install /dev/sda
}

View File

@@ -0,0 +1,16 @@
from onl.platform.base import *
from onl.platform.celestica import *
class OnlPlatform_x86_64_cel_redstone_xp_r0(OnlPlatformCelestica):
def model(self):
return "Redstone XP"
def platform(self):
return "x86-64-cel-redstone-xp-r0"
def sys_oid_platform(self):
return ".2060.1"
def baseconfig(self):
return True