imgtools/imaker/src/imaker_image.mk
author Zheng Shen <zheng.shen@nokia.com>
Tue, 20 Jul 2010 15:02:28 +0800
changeset 617 3a747a240983
parent 596 9f25be3da657
permissions -rw-r--r--
ROM Tools 12.2.0.4 Postlinker 2.2.5 Revert package_definition.xml to changeset 360bd6b35136
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
#
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
# All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
584
56dd7656a965 -Changed SF licence to EPL licence.
terytkon
parents: 1
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
584
56dd7656a965 -Changed SF licence to EPL licence.
terytkon
parents: 1
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
#
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
# Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
#
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
# Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
#
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
# Description: Default iMaker image configuration
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
#
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
USE_FEATVAR    = $(call select,$(word 1,$(getsbvrominc)),invalid,0,1)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
USE_IMGCHK     = 0
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    21
USE_NOROMHDR   = 0
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    22
USE_QTLOCLZTN  = 0
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    23
USE_ROFS       = 1,2,3
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
USE_ROFSFILE   = $(call iif,$(USE_PAGING),1,0)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
USE_ROMFILE    = 1
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    26
USE_SMR        = 0
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
USE_SYMGEN     = 0
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
USE_UDEB       = 0
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    30
# Temporary
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    31
USE_BLRWORKDIR = 0
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    33
#==============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    34
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    35
TYPE = rnd
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    36
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    37
MAJOR_VERSION = 001
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    38
MINOR_VERSION = 000
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    39
SW_VERSION    = $(MAJOR_VERSION).$(MINOR_VERSION)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    40
SW_TYPEINFO   = $(call select,$(TYPE),rnd,RD)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    41
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    42
BUILD_INFOMK = $(call findfile,image_conf_buildinfo.mk,,1)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    43
BUILD_NAMEMK = $(call findfile,image_conf_naming.mk,,1)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    44
BUILD_YEAR   = $(YEAR)
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    45
BUILD_MONTH  = $(MONTH)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    46
BUILD_WEEK   = $(WEEK)
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    47
BUILD_DAY    = $(DAY)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    48
BUILD_ID     = 001
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    49
BUILD_NUMBER = 001
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    50
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    51
COREPLAT_NAME    =
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
COREPLAT_DIR     = $(CONFIGROOT)/$(COREPLAT_NAME)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    53
COREPLAT_VERSION =
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    54
PLATFORM_NAME    = $(subst .,,$(COREPLAT_VERSION)$(S60_VERSION))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    55
PLATFORM_DIR     = $(CONFIGROOT)/$(PLATFORM_NAME)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    56
PRODUCT_MSTNAME  =
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    57
PRODUCT_MSTDIR   = $(if $(PRODUCT_MSTNAME),$(PLATFORM_DIR)/$(PRODUCT_MSTNAME))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    58
PRODUCT_NAME     =
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    59
PRODUCT_MANUFACT = Nokia
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    60
PRODUCT_MODEL    = N00
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    61
PRODUCT_TYPE     =
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    62
PRODUCT_REVISION = 01
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    63
PRODUCT_DIR      = $(if $(PRODUCT_NAME),$(PLATFORM_DIR)/$(if $(PRODUCT_MSTNAME),$(PRODUCT_MSTNAME)/)$(PRODUCT_NAME))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    64
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    65
FEATURE_VARIANT = $(PRODUCT_NAME)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    66
FEATVAR_IDIR    = $(call getrominc)
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    67
FEATVAR_HRH     = $(call findfile,feature_settings.hrh)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    68
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    69
LABEL   =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    70
NAME    = $(or $(PRODUCT_NAME),imaker)$(LABEL)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    71
WORKDIR = $(if $(PRODUCT_NAME),$(E32ROMBLD)/$(PRODUCT_NAME),$(CURDIR))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    72
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    73
IMAGE_TYPE    =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    74
IMAGE_ID      = $(or $(subst CORE,1,$(subst ROFS,,$(filter CORE ROFS%,$(IMAGE_TYPE)))),\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    75
  $(call lcase,$(call substr,1,1,$(filter EMMC MCARD UDA,$(IMAGE_TYPE)))))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    76
