imgtools/imaker/src/imaker_smr.mk
author y4jin
Thu, 18 Nov 2010 13:41:24 +0800
changeset 703 a23be6984256
parent 596 9f25be3da657
permissions -rw-r--r--
Fix the illegal word scanned by sfchecksource tools
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     1
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     3
# All rights reserved.
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     8
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     9
# Initial Contributors:
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    11
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    12
# Contributors:
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    13
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    14
# Description: iMaker SMR image configuration
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    15
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    16
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    17
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    18
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    19
###############################################################################
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    20
#  ___ __  __ ___
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    21
# / __|  \/  | _ \
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    22
# \__ \ |\/| |   /
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    23
# |___/_|  |_|_|_\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    24
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    25
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    26
SMR_TITLE  = SMR
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    27
SMR_DIR    = $(CORE_DIR)/smr
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    28
SMR_NAME   = $(NAME)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    29
SMR_PREFIX = $(SMR_DIR)/$(SMR_NAME)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    30
SMR_IDIR   =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    31
SMR_HBY    =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    32
SMR_OBY    =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    33
SMR_OPT    = $(BLDROM_OPT) -s -D_EABI=$(ARM_VERSION)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    34
SMR_MSTOBY = $(SMR_PREFIX)_smr_master.oby
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    35
SMR_HEADER =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    36
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    37
SMR_OBYGEN =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    38
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    39
SMR_IMG    = $(SMR_PREFIX).smr.img
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    40
SMR_LOG    = $(SMR_PREFIX).smr.log
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    41
SMR_OUTOBY = $(SMR_PREFIX).smr.oby
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    42
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    43
SMR_CONECONF =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    44
SMR_CONEOPT  = --all-layers --impl-tag=target:smr
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    45
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    46
#==============================================================================
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    47
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    48
define SMR_MSTOBYINFO
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    49
  $(call BLDROM_HDRINFO,SMR)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    50
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    51
  ROM_IMAGE 0 non-xip size=0x00000000
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    52
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    53
  /* $(SMR_TITLE) header
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    54
  */
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    55
  $(SMR_HDRINFO)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    56
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    57
  SMR_IMAGE {
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    58
    $(BLR.SMR.OBY)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    59
    imagename=$(notdir $(SMR_IMG))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    60
  }
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    61
endef
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    62
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    63
define SMR_HDRINFO
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    64
  $(DEFINE) _IMAGE_WORKDIR $(SMR_DIR)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    65
  $(call mac2cppdef,$(BLR.SMR.OPT))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    66
  $(BLR.SMR.HBY)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    67
  $(SMR_HEADER)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    68
  $(if $(filter 1,$(USE_VARIANTBLD)),$(VARIANT_HEADER))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    69
endef
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    70
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    71
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    72
###############################################################################
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    73
# SMR pre-build step
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    74
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    75
CLEAN_SMRPRE =\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    76
  $(if $(filter 1,$(USE_VARIANTBLD)),$(CLEAN_VARIANT) |)\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    77
  del | "$(SMR_MSTOBY)" | del | $(call getgenfiles,$(SMR_OBYGEN))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    78
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    79
BUILD_SMRPRE =\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    80
  $(if $(filter 1,$(USE_VARIANTBLD)),$(BUILD_VARIANT) |)\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    81
  mkdir   | "$(SMR_DIR)" |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    82
  echo-q  | Generating file(s) for $(SMR_TITLE) image creation  |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    83
  write-c | "$(SMR_MSTOBY)" | $(call def2str,$(SMR_MSTOBYINFO)) |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    84
  $(SMR_OBYGEN)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    85
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    86
#==============================================================================
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    87
# SMR build step
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    88
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    89
BLR.SMR.IDIR = $(call dir2inc,$(SMR_IDIR) $(call iif,$(USE_FEATVAR),,$(FEATVAR_IDIR)))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    90
BLR.SMR.HBY  = $(call includeiby,$(IMAGE_HBY) $(SMR_HBY))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    91
BLR.SMR.OBY  = $(call includeiby,$(SMR_OBY))\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    92
  $(call includeiby,$(if $(filter 1,$(USE_VARIANTBLD)),$(VARIANT_OBY)) $(BLDROBY))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    93
BLR.SMR.OPT  = $(SMR_OPT) -o$(call pathconv,$(SMR_PREFIX)).img $(BLDROPT)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    94
BLR.SMR.POST =\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    95
  move | "$(SMR_OUTOBY).log" | $(SMR_LOG) |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    96
  test | "$(SMR_IMG)"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    97
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    98
CLEAN_SMR = $(call CLEAN_BLDROM,SMR)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    99
BUILD_SMR = $(call BUILD_BLDROM,SMR)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   100
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   101
REPORT_SMR =\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   102
  $(SMR_TITLE) dir   | $(SMR_DIR) | d |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   103
  $(SMR_TITLE) image | $(SMR_IMG) | f
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   104
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   105
#==============================================================================
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   106
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   107
SOS.SMR.STEPS = $(call iif,$(USE_SMR),\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   108
  $(call iif,$(SKIPPRE),,$(and $(filter 1,$(USE_VARIANTBLD)),$(call true,$(USE_CONE)),CONEGEN RESTART) SMRPRE)\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   109
  $(call iif,$(SKIPBLD),,SMR) $(call iif,$(SKIPPOST),,SMRPOST))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   110
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   111
ALL.SMR.STEPS = $(SOS.SMR.STEPS)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   112
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   113
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   114
###############################################################################
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   115
# Targets
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   116
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   117
.PHONY: smr smr-all smr-image smr-cone smr-pre
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   118
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   119
smr smr%: IMAGE_TYPE = SMR
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   120
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   121
smr smr-all: ;@$(call IMAKER,$$(ALL.SMR.STEPS))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   122
smr-image  : ;@$(call IMAKER,$$(SOS.SMR.STEPS))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   123
smr-cone   : ;@$(call IMAKER,CONEGEN)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   124
smr-pre    : ;@$(call IMAKER,SMRPRE)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   125
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   126
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
   127
# END OF IMAKER_SMR.MK