| 1 | #/*************************************************************************** |
|---|
| 2 | # * (c)2007-2011 Broadcom Corporation |
|---|
| 3 | # * |
|---|
| 4 | # * This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | # * and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | # * conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | # * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | # * no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | # * Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | # * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | # * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | # * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | # * |
|---|
| 14 | # * Except as expressly set forth in the Authorized License, |
|---|
| 15 | # * |
|---|
| 16 | # * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | # * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | # * and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | # * |
|---|
| 20 | # * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | # * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | # * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | # * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | # * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | # * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | # * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | # * USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | # * |
|---|
| 29 | # * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | # * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | # * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | # * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | # * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | # * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | # * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | # * ANY LIMITED REMEDY. |
|---|
| 37 | # * |
|---|
| 38 | # * $brcm_Workfile: bhsm.inc $ |
|---|
| 39 | # * $brcm_Revision: Hydra_Software_Devel/8 $ |
|---|
| 40 | # * $brcm_Date: 10/17/11 5:26p $ |
|---|
| 41 | # * |
|---|
| 42 | # * Module Description: |
|---|
| 43 | # * |
|---|
| 44 | # * Revision History: |
|---|
| 45 | # * |
|---|
| 46 | # * $brcm_Log: /magnum/portinginterface/hsm/7422/bhsm.inc $ |
|---|
| 47 | # * |
|---|
| 48 | # * Hydra_Software_Devel/8 10/17/11 5:26p atruong |
|---|
| 49 | # * SWSECURITY-69: Support for 40-nm B0 Zeus 2.0 platforms |
|---|
| 50 | # * |
|---|
| 51 | # * Hydra_Software_Devel/7 10/12/11 10:48p atruong |
|---|
| 52 | # * SW7425-1251: HSM PI Support For BCM7425B0 |
|---|
| 53 | # * |
|---|
| 54 | # * Hydra_Software_Devel/6 9/23/11 7:09p atruong |
|---|
| 55 | # * SW7346-495: HSM_SOURCE_AVAILABLE option fix |
|---|
| 56 | # * |
|---|
| 57 | # * Hydra_Software_Devel/5 9/21/11 11:55a atruong |
|---|
| 58 | # * SW7346-495: Add NSK2AVK support |
|---|
| 59 | # * |
|---|
| 60 | # * Hydra_Software_Devel/4 6/2/11 6:08p atruong |
|---|
| 61 | # * SW7422-451: New Folder structure/BSP shared header file separation |
|---|
| 62 | # * |
|---|
| 63 | # * Hydra_Software_Devel/3 5/31/11 11:34p atruong |
|---|
| 64 | # * SW7422-451: New Folder structure/BSP shared header file separation |
|---|
| 65 | # * |
|---|
| 66 | # * Hydra_Software_Devel/2 1/24/11 10:44a atruong |
|---|
| 67 | # * SW7422-26: Add HSM PI Support For 7422A0 - CC header format |
|---|
| 68 | # * |
|---|
| 69 | # ******************************************************************************/ |
|---|
| 70 | |
|---|
| 71 | #-----------------------------------------------------------------------------------# |
|---|
| 72 | # HSM build-command-line-options: |
|---|
| 73 | # CUST=GENERIC3A or |
|---|
| 74 | # CUST=GENERIC3B or |
|---|
| 75 | # CUST=DIRECTV or |
|---|
| 76 | # CUST=ECHOSTAR or |
|---|
| 77 | # CUST=CONAX or |
|---|
| 78 | # CUST=CISCO or |
|---|
| 79 | # CUST=IRDETO or |
|---|
| 80 | # CUST=MICROSOFT or |
|---|
| 81 | # CUST=MOTOROLA or |
|---|
| 82 | # CUST=NAGRA or |
|---|
| 83 | # CUST=NDS or |
|---|
| 84 | # CUST=NDSDSS or |
|---|
| 85 | # CUST=ALL to select customer mode |
|---|
| 86 | # CUST=Not Set or Invalid - Customer Mode defaults to GENERIC3A |
|---|
| 87 | # SCVALUE=ON to turn on scrambling ctrl bits setting with specified value |
|---|
| 88 | # BHSM_REGIONVERIFY=ON to turn on region verification with Generic mode (invalid option for non-Generic mode build) |
|---|
| 89 | # BHSM_BSECK=ON to turn on/off BSECK feature |
|---|
| 90 | # BHSM_IPTV=ON to turn on/off IPTV feature |
|---|
| 91 | # BHSM_KEYLADDER=ON to select spitted, protected secure PIs |
|---|
| 92 | # BHSM_MISC=ON to select spitted, protected secure PIs |
|---|
| 93 | # BHSM_OTPMSP=ON to select spitted, protected secure PIs |
|---|
| 94 | # BHSM_SECURE_RSA=ON to turn on Secure RSA feature |
|---|
| 95 | # BHSM_SECURE_ACCESS=ON to turn on Secure Access (DRM Data Op) feature |
|---|
| 96 | # BHSM_IP_LICENSING=ON to turn on IP Licensing feature |
|---|
| 97 | # BHSM_MISC=ON to turn on support for DEBUG_DUMP_EXEC command |
|---|
| 98 | # BHSM_PWR_MGMT=ON to turn on support for power management |
|---|
| 99 | # |
|---|
| 100 | #-----------------------------------------------------------------------------------# |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | # |
|---|
| 104 | # Conditional Options for this Makefile |
|---|
| 105 | # |
|---|
| 106 | # BHSM_CUST - HSM Specific Option. This value will be provided for you if appropriate. |
|---|
| 107 | # |
|---|
| 108 | |
|---|
| 109 | # Define this module |
|---|
| 110 | MAGNUM_MODULES += BHSM |
|---|
| 111 | |
|---|
| 112 | BCHP_VER_LOWER := $(shell awk 'BEGIN{print tolower("$(BCHP_VER)")}') |
|---|
| 113 | |
|---|
| 114 | # Definitions |
|---|
| 115 | BHSM_DEFINES += BHSM_AEGIS_SUPPORT |
|---|
| 116 | |
|---|
| 117 | # Support uScValue definition for newer chip (7400C0 and later) |
|---|
| 118 | BHSM_DEFINES += BHSM_SC_VALUE |
|---|
| 119 | BSP_SC_VALUE_SUPPORT=ON |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | CUST_SETTING := OFF |
|---|
| 123 | |
|---|
| 124 | #-----------------------------------------------------------------------------------# |
|---|
| 125 | # old support "make CUST=ECHOSTAR" |
|---|
| 126 | # space can NOT be put after 'ECHOSTAR' in ifeq ($(CUST), ECHOSTAR), yet can be put before 'ECHOSTAR' |
|---|
| 127 | |
|---|
| 128 | ifeq ($(CUST),ECHOSTAR) |
|---|
| 129 | BHSM_CUST := ECHOSTAR |
|---|
| 130 | CUST_SETTING := ON |
|---|
| 131 | endif |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | #-----------------------------------------------------------------------------------# |
|---|
| 135 | # 4/11/07 to add EchoStar build support |
|---|
| 136 | # this is complicated, discard: ifeq ($(findstring E, $(BHSM_CUST)), $(BHSM_CUST)) |
|---|
| 137 | |
|---|
| 138 | ifeq ($(BHSM_CUST),ECHOSTAR) |
|---|
| 139 | # change itself from the upper case to lower for directory mapping |
|---|
| 140 | |
|---|
| 141 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 142 | |
|---|
| 143 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_echostar.inc |
|---|
| 144 | endif |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | |
|---|
| 148 | #-----------------------------------------------------------------------------------# |
|---|
| 149 | # old support "make CUST=DIRECTV" |
|---|
| 150 | ifeq ($(CUST),DIRECTV) |
|---|
| 151 | BHSM_CUST := DIRECTV |
|---|
| 152 | CUST_SETTING := ON |
|---|
| 153 | endif |
|---|
| 154 | |
|---|
| 155 | ifeq ($(BHSM_CUST),DIRECTV) |
|---|
| 156 | |
|---|
| 157 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 158 | |
|---|
| 159 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_directv.inc |
|---|
| 160 | endif |
|---|
| 161 | |
|---|
| 162 | |
|---|
| 163 | #-----------------------------------------------------------------------------------# |
|---|
| 164 | # old support "make CUST=NDS" |
|---|
| 165 | ifeq ($(CUST),NDS) |
|---|
| 166 | BHSM_CUST := NDS |
|---|
| 167 | CUST_SETTING := ON |
|---|
| 168 | endif |
|---|
| 169 | |
|---|
| 170 | ifeq ($(BHSM_CUST),NDS) |
|---|
| 171 | |
|---|
| 172 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 173 | |
|---|
| 174 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_nds.inc |
|---|
| 175 | endif |
|---|
| 176 | |
|---|
| 177 | |
|---|
| 178 | #-----------------------------------------------------------------------------------# |
|---|
| 179 | # old support "make CUST=MICROSOFT" |
|---|
| 180 | ifeq ($(CUST),MICROSOFT) |
|---|
| 181 | BHSM_CUST := MICROSOFT |
|---|
| 182 | CUST_SETTING := ON |
|---|
| 183 | endif |
|---|
| 184 | |
|---|
| 185 | ifeq ($(BHSM_CUST),MICROSOFT) |
|---|
| 186 | |
|---|
| 187 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 188 | |
|---|
| 189 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_microsoft.inc |
|---|
| 190 | endif |
|---|
| 191 | |
|---|
| 192 | |
|---|
| 193 | |
|---|
| 194 | #-----------------------------------------------------------------------------------# |
|---|
| 195 | # old support "make CUST=CISCO" |
|---|
| 196 | ifeq ($(CUST),CISCO) |
|---|
| 197 | BHSM_CUST := CISCO |
|---|
| 198 | CUST_SETTING := ON |
|---|
| 199 | endif |
|---|
| 200 | |
|---|
| 201 | ifeq ($(BHSM_CUST),CISCO) |
|---|
| 202 | |
|---|
| 203 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 204 | |
|---|
| 205 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_cisco.inc |
|---|
| 206 | endif |
|---|
| 207 | |
|---|
| 208 | #-----------------------------------------------------------------------------------# |
|---|
| 209 | # old support "make CUST=CONAX" |
|---|
| 210 | ifeq ($(CUST),CONAX) |
|---|
| 211 | BHSM_CUST := CONAX |
|---|
| 212 | CUST_SETTING := ON |
|---|
| 213 | endif |
|---|
| 214 | |
|---|
| 215 | ifeq ($(BHSM_CUST),CONAX) |
|---|
| 216 | |
|---|
| 217 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 218 | |
|---|
| 219 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_conax.inc |
|---|
| 220 | endif |
|---|
| 221 | |
|---|
| 222 | |
|---|
| 223 | #-----------------------------------------------------------------------------------# |
|---|
| 224 | # old support "make CUST=IRDETO" |
|---|
| 225 | ifeq ($(CUST),IRDETO) |
|---|
| 226 | BHSM_CUST := IRDETO |
|---|
| 227 | CUST_SETTING := ON |
|---|
| 228 | endif |
|---|
| 229 | |
|---|
| 230 | ifeq ($(BHSM_CUST),IRDETO) |
|---|
| 231 | |
|---|
| 232 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 233 | |
|---|
| 234 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_irdeto.inc |
|---|
| 235 | endif |
|---|
| 236 | |
|---|
| 237 | #-----------------------------------------------------------------------------------# |
|---|
| 238 | # old support "make CUST=MOTOROLA" |
|---|
| 239 | ifeq ($(CUST),MOTOROLA) |
|---|
| 240 | BHSM_CUST := MOTOROLA |
|---|
| 241 | CUST_SETTING := ON |
|---|
| 242 | endif |
|---|
| 243 | |
|---|
| 244 | ifeq ($(BHSM_CUST),MOTOROLA) |
|---|
| 245 | |
|---|
| 246 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 247 | |
|---|
| 248 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_motorola.inc |
|---|
| 249 | endif |
|---|
| 250 | |
|---|
| 251 | #-----------------------------------------------------------------------------------# |
|---|
| 252 | # old support "make CUST=NAGRA" |
|---|
| 253 | ifeq ($(CUST),NAGRA) |
|---|
| 254 | BHSM_CUST := NAGRA |
|---|
| 255 | CUST_SETTING := ON |
|---|
| 256 | endif |
|---|
| 257 | |
|---|
| 258 | ifeq ($(BHSM_CUST),NAGRA) |
|---|
| 259 | |
|---|
| 260 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 261 | |
|---|
| 262 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_nagra.inc |
|---|
| 263 | endif |
|---|
| 264 | |
|---|
| 265 | #-----------------------------------------------------------------------------------# |
|---|
| 266 | # old support "make CUST=NDSDSS" |
|---|
| 267 | ifeq ($(CUST),NDSDSS) |
|---|
| 268 | BHSM_CUST := NDSDSS |
|---|
| 269 | CUST_SETTING := ON |
|---|
| 270 | endif |
|---|
| 271 | |
|---|
| 272 | ifeq ($(BHSM_CUST),NDSDSS) |
|---|
| 273 | |
|---|
| 274 | BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}') |
|---|
| 275 | |
|---|
| 276 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_ndsdss.inc |
|---|
| 277 | endif |
|---|
| 278 | |
|---|
| 279 | |
|---|
| 280 | #-----------------------------------------------------------------------------------# |
|---|
| 281 | # old support "make CUST=ALL" |
|---|
| 282 | ifeq ($(CUST),ALL) |
|---|
| 283 | BHSM_CUST := ALL |
|---|
| 284 | CUST_SETTING := ON |
|---|
| 285 | endif |
|---|
| 286 | |
|---|
| 287 | ifeq ($(BHSM_CUST),ALL) |
|---|
| 288 | |
|---|
| 289 | BHSM_CUST_DIR = all |
|---|
| 290 | |
|---|
| 291 | include $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm_all.inc |
|---|
| 292 | endif |
|---|
| 293 | |
|---|
| 294 | |
|---|
| 295 | #-----------------------------------------------------------------------------------# |
|---|
| 296 | ifeq ($(CUST),GENERIC3A) |
|---|
| 297 | BHSM_CUST := GENERIC3A |
|---|
| 298 | CUST_SETTING := ON |
|---|
| 299 | endif |
|---|
| 300 | ifeq ($(BHSM_CUST),GENERIC3A) |
|---|
| 301 | GREAT_GENERIC=true |
|---|
| 302 | # always |
|---|
| 303 | BHSM_CUST_DIR = generic3A |
|---|
| 304 | endif |
|---|
| 305 | |
|---|
| 306 | ## |
|---|
| 307 | ## CUST=GENERIC3B |
|---|
| 308 | ## |
|---|
| 309 | |
|---|
| 310 | ifeq ($(CUST),GENERIC3B) |
|---|
| 311 | BHSM_CUST := GENERIC3B |
|---|
| 312 | CUST_SETTING := ON |
|---|
| 313 | endif |
|---|
| 314 | ifeq ($(BHSM_CUST),GENERIC3B) |
|---|
| 315 | GREAT_GENERIC=true |
|---|
| 316 | # always |
|---|
| 317 | BHSM_CUST_DIR = generic3B |
|---|
| 318 | endif |
|---|
| 319 | |
|---|
| 320 | |
|---|
| 321 | #-----------------------------------------------------------------------------------# |
|---|
| 322 | # Default BHSM_CUST to GENERIC3A, |
|---|
| 323 | # make without touch of BHSM_CUST |
|---|
| 324 | # make CUST=X, make BHSM_CUST=X, X is anything but defined |
|---|
| 325 | |
|---|
| 326 | ifeq ($(CUST_SETTING),OFF) |
|---|
| 327 | CUST := GENERIC3A |
|---|
| 328 | BHSM_CUST := GENERIC3A |
|---|
| 329 | GREAT_GENERIC=true |
|---|
| 330 | #$(warning ..........HSM PI built with BHSM_CUST= $(BHSM_CUST) ) |
|---|
| 331 | # always |
|---|
| 332 | BHSM_CUST_DIR = generic3A |
|---|
| 333 | endif |
|---|
| 334 | |
|---|
| 335 | ifeq ($(GREAT_GENERIC),true) |
|---|
| 336 | # this line has no effect if make BHSM_CUST=G : BHSM_CUST := generic |
|---|
| 337 | |
|---|
| 338 | # not used here, for testApp build |
|---|
| 339 | BHSM_CUST_GENERIC=1 |
|---|
| 340 | |
|---|
| 341 | BHSM_DEFINES += BSP_GENERIC |
|---|
| 342 | |
|---|
| 343 | # 3/8/07, looks the platform or magnum does not add this definition |
|---|
| 344 | #CFLAGS += -DBSP_GENERIC |
|---|
| 345 | |
|---|
| 346 | |
|---|
| 347 | |
|---|
| 348 | ###Region_Verification support in Generic Mode, there is an option to add the Region_Verification or not |
|---|
| 349 | ifeq ($(BHSM_REGIONVERIFY),ON) |
|---|
| 350 | BHSM_REGIONVERIFY_MK=1 |
|---|
| 351 | endif |
|---|
| 352 | |
|---|
| 353 | ifeq ($(BHSM_REGIONVERIFY),OFF) |
|---|
| 354 | BHSM_REGIONVERIFY_MK=0 |
|---|
| 355 | endif |
|---|
| 356 | |
|---|
| 357 | ifeq ($(BHSM_REGIONVERIFY_MK),1) |
|---|
| 358 | BHSM_REG_VERIFY_FEATURE=1 |
|---|
| 359 | |
|---|
| 360 | #$(warning ..........Region Verification Feature is built in with BHSM_REGIONVERIFY_MK= $(BHSM_REGIONVERIFY_MK) ) |
|---|
| 361 | |
|---|
| 362 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/region_verify \ |
|---|
| 363 | $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/region_verify/aegis |
|---|
| 364 | |
|---|
| 365 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/region_verify/bhsm_verify_reg.c |
|---|
| 366 | |
|---|
| 367 | endif |
|---|
| 368 | |
|---|
| 369 | endif |
|---|
| 370 | |
|---|
| 371 | |
|---|
| 372 | |
|---|
| 373 | |
|---|
| 374 | ## you can turn it ON for any chip, with 'make BHSM_IPTV=ON', even for any chip |
|---|
| 375 | ifeq ($(BHSM_IPTV),ON) |
|---|
| 376 | BHSM_IPTV_MK=1 |
|---|
| 377 | endif |
|---|
| 378 | |
|---|
| 379 | ## you can turn it OFF for any chip, with 'make BHSM_IPTV=OFF', even any chip |
|---|
| 380 | ifeq ($(BHSM_IPTV),OFF) |
|---|
| 381 | BHSM_IPTV_MK=0 |
|---|
| 382 | endif |
|---|
| 383 | |
|---|
| 384 | ifeq ($(BHSM_IPTV_MK),1) |
|---|
| 385 | #CFLAGS += -DBHSM_IPTV_CODE=1 |
|---|
| 386 | BHSM_DEFINES += BHSM_IPTV_CODE=1 |
|---|
| 387 | # $(warning ..........IPTV Feature is built in with BHSM_IPTV_MK= $(BHSM_IPTV_MK) ) |
|---|
| 388 | endif |
|---|
| 389 | |
|---|
| 390 | |
|---|
| 391 | |
|---|
| 392 | #-----------------------------------------------------------------------------------# |
|---|
| 393 | ### BSECK support |
|---|
| 394 | |
|---|
| 395 | |
|---|
| 396 | ## you can turn it ON for any chip, with 'make BHSM_BSECK=ON', even for any chip |
|---|
| 397 | ifeq ($(BHSM_BSECK),ON) |
|---|
| 398 | BHSM_BSECK_MK=1 |
|---|
| 399 | endif |
|---|
| 400 | |
|---|
| 401 | ## you can turn it OFF for any chip, with 'make BHSM_BSECK=OFF', even any chip |
|---|
| 402 | ifeq ($(BHSM_BSECK),OFF) |
|---|
| 403 | BHSM_BSECK_MK=0 |
|---|
| 404 | endif |
|---|
| 405 | |
|---|
| 406 | ifeq ($(BHSM_BSECK_MK),1) |
|---|
| 407 | #CFLAGS += -DBHSM_BSECK_CODE=1 |
|---|
| 408 | BHSM_DEFINES += BHSM_BSECK_CODE=1 |
|---|
| 409 | #$(warning ..........BSECK Feature is built in with BHSM_BSECK_MK= $(BHSM_BSECK_MK) ) |
|---|
| 410 | endif |
|---|
| 411 | |
|---|
| 412 | #-----------------------------------------------------------------------------------# |
|---|
| 413 | ### PI split, to hide certain security related PIs in a separate files |
|---|
| 414 | |
|---|
| 415 | |
|---|
| 416 | ifeq ($(BHSM_KEYLADDER),ON) |
|---|
| 417 | BHSM_SECURE_KEYLADDER_MK=1 |
|---|
| 418 | endif |
|---|
| 419 | |
|---|
| 420 | ifeq ($(BHSM_KEYLADDER),OFF) |
|---|
| 421 | BHSM_SECURE_KEYLADDER_MK=0 |
|---|
| 422 | endif |
|---|
| 423 | |
|---|
| 424 | ifeq ($(BHSM_SECURE_KEYLADDER_MK),1) |
|---|
| 425 | #CFLAGS += -DBHSM_SECURE_PI_SUPPORT_KEYLADDER=1 |
|---|
| 426 | BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_KEYLADDER=1 |
|---|
| 427 | #$(warning ..........Secure Keyladder Feature is built in with BHSM_SECURE_KEYLADDER_MK= $(BHSM_SECURE_KEYLADDER_MK) ) |
|---|
| 428 | else |
|---|
| 429 | #CFLAGS += -DBHSM_SECURE_PI_SUPPORT_KEYLADDER=0 |
|---|
| 430 | BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_KEYLADDER=0 |
|---|
| 431 | endif |
|---|
| 432 | |
|---|
| 433 | #-----------------------------------------------------------------------------------# |
|---|
| 434 | |
|---|
| 435 | ##--MS DRM Support--## |
|---|
| 436 | ifeq ($(MSDRM_PD_SUPPORT),y) |
|---|
| 437 | BHSM_DEFINES += MS_DRM |
|---|
| 438 | endif |
|---|
| 439 | |
|---|
| 440 | ifeq ($(BHSM_MISC),ON) |
|---|
| 441 | BHSM_SECURE_MISC_MK=1 |
|---|
| 442 | endif |
|---|
| 443 | |
|---|
| 444 | ifeq ($(BHSM_MISC),OFF) |
|---|
| 445 | BHSM_SECURE_MISC_MK=0 |
|---|
| 446 | endif |
|---|
| 447 | |
|---|
| 448 | ifeq ($(BHSM_SECURE_MISC_MK),1) |
|---|
| 449 | #CFLAGS += -DBHSM_SECURE_PI_SUPPORT_MISC=1 |
|---|
| 450 | BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_MISC=1 |
|---|
| 451 | #$(warning ..........Secure Misc Feature is built in with BHSM_SECURE_MISC_MK= $(BHSM_SECURE_MISC_MK) ) |
|---|
| 452 | else |
|---|
| 453 | #CFLAGS += -DBHSM_SECURE_PI_SUPPORT_MISC=0 |
|---|
| 454 | BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_MISC=0 |
|---|
| 455 | endif |
|---|
| 456 | |
|---|
| 457 | ifeq ($(BHSM_PWR_MGMT),ON) |
|---|
| 458 | BHSM_PWRMGMT_MK=1 |
|---|
| 459 | endif |
|---|
| 460 | |
|---|
| 461 | ifeq ($(BHSM_PWR_MGMT),OFF) |
|---|
| 462 | BHSM_PWRMGMT_MK=0 |
|---|
| 463 | endif |
|---|
| 464 | |
|---|
| 465 | ifeq ($(BHSM_PWRMGMT_MK),1) |
|---|
| 466 | #CFLAGS += -DBHSM_PWRMGMT_SUPPORT=1 |
|---|
| 467 | BHSM_DEFINES += BHSM_PWRMGMT_SUPPORT=1 |
|---|
| 468 | #$(warning ..........Power Management Feature is built in with BHSM_PWRMGMT_MK= $(BHSM_PWRMGMT_MK) ) |
|---|
| 469 | else |
|---|
| 470 | #CFLAGS += -DBHSM_PWRMGMT_SUPPORT=0 |
|---|
| 471 | BHSM_DEFINES += BHSM_PWRMGMT_SUPPORT=0 |
|---|
| 472 | endif |
|---|
| 473 | |
|---|
| 474 | |
|---|
| 475 | #-----------------------------------------------------------------------------------# |
|---|
| 476 | ifeq ($(BHSM_OTPMSP),ON) |
|---|
| 477 | BHSM_SECURE_OTPMSP_MK=1 |
|---|
| 478 | endif |
|---|
| 479 | |
|---|
| 480 | ifeq ($(BHSM_OTPMSP),OFF) |
|---|
| 481 | BHSM_SECURE_OTPMSP_MK=0 |
|---|
| 482 | endif |
|---|
| 483 | |
|---|
| 484 | ifeq ($(BHSM_SECURE_OTPMSP_MK),1) |
|---|
| 485 | #CFLAGS += -DBHSM_SECURE_PI_SUPPORT_OTPMSP=1 |
|---|
| 486 | BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_OTPMSP=1 |
|---|
| 487 | #$(warning ..........Secure OTP_MSP Feature is built in with BHSM_SECURE_OTPMSP_MK= $(BHSM_SECURE_OTPMSP_MK) ) |
|---|
| 488 | else |
|---|
| 489 | #CFLAGS += -DBHSM_SECURE_PI_SUPPORT_OTPMSP=0 |
|---|
| 490 | BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_OTPMSP=0 |
|---|
| 491 | endif |
|---|
| 492 | |
|---|
| 493 | # Secure RSA Functions |
|---|
| 494 | ifeq ($(BHSM_SECURE_RSA),ON) |
|---|
| 495 | BHSM_SECURE_RSA_MK=1 |
|---|
| 496 | endif |
|---|
| 497 | |
|---|
| 498 | ifeq ($(BHSM_SECURE_RSA),OFF) |
|---|
| 499 | BHSM_SECURE_RSA_MK=0 |
|---|
| 500 | endif |
|---|
| 501 | |
|---|
| 502 | ifeq ($(BHSM_SECURE_RSA_MK),1) |
|---|
| 503 | BHSM_SECURE_RSA_FEATURE=1 |
|---|
| 504 | |
|---|
| 505 | #$(warning ..........BHSM SECURE_RSA Feature is built in with BHSM_SECURE_RSA_MK= $(BHSM_SECURE_RSA_MK) ) |
|---|
| 506 | |
|---|
| 507 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_rsa \ |
|---|
| 508 | $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_rsa/aegis |
|---|
| 509 | |
|---|
| 510 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_rsa/bhsm_secure_rsa.c |
|---|
| 511 | |
|---|
| 512 | endif |
|---|
| 513 | |
|---|
| 514 | # Secure Access Functions |
|---|
| 515 | ifeq ($(BHSM_SECURE_ACCESS),ON) |
|---|
| 516 | BHSM_SECURE_ACCESS_MK=1 |
|---|
| 517 | endif |
|---|
| 518 | |
|---|
| 519 | ifeq ($(BHSM_SECURE_ACCESS),OFF) |
|---|
| 520 | BHSM_SECURE_ACCESS_MK=0 |
|---|
| 521 | endif |
|---|
| 522 | |
|---|
| 523 | ifeq ($(BHSM_SECURE_ACCESS_MK),1) |
|---|
| 524 | BHSM_SECURE_ACCESS_FEATURE=1 |
|---|
| 525 | |
|---|
| 526 | #$(warning ..........BHSM SECURE_ACCESS Feature is built in with BHSM_SECURE_ACCESS_MK= $(BHSM_SECURE_ACCESS_MK) ) |
|---|
| 527 | |
|---|
| 528 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_access \ |
|---|
| 529 | $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_access/aegis |
|---|
| 530 | |
|---|
| 531 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_access/bhsm_secure_access.c |
|---|
| 532 | |
|---|
| 533 | endif |
|---|
| 534 | |
|---|
| 535 | # IP Licensing Functions |
|---|
| 536 | ifeq ($(BHSM_IP_LICENSING),ON) |
|---|
| 537 | BHSM_IP_LICENSING_MK=1 |
|---|
| 538 | endif |
|---|
| 539 | |
|---|
| 540 | ifeq ($(BHSM_IP_LICENSING),OFF) |
|---|
| 541 | BHSM_IP_LICENSING_MK=0 |
|---|
| 542 | endif |
|---|
| 543 | |
|---|
| 544 | ifeq ($(BHSM_IP_LICENSING_MK),1) |
|---|
| 545 | BHSM_IP_LICENSING_FEATURE=1 |
|---|
| 546 | |
|---|
| 547 | #$(warning ..........BHSM IP_LICENSING Feature is built in with BHSM_IP_LICENSING_MK= $(BHSM_IP_LICENSING_MK) ) |
|---|
| 548 | |
|---|
| 549 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/ip_licensing \ |
|---|
| 550 | $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/ip_licensing/aegis |
|---|
| 551 | |
|---|
| 552 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/ip_licensing/bhsm_ip_licensing.c |
|---|
| 553 | |
|---|
| 554 | endif |
|---|
| 555 | # Debug_RdWr feature |
|---|
| 556 | ifeq ($(BHSM_DEBUG_RD_WR),ON) |
|---|
| 557 | BHSM_DEBUG_RD_WR_MK=1 |
|---|
| 558 | endif |
|---|
| 559 | |
|---|
| 560 | ifeq ($(BHSM_DEBUG_RD_WR),OFF) |
|---|
| 561 | BHSM_DEBUG_RD_WR_MK=0 |
|---|
| 562 | endif |
|---|
| 563 | |
|---|
| 564 | ifeq ($(BHSM_DEBUG_RD_WR_MK),1) |
|---|
| 565 | BHSM_DEBUG_RD_WR_FEATURE=1 |
|---|
| 566 | |
|---|
| 567 | #$(warning ..........BHSM DEBUG_RD_WR Feature is built in with BHSM_DEBUG_RD_WR_MK= $(BHSM_DEBUG_RD_WR_MK) ) |
|---|
| 568 | |
|---|
| 569 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/brcm_only |
|---|
| 570 | |
|---|
| 571 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 572 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/brcm_only/bhsm_debug_rdwr.c |
|---|
| 573 | endif |
|---|
| 574 | |
|---|
| 575 | endif |
|---|
| 576 | |
|---|
| 577 | ####################################################################### |
|---|
| 578 | |
|---|
| 579 | BHSM_KEY_LADDER_FEATURE=1 |
|---|
| 580 | |
|---|
| 581 | BHSM_OTPMSP_FEATURE=1 |
|---|
| 582 | |
|---|
| 583 | |
|---|
| 584 | ####################################################################### |
|---|
| 585 | |
|---|
| 586 | # Module Includes |
|---|
| 587 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common |
|---|
| 588 | |
|---|
| 589 | |
|---|
| 590 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/aegis |
|---|
| 591 | |
|---|
| 592 | ifdef BHSM_KEY_LADDER_FEATURE |
|---|
| 593 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder |
|---|
| 594 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 595 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder/bhsm_keyladder.c |
|---|
| 596 | endif |
|---|
| 597 | endif |
|---|
| 598 | |
|---|
| 599 | # automatically pick up the customer specific shared header files, cust_x or cust_generic |
|---|
| 600 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_$(BHSM_CUST_DIR) |
|---|
| 601 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_$(BHSM_CUST_DIR)/aegis |
|---|
| 602 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/user_misc_cmd |
|---|
| 603 | |
|---|
| 604 | # Module Sources |
|---|
| 605 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 606 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm.c |
|---|
| 607 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_priv.c |
|---|
| 608 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/user_misc_cmd/bhsm_misc.c |
|---|
| 609 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/user_misc_cmd/bhsm_user_cmds.c |
|---|
| 610 | endif |
|---|
| 611 | ifeq ($(BHSM_SECURE_OTPMSP_MK),1) |
|---|
| 612 | ifdef BHSM_OTPMSP_FEATURE |
|---|
| 613 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp |
|---|
| 614 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp/aegis |
|---|
| 615 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 616 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp/bhsm_otpmsp.c |
|---|
| 617 | endif |
|---|
| 618 | endif |
|---|
| 619 | endif |
|---|
| 620 | |
|---|
| 621 | # Extended options |
|---|
| 622 | |
|---|
| 623 | ifeq ($(BHSM_IPTV_MK),1) |
|---|
| 624 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/iptv |
|---|
| 625 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 626 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/iptv/bhsm_iptv.c |
|---|
| 627 | endif |
|---|
| 628 | #CFLAGS += -DBHSM_IPTV=1 -DBSP_MSIPTV |
|---|
| 629 | BHSM_DEFINES += BHSM_IPTV=1 |
|---|
| 630 | BHSM_DEFINES += BSP_MSIPTV |
|---|
| 631 | endif |
|---|
| 632 | |
|---|
| 633 | # IMS144828: Add BHSM_IPTV to zero to fix compiler warnings |
|---|
| 634 | ifeq ($(BHSM_IPTV_MK),0) |
|---|
| 635 | #CFLAGS += -DBHSM_IPTV=0 |
|---|
| 636 | BHSM_DEFINES += BHSM_IPTV=0 |
|---|
| 637 | endif |
|---|
| 638 | # IMS144828: end |
|---|
| 639 | |
|---|
| 640 | ifeq ($(BHSM_BSECK_MK),1) |
|---|
| 641 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/region_verify |
|---|
| 642 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/region_verify/aegis |
|---|
| 643 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 644 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/region_verify/bhsm_bseck.c |
|---|
| 645 | endif |
|---|
| 646 | #CFLAGS += -DBSP_DOWNLOAD_CODE=1 |
|---|
| 647 | BHSM_DEFINES += BSP_DOWNLOAD_CODE=1 |
|---|
| 648 | endif |
|---|
| 649 | |
|---|
| 650 | ifeq ($(BHSM_SECURE_KEYLADDER_MK),1) |
|---|
| 651 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 652 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder/bhsm_keyladder_enc.c |
|---|
| 653 | endif |
|---|
| 654 | endif |
|---|
| 655 | |
|---|
| 656 | |
|---|
| 657 | ifeq ($(BHSM_PWRMGMT_MK),1) |
|---|
| 658 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 659 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/power_management/bhsm_pwr_mgmt.c |
|---|
| 660 | endif |
|---|
| 661 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/power_management |
|---|
| 662 | endif |
|---|
| 663 | |
|---|
| 664 | ifeq ($(BHSM_SECURE_MISC_MK),1) |
|---|
| 665 | ifneq ($(HSM_SOURCE_AVAILABLE),n) |
|---|
| 666 | BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/user_misc_cmd/bhsm_misc_enc.c |
|---|
| 667 | endif |
|---|
| 668 | BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/user_misc_cmd |
|---|
| 669 | endif |
|---|