source: svn/newcon3bcm2_21bu/magnum/portinginterface/hsm/bhsm.inc @ 26

Last change on this file since 26 was 26, checked in by phkim, 11 years ago
  1. phkim
  2. 서경방소에서 kctv 로고 변경
  • Property svn:executable set to *
File size: 26.5 KB
Line 
1############################################################
2#     Copyright (c) 2003-2011, Broadcom Corporation
3#     All Rights Reserved
4#     Confidential Property of Broadcom Corporation
5#
6#  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7#  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8#  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9#
10# $brcm_Workfile: bhsm.inc $
11# $brcm_Revision: Hydra_Software_Devel/55 $
12# $brcm_Date: 7/28/11 11:49a $
13#
14# Module Description:
15#
16# Revision History:
17#
18# Created: 01/09/2007 by Jon Garrett
19#
20# $brcm_Log: /magnum/portinginterface/hsm/bhsm.inc $
21#
22# Hydra_Software_Devel/55   7/28/11 11:49a cdisc
23# SWDTV-8093: adding bhsm_misc.c to BHSM_SOURCES for 35xxx chips
24#
25# Hydra_Software_Devel/54   4/11/11 6:08p cdisc
26# SWDTV-6345: 35233 bring up
27#
28# Hydra_Software_Devel/53   3/18/11 5:12p cdisc
29# SWBLURAY-25150: adding AACS support
30#
31# Hydra_Software_Devel/52   2/10/11 1:53p cdisc
32# SWBLURAY-23691: missing endif
33#
34# Hydra_Software_Devel/51   2/8/11 12:47p cdisc
35# SWBLURAY-23691: adding 7640 specific mods
36#
37# Hydra_Software_Devel/50   11/9/10 10:26a cdisc
38# SW35125-13: adding hsm directory symlink to 35230
39#
40# Hydra_Software_Devel/49   7/21/10 3:04p cdisc
41# SW35230-581: adding bhsm_user_cmd to INCLUDES if chip is 35230
42#
43# Hydra_Software_Devel/48   6/10/10 5:29p qcheng
44# SW7550-413 : bhsm.inc prints warnings on every build
45#
46# Hydra_Software_Devel/47   6/2/10 2:32p cdisc
47# SW35230-51:   Magnum HSM PI needs to build for the 35230
48#
49# Hydra_Software_Devel/46   3/4/10 3:28p qcheng
50# SW7408-82 : Add security support for 7408 A0
51#
52# Hydra_Software_Devel/45   12/9/09 12:13p atruong
53# SW7550-102 : Add Security support for 7550
54#
55# Hydra_Software_Devel/44   12/9/09 9:46a atruong
56# SW7468-16: HSM PI Support for 7468A0
57#
58# Hydra_Software_Devel/43   10/28/09 1:38a atruong
59# SW7405-3298: Modification for ICAM Build
60#
61# Hydra_Software_Devel/42   10/9/09 1:54a atruong
62# SW7405-3173: New HSM PI and Nexus API function for reading OTP IDs
63#
64# Hydra_Software_Devel/41   9/15/09 12:21a atruong
65# SW7630-18: HSM PI Support for 7630B0
66#
67# Hydra_Software_Devel/40   9/14/09 12:33a atruong
68# SW7630-18: HSM PI Support for 7630B0
69#
70# Hydra_Software_Devel/39   8/20/09 6:29p atruong
71# PR55544: HSM PI Support For 7125A0
72#
73# Hydra_Software_Devel/38   8/11/09 4:13p atruong
74# PR55231: HSM PI Support For 7340A0
75#
76# Hydra_Software_Devel/37   8/5/09 10:30a atruong
77# PR55231: HSM PI Support for BCM7342A0
78#
79# Hydra_Software_Devel/36   7/24/09 3:27p atruong
80# PR56432: HSM PI Support for Secure RSA/Access cmds and FastCycling
81#
82# Hydra_Software_Devel/35   4/3/09 11:07a yili
83# PR53745:Added DS key routing to HSM
84#
85# Hydra_Software_Devel/34   4/1/09 10:54a atruong
86# PR53733: MS DRM Support Flag Added
87#
88# Hydra_Software_Devel/33   3/31/09 5:46p atruong
89# PR53733: Add MSDRM_PD_HWDECRYPT Support
90#
91# Hydra_Software_Devel/32   3/30/09 1:02p atruong
92# PR52979: Support for 7635A0
93#
94# Hydra_Software_Devel/31   3/26/09 10:57a vsilyaev
95# PR 53611: Use simply expanded variables everywhere where $(shell ...)
96# is used. It prevents evaluation of $(shell ) every where variable is
97# used
98#
99# Hydra_Software_Devel/30   12/5/08 8:39p atruong
100# PR50045: HSM PI Support for BCM7420 A0
101#
102# Hydra_Software_Devel/29   11/13/08 2:44p atruong
103# PR48869: Support HSM PI Raw Commands for BSP/Aegis
104#
105# Hydra_Software_Devel/28   8/27/08 8:44a atruong
106# PR45631: BCM97601A0 Bring Up
107#
108# Hydra_Software_Devel/27   8/21/08 12:03p atruong
109# PR45511: Add support for uScVal definition for newer chips (7400C0 and
110# up)
111#
112# Hydra_Software_Devel/26   8/12/08 4:27p atruong
113# PR45631: HSM PI support for BCM7601 platform
114#
115# Hydra_Software_Devel/25   4/9/08 11:05a atruong
116# PR38948: HSM PI support for BCM3548
117# PR39464: HSM PI support for BCM3556
118#
119# Hydra_Software_Devel/24   2/13/08 3:53p qxie
120# PR36907:Invalid use of CFLAGS in bhsm.inc
121#
122# Hydra_Software_Devel/23   12/13/07 12:45p qxie
123# PR38185: HSM: remove warning message in bhsm.inc
124#
125# Hydra_Software_Devel/22   12/13/07 12:42p qxie
126# PR 38185: HSM: remove warning message in bhsm.inc
127#
128# Hydra_Software_Devel/21   12/6/07 10:26a qxie
129# PR 37907: HSM: change  defaultBSECK=OFF
130#
131# Hydra_Software_Devel/20   11/21/07 3:52p qxie
132# PR 37479: HSM: change bhsm.inc to support BSECK for 7400 D0
133#
134# Hydra_Software_Devel/19   11/3/07 9:25a lyang
135# PR 35987: HSM to support BSECK, MS IPTV commands, SHA1 udpate
136#
137# Hydra_Software_Devel/18   10/30/07 11:34a lyang
138# PR36565: bhsm.inc spaces in ifeq cause trouble setting defaults
139# elsewhere
140#
141# Hydra_Software_Devel/17   10/24/07 3:36p lyang
142# PR 35987: HSM to support BSECK, MS IPTV commands, SHA1 udpate
143#
144# Hydra_Software_Devel/16   10/22/07 3:25p lyang
145# PR 35987: HSM to support BSECK, MS IPTV commands, SHA1 udpate
146#
147# Hydra_Software_Devel/15   10/22/07 1:06p lyang
148# PR 35987: HSM to support BSECK, MS IPTV commands, SHA1 udpate
149#
150# Hydra_Software_Devel/14   10/19/07 5:18p lyang
151# PR 35987: HSM to support BSECK, MS IPTV commands, SHA1 udpate
152#
153# Hydra_Software_Devel/13   9/26/07 2:59p lyang
154# PR 34706: add support for 7400 D0 to portinginterface/hsm
155#
156# Hydra_Software_Devel/12   8/28/07 5:19p lyang
157# PR 33325: make RMX patch selectable for all chips; default on for those
158# confirmed chips; OFF for others
159#
160# Hydra_Software_Devel/11   5/9/07 4:06p lyang
161# PR 27711: Add 7400B0, 7405A0 support to HSM. Purge and shared *.h
162# source udpated
163#
164# Hydra_Software_Devel/10   4/26/07 12:48p lyang
165# PR 29703: Add HSM support for 7403 A1, 7118A1, Program secret update
166#
167# Hydra_Software_Devel/9   4/25/07 12:43p lyang
168# PR 29703: Add HSM support for 7403 A1, 7118A1, Program secret update
169#
170# Hydra_Software_Devel/8   4/3/07 5:43p lyang
171# PR 27763: HSM to add 2 new PIs to support 7440B0
172#
173# Hydra_Software_Devel/7   4/3/07 5:40p lyang
174# PR 27763: HSM to add 2 new PIs to support 7440B0
175#
176# Hydra_Software_Devel/6   4/3/07 3:54p lyang
177# PR 27763: HSM to add 2 new PIs to support 7440B0
178#
179# Hydra_Software_Devel/5   3/5/07 9:17p lyang
180# PR 27763: HSM to add a new PI to support 7440B0, version upper to lower
181# casse
182#
183# Hydra_Software_Devel/4   3/2/07 10:20p lyang
184# PR 27763: HSM to add a new PI to support 7440B0
185#
186# Hydra_Software_Devel/3   3/2/07 4:33p lyang
187# PR 27763: HSM to add a new PI to support 7440B0
188#
189# Hydra_Software_Devel/2   3/2/07 4:23p lyang
190# PR 27763: HSM to add a new PI to support 7440B0.
191#
192# Hydra_Software_Devel/1   1/11/07 3:37p jgarrett
193# PR27004: Adding new .inc files
194#
195############################################################
196
197#-----------------------------------------------------------------------------------#
198# HSM build-command-line-options:
199#  CUST=G  or D  or E  or N or A  or GT  or NGNA (to turn on DCAS)  or S  or G or H to select customer mode
200#  RMXPATCH=ON               to turn on RMX patch
201#  SCVALUE=ON                to turn on scrambling ctrl bits setting with specified value
202#  BHSM_REGIONVERIFY=ON      to turn on region verification with Generic mode  (invalid option for non-Generic mode build)
203#  BHSM_BSECK=ON             to turn on/off BSECK feature
204#  BHSM_IPTV=ON              to turn on/off IPTV feature
205#  BHSM_KEYLADDER=ON         to select spitted, protected secure PIs
206#  BHSM_MISC=ON              to select spitted, protected secure PIs
207#  BHSM_OTPMSP=ON            to select spitted, protected secure PIs
208#  BHSM_SECURE_RSA=ON        to turn on Secure RSA feature
209#  BHSM_SECURE_ACCESS=ON     to turn on Secure Access (DRM Data Op) feature
210#  BHSM_IP_LICENSING=ON      to turn on IP Licensing feature
211#
212#-----------------------------------------------------------------------------------#
213
214
215#
216# Conditional Options for this Makefile
217#
218# BHSM_CUST - HSM Specific Option.  This value will be provided for you if appropriate.
219#
220
221# Define this module
222MAGNUM_MODULES += BHSM
223
224BCHP_VER_LOWER := $(shell awk 'BEGIN{print tolower("$(BCHP_VER)")}')
225
226# Definitions
227BHSM_DEFINES += BHSM_AEGIS_SUPPORT
228
229# Support uScValue definition for newer chip (7400C0 and later)
230BHSM_DEFINES += BHSM_SC_VALUE
231
232         
233
234
235#-----------------------------------------------------------------------------------#
236# old support "make CUST=E"
237# space can NOT be put after 'E' in ifeq ($(CUST),  E),  yet can be put before 'E'
238
239ifeq ($(CUST),E)
240BHSM_CUST := E
241endif
242
243
244#-----------------------------------------------------------------------------------#
245# 4/11/07 to add EchoStar build support
246# this is complicated, discard:  ifeq ($(findstring E, $(BHSM_CUST)), $(BHSM_CUST))
247
248ifeq ($(BHSM_CUST),E)
249# change itself from the upper case to lower for directory mapping
250
251BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
252         
253include $(MAGNUM)/portinginterface/hsm/bhsm_e.inc
254endif
255
256
257
258#-----------------------------------------------------------------------------------#
259# old support "make CUST=D"
260ifeq ($(CUST),D)
261BHSM_CUST := D
262endif
263
264ifeq ($(BHSM_CUST),D)
265
266BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
267         
268include $(MAGNUM)/portinginterface/hsm/bhsm_d.inc
269endif
270
271
272#-----------------------------------------------------------------------------------#
273# old support "make CUST=S"
274ifeq ($(CUST),S)
275BHSM_CUST := S
276endif
277
278ifeq ($(BHSM_CUST),S)
279
280BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
281         
282include $(MAGNUM)/portinginterface/hsm/bhsm_s.inc
283endif
284
285
286#-----------------------------------------------------------------------------------#
287# old support "make CUST=T"
288ifeq ($(CUST),T)
289BHSM_CUST := T
290endif
291
292ifeq ($(BHSM_CUST),T)
293
294BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
295         
296include $(MAGNUM)/portinginterface/hsm/bhsm_t.inc
297endif
298
299
300#-----------------------------------------------------------------------------------#
301# old support "make CUST=H"
302ifeq ($(CUST),H)
303BHSM_CUST := H
304endif
305
306ifeq ($(BHSM_CUST),H)
307
308BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
309         
310include $(MAGNUM)/portinginterface/hsm/bhsm_h.inc
311endif
312
313
314#-----------------------------------------------------------------------------------#
315# old support "make CUST=M"
316ifeq ($(CUST),M)
317BHSM_CUST := M
318endif
319
320ifeq ($(BHSM_CUST),M)
321
322BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
323         
324include $(MAGNUM)/portinginterface/hsm/bhsm_m.inc
325endif
326
327
328#-----------------------------------------------------------------------------------#
329# old support "make CUST=N"
330ifeq ($(CUST),N)
331BHSM_CUST := N
332endif
333
334ifeq ($(BHSM_CUST),N)
335
336BHSM_CUST_DIR := $(shell awk 'BEGIN{print tolower("$(BHSM_CUST)")}')
337         
338include $(MAGNUM)/portinginterface/hsm/bhsm_n.inc
339endif
340
341#-----------------------------------------------------------------------------------#
342# old support "make CUST=A"
343ifeq ($(CUST),A)
344BHSM_CUST := A
345endif
346
347ifeq ($(BHSM_CUST),A)
348
349BHSM_CUST_DIR = all
350         
351include $(MAGNUM)/portinginterface/hsm/bhsm_all.inc
352endif
353
354
355#-----------------------------------------------------------------------------------#
356#  added 4/3/07 for DVD customer specific commands , narrow down for 7440B0 above only
357ifeq ($(BCHP_CHIP),7440)
358ifneq ($(BCHP_VER_LOWER),a0)
359
360
361ifeq ($(CUST),GT)   
362BHSM_CUST := GT
363endif
364
365ifeq ($(BHSM_CUST),GT)         
366BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_toshiba
367BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_toshiba/bhsm_dvd_toshiba.c
368BHSM_CUST := G
369GREAT_GENERIC=true
370
371endif
372
373
374endif
375endif
376
377
378ifeq ($(findstring $(BCHP_CHIP), 7601 7635 7630), $(BCHP_CHIP))
379
380ifeq ($(CUST),GT)   
381BHSM_CUST := GT
382endif
383
384ifeq ($(BHSM_CUST),GT)         
385BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_toshiba
386BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_toshiba/bhsm_dvd_toshiba.c
387BHSM_CUST := G
388GREAT_GENERIC=true
389
390endif
391
392
393endif
394
395#-----------------------------------------------------------------------------------#
396#  added 4/25/07 for DCAS specific commands. No chip/version limit yet. may be added later
397
398ifeq ($(CUST),NGNA)         
399BHSM_CUST :=NGNA
400endif
401
402
403ifeq ($(BHSM_CUST),NGNA)
404         
405BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/ngna
406BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/ngna/bhsm_dcas_cmds.c
407GREAT_GENERIC=true
408
409# not used here, for testApp build
410BHSM_CUST_GENERICNGNA=1
411
412endif
413
414
415
416
417#-----------------------------------------------------------------------------------#
418ifeq ($(CUST),G)
419BHSM_CUST := G
420endif
421ifeq ($(BHSM_CUST),G)
422GREAT_GENERIC=true
423endif
424
425ifeq ($(findstring G, $(BHSM_CUST)), $(BHSM_CUST))
426BHSM_CUST := G
427GREAT_GENERIC=true
428endif
429
430ifeq ($(findstring G, $(CUST)), $(CUST))
431BHSM_CUST := G
432GREAT_GENERIC=true
433endif
434
435
436#-----------------------------------------------------------------------------------#         
437# Default BHSM_CUST to generic,   
438# new support : "make BHSM_CUST=G"
439#                     "make without touch of BHSM_CUST"
440#                 "make CUST=X,  make BHSM_CUST=X,   X is anything but defined"
441#ifeq ($(findstring G, $(BHSM_CUST)), $(BHSM_CUST))
442
443ifeq ($(GREAT_GENERIC),true)
444# this line has no effect if make BHSM_CUST=G :            BHSM_CUST := generic
445
446# not used here, for testApp build
447BHSM_CUST_GENERIC=1
448
449BHSM_DEFINES += BSP_GENERIC
450
451# 3/8/07, looks the platform or magnum doesn't add this definition
452#CFLAGS += -DBSP_GENERIC
453
454# always
455BHSM_CUST_DIR = generic
456
457###Region_Verification support in Generic Mode, there is an option to add the Region_Verification or not
458ifeq ($(BHSM_REGIONVERIFY),ON)
459BHSM_REGIONVERIFY_MK=1
460endif
461
462ifeq ($(BHSM_REGIONVERIFY),OFF)
463BHSM_REGIONVERIFY_MK=0
464endif
465         
466ifeq ($(BHSM_REGIONVERIFY_MK),1)
467BHSM_REG_VERIFY_FEATURE=1
468
469#$(warning  ..........Region Verificationi Feature is built in with BHSM_REGIONVERIFY_MK= $(BHSM_REGIONVERIFY_MK) )
470         
471BHSM_INCLUDES +=        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/region_verify \
472                        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/region_verify/aegis
473       
474BHSM_SOURCES +=         $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/region_verify/bhsm_verify_reg.c
475
476endif
477         
478endif
479
480
481
482#-----------------------------------------------------------------------------------#
483
484###  7401C0/C1/C2 need RMX patch
485ifeq ($(BCHP_CHIP),7401)
486ifeq ($(BCHP_VER),C0)
487BHSM_RMX_PATCH=1
488endif
489ifeq ($(BCHP_VER),C1)
490BHSM_RMX_PATCH=1
491endif
492ifeq ($(BCHP_VER),C2)
493BHSM_RMX_PATCH=1
494endif
495endif
496
497### 7403A0/A1 need RMX patch
498ifeq ($(BCHP_CHIP),7403)
499ifeq ($(BCHP_VER),A0)
500BHSM_RMX_PATCH=1
501endif
502ifeq ($(BCHP_VER),A1)
503BHSM_RMX_PATCH=1
504endif
505endif
506
507### 7118, unknown yet.  if need, please use  'make RMXPATCH=ON/' to turn on, by default it's off
508ifeq ($(BCHP_CHIP),7118)
509ifeq ($(BCHP_VER),B0)
510
511endif
512endif
513
514
515### 7405 all 65nm, not needed
516### 7400 B0 65nm, not needed,  A0?
517
518## you can turn it ON for any chip, with 'make RMXPATCH=ON', even for 65nm chips like 7405
519ifeq ($(RMXPATCH),ON)
520BHSM_RMX_PATCH=1
521endif
522
523## you can turn it OFF for any chip, with 'make RMXPATCH=OFF', even for 130nm chips like 7401C0/C1/C2
524ifeq ($(RMXPATCH),OFF)
525BHSM_RMX_PATCH=0
526endif
527         
528ifeq ($(BHSM_RMX_PATCH),1)
529#CFLAGS += -DBHSM_RMX_PATCH=1
530BHSM_DEFINES += BHSM_RMX_PATCH=1
531#$(warning  ..........bhsm_all.inc is entered with BHSM_RMX_PATCH= $(BHSM_RMX_PATCH) )
532endif
533
534## you can turn it ON for any chip, with 'make BHSM_IPTV=ON', even for any chip
535ifeq ($(BHSM_IPTV),ON)
536BHSM_IPTV_MK=1
537endif
538
539## you can turn it OFF for any chip, with 'make BHSM_IPTV=OFF', even any chip
540ifeq ($(BHSM_IPTV),OFF)
541BHSM_IPTV_MK=0
542endif
543         
544ifeq ($(BHSM_IPTV_MK),1)
545#CFLAGS += -DBHSM_IPTV_CODE=1
546BHSM_DEFINES += BHSM_IPTV_CODE=1
547# $(warning  ..........IPTV Feature is built in with BHSM_IPTV_MK= $(BHSM_IPTV_MK) )
548endif
549
550#-----------------------------------------------------------------------------------#
551
552
553#-----------------------------------------------------------------------------------#
554###  BSECK  support
555
556ifeq ($(BCHP_CHIP),7400)
557ifneq ($(findstring $(BCHP_VER),A0 B0 C0), $(BCHP_VER))
558BHSM_BSECK_MK=0
559endif
560endif
561
562ifeq ($(findstring $(BCHP_CHIP), 7405 7325 7335 7420 7340 7342 7125 7468), $(BCHP_CHIP))
563BHSM_BSECK_MK=0
564endif
565
566## you can turn it ON for any chip, with 'make BHSM_BSECK=ON', even for any chip
567ifeq ($(BHSM_BSECK),ON)
568BHSM_BSECK_MK=1
569endif
570
571## you can turn it OFF for any chip, with 'make BHSM_BSECK=OFF', even any chip
572ifeq ($(BHSM_BSECK),OFF)
573BHSM_BSECK_MK=0
574endif
575         
576ifeq ($(BHSM_BSECK_MK),1)
577#CFLAGS += -DBHSM_BSECK_CODE=1
578BHSM_DEFINES += BHSM_BSECK_CODE=1
579#$(warning  ..........BSECK Feature is built in with BHSM_BSECK_MK= $(BHSM_BSECK_MK) )
580endif
581
582#-----------------------------------------------------------------------------------#
583###  PI split, to hide certain security related PIs in a separate files
584
585
586ifeq ($(BHSM_KEYLADDER),ON)
587BHSM_SECURE_KEYLADDER_MK=1
588endif
589
590ifeq ($(BHSM_KEYLADDER),OFF)
591BHSM_SECURE_KEYLADDER_MK=0
592endif
593         
594ifeq ($(BSP_DS2_KEY_ROUTING),ON)
595BHSM_DEFINES += BHSM_DS2_KEY_ROUTING
596BHSM_SECURE_KEYLADDER_MK=1
597endif
598
599ifeq ($(BHSM_SECURE_KEYLADDER_MK),1)
600#CFLAGS += -DBHSM_SECURE_PI_SUPPORT=1  -DBHSM_SECURE_PI_SUPPORT_KEYLADDER=1
601BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT=1
602BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_KEYLADDER=1
603#$(warning  ..........Secure Keyladder Feature is built in with BHSM_SECURE_KEYLADDER_MK= $(BHSM_SECURE_KEYLADDER_MK) )
604else
605#CFLAGS += -DBHSM_SECURE_PI_SUPPORT=0  -DBHSM_SECURE_PI_SUPPORT_KEYLADDER=0
606BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT=0
607BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_KEYLADDER=0
608endif
609
610#-----------------------------------------------------------------------------------#
611
612##--MS DRM Support--##
613ifeq ($(MSDRM_PD_SUPPORT),y)
614BHSM_DEFINES += MS_DRM
615endif
616
617ifeq ($(BHSM_MISC),ON)
618BHSM_SECURE_MISC_MK=1
619endif
620
621ifeq ($(BHSM_MISC),OFF)
622BHSM_SECURE_MISC_MK=0
623endif
624         
625ifeq ($(BHSM_SECURE_MISC_MK),1)
626#CFLAGS +=  -DBHSM_SECURE_PI_SUPPORT_MISC=1
627BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_MISC=1
628#$(warning  ..........Secure Misc Feature is built in with BHSM_SECURE_MISC_MK= $(BHSM_SECURE_MISC_MK) )
629else
630#CFLAGS +=  -DBHSM_SECURE_PI_SUPPORT_MISC=0
631BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_MISC=0
632endif
633
634
635#-----------------------------------------------------------------------------------#
636ifeq ($(BHSM_OTPMSP),ON)
637BHSM_SECURE_OTPMSP_MK=1
638endif
639
640ifeq ($(BHSM_OTPMSP),OFF)
641BHSM_SECURE_OTPMSP_MK=0
642endif
643         
644ifeq ($(BHSM_SECURE_OTPMSP_MK),1)
645#CFLAGS +=  -DBHSM_SECURE_PI_SUPPORT_OTPMSP=1
646BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_OTPMSP=1
647#$(warning  ..........Secure OTP_MSP Feature is built in with BHSM_SECURE_OTPMSP_MK= $(BHSM_SECURE_OTPMSP_MK) )
648else
649#CFLAGS +=  -DBHSM_SECURE_PI_SUPPORT_OTPMSP=0
650BHSM_DEFINES += BHSM_SECURE_PI_SUPPORT_OTPMSP=0
651endif
652
653# Secure RSA Functions
654ifeq ($(BHSM_SECURE_RSA),ON)
655BHSM_SECURE_RSA_MK=1
656endif
657
658ifeq ($(BHSM_SECURE_RSA),OFF)
659BHSM_SECURE_RSA_MK=0
660endif
661         
662ifeq ($(BHSM_SECURE_RSA_MK),1)
663BHSM_SECURE_RSA_FEATURE=1
664
665#$(warning  ..........BHSM SECURE_RSA Feature is built in with BHSM_SECURE_RSA_MK= $(BHSM_SECURE_RSA_MK) )
666         
667BHSM_INCLUDES +=        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_rsa \
668                        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_rsa/aegis
669       
670BHSM_SOURCES +=         $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_rsa/bhsm_secure_rsa.c
671
672endif
673
674# Secure Access Functions
675ifeq ($(BHSM_SECURE_ACCESS),ON)
676BHSM_SECURE_ACCESS_MK=1
677endif
678
679ifeq ($(BHSM_SECURE_ACCESS),OFF)
680BHSM_SECURE_ACCESS_MK=0
681endif
682         
683ifeq ($(BHSM_SECURE_ACCESS_MK),1)
684BHSM_SECURE_ACCESS_FEATURE=1
685
686#$(warning  ..........BHSM SECURE_ACCESS Feature is built in with BHSM_SECURE_ACCESS_MK= $(BHSM_SECURE_ACCESS_MK) )
687         
688BHSM_INCLUDES +=        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_access \
689                        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_access/aegis
690       
691BHSM_SOURCES +=         $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/secure_access/bhsm_secure_access.c
692
693endif
694
695# IP Licensing Functions
696ifeq ($(BHSM_IP_LICENSING),ON)
697BHSM_IP_LICENSING_MK=1
698endif
699
700ifeq ($(BHSM_IP_LICENSING),OFF)
701BHSM_IP_LICENSING_MK=0
702endif
703         
704ifeq ($(BHSM_IP_LICENSING_MK),1)
705BHSM_IP_LICENSING_FEATURE=1
706
707#$(warning  ..........BHSM IP_LICENSING Feature is built in with BHSM_IP_LICENSING_MK= $(BHSM_IP_LICENSING_MK) )
708         
709BHSM_INCLUDES +=        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/ip_licensing \
710                        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/ip_licensing/aegis
711       
712BHSM_SOURCES +=         $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/ip_licensing/bhsm_ip_licensing.c
713
714endif
715# Debug_RdWr feature
716ifeq ($(BHSM_DEBUG_RD_WR),ON)
717BHSM_DEBUG_RD_WR_MK=1
718endif
719
720ifeq ($(BHSM_DEBUG_RD_WR),OFF)
721BHSM_DEBUG_RD_WR_MK=0
722endif
723
724ifeq ($(BHSM_DEBUG_RD_WR_MK),1)
725BHSM_DEBUG_RD_WR_FEATURE=1
726
727#$(warning  ..........BHSM DEBUG_RD_WR Feature is built in with BHSM_DEBUG_RD_WR_MK= $(BHSM_DEBUG_RD_WR_MK) )
728         
729BHSM_INCLUDES +=        $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/debug_rdwr
730       
731BHSM_SOURCES +=         $(MAGNUM)/portinginterface/hsm/${BCHP_CHIP}/${BCHP_VER_LOWER}/debug_rdwr/bhsm_debug_rdwr.c
732
733endif
734
735#######################################################################
736
737BHSM_KEY_LADDER_FEATURE=1
738
739ifneq ($(findstring $(BCHP_CHIP),3563 3548 3556), $(BCHP_CHIP))
740BHSM_OTPMSP_FEATURE=1
741endif
742
743
744#######################################################################
745
746# Module Includes
747BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common
748ifeq ($(findstring $(BCHP_CHIP), 7550,7408), $(BCHP_CHIP))
749#$(warning  ..........No Aegis header files needed for 7550  )
750else
751BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/aegis
752endif
753
754ifdef BHSM_KEY_LADDER_FEATURE
755BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder
756ifeq ($(findstring $(BCHP_CHIP), 7550,7408), $(BCHP_CHIP))
757#$(warning  ..........No Aegis header files needed for 7550  )
758else
759BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder/aegis
760endif
761BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder/bhsm_keyladder.c
762endif
763
764ifeq ($(findstring $(BCHP_CHIP),7440 7601 7635 7630), $(BCHP_CHIP))
765ifdef BHSM_OTPMSP_FEATURE       
766BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp
767BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp/aegis
768BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp/bhsm_otpmsp.c
769endif
770ifeq ($(BHSM_PROG_PATTERN),ON)
771BHSM_DEFINES += BSP_OTP_PROG_PATTERN_SEQUENCE=1
772endif
773endif
774
775# automatically pick up the customer specific shared header files, cust_x or cust_generic
776ifeq ($(findstring $(BCHP_CHIP), 7550,7408), $(BCHP_CHIP))
777#$(warning  ..........No customer specific header files needed for 7550  )
778else
779BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_$(BHSM_CUST_DIR)
780BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_$(BHSM_CUST_DIR)/aegis
781endif
782
783# Module Sources
784ifeq ($(findstring $(BCHP_CHIP), 7550,7408, 35230, 35125, 35233), $(BCHP_CHIP))
785BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm.c
786BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_priv.c
787else
788ifeq ($(findstring $(BCHP_CHIP), 7640), $(BCHP_CHIP))
789BHSM_SOURCES +=
790else
791BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm.c
792BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_priv.c
793BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_misc.c
794BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_user_cmds.c
795endif
796endif
797
798ifeq ($(findstring $(BCHP_CHIP), 35230, 35125, 35233), $(BCHP_CHIP))
799BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_user_cmds.c
800BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_misc.c
801endif
802
803ifeq ($(BHSM_SECURE_OTPMSP_MK),1)
804ifdef BHSM_OTPMSP_FEATURE       
805BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp
806BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp/aegis
807BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/otpmsp/bhsm_otpmsp.c
808endif
809endif
810
811# Extended options
812ifeq ($(BCHP_CHIP),7118)
813BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/docsis
814
815BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/docsis/bhsm_docsis.c
816endif
817
818
819ifeq ($(BCHP_CHIP),7440)
820BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/dvd_cmds
821BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/dvd_cmds/aegis
822
823BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/dvd_cmds/bhsm_dvd_cmds.c
824endif
825
826ifeq ($(findstring $(BCHP_CHIP), 7601 7635 7630), $(BCHP_CHIP))
827BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/dvd_cmds
828BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/dvd_cmds/aegis
829
830BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/dvd_cmds/bhsm_dvd_cmds.c
831endif
832
833
834ifeq ($(BHSM_IPTV_MK),1)
835BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/iptv
836BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/iptv/bhsm_iptv.c
837#CFLAGS += -DBHSM_IPTV=1 -DBSP_MSIPTV
838BHSM_DEFINES += BHSM_IPTV=1
839BHSM_DEFINES += BSP_MSIPTV
840endif
841
842# IMS144828: Add BHSM_IPTV to zero to fix compiler warnings
843ifeq ($(BHSM_IPTV_MK),0)
844#CFLAGS += -DBHSM_IPTV=0
845BHSM_DEFINES += BHSM_IPTV=0
846endif
847# IMS144828: end
848
849ifeq ($(BHSM_BSECK_MK),1)
850BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/region_verify
851BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/region_verify/aegis
852BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/region_verify/bhsm_bseck.c
853#CFLAGS += -DBSP_DOWNLOAD_CODE=1
854BHSM_DEFINES += BSP_DOWNLOAD_CODE=1
855endif
856
857ifeq ($(BHSM_SECURE_KEYLADDER_MK),1)
858BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder/bhsm_keyladder_enc.c
859endif
860
861ifeq ($(BHSM_SECURE_MISC_MK),1)
862BHSM_SOURCES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/bhsm_misc_enc.c
863endif
864
865# for 7640 overwrite INCLUDES and SOURCES since HSM is in lib form
866ifeq ($(findstring $(BCHP_CHIP), 7640), $(BCHP_CHIP))
867$(warning  ..........7640 Skipping compilation of sources!!  )
868BHSM_INCLUDES = $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common
869BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/common/aegis
870BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/cust_generic/aegis
871BHSM_INCLUDES += $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/$(BCHP_VER_LOWER)/keyladder
872BHSM_SOURCES =
873endif
874
Note: See TracBrowser for help on using the repository browser.