sbsv1/buildsystem/extension/base/lab_restricted_miniboot.flm
author lorewang
Wed, 17 Nov 2010 11:21:28 +0800
changeset 684 2defe8c85348
parent 599 fa7a3cc6effd
permissions -rw-r--r--
elf2e32 treatment of ARM$$INIT_ARRAY$$Base can break GCCE builds
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# lab_restricted_miniboot.flm
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     2
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     3
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     4
# All rights reserved.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     5
# This component and the accompanying materials are made available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     6
# under the terms of "Eclipse Public License v1.0"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     7
# which accompanies this distribution, and is available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     8
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     9
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    10
# Initial Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    11
# Nokia Corporation - initial contribution.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    12
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    13
# Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    14
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
ifeq ($(lab_restricted_miniboot_flm),)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
lab_restricted_miniboot_flm := 1
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
# Set the directories
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
SRCDIR := $(EXTENSION_ROOT)/../../lab_restricted/unistore2/nandboot/miniboot_largeblk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
# Build directory
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
BUILDLOC := $(EPOCBLD)/lab_restricted_miniboot_flm/$(PLATFORM_PATH)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
# Set the target name
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
TARGETDIR := $(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
BINTARGET := $(TARGETDIR)/lab_miniboot.bin
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
TMPTARGET := $(BUILDLOC)/lab_miniboot.elf
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
TMPTARGET2 := $(BUILDLOC)/lab_miniboot.bin
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
# Set the Load Address for the miniboot
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
# This is currently set to the beginning of SRAM
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
LINKBASE := 0x40200000
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
# Rules
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
vpath %.s . $(SRCDIR)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
ASMSOURCE := miniboot_largeblk.s
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
# Arm RVCT tools
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
ASM_TRUE_MACROS := USE_CXSF
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
OBJEXT := o
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),--predefine "$(macro) SETL {TRUE}")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),--predefine "$(macro) SETL {FALSE}")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
AFLAGS := -g --keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) -I$(BUILDLOC)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
LFLAGS := --ro-base $(LINKBASE) --entry BootEntry --FIRST BootEntry --map
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
SYMOPT := --symdefs
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
ASMTYP := ARMASM
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
# Include base commonly used functions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
include $(EPOCROOT)/epoc32/tools/makefile_templates/base/base_rvct_common.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
FULLOBJECTS := $(FULLASMOBJECTS)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
# Link
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
$(eval $(call base__link,$(TMPTARGET),$(FULLOBJECTS)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
# Strip
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
$(eval $(call base__strip,$(TMPTARGET2),$(TMPTARGET)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
# Omapsig
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
$(eval $(call base__omapsig,$(BINTARGET),$(TMPTARGET2)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
# Asm objects
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
$(eval $(call base__asm,$(FULLASMOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(SRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
TARGET :: $(BINTARGET) $(TARGETDIR) $(BUILDLOC) 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
# --what to show releasables
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
$(eval $(call whatmacro,$(BINTARGET),USERFLM))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
# Create directory
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
CREATABLEPATHS := $(TARGETDIR) $(BUILDLOC)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
$(call makepath,$(CREATABLEPATHS))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
# Clean up
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(BUILDLOC)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
endif