-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.common
1202 lines (933 loc) · 32.2 KB
/
make.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# This makefile is included by most of the lower level makefiles
# to suck in the common defines.
#
#
# version.make has the 4.0.0 version number,
# each directory must set depth appropriately
#
include $(BUILD_DIR)/version.make
BRCM_RELEASETAG=$(BRCM_VERSION).$(BRCM_RELEASE)L.$(BRCM_EXTRAVERSION)
###########################################
# Define Basic Variables
#
###########################################
BL_BUILD_DIR=$(BUILD_DIR)/cfe/build/broadcom/bcm63xx_rom
KERNEL_VER = 2.6
ifeq ($(strip $(KERNEL_VER)),2.6)
INC_KERNEL_BASE = $(BUILD_DIR)/kernel
ORIGINAL_KERNEL = linuxmips.tar.bz2
endif
KERNEL_DIR = $(INC_KERNEL_BASE)/linux
BRCMDRIVERS_DIR = $(BUILD_DIR)/bcmdrivers
ORIGINAL_MDK = mdk212.tar.bz2
LINUXDIR = $(INC_KERNEL_BASE)/linux
HOSTTOOLS_DIR = $(BUILD_DIR)/hostTools
IMAGES_DIR = $(BUILD_DIR)/images
RELEASE_DIR = $(BUILD_DIR)/release
TARGETS_DIR = $(BUILD_DIR)/targets
DEFAULTCFG_DIR = $(TARGETS_DIR)/defaultcfg
FSSRC_DIR = $(TARGETS_DIR)/fs.src
CFE_FILE = $(TARGETS_DIR)/cfe/cfe$(BRCM_CHIP).bin
CFE_ROM_FILE = $(TARGETS_DIR)/cfe/cfe$(BRCM_CHIP)rom.bin
SHARED_DIR = $(BUILD_DIR)/shared
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
GENDEFCONFIG_CMD = $(HOSTTOOLS_DIR)/scripts/gendefconfig
6510_REF_CODE=$(BUILD_DIR)/userapps/broadcom/6510refCode
USERSPACE_PUBLIC_LIBS_DIR=$(BUILD_DIR)/userspace/public/libs
KERNEL_DEBUG=0
KERNEL_KALLSYMS=0
#
# This is for CMS
# We could put this in the make menuconfig, but it might
# confuse the users. For now, we only support one target OS.
# Everytime we see OALDIR, substitute it with linux
#
TARGET_OS = LINUX
OALDIR = $(subst LINUX,linux,$(strip $(TARGET_OS)))
export BL_BUILD_DIR KERNEL_VER KERNEL_DIR BRCMDRIVERS_DIR \
LINUXDIR HOSTTOOLS_DIR IMAGES_DIR TARGETS_DIR DEFAULTCFG_DIR \
FSSRC_DIR CFE_FILE SHARED_DIR GENDEFCONFIG_CMD \
6510_REF_CODE CMS_LOG_FLAGS OALDIR USERSPACE_PUBLIC_LIBS_DIR \
KERNEL_DEBUG
###########################################
#
# Import Build Profiles
#
###########################################
BRCM_BOARD=bcm963xx
#
# If we don't define a PROFILE, try to figure out what the last profile
# was and use that.
#
ifneq ($(MAKECMDGOALS), menuconfig)
LAST_PROFILE_COOKIE := $(BUILD_DIR)/.last_profile
LAST_PROFILE := $(strip $(shell cat $(LAST_PROFILE_COOKIE) 2>/dev/null))
ifeq ($(strip $(PROFILE)),)
PROFILE=$(LAST_PROFILE)
export PROFILE
endif
ifneq ($(strip $(PROFILE)),)
include $(TARGETS_DIR)/$(PROFILE)/$(PROFILE)
export BRCM_CHIP
export BRCM_FLASHPSI_SIZE
export BRCM_DRIVER_WIRELESS_PCMCIA_DATASWAP BRCM_DRIVER_WIRELESS_EBI_DMA
export BRCM_DRIVER_USB BRCM_DRIVER_ETHERNET_CONFIG BRCM_DRIVER_GPON BRCM_DRIVER_XTM
export BRCM_DRIVER_LOG BRCM_GPON_FPGA BRCM_DRIVER_I2C
export BRCM_DRIVER_PKTFLOW_DEBUG BRCM_DRIVER_PKTFLOW_IPV6 BRCM_DRIVER_PKTFLOW_MCAST
export BRCM_DRIVER_MoCA_CTP_CANDIDATE
export BRCM_DRIVER_ISDN
export BRCM_DEFAULTCFG
export BRCM_CERT_FILE
export BRCM_KERNEL_NF_FIREWALL BRCM_KERNEL_NF_MANGLE BRCM_KERNEL_NF_NAT
export BRCM_KERNEL_NF_NAT_ALG_FTP BRCM_KERNEL_NF_NAT_ALG_SIP BRCM_KERNEL_NF_NAT_ALG_TFTP BRCM_KERNEL_NF_NAT_ALG_H323 BRCM_KERNEL_NF_NAT_ALG_H323_SIGNAL_PROXY
export BRCM_KERNEL_NF_NAT_ALG_IRC BRCM_KERNEL_NF_NAT_ALG_WM BRCM_KERNEL_NF_NAT_ALG_PT BRCM_KERNEL_NF_NAT_ALG_PPTP BRCM_KERNEL_NF_NAT_ALG_IPSEC
export BRCM_KERNEL_NF_NAT_ALG_RTSP BRCM_KERNEL_NF_NAT_ALG_SNMP BRCM_KERNEL_NF_NAT_ALG_TALK
export BRCM_EXT_SWITCH BRCM_EXT_SWITCH_REV
endif
endif
#mwang: export everything we get from the profile file here.
#export all the BUILD_xxx here?
export DESKTOP_LINUX BRCM_BOARD BRCM_UCLIBC
export BUILD_HTTPD_SSL
export BUILD_WGET_HTTPS
###########################################
#
# Define Toolchain
#
###########################################
ifeq ($(strip $(BRCM_UCLIBC)),y)
NTC=1
ifeq ($(strip $(NTC)),1)
ifndef TOOLCHAIN
ifndef TOOLCHAIN_TOP
TOOLCHAIN_TOP = /opt/toolchains/uclibc-crosstools-gcc-4.4.2-1
endif
TOOLCHAIN = $(TOOLCHAIN_TOP)/usr
LIBDIR = $(TOOLCHAIN_TOP)/lib
USRLIBDIR = $(TOOLCHAIN_TOP)/usr/lib
EXTRALIBDIR = $(TOOLCHAIN_TOP)/usr/mips-linux-uclibc/lib
EXTRAINCDIR = $(TOOLCHAIN_TOP)/usr/lib/gcc/mips-linux-uclibc/4.4.2/include
LIB_PATH = $(TOOLCHAIN_TOP)/lib
LIBCDIR = $(TOOLCHAIN_TOP)/lib
ifndef NO_WERRS
export BRCM_WERROR_CFLAGS := -Werror=return-type -Werror=uninitialized -Werror=frame-larger-than=1024
else
export BRCM_WERROR_CFLAGS :=
endif
BRCM_COMMON_CFLAGS := -Os -march=mips32 -fomit-frame-pointer -fno-strict-aliasing -mabi=32 -G 0 -msoft-float -pipe -Wa,-mips32 $(BRCM_WERROR_CFLAGS)
export BRCM_APP_CFLAGS := $(BRCM_COMMON_CFLAGS) -mno-shared
export BRCM_SO_CFLAGS := $(BRCM_COMMON_CFLAGS)
endif
CROSS_COMPILE = $(TOOLCHAIN)/bin/mips-linux-uclibc-
else
TOOLCHAIN=/opt/toolchains/uclibc
CROSS_COMPILE = $(TOOLCHAIN)/bin/mips-uclibc-
endif
else
TOOLCHAIN=/usr/crossdev/mips
CROSS_COMPILE = $(TOOLCHAIN)/bin/mips-linux-
endif
ifeq ($(strip $(DESKTOP_LINUX)),y)
CROSS_COMPILE = /usr/bin/
endif
AR = $(CROSS_COMPILE)ar
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
CPP = $(CROSS_COMPILE)cpp
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
SSTRIP = $(CROSS_COMPILE)sstrip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
RANLIB = $(CROSS_COMPILE)ranlib
# If building on desktop, don't strip binaries
ifeq ($(strip $(DESKTOP_LINUX)),y)
STRIP = /bin/touch
SSTRIP = /bin/touch
endif
# If building on desktop, set LIBDIR for legacy makefiles
# that still use LIBDIR (e.g. zebra)
ifeq ($(strip $(DESKTOP_LINUX)),y)
LIB_PATH = /usr/lib
LIBDIR = /usr/lib
LIBCDIR = /usr/lib
endif
# STRIP is used to strip the kernel modules. Currently, there is no
# usage scenario which requires unstripped kernel modules.
# SSTRIP is used to strip userspace apps. If BUILD_GDBSERVER, then
# SSTRIP is set to /bin/touch, which tells buildFS to not sstrip the
# userspace binaries.
ifeq ($(strip $(BUILD_GDBSERVER)),y)
SSTRIP = /bin/touch
endif
export TOOLCHAIN_TOP TOOLCHAIN LEGACY_TOOLCHAIN CROSS_COMPILE \
AR AS LD CC CXX CPP NM STRIP SSTRIP OBJCOPY OBJDUMP RANLIB \
LIB_PATH LIBDIR USRLIBDIR EXTRALIBDIR EXTRAINCDIR LIBCDIR \
BUILD_GDBSERVER
###########################################
#
# Application-specific settings
#
###########################################
TARGET_FS = $(TARGETS_DIR)/$(PROFILE)/fs
PROFILE_DIR = $(TARGETS_DIR)/$(PROFILE)
INSTALL_DIR=$(PROFILE_DIR)/fs.install
PROFILE_PATH = $(TARGETS_DIR)/$(PROFILE)/$(PROFILE)
VENDOR_NAME = bcm
FS_KERNEL_IMAGE_NAME = $(VENDOR_NAME)$(PROFILE)_fs_kernel
CFE_FS_KERNEL_IMAGE_NAME = $(VENDOR_NAME)$(PROFILE)_cfe_fs_kernel
FLASH_IMAGE_NAME = $(VENDOR_NAME)$(PROFILE)_flash_image_$(BRCM_BOARD_ID)
FLASH_NAND_CFEROM_FS_IMAGE_NAME_16 = $(VENDOR_NAME)$(PROFILE)_nand_cferom_fs_image_16
FLASH_NAND_FS_IMAGE_NAME_16 = $(VENDOR_NAME)$(PROFILE)_nand_fs_image_16
FLASH_NAND_CFEROM_FS_IMAGE_NAME_128 = $(VENDOR_NAME)$(PROFILE)_nand_cferom_fs_image_128
FLASH_NAND_FS_IMAGE_NAME_128 = $(VENDOR_NAME)$(PROFILE)_nand_fs_image_128
FLASH_NAND_BLOCK_16KB=16384
FLASH_NAND_BLOCK_128KB=131072
INC_BRCMDRIVER_PUB_PATH=$(BRCMDRIVERS_DIR)/opensource/include
INC_BRCMDRIVER_PRIV_PATH=$(BRCMDRIVERS_DIR)/broadcom/include
INC_ADSLDRV_PATH=$(BRCMDRIVERS_DIR)/broadcom/char/adsl/impl1
INC_ATMAPI_DRV_PATH=$(BRCMDRIVERS_DIR)/broadcom/char/atmapi/impl1
INC_MOCACFGDRV_PATH=$(BRCMDRIVERS_DIR)/broadcom/char/moca/impl1
INC_BRCMSHARED_PUB_PATH=$(SHARED_DIR)/opensource/include
INC_BRCMSHARED_PRIV_PATH=$(SHARED_DIR)/broadcom/include
INC_BRCMBOARDPARMS_PATH=$(SHARED_DIR)/opensource/boardparms
INC_FLASH_PATH=$(SHARED_DIR)/opensource/flash
INC_UTILS_PATH=$(SHARED_DIR)/opensource/utils
INC_SPI_PATH=$(SHARED_DIR)/opensource/spi
INC_SPUDRV_PATH=$(BRCMDRIVERS_DIR)/broadcom/char/spudd/impl1
INC_PWRMNGTDRV_PATH=$(BRCMDRIVERS_DIR)/broadcom/char/pwrmngt/impl1
INC_ENETDRV_PATH=$(BRCMDRIVERS_DIR)/opensource/net/enet/impl4
INC_EPONDRV_PATH=$(BRCMDRIVERS_DIR)/broadcom/char/epon/impl1
export TARGET_FS PROFILE_DIR INSTALL_DIR PROFILE_PATH VENDOR_NAME \
FS_KERNEL_IMAGE_NAME CFE_FS_KERNEL_IMAGE_NAME FLASH_IMAGE_NAME \
INC_BRCMDRIVER_PUB_PATH INC_BRCMDRIVER_PRIV_PATH \
INC_ADSLDRV_PATH INC_ATMAPI_DRV_PATH \
INC_BRCMSHARED_PUB_PATH INC_BRCMSHARED_PRIV_PATH \
INC_BRCMBOARDPARMS_PATH INC_FLASH_PATH \
INC_UTILS_PATH \
INC_PWRMNGTDRV_PATH INC_ENETDRV_PATH INC_SPI_PATH
##################################################################
#
# Start CMS specific defines
#
##################################################################
ifeq ($(strip $(DESKTOP_LINUX)),y)
#Defines when are are building for Desktop Linux
ifdef BRCM_CMS_COMPILER_OPTS
CMS_COMPILER_OPTS := -Wall -W $(BRCM_CMS_COMPILER_OPTS) -DDESKTOP_LINUX -fPIC
else
# The -O is needed to detect uninitialized variables, but sometimes prevents
# gdb from printing out a variable value. So if you need to do some serious
# debugging, set BRCM_CMS_COMPILER_OPTS=-g in your shell.
CMS_COMPILER_OPTS := -Wall -W -O -g -DDESKTOP_LINUX -fPIC
endif
# Force 32 bit compiles even if the build machine is a 64 bit system
CMS_COMPILER_OPTS += -m32
CMS_COMMON_LIBS := -lcms_util -lcms_boardctl -lcrypt -lutil -lrt
CMS_LIB_RPATH = $(ALLOWED_LIB_DIRS):$(INSTALL_DIR)$(subst :,:$(INSTALL_DIR),$(ALLOWED_LIB_DIRS))
else
# Defines when we are building for flash
CMS_COMPILER_OPTS := $(BRCM_COMMON_CFLAGS) -Wall -Dmips -g -fPIC
CMS_COMMON_LIBS := -lcms_util -lcms_boardctl -lcrypt -lutil
CMS_LIB_RPATH =
endif
# This is the cms_core library plus all the libraries that libcms_core
# depend on.
CMS_CORE_LIBS := -lcms_core -lnanoxml -ldl -lmdm
ifneq ($(strip $(BRCM_DRIVER_ADSL)),)
CMS_CORE_LIBS += -lxdslctl
endif
ifneq ($(strip $(BRCM_DRIVER_XTM)),)
CMS_CORE_LIBS += -latmctl
endif
ifneq ($(strip $(BUILD_MoCACTL)),)
CMS_CORE_LIBS += -lmocactl -lm
endif
ifneq ($(strip $(BUILD_MoCACTL2)),)
CMS_CORE_LIBS += -lpthread
endif
ifneq ($(strip $(BUILD_GPONCTL)),)
CMS_CORE_LIBS += -lgponctl -lgponif
endif
ifneq ($(strip $(BUILD_OMCI)),)
CMS_CORE_LIBS += -lomci -lomcipm_drv -lm
endif
ifneq ($(strip $(BUILD_VLANCTL)),)
CMS_CORE_LIBS += -lvlanctl
endif
ifneq ($(strip $(BUILD_SPUCTL)),)
CMS_CORE_LIBS += -lspuctl
endif
ifneq ($(strip $(BUILD_PWRCTL)),)
CMS_CORE_LIBS += -lpwrctl
endif
ifneq ($(strip $(BUILD_ETHSWCTL)),)
CMS_CORE_LIBS += -lethswctl
endif
ifneq ($(strip $(BUILD_EPONCTL)),)
CMS_CORE_LIBS += -leponctl
endif
ifneq ($(strip $(BUILD_CMFAPI)),)
CMS_CORE_LIBS += -lcmfapi
endif
ifneq ($(strip $(BUILD_WANVLANMUX)),)
ifeq ($(strip $(BUILD_OMCI)),)
CMS_CORE_LIBS += -lvlanctl
endif
endif
ifneq ($(strip $(BUILD_IGMP_SNOOP)),)
CMS_CORE_LIBS += -lmcasthal
endif
CMS_LIB_PATH = $(patsubst %,-L$(INSTALL_DIR)%,$(subst :, ,$(ALLOWED_LIB_DIRS)))
CMS_COMPILER_OPTS += -DMDM_SHARED_MEM
CMS_COMPILER_OPTS += -DCMS_MEM_DEBUG
export CMS_COMMON_LIBS CMS_CORE_LIBS CMS_COMPILER_OPTS CMS_COMPILE_FLAGS
#
# Several features will trigger the building of libpcap.
export BUILD_LIBPCAP
ifneq ($(strip $(BUILD_TCPDUMP)),)
BUILD_LIBPCAP=y
endif
ifneq ($(strip $(BUILD_SENDPACKETS)),)
BUILD_LIBPCAP=y
endif
#
# Many features will trigger the building of OpenSSL.
# OpenSSL is both a library and an app.
# We could distinguish betwen building OpenSSL lib and OpenSSL app,
# but for now, we always build and install both. I have a plan to
# get rid of the app completely.
#
ifneq ($(strip $(BUILD_CERT)),)
DO_BUILD_OPENSSL=y
endif
ifneq ($(strip $(BUILD_TR69C_SSL)),)
DO_BUILD_OPENSSL=y
endif
ifneq ($(strip $(BUILD_HTTPD_SSL)),)
DO_BUILD_OPENSSL=y
endif
ifneq ($(strip $(BUILD_IPSEC_TOOLS)),)
DO_BUILD_OPENSSL=y
endif
export DO_BUILD_OPENSSL
#
# These profiles are always defined
#
CMS_DMP_FLAGS := -DDMP_BASELINE_1 -DDMP_X_BROADCOM_COM_BASELINE_1
#
# these profiles are always defined, but we may also want the
# ability to compile them out in the future
#
CMS_DMP_FLAGS += -DDMP_ETHERNETLAN_1
CMS_DMP_FLAGS += -DDMP_DEVICEASSOCIATION_1
CMS_DMP_FLAGS += -DDMP_QOS_1
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_QOS_1
#we don't support QOSDYNAMICFLOW right now
CMS_DMP_FLAGS += -DDMP_QOSDYNAMICFLOW_1
CMS_DMP_FLAGS += -DDMP_IPPING_1
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_DEBUG_1
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_SECURITY_1
#
# ADSLWAN_1 profile is used to mean presence of xDSL technology on
# the modem, the presence of ATM technology, and presence of ADSL.
# BUILD_DSL is a pre-requisit for loop diag, atm loopback, bonding,
# vdsl phy, and multi-mode phy. ATM WAN and PTM WAN have their own
# controls in make menuconfig, so users should be smart enough to
# unselect that if DSL driver is not built.
#
ifneq ($(strip $(BUILD_DSL)),)
CMS_DMP_FLAGS += -DDMP_ADSLWAN_1 -DDMP_X_BROADCOM_COM_ADSLWAN_1
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_XTMSTATS_1
ifneq ($(strip $(BUILD_DSL_LOOP_DIAG)),)
CMS_DMP_FLAGS += -DDMP_DSLDIAGNOSTICS_1
endif
ifeq ($(strip $(BRCM_PHY_BONDING)),y)
CMS_DMP_FLAGS += -DSUPPORT_DSL_BONDING -DDMP_X_BROADCOM_COM_DSLBONDING_1
export BRCM_PHY_BONDING=y
endif
ifeq ($(strip $(BRCM_MULTI_PHY)),y)
CMS_DMP_FLAGS += -DSUPPORT_MULTI_PHY
export BRCM_MULTI_PHY=y
endif
DSL_EXT_BONDING_DRIVER_DEFINES := -DNONE
ifeq ($(strip $(BRCM_EXT_PHY_BONDING)),y)
ifeq ($(strip $(BRCM_CHIP)),63268)
CMS_DMP_FLAGS += -DSUPPORT_EXT_DSL_BONDING -DDMP_X_BROADCOM_COM_DSLBONDING_1 -DSUPPORT_DSL_BONDING
endif
ifeq ($(strip $(BRCM_CHIP)),6368)
CMS_DMP_FLAGS += -DSUPPORT_EXT_DSL_BONDING
endif
DSL_EXT_BONDING_DRIVER_DEFINES += -DSUPPORT_EXT_DSL_BONDING
export BRCM_EXT_PHY_BONDING=y
endif
export DSL_EXT_BONDING_DRIVER_DEFINES
# VDSL flags have to be turned on for VDSL and Multimode phy
ifneq ($(strip $(BUILD_PHY_VDSL)),)
CMS_DMP_FLAGS += -DDMP_VDSL2WAN_1 -DDMP_X_BROADCOM_COM_VDSL2WAN_1
endif
ifneq ($(strip $(BUILD_PHY_MULTIMODE)),)
CMS_DMP_FLAGS += -DDMP_VDSL2WAN_1 -DDMP_X_BROADCOM_COM_VDSL2WAN_1
endif
export BUILD_PHY_ADSL BUILD_PHY_VDSL BUILD_PHY_MULTIMODE
endif
#
# Various technologies as WAN interface selections
#
# this means the user wants to have a ATM WAN interface
# ATMLOOPBACK is automatically selected in config.in when ATM WAN is selected
ifneq ($(strip $(BUILD_ATMWAN)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_ATMWAN_1
endif
ifneq ($(strip $(BUILD_ATMLOOPBACK)),)
CMS_DMP_FLAGS += -DDMP_ATMLOOPBACK_1 -DDMP_X_BROADCOM_COM_ATMLOOPBACK_1
endif
# this means the modem has PTM technology and user wants to have
# a PTM WAN interface
ifneq ($(strip $(BUILD_PTMWAN)),)
CMS_DMP_FLAGS += -DDMP_PTMWAN_1 -DDMP_X_BROADCOM_COM_PTMWAN_1
endif
# this means the user wants to have a Moca WAN interface
ifneq ($(strip $(BUILD_MOCAWAN)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_MOCAWAN_1
endif
# this means user wants to have a ethernet WAN interface
ifneq ($(strip $(BUILD_ETHWAN)),)
CMS_DMP_FLAGS += -DSUPPORT_ETHWAN -DDMP_ETHERNETWAN_1
endif
# this means the user wants to have a EPON WAN interface
ifneq ($(strip $(BUILD_EPONWAN)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_PONWAN_1 -DDMP_X_BROADCOM_COM_EPONWAN_1
endif
# this means the user wants to have a GponRG Light Omci build
ifneq ($(strip $(BUILD_GPONRG_OMCI_LIGHT)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_PONWAN_1 -DDMP_X_BROADCOM_COM_GPONWAN_1 -DDMP_X_BROADCOM_COM_GPONRG_OMCI_LIGHT_1
endif
# this means the user wants to have a GponRG Full Omci build
ifneq ($(strip $(BUILD_GPONRG_OMCI_FULL)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_PONWAN_1 -DDMP_X_BROADCOM_COM_GPONWAN_1 -DDMP_X_BROADCOM_COM_GPONRG_OMCI_FULL_1
endif
# this means the user wants to have a GPON OMCI TR69 dual stack
ifneq ($(strip $(BUILD_OMCI_TR69_DUAL_STACK)),)
CMS_DMP_FLAGS += -DOMCI_TR69_DUAL_STACK
endif
ifneq ($(strip $(BUILD_OMCI)),)
ifeq ($(strip $(BUILD_GPONRG_OMCI_LIGHT)),)
ifeq ($(strip $(BUILD_GPONRG_OMCI_FULL)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_GPONONT_1
endif
endif
endif
# this means user wants to have a L2TP AC (PPPoL2TPAC) WAN service
ifneq ($(strip $(BUILD_L2TPAC)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_L2TPAC_1
endif
ifneq ($(strip $(BUILD_MoCACTL)),)
CMS_DMP_FLAGS += -DSUPPORT_MOCA -DDMP_X_BROADCOM_COM_MOCALAN_1
endif
ifneq ($(strip $(BRCM_MOCA_SOFT_SWITCHING)),)
CMS_DMP_FLAGS += -DMOCA_SOFT_SWITCHING
endif
ifneq ($(strip $(BUILD_MoCACTL2)),)
CMS_DMP_FLAGS += -DBRCM_MOCA_DAEMON
endif
# eanble DMP_X_BROADCOM_COM_BPAAPI_1 under the following conditions
# Both ETHWAN and MOCAWAN are enabled, or
# some other condition TBD by Anil
ifneq ($(strip $(BUILD_ETHWAN)),)
ifneq ($(strip $(BUILD_MOCAWAN)),)
BUILD_BPAAPI := 1
endif
endif
ifneq ($(strip $(BUILD_BPAAPI)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_BPAAPI_1
endif
ifneq ($(strip $(BUILD_SOAP)),)
CMS_DMP_FLAGS += -DSUPPORT_SOAP
endif
ifneq ($(strip $(BUILD_IPSEC_TOOLS)),)
CMS_DMP_FLAGS += -DSUPPORT_IPSEC -DDMP_X_BROADCOM_COM_IPSEC_1
endif
ifneq ($(strip $(BUILD_SNMP)),)
CMS_DMP_FLAGS += -DSUPPORT_SNMP -DDMP_X_BROADCOM_COM_SNMP_1
endif
ifneq ($(strip $(BUILD_TR64)),)
CMS_DMP_FLAGS += -DSUPPORT_TR64C -DDMP_X_BROADCOM_COM_TR64_1
endif
ifneq ($(strip $(BUILD_IPV6)),)
CMS_DMP_FLAGS += -DSUPPORT_IPV6 -DDMP_X_BROADCOM_COM_IPV6_1
endif
ifneq ($(strip $(BUILD_TR69C)),)
CMS_DMP_FLAGS += -DSUPPORT_TR69C
endif
ifneq ($(strip $(BUILD_TR69C_SSL)),)
CMS_DMP_FLAGS += -DSUPPORT_TR69C
endif
ifneq ($(strip $(BUILD_TR69C_BCM_SSL)),)
CMS_DMP_FLAGS += -DSUPPORT_TR69C
endif
ifneq ($(strip $(BUILD_EPON_SDK_VOICE_OAM)),)
CMS_DMP_FLAGS += -DDMP_X_CT_ORG_EPON_1 -DDMP_ENDPOINT_1 -DDMP_EPON_VOICE_OAM -DDMP_X_BROADCOM_COM_EPON_1
endif
ifneq ($(strip $(BUILD_GPON)),)
CMS_DMP_FLAGS += -DDMP_X_ITU_ORG_GPON_1 -DDMP_X_BROADCOM_COM_GPON_1 -DDMP_DEVICE_2
ifeq ($(strip $(BRCM_APP_PHONE)),sip)
CMS_DMP_FLAGS += -DDMP_X_ITU_ORG_VOICE_1 -DDMP_X_ITU_ORG_VOICE_SIP_1
endif
ifeq ($(strip $(BRCM_APP_PHONE)),mgcp)
#CMS_DMP_FLAGS += -DDMP_X_ITU_ORG_VOICE_1 -DDMP_X_ITU_ORG_VOICE_MGC_1
endif
endif
ifneq ($(strip $(BUILD_OMCI)),)
CMS_DMP_FLAGS += -DBRCM_OMCI
endif
ifneq ($(strip $(BUILD_HTTPD)),)
CMS_DMP_FLAGS += -DSUPPORT_HTTPD
endif
ifneq ($(strip $(BUILD_QUICKSETUP)),)
CMS_DMP_FLAGS += -DSUPPORT_QUICKSETUP -DDMP_X_BROADCOM_COM_QUICKSETUP_1
endif
ifneq ($(strip $(BUILD_HTTPD_SSL)),)
CMS_DMP_FLAGS += -DSUPPORT_HTTPD -DSUPPORT_HTTPD_SSL
endif
ifneq ($(strip $(BUILD_CLI_MENU)),)
CMS_DMP_FLAGS += -DSUPPORT_CLI_MENU
endif
ifneq ($(strip $(BUILD_CLI_CMD)),)
CMS_DMP_FLAGS += -DSUPPORT_CLI_CMD -DCLI_CMD_EDIT
endif
ifneq ($(strip $(BUILD_CONSOLED)),)
CMS_DMP_FLAGS += -DSUPPORT_CONSOLED
endif
ifneq ($(strip $(BUILD_VECTORINGD)),)
CMS_DMP_FLAGS += -DSUPPORT_VECTORINGD
export BUILD_VECTORINGD=y
endif
ifneq ($(strip $(BUILD_TELNETD)),)
CMS_DMP_FLAGS += -DSUPPORT_TELNETD
endif
ifneq ($(strip $(BUILD_SSHD)),)
CMS_DMP_FLAGS += -DSUPPORT_SSHD
endif
ifneq ($(strip $(BUILD_FTPD)),)
CMS_DMP_FLAGS += -DSUPPORT_FTPD
endif
ifneq ($(strip $(BUILD_EBTABLES)),)
CMS_DMP_FLAGS += -DSUPPORT_EBTABLES
endif
ifneq ($(strip $(BUILD_TOD)),)
CMS_DMP_FLAGS += -DSUPPORT_TOD -DDMP_X_BROADCOM_COM_ACCESSTIMERESTRICTION_1
endif
ifneq ($(strip $(BUILD_URLFILTER)),)
CMS_DMP_FLAGS += -DSUPPORT_URLFILTER
endif
ifneq ($(strip $(BUILD_IPROUTE2)),)
CMS_DMP_FLAGS += -DSUPPORT_POLICYROUTING
endif
ifneq ($(strip $(BUILD_UPNP)),)
CMS_DMP_FLAGS += -DSUPPORT_UPNP -DDMP_X_BROADCOM_COM_UPNP_1
endif
ifneq ($(strip $(BUILD_HASHED_PASSWORDS)),)
CMS_DMP_FLAGS += -DSUPPORT_HASHED_PASSWORDS
endif
ifneq ($(strip $(BUILD_DDNSD)),)
CMS_DMP_FLAGS += -DSUPPORT_DDNSD -DDMP_X_BROADCOM_COM_DYNAMICDNS_1
endif
ifneq ($(strip $(BUILD_DPROXY)),)
CMS_DMP_FLAGS += -DSUPPORT_DNSPROXY -DDMP_X_BROADCOM_COM_DNSPROXY_1
endif
ifneq ($(strip $(BUILD_DNSPROBE)),)
CMS_DMP_FLAGS += -DSUPPORT_DNSPROBE
endif
ifneq ($(strip $(BUILD_DPROXYWITHPROBE)),)
CMS_DMP_FLAGS += -DSUPPORT_DNSPROXYWITHPROBE -DDMP_X_BROADCOM_COM_DNSPROXY_1
endif
ifneq ($(strip $(BUILD_SUPERDMZ)),)
CMS_DMP_FLAGS += -DSUPPORT_ADVANCED_DMZ
endif
ifneq ($(strip $(BUILD_IPPD)),)
CMS_DMP_FLAGS += -DSUPPORT_IPP -DDMP_X_BROADCOM_COM_IPPRINTING_1
endif
ifneq ($(strip $(BUILD_DLNA)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_DLNA_1
export BUILD_DLNA
endif
ifneq ($(strip $(BUILD_DSLDIAGD)),)
CMS_DMP_FLAGS += -DSUPPORT_DSLDIAGD
endif
ifneq ($(strip $(BUILD_SNTP)),)
CMS_DMP_FLAGS += -DSUPPORT_SNTP -DDMP_TIME_1
endif
ifneq ($(strip $(BUILD_UDHCP)),)
CMS_DMP_FLAGS += -DSUPPORT_UDHCP
endif
ifneq ($(strip $(BUILD_UDHCP_RELAY)),)
CMS_DMP_FLAGS += -DDHCP_RELAY
endif
ifneq ($(strip $(BRCM_DRIVER_P8021AG)),)
CMS_DMP_FLAGS += -DSUPPORT_P8021AG -DDMP_X_BROADCOM_COM_P8021AG_1
endif
ifneq ($(strip $(BUILD_SPUCTL)),)
CMS_DMP_FLAGS += -DSUPPORT_SPUCTL
endif
ifneq ($(strip $(BUILD_PWRCTL)),)
CMS_DMP_FLAGS += -DSUPPORT_PWRMNGT -DDMP_X_BROADCOM_COM_PWRMNGT_1
endif
ifneq ($(strip $(BRCM_HOSTMIPS_PWRSAVE)),)
CMS_DMP_FLAGS += -DSUPPORT_HOSTMIPS_PWRSAVE
endif
ifneq ($(strip $(BRCM_DDR_SELF_REFRESH_PWRSAVE)),)
CMS_DMP_FLAGS += -DSUPPORT_DDR_SELF_REFRESH_PWRSAVE
endif
ifneq ($(strip $(BRCM_ETH_PWRSAVE)),)
CMS_DMP_FLAGS += -DSUPPORT_ETH_PWRSAVE
endif
ifneq ($(strip $(BRCM_AVS_PWRSAVE)),)
CMS_DMP_FLAGS += -DSUPPORT_AVS_PWRSAVE
endif
ifneq ($(strip $(BUILD_BMU)),)
CMS_DMP_FLAGS += -DSUPPORT_BMU
endif
ifneq ($(strip $(BRCM_STANDBY)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_STANDBY_1
endif
ifneq ($(strip $(BUILD_CMFD)),)
CMS_DMP_FLAGS += -DSUPPORT_CMFD
endif
ifneq ($(strip $(BUILD_GPONCTL)),)
CMS_DMP_FLAGS += -DSUPPORT_GPONCTL
endif
ifneq ($(strip $(BUILD_RNGD)),)
CMS_DMP_FLAGS += -DSUPPORT_HWRANDOM
endif
ifneq ($(strip $(BUILD_EPON_SDK)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_EPON_1
endif
ifneq ($(strip $(BUILD_MOD_SW_UPDATE)),)
CMS_DMP_FLAGS += -DSUPPORT_MOD_SW_UPDATE
endif
# TR140 Storage Service
ifneq ($(strip $(BUILD_STORAGESERVICE)),)
CMS_DMP_FLAGS += -DSUPPORT_STORAGESERVICE -DDMP_STORAGESERVICE_1
endif
ifneq ($(strip $(BUILD_NTFS_3G)),)
CMS_DMP_FLAGS += -DSUPPORT_NTFS_3G
endif
ifneq ($(strip $(BUILD_SAMBA)),)
CMS_DMP_FLAGS += -DSUPPORT_SAMBA
endif
# end Storage Service
ifneq ($(strip $(BUILD_MCAST_PROXY)),)
CMS_DMP_FLAGS += -DSUPPORT_IGMP -DDMP_X_BROADCOM_COM_IGMP_1
ifneq ($(strip $(BUILD_IPV6)),)
CMS_DMP_FLAGS += -DSUPPORT_MLD -DDMP_X_BROADCOM_COM_MLD_1
endif
endif
ifneq ($(strip $(BUILD_AUTODETECTION)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_AUTODETECTION_1
endif
ifneq ($(strip $(BUILD_OSGI_JVM)),)
CMS_DMP_FLAGS += -DDMP_X_BROADCOM_COM_OSGI_JVM_1 -DDMP_SM_DEPLOYANDEXECUNITS_1
CMS_DMP_FLAGS += -DJVM_MIN_HEAP=$(JVM_MIN_HEAP_SIZE)
CMS_DMP_FLAGS += -DJVM_MAX_HEAP=$(JVM_MAX_HEAP_SIZE)
CMS_DMP_FLAGS += -DJVM_STACK=$(JVM_STACK_SIZE_PER_THREAD)
endif
#
# netfilter modules
#
ifneq ($(strip $(BRCM_KERNEL_NF_NAT_ALG_IPSEC)),)
CMS_DMP_FLAGS += -DSUPPORT_IPSEC_PASSTHROUGH
endif
ifneq ($(strip $(BRCM_KERNEL_NF_NAT_ALG_PPTP)),)
CMS_DMP_FLAGS += -DSUPPORT_PPTP
endif
ifneq ($(strip $(BRCM_KERNEL_NF_NAT_ALG_SIP)),)
CMS_DMP_FLAGS += -DSUPPORT_SIP
endif
ifneq ($(strip $(BUILD_CONNTRACK_TOOLS)),)
CMS_DMP_FLAGS += -DSUPPORT_CONNTRACK_TOOLS
endif
#
# netfilter modules end
#
# Somehow this VCONFIG is tangled up with the broadcom port mapping and
# VLAN mux features. Will have to sort it out later.
#
ifneq ($(strip $(BUILD_VCONFIG)),)
CMS_DMP_FLAGS += -DSUPPORT_PORT_MAP -DDMP_BRIDGING_1
endif
ifneq ($(strip $(BUILD_WANVLANMUX)),)
CMS_DMP_FLAGS += -DSUPPORT_WANVLANMUX
endif
ifneq ($(strip $(BUILD_LANVLAN)),)
CMS_DMP_FLAGS += -DSUPPORT_LANVLAN
endif
ifneq ($(strip $(BRCM_DRIVER_USB)),)
CMS_DMP_FLAGS += -DDMP_USBLAN_1
endif
ifneq ($(strip $(BRCM_TC_RATE_LIMIT)),)
CMS_DMP_FLAGS += -DSUPPORT_RATE_LIMIT
endif
ifneq ($(strip $(BRCM_TC_POLICING)),)
CMS_DMP_FLAGS += -DSUPPORT_POLICING
endif
ifneq ($(strip $(BRCM_KERNEL_FTRACE)),)
CMS_DMP_FLAGS += -DSUPPORT_FTRACE
endif
#
# These variables come from the debug section of make menuconfig
#
ifeq ($(strip $(CMS_LOG_DEBUG)),)
CMS_LOG_FLAGS := -DCMS_LOG0
else
ifneq ($(strip $(CMS_LOG_LEVEL_1)),)
CMS_LOG_FLAGS := -DCMS_LOG2
endif
ifneq ($(strip $(CMS_LOG_LEVEL_2)),)
CMS_LOG_FLAGS := -DCMS_LOG3
endif
ifneq ($(strip $(CMS_STARTUP_DEBUG)),)
CMS_DMP_FLAGS += -DCMS_STARTUP_DEBUG
endif
endif
ifneq ($(strip $(CMS_SECURITY_LOG)),)
CMS_DMP_FLAGS += -DCMS_SECURITY_LOG
endif
ifneq ($(strip $(CMS_MEM_BOUNDARY_CHECK)),)
CMS_DMP_FLAGS += -DCMS_MEM_BOUNDARY_CHECK
endif
ifneq ($(strip $(CMS_MEM_POISON_ALLOC_FREE)),)
CMS_DMP_FLAGS += -DCMS_MEM_POISON_ALLOC_FREE
endif
ifneq ($(strip $(CMS_MEM_LEAK_TRACING)),)
CMS_DMP_FLAGS += -DCMS_MEM_LEAK_TRACING
endif
ifneq ($(strip $(CMS_FATAL_ASSERT)),)
CMS_DMP_FLAGS += -DCMS_FATAL_ASSERT
endif
ifneq ($(strip $(BUILD_DEBUG_TOOLS)),)
CMS_DMP_FLAGS += -DSUPPORT_DEBUG_TOOLS
endif
ifneq ($(strip $(CMS_BYPASS_LOGIN)),)
CMS_DMP_FLAGS += -DCMS_BYPASS_LOGIN
endif
#
# This needs a little cleanup also. Instead of explicitly checking for BUILD_CERT,
# this check should be if (BUILD_HTTPD_SSL or BUILD_TR69_SSL or any other feature
# that requires SSL).
#
ifneq ($(strip $(BUILD_CERT)),)
CMS_DMP_FLAGS += -DSUPPORT_CERT -DDMP_X_BROADCOM_COM_DIGITALCERTIFICATES_1
endif
ifneq ($(strip $(BUILD_ZEBRA)),)
CMS_DMP_FLAGS += -DSUPPORT_RIP
endif
ifneq ($(strip $(COMPRESSED_CONFIG_FILE)),)
CMS_DMP_FLAGS += -DCOMPRESSED_CONFIG_FILE
endif
ifneq ($(strip $(BUILD_BACKUP_PSI)),)
CMS_DMP_FLAGS += -DSUPPORT_BACKUP_PSI
endif
ifneq ($(strip $(CMS_CONFIG_COMPAT)),)
CMS_DMP_FLAGS += -DCMS_CONFIG_COMPAT
endif
#we use wlan driver as the flags for wireless support on mdm, http, dal etc
ifneq ($(strip $(BRCM_DRIVER_WIRELESS)), )
CMS_WLAN_FLAGS += -DBRCM_WLAN -DWIRELESS
CMS_DMP_FLAGS += -DDMP_WIFILAN_1 -DDMP_X_BROADCOM_COM_WIFILAN_1
export WIRELESS=1
ifeq ($(BRCM_WAPI),y)
CMS_WLAN_FLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
endif
endif
ifeq ($(strip $(BRCM_KERNEL_ROOTFS)),nfs)
CMS_DMP_FLAGS += -DCMS_CONFIG_NFS
endif
CMS_COMPILE_FLAGS := $(DBGFLAGS) $(CMS_LOG_FLAGS) $(PROFILERFLAGS) \
-D$(TARGET_OS) $(CMS_COMPILER_OPTS) $(CMS_DMP_FLAGS) \
-DCHIP_$(BRCM_CHIP) -DCONFIG_BCM9$(BRCM_CHIP)
ifneq ($(strip $(BUILD_BRCM_CMS)),)
CMS_COMPILE_FLAGS += -DBRCM_CMS_BUILD
endif
###### Need to export kernel config to userspace as well
ifeq ($(BRCM_6818_ON_6816),y)
CMS_COMPILE_FLAGS += -DCONFIG_BRCM_6818_ON_6816
endif
ifeq ($(BRCM_GPON_DDRO), y)
CMS_COMPILE_FLAGS += -DCONFIG_BCM_GPON_DDRO -DCONFIG_BCM_GPON_DDRO_SIZE=$(BRCM_GPON_DDRO_SIZE)
endif
ifeq ($(BCM_GPON_802_1Q_ENABLED),y)
CMS_COMPILE_FLAGS += -DCONFIG_BCM_GPON_802_1Q_ENABLED
endif
ifeq ($(BCM_GPON_AE_AUTO_SWITCH),y)
CMS_COMPILE_FLAGS += -DCONFIG_BCM_GPON_AE_AUTO_SWITCH
endif
ifeq ($(strip $(BRCM_CHIP)),6818)
CMS_COMPILE_FLAGS += -DCONFIG_BCM_MAX_GEM_PORTS=$(BCM_MAX_GEM_PORTS)
else
CMS_COMPILE_FLAGS += -DCONFIG_BCM_MAX_GEM_PORTS=32
endif
ifneq ($(strip $(BRCM_MIPS_RATE_LIMIT)),)
CMS_COMPILE_FLAGS += -DCONFIG_MIPS_RATE_LIMIT=$(BRCM_MIPS_RATE_LIMIT)
endif
ifneq ($(strip $(EPON_ONU_TYPE)),)
CMS_COMPILE_FLAGS += -D$(EPON_ONU_TYPE)