IMAGE_PREFIX  = $($(IMAGE_TYPE)_PREFIX)_$(call lcase,$(IMAGE_TYPE))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    77
IMAGE_HBY     = <data_caging_paths_for_iby.hrh> <variant/header.iby>
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    78
IMAGE_VERSDIR = RESOURCE_FILES_DIR\versions
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    79
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    80
IMAGE_ORIDEFILES =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    81
IMAGE_ORIDECONF  =
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    82
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    83
TRACE_IDIR     = $(addsuffix /traces,$(FEATVAR_IDIR))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    84
TRACE_PREFIX   =
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    85
TRACE_SUFFIX   = _trace.txt
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    86
TRACE_UDEBFILE = $(E32ROMBLD)/mytraces.txt
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    87
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    88
OVERRIDE_CONF = OVERRIDE_REPLACE/WARN #OVERRIDE_REPLACE/ADD, OVERRIDE_REPLACE/SKIP, OVERRIDE_SKIP/ADD
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    89
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    90
#GENIBY_FILEPAT = *.dll *.exe *.agt *.csy *.fsy *.tsy *.drv *.nif *.pgn *.prt
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    91
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    92
ARM_VERSION = ARMV5
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    93
SOS_VERSION = #9.5
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    94
S60_VERSION =
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    95
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    96
CPPFILE_FILTER = FF_WDP_\S+|SYMBIAN_\S+
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    97
CPPFILE_LIST   = $(if $(FEATURE_VARIANT),$(FEATVAR_HRH))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    98
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
    99
