Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 1 | #Copyright 2018-present Open Networking Foundation |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 2 | # |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 3 | #Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | #you may not use this file except in compliance with the License. |
| 5 | #You may obtain a copy of the License at |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 6 | # |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 7 | #http://www.apache.org/licenses/LICENSE-2.0 |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 8 | # |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 9 | #Unless required by applicable law or agreed to in writing, software |
| 10 | #distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | #See the License for the specific language governing permissions and |
| 13 | #limitations under the License. |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 14 | |
| 15 | ######################################################################## |
| 16 | ## |
| 17 | ## |
Luca Prete | e75aaa5 | 2018-04-13 12:19:12 -0700 | [diff] [blame] | 18 | ## Config |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 19 | ## |
| 20 | ## |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 21 | TOP_DIR=$(shell pwd) |
Shad Ansari | 9acc973 | 2018-10-30 18:01:44 +0000 | [diff] [blame] | 22 | OPENOLTDEVICE ?= generic |
Craig Lutgen | 88a22ad | 2018-10-04 12:30:46 -0500 | [diff] [blame] | 23 | |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 24 | # |
| 25 | # Three vendor proprietary source files are required to build BAL. |
| 26 | # SW-BCM68620_<VER>.zip - Broadcom BAL source and Maple SDK. |
| 27 | # sdk-all-<SDK_VER>.tar.gz - Broadcom Qumran SDK. |
Craig Lutgen | f040dba | 2018-09-27 11:21:43 -0500 | [diff] [blame] | 28 | # ACCTON_BAL_<BAL_VER>-<DEV_VER>.patch - Accton/Edgecore's patch. |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 29 | BAL_MAJOR_VER = 3 |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 30 | BAL_MINOR_VER = 10 |
| 31 | BAL_REV_HOST_VER = 2 |
| 32 | BAL_REV_EMBEDDED_VER = 2 |
| 33 | BAL_API_SO_VER = $(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_HOST_VER) |
| 34 | BAL_VER = $(BAL_API_SO_VER).$(BAL_REV_EMBEDDED_VER) |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 35 | ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w")) |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 36 | DEV_VER = 202111040101 |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 37 | # Version of Open Network Linux (ONL). |
| 38 | ONL_KERN_VER_MAJOR = 4.19 |
| 39 | else |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 40 | DEV_VER = 202111040101 |
| 41 | API_VER = 202111090101 |
| 42 | # Version of Open Network Linux (ONL). |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 43 | ONL_KERN_VER_MAJOR = 4.14 |
| 44 | endif |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 45 | SDK_VER = 6.5.21 |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 46 | |
| 47 | # OpenOLT Proto version. |
| 48 | # This specifies the GIT tag in https://github.com/opencord/voltha-protos |
| 49 | # repo that we need to refer to, to pick the right version of |
| 50 | # openolt.proto and tech_profile.proto |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 51 | OPENOLT_PROTO_VER ?= v5.1.0 |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 52 | |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 53 | # Variables used for Inband build |
| 54 | INBAND = "n" |
| 55 | VLAN_ID = 4093 |
| 56 | |
Jason Huang | dc83ba7 | 2020-11-16 22:08:43 +0800 | [diff] [blame] | 57 | # NNI ports speed setting |
| 58 | PORT_100G_SPEED ?= 100000 |
| 59 | PORT_25G_SPEED ?= 25000 |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 60 | ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w")) |
| 61 | PORT_QSFP_SPEED ?= 40g |
| 62 | PORT_SFP_SPEED ?= 10g |
| 63 | else ifeq ("$(strip $(OPENOLTDEVICE))","rlt-1600x-w") |
| 64 | PORT_QSFP_SPEED ?= 100g |
| 65 | PORT_SFP_SPEED ?= 25g |
| 66 | endif |
Jason Huang | dc83ba7 | 2020-11-16 22:08:43 +0800 | [diff] [blame] | 67 | |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 68 | # Build directory |
| 69 | BUILD_DIR = build |
Girish Gowdra | ddf9a16 | 2020-01-27 12:56:27 +0530 | [diff] [blame] | 70 | |
Orhan Kupusoglu | ec57af0 | 2021-05-12 12:38:17 +0000 | [diff] [blame] | 71 | # Rx optical power test app |
| 72 | RXTX_POWER_EXE = read_rxtx_power |
| 73 | |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 74 | # initialiaze path of protoc binary |
Girish Gowdra | 489425a | 2020-02-22 13:07:42 +0530 | [diff] [blame] | 75 | protoc-bin = $(shell which protoc) |
Girish Gowdra | ddf9a16 | 2020-01-27 12:56:27 +0530 | [diff] [blame] | 76 | |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 77 | # initialiaze path of grpc_cpp_plugin binary |
Girish Gowdra | 489425a | 2020-02-22 13:07:42 +0530 | [diff] [blame] | 78 | grpc-cpp-plugin-bin = $(shell which grpc_cpp_plugin) |
Shad Ansari | 2cddc55 | 2018-06-26 20:34:27 +0000 | [diff] [blame] | 79 | |
| 80 | USER := $(shell echo $(USER)) |
Luca Prete | e75aaa5 | 2018-04-13 12:19:12 -0700 | [diff] [blame] | 81 | # |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 82 | ######################################################################## |
| 83 | ## |
| 84 | ## |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 85 | ## Initialize various build flags |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 86 | ## |
| 87 | ## |
| 88 | HOST_SYSTEM = $(shell uname | cut -f 1 -d_) |
| 89 | SYSTEM ?= $(HOST_SYSTEM) |
Luca Prete | e75aaa5 | 2018-04-13 12:19:12 -0700 | [diff] [blame] | 90 | |
Humera Kouser | 5ac5661 | 2019-07-25 20:23:01 -0400 | [diff] [blame] | 91 | VERSION ?= $(shell cat ../VERSION) |
| 92 | |
| 93 | #set ref and commit date only if committed |
| 94 | LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote)) |
| 95 | LABEL_VCS_REF = $(shell git rev-parse HEAD) |
| 96 | LABEL_BUILD_DATE ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ") |
| 97 | LABEL_COMMIT_DATE = $(shell git show -s --format=%cd --date=iso-strict HEAD) |
| 98 | |
Craig Lutgen | f040dba | 2018-09-27 11:21:43 -0500 | [diff] [blame] | 99 | LIBGRPC_PATH=$(shell pkg-config --libs-only-L grpc | sed s/-L// | sed s/\ //g) |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 100 | LIBZ_PATH=$(shell pkg-config --libs-only-L zlib | sed s/-L// | sed s/\ //g) |
Craig Lutgen | f040dba | 2018-09-27 11:21:43 -0500 | [diff] [blame] | 101 | LIBPROTOBUF_PATH=$(shell PKG_CONFIG_ALLOW_SYSTEM_LIBS=true pkg-config --libs-only-L protobuf | sed s/-L// | sed s/\ //g) |
| 102 | |
Girish Gowdra | 1935e6a | 2020-10-31 21:48:22 -0700 | [diff] [blame] | 103 | PCAPPLUSPLUS_INCLUDE_PATH=-I/usr/local/include/pcapplusplus/ |
| 104 | PCAPPLUSPLUS_LIB_PATH=-lPcap++ -lPacket++ -lCommon++ |
| 105 | |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 106 | ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w")) |
| 107 | CXX = @CXX@-6 |
| 108 | else |
| 109 | CXX = @CXX@-4.9 |
| 110 | endif |
Craig Lutgen | f040dba | 2018-09-27 11:21:43 -0500 | [diff] [blame] | 111 | CXXFLAGS += @CXXFLAGS@ |
| 112 | CXXFLAGS += $(shell pkg-config --cflags-only-I grpc++) |
Girish Gowdra | 1935e6a | 2020-10-31 21:48:22 -0700 | [diff] [blame] | 113 | CXXFLAGS += $(PCAPPLUSPLUS_INCLUDE_PATH) |
Humera Kouser | 5ac5661 | 2019-07-25 20:23:01 -0400 | [diff] [blame] | 114 | CPPFLAGS += @CPPFLAGS@ |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 115 | CPPFLAGS += `pkg-config --cflags protobuf grpc` |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 116 | |
| 117 | # Enabling SCALE_AND_PERF for higher performance and scaling to 512 subscribers. Enabling the flag will |
| 118 | # disable the handling in FLOW_CHECKER and also disable flow statistics |
Humera Kouser | 5ac5661 | 2019-07-25 20:23:01 -0400 | [diff] [blame] | 119 | CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBAL_VER=\"$(BAL_VER)\" -DLABEL_VCS_URL=\"$(LABEL_VCS_URL)\" \ |
| 120 | -DLABEL_VCS_REF=\"$(LABEL_VCS_REF)\" -DLABEL_BUILD_DATE=\"$(LABEL_BUILD_DATE)\" \ |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 121 | -DLABEL_COMMIT_DATE=\"$(LABEL_COMMIT_DATE)\" -DFLOW_CHECKER -USCALE_AND_PERF |
Humera Kouser | 6143c9e | 2020-06-17 22:37:31 +0530 | [diff] [blame] | 122 | CPPFLAGS += -I./ |
Craig Lutgen | 7ebee13 | 2018-11-16 15:31:11 -0600 | [diff] [blame] | 123 | CXXFLAGS += -std=c++11 -fpermissive -Wno-literal-suffix |
Craig Lutgen | f040dba | 2018-09-27 11:21:43 -0500 | [diff] [blame] | 124 | LDFLAGS += @LDFLAGS@ |
| 125 | LDFLAGS += `pkg-config --libs protobuf grpc++ grpc` -ldl -lgpr |
Shad Ansari | 9acc973 | 2018-10-30 18:01:44 +0000 | [diff] [blame] | 126 | CXXFLAGSDEVICE = -I./device -I./device/$(OPENOLTDEVICE) -I./device/generic |
Craig Lutgen | f040dba | 2018-09-27 11:21:43 -0500 | [diff] [blame] | 127 | |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 128 | export CXX CXXFLAGS OPENOLT_PROTO_VER |
Luca Prete | e75aaa5 | 2018-04-13 12:19:12 -0700 | [diff] [blame] | 129 | |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 130 | ######################################################################## |
| 131 | ## |
| 132 | ## |
Luca Prete | e75aaa5 | 2018-04-13 12:19:12 -0700 | [diff] [blame] | 133 | ## ONL |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 134 | ## |
| 135 | ## |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 136 | ONL_REPO = onl |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 137 | ONL_DIR = $(BUILD_DIR)/$(ONL_REPO) |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 138 | onl: |
| 139 | if [ ! -d "$(ONL_DIR)/OpenNetworkLinux" ]; then \ |
| 140 | mkdir -p $(ONL_DIR); \ |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 141 | git clone https://github.com/opencomputeproject/OpenNetworkLinux.git $(ONL_DIR)/OpenNetworkLinux; \ |
| 142 | cp download/Makefile.onl $(ONL_DIR)/Makefile; \ |
| 143 | install -m 755 download/build-onl.sh $(ONL_DIR)/OpenNetworkLinux; \ |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 144 | cp download/disable-certificate-validation*.patch $(ONL_DIR)/OpenNetworkLinux; \ |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 145 | if [ "$(OPENOLTDEVICE)" = "rlt-3200g-w" ] || [ "$(OPENOLTDEVICE)" = "rlt-1600g-w" ] || [ "$(OPENOLTDEVICE)" = "rlt-1600x-w" ]; \ |
| 146 | then \ |
Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 147 | cp $(TOP_DIR)/device/$(OPENOLTDEVICE)/update_kernel_options.sh $(ONL_DIR)/OpenNetworkLinux/.; \ |
| 148 | chmod 0755 $(ONL_DIR)/OpenNetworkLinux/update_kernel_options.sh; \ |
| 149 | fi; \ |
| 150 | make -C $(ONL_DIR) onl-$(ONL_KERN_VER_MAJOR) INBAND=n BOARD=$(OPENOLTDEVICE); \ |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 151 | else \ |
| 152 | if [ "$(INBAND)" = n -a "$$(grep "inband" $(ONL_DIR)/onl_build.mode | cut -d= -f 2)" = y ]; then \ |
| 153 | make -C $(ONL_DIR) onl-$(ONL_KERN_VER_MAJOR) INBAND=n; \ |
| 154 | fi; \ |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 155 | fi; |
| 156 | onl-force: |
Shad Ansari | 9acc973 | 2018-10-30 18:01:44 +0000 | [diff] [blame] | 157 | make -C $(ONL_DIR) $(OPENOLTDEVICE)-$(ONL_KERN_VER_MAJOR) |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 158 | distclean-onl: |
| 159 | sudo rm -rf $(ONL_DIR) |
| 160 | |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 161 | |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 162 | ######################################################################## |
| 163 | ## |
| 164 | ## |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 165 | ## Broadcom LIBRARY OSS API |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 166 | ## |
| 167 | ## |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 168 | BAL_API_DIR = $(TOP_DIR)/$(BUILD_DIR)/bal-oss-api-$(BAL_VER) |
| 169 | BAL_API_PATCH = ACCTON_BAL_API_$(BAL_VER)-V$(API_VER).patch |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 170 | |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 171 | $(BUILD_DIR)/libbal_host_api-oss.so: |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 172 | if [ ! -d "$(BAL_API_DIR)" ]; then \ |
| 173 | mkdir -p $(BAL_API_DIR); \ |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 174 | cd $(BAL_API_DIR); \ |
| 175 | git clone https://github.com/balapi/bal-sdk.git -b $(BAL_VER); \ |
| 176 | mv bal-sdk bal-sdk-$(BAL_VER); \ |
| 177 | cat $(TOP_DIR)/download/$(BAL_API_PATCH) | patch -p1 -d $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \ |
| 178 | cd $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \ |
| 179 | make BOARD=$(OPENOLTDEVICE); \ |
| 180 | cp build/fs/libbal_host_api-oss.$(BAL_API_SO_VER).so ../../../$(BUILD_DIR)/libbal_host_api-oss.so; \ |
| 181 | cp config/$(OPENOLTDEVICE)/bcm_config.h build/fs/include; \ |
| 182 | cd .. && ln -s bal-sdk-$(BAL_VER)/build/fs/include include; \ |
| 183 | cd; \ |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 184 | fi; |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 185 | |
| 186 | |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 187 | bal-api-clean: |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 188 | if [ -d "$(BAL_API_DIR)" ]; then \ |
| 189 | rm -rf $(BAL_API_DIR); \ |
| 190 | fi; |
| 191 | rm -rf $(BUILD_DIR)/libbal_host_api-oss.so |
| 192 | |
| 193 | ######################################################################## |
| 194 | # |
| 195 | # Choose api type: open api (api-oss) or proprietary api (api-nda-req) |
| 196 | BAL_API_TYPE = api-oss |
| 197 | #BAL_API_TYPE = api-nda-req |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 198 | |
| 199 | ######################################################################## |
| 200 | ## |
| 201 | ## |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 202 | ## BAL OSS API |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 203 | ## |
| 204 | ## |
Shad Ansari | 9acc973 | 2018-10-30 18:01:44 +0000 | [diff] [blame] | 205 | BAL_DIR = $(BUILD_DIR)/$(OPENOLTDEVICE)-bal |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 206 | BALLIBDIR = $(BUILD_DIR) |
| 207 | BALLIBNAME = bal_host_$(BAL_API_TYPE) |
| 208 | BAL_INC = -I$(BAL_API_DIR)/include |
| 209 | CXXFLAGS += $(BAL_INC) |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 210 | CXXFLAGS += -DBCMOS_MSG_QUEUE_DOMAIN_SOCKET -DBCMOS_MSG_QUEUE_UDP_SOCKET -DBCMOS_MEM_CHECK -DBCMOS_SYS_UNITTEST -DENABLE_LOG -DENABLE_CLI |
Jason Huang | dc83ba7 | 2020-11-16 22:08:43 +0800 | [diff] [blame] | 211 | PORT_SPEED_FILE = $(BAL_DIR)/switch_sdk/$(SDK_VER)/rc/$(OPENOLTDEVICE)/board_files/broadcom/port_speed.soc |
Shad Ansari | cb004c5 | 2018-05-30 18:07:23 +0000 | [diff] [blame] | 212 | |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 213 | ######################################################################## |
| 214 | ## |
| 215 | ## BAL proprietary elements - NDA is required with Broadcom |
| 216 | ## |
| 217 | ## For Accton patch - contact Accton corporation |
| 218 | ## |
| 219 | ## Not required when building the OpenOLT agent from github source |
| 220 | ## |
| 221 | ## !!!NOTE: libbal_host_api-nda_req.so is proprietary and must not be |
| 222 | ## published in any open debian package or otherwise made |
| 223 | ## available to third parties that do not have an SLA and |
| 224 | ## NDA with Broadcom |
| 225 | ## |
| 226 | BAL_SDK_ZIP = SW-BCM686OLT_$(subst .,_,$(BAL_VER)).tgz |
| 227 | CSG_SDK_ZIP = sdk-all-$(SDK_VER).tar.gz |
| 228 | ACCTON_PATCH = ACCTON_BAL_$(BAL_VER)-V$(DEV_VER).patch |
| 229 | BROADCOM_IP_PATCH = ACCTON_BAL_$(BAL_VER)-V$(DEV_VER)-BROADCOM-IP.patch |
| 230 | BCM_SWITCH_SDK = $(BAL_DIR)/switch_sdk/$(SDK_VER) |
| 231 | |
| 232 | sdk: onl |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 233 | ifeq ("$(wildcard $(BAL_DIR))","") |
| 234 | mkdir $(BAL_DIR) |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 235 | tar zxvf download/$(BAL_SDK_ZIP) --strip 1 -C $(BAL_DIR) |
| 236 | cp download/$(CSG_SDK_ZIP) $(BCM_SWITCH_SDK) |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 237 | chmod -R 744 $(BAL_DIR) |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 238 | cat download/$(ACCTON_PATCH) | patch -p1 -d $(BAL_DIR) |
| 239 | cat download/$(BROADCOM_IP_PATCH) | patch -p1 -d $(BAL_DIR) |
| 240 | |
Jason Huang | dc83ba7 | 2020-11-16 22:08:43 +0800 | [diff] [blame] | 241 | ifeq ("$(strip $(OPENOLTDEVICE))","asfvolt16") |
| 242 | echo "setenv port_speed_for_100 $(PORT_100G_SPEED)" > $(PORT_SPEED_FILE) |
| 243 | else ifeq ("$(strip $(OPENOLTDEVICE))","asgvolt64") |
| 244 | echo "setenv port_speed_for_100 $(PORT_100G_SPEED)" > $(PORT_SPEED_FILE) |
| 245 | echo "setenv port_speed_for_25 $(PORT_25G_SPEED)" >> $(PORT_SPEED_FILE) |
| 246 | endif |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 247 | |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 248 | ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w")) |
Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 249 | chmod 0755 $(BAL_DIR)/onu_mgmt/libomcistack/me_codegen/omci_stack_codegen |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 250 | make -C $(BAL_DIR) BOARD=phoenix ONL=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux ONL_DEBIAN_SUITE=$(shell lsb_release -c -s) |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 251 | make -C $(BAL_DIR) BOARD=phoenix release_board |
Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 252 | else |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 253 | make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) ONL_DIR=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 254 | make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) release_board |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 255 | endif |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 256 | endif |
Shad Ansari | cb004c5 | 2018-05-30 18:07:23 +0000 | [diff] [blame] | 257 | |
Shad Ansari | cb004c5 | 2018-05-30 18:07:23 +0000 | [diff] [blame] | 258 | bal-clean: |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 259 | make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) clean_all |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 260 | |
| 261 | ######################################################################## |
| 262 | ## |
| 263 | ## |
Luca Prete | e75aaa5 | 2018-04-13 12:19:12 -0700 | [diff] [blame] | 264 | ## OpenOLT API |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 265 | ## |
| 266 | ## |
Shad Ansari | 56c8ea4 | 2018-10-30 19:34:35 +0000 | [diff] [blame] | 267 | OPENOLT_PROTOS_DIR = ../protos |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 268 | OPENOLT_API_LIB = $(OPENOLT_PROTOS_DIR)/libopenoltapi.a |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 269 | CXXFLAGS += -I$(OPENOLT_PROTOS_DIR) -I./device -I./device/$(OPENOLTDEVICE) -I$(OPENOLT_PROTOS_DIR)/googleapis/gens |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 270 | protos: |
| 271 | make -C $(OPENOLT_PROTOS_DIR) all |
Shad Ansari | cc01de1 | 2018-05-21 22:54:45 +0000 | [diff] [blame] | 272 | protos-clean: |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 273 | -make -C $(OPENOLT_PROTOS_DIR) clean |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 274 | |
| 275 | ######################################################################## |
| 276 | ## |
| 277 | ## |
Shad Ansari | 627b578 | 2018-08-13 22:49:32 +0000 | [diff] [blame] | 278 | ## common |
Shad Ansari | 7193ae2 | 2018-08-08 22:23:18 +0000 | [diff] [blame] | 279 | ## |
| 280 | ## |
Girish Gowdra | fe64970 | 2019-10-30 12:49:58 +0530 | [diff] [blame] | 281 | |
| 282 | # A hack to force a re-build of common/main.cc everytime. |
| 283 | # This is needed to bake in the git VCS information in the openolt binary |
| 284 | # at the time of building the openolt package. |
| 285 | common/main.o: .FORCE |
| 286 | .FORCE: |
| 287 | $(CXX) $(CXXFLAGS) $(CPPFLAGS) -I./common -c common/main.cc -o common/main.o |
| 288 | |
Shad Ansari | 627b578 | 2018-08-13 22:49:32 +0000 | [diff] [blame] | 289 | common/%.o: common/%.cc |
Humera Kouser | 5ac5661 | 2019-07-25 20:23:01 -0400 | [diff] [blame] | 290 | $(CXX) $(CXXFLAGS) $(CPPFLAGS) -I./common -c $< -o $@ |
Shad Ansari | 7193ae2 | 2018-08-08 22:23:18 +0000 | [diff] [blame] | 291 | |
| 292 | ######################################################################## |
| 293 | ## |
| 294 | ## |
Craig Lutgen | 88a22ad | 2018-10-04 12:30:46 -0500 | [diff] [blame] | 295 | ## device |
| 296 | ## |
| 297 | ## |
Shad Ansari | 9acc973 | 2018-10-30 18:01:44 +0000 | [diff] [blame] | 298 | device/$(OPENOLTDEVICE)/%.o: device/$(OPENOLTDEVICE)/%.cc |
Craig Lutgen | 88a22ad | 2018-10-04 12:30:46 -0500 | [diff] [blame] | 299 | $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) -c $< -o $@ |
| 300 | |
| 301 | device/generic/%.o: device/generic/%.cc |
| 302 | $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) -c $< -o $@ |
| 303 | |
| 304 | ######################################################################## |
| 305 | ## |
| 306 | ## |
Shad Ansari | 627b578 | 2018-08-13 22:49:32 +0000 | [diff] [blame] | 307 | ## openolt |
| 308 | ## |
| 309 | ## |
Humera Kouser | 9c2bd9f | 2020-09-25 02:41:29 -0400 | [diff] [blame] | 310 | OLT_SW_UPGRADE_DIR = ../olt-sw-upgrade |
Shad Ansari | 9acc973 | 2018-10-30 18:01:44 +0000 | [diff] [blame] | 311 | SRCS = $(wildcard src/*.cc) $(wildcard common/*.cc) $(wildcard device/$(OPENOLTDEVICE)/*.cc) |
Humera Kouser | 9c2bd9f | 2020-09-25 02:41:29 -0400 | [diff] [blame] | 312 | ANSIBLE_DIR = /etc/ansible |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 313 | OBJS = $(SRCS:.cc=.o) |
| 314 | DEPS = $(SRCS:.cc=.d) |
| 315 | .DEFAULT_GOAL := all |
Shad Ansari | 2ae2767 | 2019-05-09 00:26:34 +0000 | [diff] [blame] | 316 | all: $(BUILD_DIR)/openolt |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 317 | $(BUILD_DIR)/openolt: $(BUILD_DIR)/lib$(BALLIBNAME).so sdk protos $(OBJS) |
Girish Gowdra | 1935e6a | 2020-10-31 21:48:22 -0700 | [diff] [blame] | 318 | $(CXX) $(LDFLAGS) -L$(BALLIBDIR) $(OBJS) $(OPENOLT_API_LIB) $(LIBPROTOBUF_PATH)/libprotobuf.a -o $@ -l$(BALLIBNAME) $(shell pkg-config --libs protobuf grpc++ grpc) $(PCAPPLUSPLUS_LIB_PATH) |
Jason Huang | 09b73ea | 2020-01-08 17:52:05 +0800 | [diff] [blame] | 319 | ln -sf $(TOP_DIR)/$(BAL_DIR)/build/fs/$(OPENOLTDEVICE)/release/release_$(OPENOLTDEVICE)_V$(BAL_VER).$(DEV_VER).tar.gz $(BUILD_DIR)/. |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 320 | ln -sf $(LIBGRPC_PATH)/libz.so.1 $(BUILD_DIR)/libz.so.1 |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 321 | ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(BUILD_DIR)/libstdc++.so.6 |
| 322 | strip $(BUILD_DIR)/openolt |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 323 | echo "inband=n" > $(ONL_DIR)/onl_build.mode |
| 324 | if [ $(INBAND) = y ]; then \ |
| 325 | echo "Building ONL+BAL+OpenoltAgent allinone image"; \ |
| 326 | make deb; \ |
| 327 | make inband-onl; \ |
| 328 | fi; |
| 329 | |
Shad Ansari | 627b578 | 2018-08-13 22:49:32 +0000 | [diff] [blame] | 330 | src/%.o: src/%.cc |
Humera Kouser | 5ac5661 | 2019-07-25 20:23:01 -0400 | [diff] [blame] | 331 | $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) $(CPPFLAGS) -I./common -c $< -o $@ |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 332 | |
Orhan Kupusoglu | ec57af0 | 2021-05-12 12:38:17 +0000 | [diff] [blame] | 333 | deb: rxtx-power |
Jason Huang | 09b73ea | 2020-01-08 17:52:05 +0800 | [diff] [blame] | 334 | cp $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_VER).$(DEV_VER).tar.gz device/$(OPENOLTDEVICE)/mkdebian/debian |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 335 | cp $(BUILD_DIR)/openolt device/$(OPENOLTDEVICE)/mkdebian/debian |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 336 | cp $(BUILD_DIR)/libz.so.1 device/$(OPENOLTDEVICE)/mkdebian/debian |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 337 | cp $(BUILD_DIR)/libstdc++.so.6 device/$(OPENOLTDEVICE)/mkdebian/debian |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 338 | cp $(BUILD_DIR)/libbal_host_api-oss.so device/$(OPENOLTDEVICE)/mkdebian/debian |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 339 | cp -a scripts/init.d device/$(OPENOLTDEVICE)/mkdebian/debian |
Orhan Kupusoglu | ec57af0 | 2021-05-12 12:38:17 +0000 | [diff] [blame] | 340 | cp -a $(RXTX_POWER_EXE) device/$(OPENOLTDEVICE)/mkdebian/debian |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 341 | ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w")) |
| 342 | sed -i '/\/opt\/bcm68650\/svk_init.sh/c\ \/opt\/bcm68650\/svk_init.sh -qsfp_speed=$(PORT_QSFP_SPEED) -sfp_speed=$(PORT_SFP_SPEED)' device/$(OPENOLTDEVICE)/mkdebian/debian/init.d/dev_mgmt_daemon |
Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 343 | endif |
Girish Gowdra | 6e74552 | 2020-07-15 15:52:13 -0700 | [diff] [blame] | 344 | cp -a scripts/watchdog device/$(OPENOLTDEVICE)/mkdebian/debian |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 345 | cd device/$(OPENOLTDEVICE)/mkdebian && ./build_$(OPENOLTDEVICE)_deb.sh |
Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 346 | mv device/$(OPENOLTDEVICE)/$(OPENOLTDEVICE)_*.deb $(BUILD_DIR)/openolt_$(OPENOLTDEVICE)-$(VERSION)-$(LABEL_VCS_REF).deb |
Shad Ansari | cb004c5 | 2018-05-30 18:07:23 +0000 | [diff] [blame] | 347 | make deb-cleanup |
Shad Ansari | 6cd46a6 | 2018-05-13 23:20:51 +0000 | [diff] [blame] | 348 | |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 349 | inband-onl: |
| 350 | # Clean previous ONL build and build freshly |
| 351 | sudo rm -rf $(ONL_DIR) |
| 352 | mkdir -p $(ONL_DIR) |
| 353 | git clone https://github.com/opencomputeproject/OpenNetworkLinux.git $(ONL_DIR)/OpenNetworkLinux |
| 354 | cp download/Makefile.onl $(ONL_DIR)/Makefile |
| 355 | install -m 755 download/build-onl.sh $(ONL_DIR)/OpenNetworkLinux |
| 356 | |
| 357 | # Check ONL commit equals to Inband patch commit |
| 358 | ONL_COMMIT_ID=$(awk \'/COMMIT_ID = /{print $0}\' $(ONL_DIR)/Makefile | awk -F \"=\" \'{print $2}\') |
| 359 | INBAND_PATCH_COMMIT_ID=$(echo cp $(TOP_DIR)/inband/patch/*.patch | cut -d- -f 2 | cut -d. -f 1) |
| 360 | if [ "$(ONL_COMMIT_ID)" = "$(INBAND_PATCH_COMMIT_ID)" ]; then \ |
| 361 | echo "ONL commit and inband patch commit matched."; \ |
| 362 | cp $(TOP_DIR)/inband/patch/*.patch $(ONL_DIR)/OpenNetworkLinux; \ |
Girish Gowdra | a164080 | 2021-11-24 20:24:38 -0800 | [diff] [blame] | 363 | cp $(TOP_DIR)/download/disable-certificate-validation-v*.patch $(ONL_DIR)/OpenNetworkLinux; \ |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 364 | else \ |
| 365 | echo "ONL commit and inband patch commit does not match. Exiting."; \ |
| 366 | exit 1; \ |
| 367 | fi; |
| 368 | |
Girish Gowdra | 6e74552 | 2020-07-15 15:52:13 -0700 | [diff] [blame] | 369 | # Update inband.config file with VLAN ID argument passed |
| 370 | sed -i 's/asfvolt16_vlan_id_eth2=.*/asfvolt16_vlan_id_eth2=$(VLAN_ID)/' $(TOP_DIR)/inband/config/inband.config |
| 371 | sed -i 's/asgvolt64_vlan_id_eth1=.*/asgvolt64_vlan_id_eth1=$(VLAN_ID)/' $(TOP_DIR)/inband/config/inband.config |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 372 | |
| 373 | # Copy Inband config files and olt startup scripts to ONL source code and build |
| 374 | cd $(TOP_DIR) && mkdir -p $(ONL_DIR)/OpenNetworkLinux/bal_packages |
| 375 | cp $(TOP_DIR)/inband/scripts/* $(ONL_DIR)/OpenNetworkLinux/bal_packages |
Girish Gowdra | 6e74552 | 2020-07-15 15:52:13 -0700 | [diff] [blame] | 376 | cp $(TOP_DIR)/inband/config/inband.config $(ONL_DIR)/OpenNetworkLinux/bal_packages |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 377 | cp $(BUILD_DIR)/openolt_$(OPENOLTDEVICE)-$(VERSION)-$(LABEL_VCS_REF).deb $(ONL_DIR)/OpenNetworkLinux/bal_packages/openolt_$(OPENOLTDEVICE).deb |
Humera Kouser | 9c2bd9f | 2020-09-25 02:41:29 -0400 | [diff] [blame] | 378 | cp $(OLT_SW_UPGRADE_DIR)/change_labels.sh $(ONL_DIR)/OpenNetworkLinux/bal_packages |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 379 | |
| 380 | # Rebuild ONL packed with already built BAL+Openolt debian package |
| 381 | make -C $(ONL_DIR) onl-$(ONL_KERN_VER_MAJOR) INBAND=y |
| 382 | echo "inband=y" > $(ONL_DIR)/onl_build.mode |
| 383 | make inband-onl-cleanup |
Humera Kouser | 9c2bd9f | 2020-09-25 02:41:29 -0400 | [diff] [blame] | 384 | # requires 'sudo' privileges |
| 385 | |
| 386 | ansible: |
| 387 | (ONL_INSTALLED_INSTALLER="$(shell find "$$(cd ./build/onl/OpenNetworkLinux/RELEASE/jessie/amd64; pwd)" -name "ONL-onl-*_AMD64_INSTALLED_INSTALLER")"; \ |
| 388 | rm -rf $(ANSIBLE_DIR)/roles/upgrade/files; \ |
| 389 | mkdir -p $(ANSIBLE_DIR)/roles/upgrade/files; \ |
| 390 | cp ../olt-sw-upgrade/install_onl.sh $(ANSIBLE_DIR)/roles/upgrade/files; \ |
| 391 | chmod +x $(ANSIBLE_DIR)/roles/upgrade/files/*.sh; \ |
| 392 | ln -s $$ONL_INSTALLED_INSTALLER $(ANSIBLE_DIR)/roles/upgrade/files/ONL_INSTALLED_INSTALLER) |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 393 | |
Shad Ansari | 01b0e65 | 2018-04-05 21:02:53 +0000 | [diff] [blame] | 394 | src/%.o: %.cpp |
| 395 | $(CXX) -MMD -c $< -o $@ |
| 396 | |
Orhan Kupusoglu | ec57af0 | 2021-05-12 12:38:17 +0000 | [diff] [blame] | 397 | rxtx-power: clean-rxtx-power |
| 398 | $(CXX) -std=c++11 -DRXTX_POWER_EXE_MODE src/trx_eeprom_reader.cc -o $(RXTX_POWER_EXE) && ls -l $(RXTX_POWER_EXE) |
| 399 | |
| 400 | deb-cleanup: clean-rxtx-power |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 401 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).debhelper.log |
| 402 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).postinst.debhelper |
| 403 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).postrm.debhelper |
| 404 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).substvars |
| 405 | @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE)/ |
| 406 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/debhelper-build-stamp |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 407 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libz.so.1 |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 408 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libstdc++.so.6 |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 409 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libbal_host_api-oss.so |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 410 | @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/init.d/ |
| 411 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/openolt |
Jason Huang | 09b73ea | 2020-01-08 17:52:05 +0800 | [diff] [blame] | 412 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/release_$(OPENOLTDEVICE)_V$(BAL_VER).$(DEV_VER).tar.gz |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 413 | @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/tmp/ |
| 414 | @rm -f device/$(OPENOLTDEVICE)/$(OPENOLTDEVICE)_$(BAL_VER)+edgecore-V$(DEV_VER)_amd64.changes |
Orhan Kupusoglu | ec57af0 | 2021-05-12 12:38:17 +0000 | [diff] [blame] | 415 | @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(RXTX_POWER_EXE) |
Girish Gowdra | b8c09fa | 2021-08-02 10:22:59 -0700 | [diff] [blame] | 416 | @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/watchdog/ |
Shad Ansari | cc01de1 | 2018-05-21 22:54:45 +0000 | [diff] [blame] | 417 | |
Thiyagarajan Subramani | e84935d | 2020-04-23 17:45:44 +0530 | [diff] [blame] | 418 | inband-onl-cleanup: |
| 419 | @rm -f $(ONL_DIR)/OpenNetworkLinux/*.patch |
| 420 | @rm -rf $(ONL_DIR)/OpenNetworkLinux/bal_packages |
| 421 | |
Shad Ansari | cb004c5 | 2018-05-30 18:07:23 +0000 | [diff] [blame] | 422 | clean: protos-clean deb-cleanup |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 423 | @rm -f $(OBJS) $(DEPS) |
| 424 | @rm -rf $(OPENOLT_PROTOS_DIR)/googleapis |
Girish Gowdra | 252f497 | 2020-09-07 21:24:01 -0700 | [diff] [blame] | 425 | @rm -f $(BUILD_DIR)/libz.so.1 |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 426 | @rm -f $(BUILD_DIR)/libbal_host_api-oss.so |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 427 | @rm -f $(BUILD_DIR)/openolt |
Girish Gowdra | ab7ea55 | 2020-01-07 13:25:15 +0530 | [diff] [blame] | 428 | @rm -f $(BUILD_DIR)/dev_mgmt_daemon |
Jason Huang | 09b73ea | 2020-01-08 17:52:05 +0800 | [diff] [blame] | 429 | @rm -f $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_VER).$(DEV_VER).tar.gz |
Girish Gowdra | bc6e085 | 2020-03-26 11:36:12 -0700 | [diff] [blame] | 430 | @rm -f $(BUILD_DIR)/openolt_$(OPENOLTDEVICE)-$(VERSION)-$(LABEL_VCS_REF).deb |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 431 | |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 432 | clean-src: protos-clean |
| 433 | @rm -f $(OBJS) $(DEPS) |
| 434 | |
Orhan Kupusoglu | ec57af0 | 2021-05-12 12:38:17 +0000 | [diff] [blame] | 435 | clean-rxtx-power: |
| 436 | @rm -f src/$(RXTX_POWER_EXE) |
| 437 | @rm -f $(RXTX_POWER_EXE) |
| 438 | |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 439 | distclean: clean-src clean |
| 440 | @rm -rf $(BUILD_DIR) |
Shad Ansari | cb004c5 | 2018-05-30 18:07:23 +0000 | [diff] [blame] | 441 | |
Humera Kouser | 9c2bd9f | 2020-09-25 02:41:29 -0400 | [diff] [blame] | 442 | .PHONY: onl sdk bal protos inband-onl ansible .FORCE |