sbsv1/buildsystem/extension/base/lab_restricted_miniboot.flm
author Mike Kinghan <mikek@symbian.org>
Thu, 25 Nov 2010 13:59:07 +0000
changeset 40 68f68128601f
permissions -rw-r--r--
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package. 2) Enhance romnibus.pl so that it generate the symbol file for the built rom when invoked by Raptor 3) Make the maksym.pl tool portable for Linux as well as Windows. 4) Remove the of armasm2as.pl from the e32tools component in favour of the copy now exported from sbsv1/e32util.

# lab_restricted_miniboot.flm
#
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#

ifeq ($(lab_restricted_miniboot_flm),)
lab_restricted_miniboot_flm := 1

# Set the directories
SRCDIR := $(EXTENSION_ROOT)/../../lab_restricted/unistore2/nandboot/miniboot_largeblk

# Build directory
BUILDLOC := $(EPOCBLD)/lab_restricted_miniboot_flm/$(PLATFORM_PATH)

# Set the target name
TARGETDIR := $(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)
BINTARGET := $(TARGETDIR)/lab_miniboot.bin
TMPTARGET := $(BUILDLOC)/lab_miniboot.elf
TMPTARGET2 := $(BUILDLOC)/lab_miniboot.bin

# Set the Load Address for the miniboot
# This is currently set to the beginning of SRAM
LINKBASE := 0x40200000

# Rules
vpath %.s . $(SRCDIR)

ASMSOURCE := miniboot_largeblk.s


# Arm RVCT tools
ASM_TRUE_MACROS := USE_CXSF

OBJEXT := o

ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),--predefine "$(macro) SETL {TRUE}")
ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),--predefine "$(macro) SETL {FALSE}")

AFLAGS := -g --keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) -I$(BUILDLOC)
LFLAGS := --ro-base $(LINKBASE) --entry BootEntry --FIRST BootEntry --map
SYMOPT := --symdefs
ASMTYP := ARMASM

# Include base commonly used functions
include $(EPOCROOT)/epoc32/tools/makefile_templates/base/base_rvct_common.mk


ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT))
FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS))

FULLOBJECTS := $(FULLASMOBJECTS)

# Link
$(eval $(call base__link,$(TMPTARGET),$(FULLOBJECTS)))
# Strip
$(eval $(call base__strip,$(TMPTARGET2),$(TMPTARGET)))
# Omapsig
$(eval $(call base__omapsig,$(BINTARGET),$(TMPTARGET2)))

# Asm objects
$(eval $(call base__asm,$(FULLASMOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(SRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES)))

#
TARGET :: $(BINTARGET) $(TARGETDIR) $(BUILDLOC) 

# --what to show releasables
$(eval $(call whatmacro,$(BINTARGET),USERFLM))
# Create directory
CREATABLEPATHS := $(TARGETDIR) $(BUILDLOC)
$(call makepath,$(CREATABLEPATHS))
# Clean up
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(BUILDLOC)))

endif