TARGET_PRODUCT =
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   100
TARGET_DEFAULT = all
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   101
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   102
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   103
###############################################################################
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   104
# Internal macros and definitions
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   105
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   106
getrominc =\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   107
  $(if $(call true,$(USE_FEATVAR)),$(getsbvrominc),$(if $(word 5,$(__i_getrominc)),$(call restwords,5,$(__i_getrominc))\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   108
    ,$(PRODUCT_DIR) $(PRODUCT_MSTDIR) $(CONFIGROOT)) $(E32ROM) $(E32ROMINC) $(E32INC)/oem $(E32INC))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   109
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   110
#    ,$(PRODUCT_DIR) $(PRODUCT_MSTDIR) $(CONFIGROOT)) $(E32INC)/config $(E32ROM) $(E32ROMINC) $(E32INC)/internal $(E32INC))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   111
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   112
getsbvrominc =\
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   113
  $(if $(and $(FEATURE_VARIANT),$(call equal,$(__i_featvar),$(FEATURE_VARIANT))),,$(eval __i_featvar := $(FEATURE_VARIANT))\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   114
    $(eval __i_getrominc := $(if $(__i_featvar),$(shell $(PERL) -x $(IMAKER_TOOL) --incdir $(__i_featvar)),invalid)))$(__i_getrominc)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   115
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   116
includeiby = $(if $(strip $1),$(call peval,\
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   117
  my @files = ();\
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   118
  while ($(call pquote,$1) =~ /(?:([1-6]):)?(?:<(.+?)>|"+(.+?)"+|(\S+))/g) {\
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   119
    my $$rom = (defined($$1) ? $$1 : q());\
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   120
    push(@files, ($$rom ? q(ROM_IMAGE[).$$rom.q(] {\n) : q()) . q(\#include ).\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   121
      (defined($$2) ? qq(<$$2>) : q(").GetAbsFname(defined($$3) ? $$3 : $$4).q(")) . ($$rom ? q(\n}) : q()))\
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   122
  }\
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   123
  return(join(q(), map(q(\n) . $$_, @files)))))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   124
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   125
define BLDROM_HDRINFO
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   126
  // Generated master oby for $($1_TITLE) image creation
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   127
  //
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   128
  // Filename: $($1_MSTOBY)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   129
  // Command : $(call BLDROM_CMD,$1)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   130
endef
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   131
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   132
define BLDROM_PLUGINFO
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   133
  /* Buildrom plugins
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   134
  */
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   135
  externaltool=override:-i$1;-l$($1_PLUGINLOG)$(if $(filter debug 127,$(VERBOSE)),;-ddebug)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   136
  $(OVERRIDE_CONF)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   137
  externaltool=obyparse:-i$1;-l$($1_PLUGINLOG);-w$($1_DIR)$(if $(filter debug 127,$(VERBOSE)),;-ddebug);-f$(FEATURE_VARIANT)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   138
  externaltool=stubsischeck:-i$1;-l$($1_PLUGINLOG)$(if $(filter debug 127,$(VERBOSE)),;-ddebug)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   139
  $(call iif,$(if $(filter CORE,$1),$(USE_ROFS1)),
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   140
    $(call iif,$(USE_ROMFILE),
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   141
      OBYPARSE_ROM $(CORE_ROMFILE))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   142
    $(call iif,$(USE_ROFSFILE),
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   143
      OBYPARSE_ROFS1 $(CORE_ROFSFILE))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   144
  )
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   145
  $(call iif,$(USE_UDEB),
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   146
    OBYPARSE_UDEB $(call select,$(USE_UDEB),full,*,$($1_UDEBFILE)))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   147
endef
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   148
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   149
getgenfiles = $(if $1,\
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   150
  $(eval __i_cmd := $(filter geniby% write%,$(call lcase,$(call getelem,1,$1))))\
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   151
  $(if $(__i_cmd),"$(call getelem,2,$1)")\
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   152
  $(call getgenfiles,$(call restelems,$(if $(filter geniby%,$(__i_cmd)),7,$(if $(filter write%,$(__i_cmd)),4,2)),$1)))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   153
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   154
#==============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   155
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   156
BLDROM_CMD = $(BLDROM_TOOL)\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   157
  $(filter-out --D% -U% $(filter-out $(BLDROM_CMDDOPT),$(filter -D%,$(BLR.$1.OPT))),$(BLR.$1.OPT))\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   158
  $(BLR.$1.IDIR) $(subst \,/,$($1_MSTOBY))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   159
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   160
BLDROM_CMDDOPT = -DFEATUREVARIANT=% -D_FULL_DEBUG -D_PLAT=%
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   161
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   162
CLEAN_BLDROM =\
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   163
  del | $(foreach file,dir *.img *.inc *.log *.oby *.symbol,"$($1_PREFIX).$(file)")\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   164
    $(foreach file,ecom*.s?? features.dat loglinux.oby logwin.oby tmp?.oby,"$($1_DIR)/$(file)")\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   165
    "$($1_PLUGINLOG)" |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   166
  $(BLR.$1.CLEAN)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   167
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   168
BUILD_BLDROM =\
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   169
  $(or $(BLR.$1.BUILD),\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   170
    echo-q | Creating $($1_TITLE) SOS $(if $(filter -noimage,$(BLR.$1.OPT)),oby,image) |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   171
    $(call iif,$(USE_BLRWORKDIR),,cd | "$($1_DIR)" |)\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   172
    cmd    | $(strip $(call BLDROM_CMD,$1)) | $(BLDROM_PARSE) |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   173
    move   | "$($1_DIR)/tmp1.oby" | $($1_PREFIX).tmp1.oby |\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   174
    $(call iif,$(KEEPTEMP),,del | "$($1_DIR)/tmp?.oby" "$($1_PREFIX).dummy*" |)\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   175
    $(BLR.$1.POST))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   176
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   177
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   178
###############################################################################
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   179
# Steps
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   180
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   181
IMAGE_STEPS = core $(VARIANT_STEPS)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   182
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   183
VARIANT_STEPS = $(call iif,$(USE_ROFS2),langpack_$(or $(TARGETID),01))\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   184
  $(foreach rofs,3 4 5 6,$(call iif,$(USE_ROFS$(rofs)),rofs$(rofs)))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   185
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   186
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   187
###############################################################################
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   188
# Targets
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   189
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   190
.PHONY: default all flash image variant #i2file variant-i2file
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   191
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   192
default default-%:\
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   193
  ;@$(call IMAKER,$$(if $$(PRODUCT_NAME),,$$(TARGET_PRODUCT)) $$(TARGET_DEFAULT))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   194
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   195
all  : ;@$(call IMAKER,flash-all)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   196
image: ;@$(call IMAKER,flash-image)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   197
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   198
flash flash-% image-%: ;@$(call IMAKER,$$(IMAGE_STEPS))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   199
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   200
variant variant_% variant-%: ;@$(call IMAKER,$$(VARIANT_STEPS))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   201
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   202
#i2file        : ;@$(call IMAKER,$(call ucase,$@))
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   203
#variant-i2file: ;@$(call IMAKER,VARIANTI2F)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   204
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   205
#==============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   206
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents: 584
diff changeset
   207
$(call includechk,$(addprefix $(IMAKER_DIR)/imaker_,fat.mk odp.mk rofs.mk smr.mk core.mk variant.mk))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   208
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   209
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   210
# END OF IMAKER_IMAGE.MK