Merge pull request #584 from opencomputeproject/platform-reorg

Platform Common Reorganization
This commit is contained in:
Jeffrey Townsend
2019-07-15 12:45:25 -07:00
committed by GitHub
5431 changed files with 8368 additions and 17442 deletions

View File

@@ -0,0 +1,16 @@
############################################################
#
# Add additional dev tools.
#
############################################################
FROM opennetworklinux/builder9:1.4
MAINTAINER Jeffrey Townsend <jeffrey.townsend@bigswitch.com>
RUN apt-get update && apt-get upgrade -y
RUN xapt -a arm64 libedit-dev ncurses-dev libsensors4-dev libwrap0-dev libssl-dev libsnmp-dev
#
# Docker shell and other container tools.
#
COPY docker_shell /bin/docker_shell
COPY container-id /bin/container-id

View File

@@ -0,0 +1,19 @@
VERSION=1.5
USER=opennetworklinux
REPO=builder9
TOOLS=../../../tools/docker_shell ../../../tools/container-id
build: check_version
cp $(TOOLS) .
docker build -t $(USER)/$(REPO):$(VERSION) .
rm -rf $(notdir $(TOOLS))
#
# Todo: Query remote repository to see if the request version already exists to avoid accidental overwrites
# when a new image is built but the VERSION variable is not updated.
#
check_version:
push:
docker push $(USER)/$(REPO):$(VERSION)

View File

@@ -19,7 +19,7 @@ g_timestamp = datetime.datetime.now().strftime("%Y-%m-%d.%H%M%S")
g_builder7_image_name="opennetworklinux/builder7:1.2"
g_builder8_image_name="opennetworklinux/builder8:1.10"
g_builder9_image_name="opennetworklinux/builder9:1.4"
g_builder9_image_name="opennetworklinux/builder9:1.5"
g_default_image_name=g_builder8_image_name
g_default_container_name = "%s_%s" % (g_current_user, g_timestamp)

View File

@@ -0,0 +1,2 @@
DIRECTORIES := lib onlps
include $(ONL)/make/subdirs.mk

View File

@@ -0,0 +1,32 @@
ifndef PLATFORM
$(error $$PLATFORM not set)
endif
ifndef ARCH
# Determine ARCH from platform name
ifeq ($(findstring x86-64-,$(PLATFORM)),x86-64-)
ARCH := amd64
endif
ifeq ($(findstring powerpc-,$(PLATFORM)),powerpc-)
ARCH := powerpc
endif
ifeq ($(findstring arm-,$(PLATFORM)),arm-)
ARCH := armel
endif
ifeq ($(findstring arm64-,$(PLATFORM)),arm64-)
ARCH := arm64
endif
endif
ifndef ARCH
$(error $$ARCH not set and the architecture cannot be determined from the given platform name ($(PLATFORM)))
endif
ifndef PLATFORM_MODULE
PLATFORM_MODULE := $(subst -,_,$(PLATFORM))
endif
include $(ONL)/make/config.$(ARCH).mk

View File

@@ -1,7 +1,7 @@
############################################################
# <bsn.cl fy=2014 v=onl>
#
# Copyright 2014 BigSwitch Networks, Inc.
# Copyright 2014-2018 BigSwitch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
@@ -18,20 +18,17 @@
#
# </bsn.cl>
############################################################
#
#
############################################################
include $(ONL)/make/config.armel.mk
include $(ONL)/packages/base/any/onlp/builds/platform/common.mk
MODULE := libonlp-arm-accton-as4610-30
MODULE := libonlp-$(PLATFORM)
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF arm_accton_as4610 onlplib
DEPENDMODULE_HEADERS := sff
DEPENDMODULES := AIM IOF onlplib $(DEPENDMODULES) $(PLATFORM_MODULE) $(EXTRA_MODULES)
DEPENDMODULE_HEADERS := $(DEPENDMODULE_HEADERS) sff
include $(BUILDER)/dependmodules.mk
SHAREDLIB := libonlp-arm-accton-as4610-30.so
SHAREDLIB := libonlp-$(PLATFORM).so
$(SHAREDLIB)_TARGETS := $(ALL_TARGETS)
include $(BUILDER)/so.mk
.DEFAULT_GOAL := $(SHAREDLIB)

View File

@@ -1,7 +1,7 @@
############################################################
# <bsn.cl fy=2014 v=onl>
#
# Copyright 2014 BigSwitch Networks, Inc.
# Copyright 2014-2018 BigSwitch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
@@ -18,28 +18,26 @@
#
# </bsn.cl>
############################################################
#
#
#
############################################################
include $(ONL)/make/config.armhf.mk
include $(ONL)/packages/base/any/onlp/builds/platform/common.mk
.DEFAULT_GOAL := onlpdump
.DEFAULT_GOAL := onlps
MODULE := onlpdump
MODULE := onlps
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF onlp arm_accton_as4610 onlplib onlp_platform_defaults sff cjson cjson_util timer_wheel OS
DEPENDMODULES := $(DEPENDMODULES) AIM IOF onlp onlplib $(PLATFORM_MODULE) onlp_platform_defaults sff cjson cjson_util timer_wheel OS uCli ELS $(EXTRA_MODULES)
include $(BUILDER)/dependmodules.mk
BINARY := onlpdump
BINARY := onlps
$(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
GLOBAL_CFLAGS += -DUCLI_CONFIG_INCLUDE_ELS_LOOP=1
GLOBAL_CFLAGS += -DONLP_CONFIG_INCLUDE_UCLI=1
GLOBAL_LINK_LIBS += -lpthread -lm -ledit
include $(BUILDER)/targets.mk

View File

@@ -23,6 +23,6 @@ packages:
files:
builds/lib/$BUILD_DIR/$TOOLCHAIN/bin/libonlp-${PLATFORM}.so : ${install}/lib/
builds/onlpdump/$BUILD_DIR/$TOOLCHAIN/bin/onlpdump : ${install}/bin/
builds/onlpdump/$BUILD_DIR/$TOOLCHAIN/bin/onlps : ${install}/bin/onlpdump
changelog: Change changes changes.,

3
packages/platforms/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
onlpdump.mk
onlps.mk
libonlp-*.mk

View File

@@ -1,45 +0,0 @@
############################################################
# <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.armel.mk
.DEFAULT_GOAL := onlpdump
MODULE := onlpdump
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF onlp arm_accton_as4610 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

@@ -1,44 +0,0 @@
############################################################
# <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.armel.mk
MODULE := libonlp-arm-accton-as4610-54
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF arm_accton_as4610 onlplib
DEPENDMODULE_HEADERS := sff
include $(BUILDER)/dependmodules.mk
SHAREDLIB := libonlp-arm-accton-as4610-54.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

@@ -1,45 +0,0 @@
############################################################
# <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.armel.mk
.DEFAULT_GOAL := onlpdump
MODULE := onlpdump
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF onlp arm_accton_as4610 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,3 @@
PLATFORM := arm-accton-as4610-30
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk

View File

@@ -0,0 +1,3 @@
PLATFORM := arm-accton-as4610-30
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk

View File

@@ -0,0 +1,3 @@
PLATFORM := arm-accton-as4610-54
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk

View File

@@ -0,0 +1,3 @@
PLATFORM := arm-accton-as4610-54
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk

View File

@@ -1,44 +0,0 @@
############################################################
# <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.armhf.mk
MODULE := libonlp-arm-accton-as4610-30
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF arm_accton_as4610 onlplib
DEPENDMODULE_HEADERS := sff
include $(BUILDER)/dependmodules.mk
SHAREDLIB := libonlp-arm-accton-as4610-30.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

@@ -1,44 +0,0 @@
############################################################
# <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.armhf.mk
MODULE := libonlp-arm-accton-as4610-54
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF arm_accton_as4610 onlplib
DEPENDMODULE_HEADERS := sff
include $(BUILDER)/dependmodules.mk
SHAREDLIB := libonlp-arm-accton-as4610-54.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

@@ -1,45 +0,0 @@
############################################################
# <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.armhf.mk
.DEFAULT_GOAL := onlpdump
MODULE := onlpdump
include $(BUILDER)/standardinit.mk
DEPENDMODULES := AIM IOF onlp arm_accton_as4610 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,4 @@
ARCH := armhf
PLATFORM := arm-accton-as4610-30
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk

View File

@@ -0,0 +1,4 @@
ARCH := armhf
PLATFORM := arm-accton-as4610-30
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk

View File

@@ -0,0 +1,4 @@
ARCH := armhf
PLATFORM := arm-accton-as4610-54
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk

View File

@@ -0,0 +1,4 @@
ARCH := armhf
PLATFORM := arm-accton-as4610-54
PLATFORM_MODULE := arm_accton_as4610
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk

Some files were not shown because too many files have changed in this diff Show More