# HG changeset patch # User hgs # Date 1288217247 -19800 # Node ID 0d178dffddca14dcc758f4f1e7b58cf77e9f14d1 # Parent 164db16a7f093b314b173cf09681a75cfe4d44f6 201041_02 diff -r 164db16a7f09 -r 0d178dffddca emulator/emulatorbsp/bld.inf --- a/emulator/emulatorbsp/bld.inf Thu Oct 14 15:35:36 2010 +0530 +++ b/emulator/emulatorbsp/bld.inf Thu Oct 28 03:37:27 2010 +0530 @@ -20,7 +20,7 @@ PRJ_EXPORTS -documentation/wins_ether_drv_howto.txt /epoc32/engdoc/ethernet/ // + inc/variantmediadef.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variantmediadef.h) variant.mmh SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variant.mmh) diff -r 164db16a7f09 -r 0d178dffddca extension/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/bld.inf Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,46 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "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: +// +// Description: +// + +PRJ_EXPORTS +h2_genbootinc.meta /epoc32/tools/makefile_templates/base/h2_genbootinc.meta +h2_genbootinc.mk /epoc32/tools/makefile_templates/base/h2_genbootinc.mk +h2_restricted_coreldr.meta /epoc32/tools/makefile_templates/base/h2_restricted_coreldr.meta +h2_restricted_coreldr.mk /epoc32/tools/makefile_templates/base/h2_restricted_coreldr.mk +h4_genbootinc.meta /epoc32/tools/makefile_templates/base/h4_genbootinc.meta +h4_genbootinc.mk /epoc32/tools/makefile_templates/base/h4_genbootinc.mk +h4_restricted_coreldr.meta /epoc32/tools/makefile_templates/base/h4_restricted_coreldr.meta +h4_restricted_coreldr.mk /epoc32/tools/makefile_templates/base/h4_restricted_coreldr.mk +h4_restricted_on_coreldr.meta /epoc32/tools/makefile_templates/base/h4_restricted_on_coreldr.meta +h4_restricted_on_coreldr.mk /epoc32/tools/makefile_templates/base/h4_restricted_on_coreldr.mk +h4_restricted_on_miniboot.meta /epoc32/tools/makefile_templates/base/h4_restricted_on_miniboot.meta +h4_restricted_on_miniboot.mk /epoc32/tools/makefile_templates/base/h4_restricted_on_miniboot.mk +ne1_tb_restricted_coreldr.meta /epoc32/tools/makefile_templates/base/ne1_tb_restricted_coreldr.meta +ne1_tb_restricted_coreldr.mk /epoc32/tools/makefile_templates/base/ne1_tb_restricted_coreldr.mk +ne1_tb_genbootinc.meta /epoc32/tools/makefile_templates/base/ne1_tb_genbootinc.meta +ne1_tb_genbootinc.mk /epoc32/tools/makefile_templates/base/ne1_tb_genbootinc.mk +lab_restricted_miniboot.meta /epoc32/tools/makefile_templates/base/lab_restricted_miniboot.meta +lab_restricted_miniboot.mk /epoc32/tools/makefile_templates/base/lab_restricted_miniboot.mk +nand_fbr_offset.meta /epoc32/tools/makefile_templates/base/nand_fbr_offset.meta +nand_fbr_offset.mk /epoc32/tools/makefile_templates/base/nand_fbr_offset.mk +omap3_genbootinc.meta /epoc32/tools/makefile_templates/base/omap3_genbootinc.meta +omap3_genbootinc.mk /epoc32/tools/makefile_templates/base/omap3_genbootinc.mk +omap3_restricted_coreldr.meta /epoc32/tools/makefile_templates/base/omap3_restricted_coreldr.meta +omap3_restricted_coreldr.mk /epoc32/tools/makefile_templates/base/omap3_restricted_coreldr.mk +omap3_restricted_coreldr.flm /epoc32/tools/makefile_templates/base/omap3_restricted_coreldr.flm +omap3_restricted_coreldr.xml /epoc32/tools/makefile_templates/base/omap3_restricted_coreldr.xml +lab_restricted_miniboot.flm /epoc32/tools/makefile_templates/base/lab_restricted_miniboot.flm +lab_restricted_miniboot.xml /epoc32/tools/makefile_templates/base/lab_restricted_miniboot.xml +ne1_tb_restricted_coreldr.flm /epoc32/tools/makefile_templates/base/ne1_tb_restricted_coreldr.flm +ne1_tb_restricted_coreldr.xml /epoc32/tools/makefile_templates/base/ne1_tb_restricted_coreldr.xml \ No newline at end of file diff -r 164db16a7f09 -r 0d178dffddca extension/h2_genbootinc.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h2_genbootinc.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h2_genbootinc extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/h2_genbootinc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h2_genbootinc.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,64 @@ +# Copyright (c) 2006-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: +# +# Description: +# Generate assembler inc files from header files +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +XINCDIR := $(INC_PATH)/h2 +XINCDIR2 := $(INC_PATH)/assp/omap1610 + +MAKMAKE : all + +FREEZE : + +LIB : all + +CLEANLIB : + +RESOURCE : + +FINAL : + +BLD SAVESPACE : all + +RELEASABLES : + @echo $(XINCDIR)/h2const.inc + @echo $(XINCDIR)/nand_fbr_offset.inc + @echo $(XINCDIR2)/omapconst.inc + +CLEAN : + -$(ERASE) $(call slash2generic,$(XINCDIR)/h2const.inc) + -$(ERASE) $(call slash2generic,$(XINCDIR)/nand_fbr_offset.inc) +# -$(ERASE) $(XINCDIR)/h2const.inc +# -$(ERASE) $(XINCDIR)/nand_fbr_offset.inc + @echo $(XINCDIR2)/omapconst.inc + +all: $(XINCDIR)/h2const.inc $(XINCDIR)/nand_fbr_offset.inc $(XINCDIR2)/omapconst.inc + +$(XINCDIR)/h2const.inc : $(XINCDIR)/h2const.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR)/h2const.h $(XINCDIR)/h2const.inc ARMASM + +$(XINCDIR)/nand_fbr_offset.inc : $(XINCDIR)/nand_fbr_offset.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR)/nand_fbr_offset.h $(XINCDIR)/nand_fbr_offset.inc ARMASM + +$(XINCDIR2)/omapconst.inc : $(XINCDIR2)/omapconst.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR2)/omapconst.h $(XINCDIR2)/omapconst.inc ARMASM diff -r 164db16a7f09 -r 0d178dffddca extension/h2_restricted_coreldr.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h2_restricted_coreldr.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h2_restricted_coreldr extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/h2_restricted_coreldr.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h2_restricted_coreldr.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,389 @@ +# Copyright (c) 2006-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: +# +# Description: +# Code execute address set in the linker file +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +## If any of these macros are changed, then execute "abld clean coreldr" from this directory +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +USE_MMU := TRUE + +## This macro enables benchmarking code. Comment out or set FALSE if not required +#WRITE_TIMINGS := TRUE + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +#DUMP_PAGE_TABLES := TRUE + + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +#Set the directories +GENSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +XSRSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr/unistore2 +SPECSRCDIR := $(EXTENSION_ROOT)/../omaph2bsp/h2/nandboot/coreldr +PLATSRCDIR := $(EXTENSION_ROOT)/../omaph2bsp/shared/bootstrap + +VARIANTINC := $(EXTENSION_ROOT)/../omaph2bsp/h2/inc +ARMDIR := $(INC_PATH)/kernel/arm + +GENINC1 := $(INC_PATH) /epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 +H2BLDDIR := $(EXTENSION_ROOT)/../omaph2bsp/h2 +GENINCPATH:= $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR) $(VARIANTINC) $(GENINC1) $(GENDRIVERINC) $(GENINC2) $(H2BLDDIR) $(PLATSRCDIR) + +# Set the source/include/target directories +GSRCDIR = ../../../unref/orphan/cedgen/shared/nandboot +VINCDIR = ../../../unref/orphan/cedgen/h2/inc +GINCDIR = ../../../unref/orphan/cedgen/shared/inc + +# Build directory (EPOCBLD too long) +#BUILDLOC = $(EPOCROOT)epoc32/build/omap/h2/specific/unistore2/nandboot/coreldr/$(PLATFORM_PATH)/$(CFG_PATH) +BUILDLOC = $(EPOCBLD)/$(PLATFORM_PATH)/$(CFG_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(TARGETDIR)/h2_un2_coreldr.bin +TMPTARGET = $(BUILDLOC)/coreldr.tmp + +#Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) $(GENSRCDIR) +vpath %.inc . $(SPECSRCDIR) $(VARIANTINC) $(EPOCINCDIR) $(BLDDIR) $(ARMDIR) $(PLATSRCDIR) $(GENSRCDIR) $(H2BLDDIR) +vpath %.ginc . $(BUILDLOC) + +INCLUDES := nand_macro.inc + +VHEADERS := nanddevice.h +BUILTINCLUDES := nanddevice.inc +BUILTINCLUDES2 := nand_plat.inc +BLDINCLUDES := config.inc +PLATINCLUDES := 16xx_common.inc general.inc +GENINCLUDES := armcpudefs.inc + +ASMSOURCE := coreldrasm.s +GENCPPSOURCE := coreldr.cpp inflate.cpp +XSRCPPSOURCE := coreldrxsr.cpp +ifeq "$(USE_MMU)" "TRUE" + GENASMSOURCE := coreldrmmu.s # only link in the MMU stuff if required +endif + +HEADERS := inflate.h coreldr.h +SPECHEADERS := nand_plat.h + +## Address at which binary is loaded and started from +LINKBASE = 0x20000C00 + + + +#ARMASM_OUT := $(shell armasm 2>&1) +#ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) +ARMASM_OUT := $(wordlist 2, 4, $(shell armasm --vsn 2>&1)) + +# Select the toolchain: ARM RVCT, then GCC + +# Use GCC toolchain if no other is available +TOOLVER := GCC +#RVCTSTR := $(strip $(findstring RVCT, $(ARMASM_OUT_4))) +RVCTSTR := $(strip $(findstring RVCT,$(ARMASM_OUT))) +ifeq "$(RVCTSTR)" "RVCT" + TOOLVER := RVCT + OP := -- + OB := o +endif +TOOLVER := RVCT +OP := -- +OB := o + +# Build up logical TRUE defines +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS += DUMP_PAGE_TABLES +endif + +# Build up logical FALSE defines +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS += DUMP_PAGE_TABLES +endif + +#Arm RVCT tools +ifeq "$(TOOLVER)" "RVCT" + ASM_TRUE_MACROS += USE_CXSF + ASM := armasm + LINK := armlink + FROMELF := fromelf + CPP := armcc + + OBJEXT := o + INCEXT := inc + + ARMCCFLAGS := --arm -c -Otime --cpp + ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 + ARMCCFLAGS := $(ARMCCFLAGS) -DSYMBIAN_SUPPORT_UNISTORE2 + + + ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)epoc32/include/rvct/rvct.h + + ifeq "$(CFG)" "UDEB" + ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG + endif + + ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") + ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") + ASM_LINKBASE_MACRO := $(OP)predefine "_LINKBASE_ SETA $(LINKBASE)" + + AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + LFLAGS := $(OP)entry BootEntry $(OP)ro-base $(LINKBASE) $(OP)FIRST BootEntry $(OP)map + SYMOPT := $(OP)symdefs + ASMTYP := ARMASM + LINKFILE := + + define do_compile + $(CPP) $(ARMCCFLAGS) $< -o $@ + endef + define do_h2inc + perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ ARMASM + endef + define do_asm + $(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< + endef + define do_link + $(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) + endef + define do_strip + $(FROMELF) $(OP)bin $(OP)output $@ $< + endef +endif + + +#GCC build options +ifeq "$(TOOLVER)" "GCC" + ASM := as + AFLAGS := -mapcs-32 -R -n -I$(BUILDLOC) + + ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),--defsym $(macro)=1) + ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),--defsym $(macro)=0) + ASM_LINKBASE_MACRO := --defsym _LINKBASE_=$(LINKBASE) + + LINKFLAGS = -n --section-alignment 4 --file-alignment 2 -no-whole-archive + GCCFLAGS=-march=armv4 -nostdinc -pipe -c -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas + GCCFLAGS := $(GCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + GCCDEFS = -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ -D__MARM__ -D__MARM_ARM4__ -DEKA2 -DSYMBIAN_SUPPORT_UNISTORE2 + ifeq "$(CFG)" "UDEB" + GCC = gcc -x c++ -g -O2 $(GCCFLAGS) -D_DEBUG -D_UNICODE $(GCCDEFS) + else + GCC = gcc -x c++ -s -fomit-frame-pointer -O2 $(GCCFLAGS) -DNDEBUG -D_UNICODE $(GCCDEFS) + endif + + LINKFILE = $(SPECSRCDIR)/coreldr.lnk + OBJEXT := o + INCEXT := ginc + + PROCESS_INCLUDES := 1 + define do_compile + $(GCC) -o $@ $< + endef + define do_h2inc + perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ AS + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $@ $(join $(basename $@),.ginc) + endef + define do_includes + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $< $@ + endef + define do_asm + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $< $(join $(basename $@),.s) + $(AS) $(AFLAGS) $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -o $@ $(join $(basename $@),.s) + endef + define do_strip + strip -O binary -o "$(TARGET)" "$(TMPTARGET)" + + $(ERASE) $(call slash2generic,"$(TMPTARGET)") + # $(ERASE) "$(TMPTARGET)" + echo Built $(TARGET) + endef + define do_link + ld -o "$(TMPTARGET)" --start $(FULLOBJECTS) --script=$(LINKFILE) + endef +endif + + +#CPP source processing +FULLCPPSOURCE := $(addprefix $(GENSRCDIR)/,$(GENCPPSOURCE)) + +#Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) +$(FULLBUILTINCLUDES) : $(FULLVHEADERS) + $(do_h2inc) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) +$(FULLBUILTINCLUDES2) : $(FULLVHEADERS2) + $(do_h2inc) + +#object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +XSRCPPOBJECTS := $(foreach f,$(XSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLXSRCPPOBJECTS) + +ifdef PROCESS_INCLUDES + +GCCSRC := $(addprefix $(BUILDLOC)/,$(SRC)) + +#Creation of headers +FULLINCLUDES := $(foreach f,$(INCLUDES),$(basename $(f)).$(INCEXT)) +FULLINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLINCLUDES)) + +$(FULLINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLBLDINCLUDES := $(foreach f,$(BLDINCLUDES),$(basename $(f)).$(INCEXT)) +FULLBLDINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLBLDINCLUDES)) +$(FULLBLDINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLPLATINCLUDES := $(foreach f,$(PLATINCLUDES),$(basename $(f)).$(INCEXT)) +FULLPLATINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLPLATINCLUDES)) +$(FULLPLATINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLGENINCLUDES := $(foreach f,$(GENINCLUDES),$(basename $(f)).$(INCEXT)) +FULLGENINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLGENINCLUDES)) +$(FULLGENINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +else +FULLINCLUDES:= $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES:= $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES:= $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES:= $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + +#Arm RVCT specifics here + +endif + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TARGET) : $(TMPTARGET) + $(do_strip) + +#CPP objects +$(FULLGENCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLXSRCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(XSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + + +#Asm objects +$(FULLGENASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") +# -$(ERASE) "$(TARGET)" +# -$(ERASE) "$(BUILDLOC)/*.*" + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_genbootinc.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_genbootinc.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,22 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h4_genbootinc extension template +# + + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_genbootinc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_genbootinc.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,58 @@ +# Copyright (c) 2006-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: +# +# Description: +# Generate assembler inc files from header files +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +XINCDIR := $(INC_PATH)/omap_hrp/h4 +XINCDIR2 := $(INC_PATH)/omap_hrp/assp/omap24xx + +MAKMAKE : all + +FREEZE : + +LIB : all + +CLEANLIB : + +RESOURCE : + +FINAL : + +BLD SAVESPACE : all + +RELEASABLES : + @echo $(XINCDIR)/nand_fbr_offset.inc + @echo $(XINCDIR2)/omap24xxconst.inc + +CLEAN : + -$(ERASE) $(call slash2generic,$(XINCDIR)/nand_fbr_offset.inc) +# -$(ERASE) $(XINCDIR)/nand_fbr_offset.inc + @echo $(XINCDIR2)/omap24xxconst.inc + +all: $(XINCDIR2)/omap24xxconst.inc $(XINCDIR)/nand_fbr_offset.inc + +$(XINCDIR)/nand_fbr_offset.inc : $(XINCDIR)/nand_fbr_offset.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR)/nand_fbr_offset.h $(XINCDIR)/nand_fbr_offset.inc ARMASM + +$(XINCDIR2)/omap24xxconst.inc : $(XINCDIR2)/omap24xxconst.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR2)/omap24xxconst.h $(XINCDIR2)/omap24xxconst.inc ARMASM diff -r 164db16a7f09 -r 0d178dffddca extension/h4_restricted_coreldr.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_restricted_coreldr.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h4_restricted_coreldr extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_restricted_coreldr.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_restricted_coreldr.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,388 @@ +# Copyright (c) 2006-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: +# +# Description: +# # NB! LINKBASE : Code execute address also set coreldr.lnk file +# # MUST REFLECT CORELOADER ADDRESS RELOCATION IN BOTH FILES!! +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +## If any of these macros are changed, then execute "abld clean coreldr" from this directory +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +USE_MMU := TRUE + +## This macro enables benchmarking code. Comment out or set FALSE if not required +#WRITE_TIMINGS := TRUE + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +#DUMP_PAGE_TABLES := TRUE + + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +#Set the directories +GENSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +XSRSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr/unistore2 +SPECSRCDIR := $(EXTENSION_ROOT)/../omaph4bsp/h4/nandboot/coreldr_smallblk + +VARIANTINC := $(INC_PATH)/omap_hrp/h4 +VARIANTINC2 := $(EXTENSION_ROOT)/../omaph4bsp/shared/bootstrap +VARIANTINC3 := $(EXTENSION_ROOT)/../omaph4bsp/h4/nand + +GENINC1 := $(INC_PATH) +GENINC3 := $(EPOCROOT)epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 +GENINCPATH:= $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR) $(VARIANTINC) $(VARIANTINC2) $(VARIANTINC3) $(GENINC1) $(GENDRIVERINC) $(GENINC2) $(GENINC3) + +# Set the source/include/target directories +GSRCDIR = ../../../unref/orphan/cedgen/shared/nandboot +VINCDIR = ../../../unref/orphan/cedgen/h4/inc +GINCDIR = ../../../unref/orphan/cedgen/shared/inc +EPOCINCDIR = $(INC_PATH)/omap_hrp/h4 + +# Build directory (EPOCBLD too long) +#BUILDLOC = $(EPOCROOT)epoc32/build/omap_hrp/h4_restricted/unistore2/nandboot/coreldr/$(PLATFORM_PATH) +#BUILDLOC = $(EPOCBLD)/$(PLATFORM_PATH)/$(CFG_PATH) # Error as $(EPOCBLD) include platform +BUILDLOC = $(EPOCBLD)/$(CFG_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(TARGETDIR)/h4hrp_un2_sb_coreldr.bin +TMPTARGET = $(BUILDLOC)/h4hrp_un2_sb_coreldr.elf + +#Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) +vpath %.inc . $(SPECSRCDIR) $(EPOCINCDIR) +vpath %.ginc . $(BUILDLOC) + +INCLUDES := + +VHEADERS := nanddevice.h +BUILTINCLUDES := nanddevice.inc config.inc +BUILTINCLUDES2 := nand_plat.inc + +ASMSOURCE := coreldrasm_smallblk.s +GENCPPSOURCE := coreldr.cpp inflate.cpp +XSRCPPSOURCE := coreldrxsr.cpp + +ifeq "$(USE_MMU)" "TRUE" + GENASMSOURCE := coreldrmmu.s # only link in the MMU stuff if required +endif + +HEADERS := inflate.h coreldr.h +SPECHEADERS := nand_plat.h + +## Address at which coreloader binary is loaded and then started from +# +# On H4 this number is base of ram + 48MB (permitting 48MB core images) +# this number is pretty arbitrary and may be raised higher into ram +# if necessary as long as the corresponding change is also made to +# KCoreLoaderAddress in variant_bootstrap.inc +# +LINKBASE = 0x83000000 + + + +#ARMASM_OUT := $(shell armasm 2>&1) +#ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) +ARMASM_OUT := $(wordlist 2, 4, $(shell armasm --vsn 2>&1)) + +# Select the toolchain: ARM RVCT, then GCC + +# Use GCC toolchain if no other is available +TOOLVER := GCC +#RVCTSTR := $(strip $(findstring RVCT, $(ARMASM_OUT_4))) +RVCTSTR := $(strip $(findstring RVCT,$(ARMASM_OUT))) +ifeq "$(RVCTSTR)" "RVCT" + TOOLVER := RVCT + OP := -- + OB := o +endif + +# Build up logical TRUE defines +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS += DUMP_PAGE_TABLES +endif + +# Build up logical FALSE defines +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS += DUMP_PAGE_TABLES +endif + +#Arm RVCT tools +ifeq "$(TOOLVER)" "RVCT" + ASM_TRUE_MACROS += USE_CXSF + ASM := armasm + LINK := armlink + FROMELF := fromelf + CPP := armcc + + OBJEXT := o + INCEXT := inc + + ARMCCFLAGS := --arm -c -Otime --cpp + ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 + ARMCCFLAGS := $(ARMCCFLAGS) -DSYMBIAN_SUPPORT_UNISTORE2 + + ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)epoc32/include/rvct/rvct.h + + ifeq "$(CFG)" "UDEB" + ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG + endif + + ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") + ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") + ASM_LINKBASE_MACRO := $(OP)predefine "_LINKBASE_ SETA $(LINKBASE)" + + AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + LFLAGS := $(OP)entry BootEntry $(OP)ro-base $(LINKBASE) $(OP)FIRST BootEntry $(OP)map + SYMOPT := $(OP)symdefs + ASMTYP := ARMASM + LINKFILE := + + define do_compile + $(CPP) $(ARMCCFLAGS) $< -o $@ + endef + define do_h2inc + perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ ARMASM + endef + define do_asm + $(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< + endef + define do_link + $(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) + endef + define do_strip + $(FROMELF) $(OP)bin $(OP)output $@ $< + endef +endif + + +#GCC build options +ifeq "$(TOOLVER)" "GCC" + ASM := as + AFLAGS := -mapcs-32 -R -n -I$(BUILDLOC) + + ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),--defsym $(macro)=1) + ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),--defsym $(macro)=0) + ASM_LINKBASE_MACRO := --defsym _LINKBASE_=$(LINKBASE) + + LINKFLAGS = -n --section-alignment 4 --file-alignment 2 -no-whole-archive + GCCFLAGS=-march=armv4 -nostdinc -pipe -c -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas + GCCFLAGS := $(GCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + GCCDEFS = -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ -D__MARM__ -D__MARM_ARM4__ -DEKA2 -DSYMBIAN_SUPPORT_UNISTORE2 + ifeq "$(CFG)" "UDEB" + GCC = gcc -x c++ -g -O2 $(GCCFLAGS) -D_DEBUG -D_UNICODE $(GCCDEFS) + else + GCC = gcc -x c++ -s -fomit-frame-pointer -O2 $(GCCFLAGS) -DNDEBUG -D_UNICODE $(GCCDEFS) + endif + + LINKFILE = $(SPECSRCDIR)/coreldr.lnk + OBJEXT := o + INCEXT := ginc + + PROCESS_INCLUDES := 1 + define do_compile + $(GCC) -o $@ $< + endef + define do_h2inc + perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ AS + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $@ $(join $(basename $@),.ginc) + endef + define do_includes + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $< $@ + endef + define do_asm + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $< $(join $(basename $@),.s) + $(AS) $(AFLAGS) $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -o $@ $(join $(basename $@),.s) + endef + define do_strip + strip -O binary -o "$(TARGET)" "$(TMPTARGET)" + echo Built $(TARGET) + endef + define do_link + ld -o "$(TMPTARGET)" --start $(FULLOBJECTS) --script=$(LINKFILE) + endef +endif + + +#CPP source processing +FULLCPPSOURCE := $(addprefix $(GENSRCDIR)/,$(GENCPPSOURCE)) + +#Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) +$(FULLBUILTINCLUDES) : $(FULLVHEADERS) + $(do_h2inc) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) +$(FULLBUILTINCLUDES2) : $(FULLVHEADERS2) + $(do_h2inc) + +#object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +XSRCPPOBJECTS := $(foreach f,$(XSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLXSRCPPOBJECTS) + +ifdef PROCESS_INCLUDES + +GCCSRC := $(addprefix $(BUILDLOC)/,$(SRC)) + +#Creation of headers +FULLINCLUDES := $(foreach f,$(INCLUDES),$(basename $(f)).$(INCEXT)) +FULLINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLINCLUDES)) + +$(FULLINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLBLDINCLUDES := $(foreach f,$(BLDINCLUDES),$(basename $(f)).$(INCEXT)) +FULLBLDINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLBLDINCLUDES)) +$(FULLBLDINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLPLATINCLUDES := $(foreach f,$(PLATINCLUDES),$(basename $(f)).$(INCEXT)) +FULLPLATINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLPLATINCLUDES)) +$(FULLPLATINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLGENINCLUDES := $(foreach f,$(GENINCLUDES),$(basename $(f)).$(INCEXT)) +FULLGENINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLGENINCLUDES)) +$(FULLGENINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +else +FULLINCLUDES:= $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES:= $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES:= $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES:= $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + +#Arm RVCT specifics here + +endif + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TARGET) : $(TMPTARGET) + $(do_strip) + +#CPP objects +$(FULLGENCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLXSRCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(XSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +#Asm objects +$(FULLGENASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") +# -$(ERASE) "$(TARGET)" +# -$(ERASE) "$(BUILDLOC)/*.*" + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_restricted_on_coreldr.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_restricted_on_coreldr.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h4_restricted_coreldr extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_restricted_on_coreldr.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_restricted_on_coreldr.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,375 @@ +# Copyright (c) 2007-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: +# +# Description: +# # NB! LINKBASE : Code execute address also set coreldr.lnk file +# # MUST REFLECT CORELOADER ADDRESS RELOCATION IN BOTH FILES!! +# +# + +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +## If any of these macros are changed, then execute "abld clean coreldr" from this directory +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +USE_MMU := TRUE + +# This macro enables benchmarking code. Comment out or set FALSE if not required +#WRITE_TIMINGS := TRUE + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +#DUMP_PAGE_TABLES := TRUE + + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +#Set the directories +GENSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +BLSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/util/ONBL2 +XSRSRCDIR1 := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/OAM/OSLess +XSRSRCDIR2 := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/LLD/DNandO +SPECSRCDIR := $(EXTENSION_ROOT)/../omaph4bsp/h4/nandboot/coreldr_onenand +SPECXSRSRCDIR := $(EXTENSION_ROOT)/drivers/h4ons + +VARIANTINC := $(INC_PATH)/omap_hrp/h4 +VARIANTINC2 := $(EXTENSION_ROOT)/../omaph4bsp/shared/bootstrap +VARIANTINC3 := $(EXTENSION_ROOT)/../omaph4bsp/h4/nand $(EXTENSION_ROOT)/../omaph4bsp/assp/shared/assp $(EXTENSION_ROOT)/../omaph4bsp/assp/omap24xx/inc $(EXTENSION_ROOT)/../omaph4bsp/assp/omap24xx/assp $(EXTENSION_ROOT)/../omaph4bsp/assp/shared/interrupt $(EXTENSION_ROOT)/../omaph4bsp/assp/omap24xx/interrupt $(EXTENSION_ROOT)/../omaph4bsp/shared/gpio $(EXTENSION_ROOT)/../omaph4bsp/shared/mcspi $(EXTENSION_ROOT)/../omaph4bsp/assp/omap24xx/gpio $(EXTENSION_ROOT)/../omaph4bsp/assp/shared $(EXTENSION_ROOT)/../omaph4bsp/shared/cirq $(EXTENSION_ROOT)/../omaph4bsp/shared/dma $(EXTENSION_ROOT)/../omaph4bsp/assp/shared/dma + +GENINC1 := $(INC_PATH) +GENINC3 := $(EPOCROOT)epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 $(INC_PATH)/memmodel/epoc $(INC_PATH)/kernel $(INC_PATH)/kernel/arm $(INC_PATH)/nkern $(INC_PATH)/nkern/arm +GENXSRINC := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/inc +GENINCPATH:= $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR1) $(XSRSRCDIR2) $(SPECXSRSRCDIR) $(VARIANTINC) $(VARIANTINC2) $(VARIANTINC3) $(GENINC1) $(GENDRIVERINC) $(GENINC2) $(GENINC3) $(GENINC4) $(GENXSRINC) $(GENINC3) + +# Set the source/include/target directories +GSRCDIR = ../../../unref/orphan/cedgen/shared/nandboot +VINCDIR = ../../../unref/orphan/cedgen/h4/inc +GINCDIR = ../../../unref/orphan/cedgen/shared/inc +EPOCINCDIR = $(INC_PATH)/omap_hrp/h4 + +# Build directory (EPOCBLD too long) +BUILDLOC = $(EPOCROOT)epoc32/build/omap_hrp/h4_restricted/unistore2/nandboot/coreldr/$(PLATFORM_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(TARGETDIR)$/h4hrp_un2_on_coreldr.bin +TMPTARGET = $(BUILDLOC)$/h4hrp_un2_on_coreldr.elf + +#Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) +vpath %.inc . $(SPECSRCDIR) $(EPOCINCDIR) +vpath %.ginc . $(BUILDLOC) + +VHEADERS := nanddevice.h +BUILTINCLUDES := nanddevice.inc config.inc +BUILTINCLUDES2 := nand_plat.inc + +ASMSOURCE := coreldrasm_onenand.s +GENCPPSOURCE := inflate.cpp +BLCPPSOURCE := ONBL2.CPP +XSRCPPSOURCE1 := OSLessOAM.cpp +XSRCPPSOURCE2 := ONLD.cpp +SPECXSRCPPSOURCE := pam.cpp + +XSRLIB := $(EPOCROOT)epoc32/release/armv5/$(CFG)/nbl2.lib + +ifeq "$(USE_MMU)" "TRUE" + GENASMSOURCE := coreldrmmu.s # only link in the MMU stuff if required +endif + +# HEADERS := inflate.h coreldr.h +HEADERS := +SPECHEADERS := nand_plat.h + +## Address at which coreloader binary is loaded and then started from +# +# On H4 this number is base of ram + 48MB (permitting 48MB core images) +# this number is pretty arbitrary and may be raised higher into ram +# if necessary as long as the corresponding change is also made to +# KCoreLoaderAddress in variant_bootstrap.inc +# +LINKBASE = 0x83000000 + + + +#ARMASM_OUT := $(shell armasm 2>&1) +#ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) +ARMASM_OUT := $(wordlist 2, 4, $(shell armasm --vsn 2>&1)) + +# Select the toolchain: ARM RVCT, then GCC + +# Use GCC toolchain if no other is available +TOOLVER := GCC +#RVCTSTR := $(strip $(findstring RVCT, $(ARMASM_OUT_4))) +RVCTSTR := $(strip $(findstring RVCT2.2,$(ARMASM_OUT))) +RVCTSTR_4 := $(strip $(findstring RVCT4.0,$(ARMASM_OUT))) + +ifeq "$(RVCTSTR)" "RVCT2.2" + + TOOLVER := RVCT2.2 + OP := -- + OB := o + endif + + ifeq "$(RVCTSTR_4)" "RVCT4.0" + TOOLVER := RVCT4.0 + OP := -- + OB := o +endif + +# Build up logical TRUE defines +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS += DUMP_PAGE_TABLES +endif + +# Build up logical FALSE defines +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS += DUMP_PAGE_TABLES +endif + +#Arm RVCT tools +#echo hello2 "$(strip $(findstring RVCT, $(TOOLVER)))" +TOOLVER1 := $(strip $(findstring RVCT, $(TOOLVER))) +ifeq "$(TOOLVER1)" "RVCT" +#echo hello2 +ASM_TRUE_MACROS += USE_CXSF +ASM := armasm +LINK := armlink +FROMELF := fromelf +CPP := armcc + +OBJEXT := o +INCEXT := inc + +ARMCCFLAGS := --arm -c -Otime --cpp +ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 +ARMCCFLAGS := $(ARMCCFLAGS) -DXSR_NBL2 -DREAL_TARGET -DSYMBIAN_SUPPORT_UNISTORE2 + + ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)epoc32/include/rvct/rvct.h + + ifeq "$(CFG)" "UDEB" + ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG + endif + +ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") +ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") +ASM_LINKBASE_MACRO := $(OP)predefine "_LINKBASE_ SETA $(LINKBASE)" + +AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +ifeq "$(TOOLVER)" "RVCT4.0" +LFLAGS := $(OP)entry BootEntry $(OP)ro-base $(LINKBASE) $(OP)FIRST BootEntry $(OP)map $(OP)no_strict_wchar_size $(OP)no_strict_enum_size +endif +ifeq "$(TOOLVER)" "RVCT2.2" +LFLAGS := $(OP)entry BootEntry $(OP)ro-base $(LINKBASE) $(OP)FIRST BootEntry $(OP)map +endif + +SYMOPT := $(OP)symdefs +ASMTYP := ARMASM +LINKFILE := + +define do_compile +$(CPP) $(ARMCCFLAGS) $< -o $@ +endef +define do_h2inc +perl -S $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ ARMASM +endef +define do_asm +$(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< +endef +define do_link +$(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) +endef +define do_strip +$(FROMELF) $(OP)bin $(OP)output $@ $< +endef +endif + +#Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) +$(FULLBUILTINCLUDES) : $(FULLVHEADERS) + $(do_h2inc) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) +$(FULLBUILTINCLUDES2) : $(FULLVHEADERS2) + $(do_h2inc) + +#object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +BLCPPOBJECTS := $(foreach f,$(BLCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLBLCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(BLCPPOBJECTS)) + +XSRCPPOBJECTS1 := $(foreach f,$(XSRCPPSOURCE1),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS1 := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS1)) + +XSRCPPOBJECTS2 := $(foreach f,$(XSRCPPSOURCE2),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS2 := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS2)) + +SPECXSRCPPOBJECTS := $(foreach f,$(SPECXSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLSPECXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(SPECXSRCPPOBJECTS)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLBLCPPOBJECTS) $(FULLXSRCPPOBJECTS1) $(FULLXSRCPPOBJECTS2) $(FULLSPECXSRCPPOBJECTS) $(XSRLIB) + +ifdef PROCESS_INCLUDES + +GCCSRC := $(addprefix $(BUILDLOC)/,$(SRC)) + +#Creation of headers +FULLINCLUDES := $(foreach f,$(INCLUDES),$(basename $(f)).$(INCEXT)) +FULLINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLINCLUDES)) + +$(FULLINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLBLDINCLUDES := $(foreach f,$(BLDINCLUDES),$(basename $(f)).$(INCEXT)) +FULLBLDINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLBLDINCLUDES)) +$(FULLBLDINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLPLATINCLUDES := $(foreach f,$(PLATINCLUDES),$(basename $(f)).$(INCEXT)) +FULLPLATINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLPLATINCLUDES)) +$(FULLPLATINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLGENINCLUDES := $(foreach f,$(GENINCLUDES),$(basename $(f)).$(INCEXT)) +FULLGENINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLGENINCLUDES)) +$(FULLGENINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +else +FULLINCLUDES:= $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES:= $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES:= $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES:= $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + +#Arm RVCT specifics here + +endif + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TARGET) : $(TMPTARGET) + $(do_strip) + +#CPP objects +$(FULLGENCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLBLCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(BLSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLXSRCPPOBJECTS1) : $(BUILDLOC)/%.$(OBJEXT) : $(XSRSRCDIR1)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLXSRCPPOBJECTS2) : $(BUILDLOC)/%.$(OBJEXT) : $(XSRSRCDIR2)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLSPECXSRCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECXSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + + +#Asm objects +$(FULLGENASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + @echo BLD + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_restricted_on_miniboot.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_restricted_on_miniboot.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h4_restricted_coreldr extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/h4_restricted_on_miniboot.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/h4_restricted_on_miniboot.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,149 @@ +# Copyright (c) 2007-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: +# +# Description: +# + +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + +## This macro enables benchmarking code. Comment out or set FALSE if not required +# WRITE_TIMINGS := TRUE + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +#Set the directories +GENSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/util/ONBL1 +SPECSRCDIR := $(EXTENSION_ROOT)/nandboot/miniboot_onenand + +# Build directory (EPOCBLD too long) +BUILDLOC = $(EPOCROOT)epoc32/build/omap_hrp/h4_restricted/unistore2/nandboot/miniboot/$(PLATFORM_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(TARGETDIR)$/h4hrp_un2_on_miniboot.bin +TMPTARGET = $(BUILDLOC)$/h4hrp_un2_on_miniboot.elf + +#Rules +vpath %.s . $(GENSRCDIR) $(SPECSRCDIR) + +GENASMSOURCE := onbl1.s +ASMSOURCE := miniboot_onenand.s + +ARMASM_OUT := $(shell armasm 2>&1) +ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) + +# Select the toolchain: ARM RVCT, then GCC +#TOOLVER := RVCT +OP := -- +OB := o + + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS += WRITE_TIMINGS +endif + +#Arm RVCT tools +ASM_TRUE_MACROS += USE_CXSF +ASM := armasm +LINK := armlink +FROMELF := fromelf + +OBJEXT := o + +ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") +ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") + +AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) -I$(BUILDLOC) +LFLAGS := $(OP)entry BootEntry $(OP)FIRST BootEntry $(OP)map +SYMOPT := $(OP)symdefs +ASMTYP := ARMASM + +define do_asm + $(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< +endef + +define do_link + $(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) +endef + +define do_strip + $(FROMELF) $(OP)bin $(OP)output $@ $< +endef + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TARGET) : $(TMPTARGET) + $(do_strip) + +#Asm objects +$(FULLGENASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") + diff -r 164db16a7f09 -r 0d178dffddca extension/lab_restricted_miniboot.flm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/lab_restricted_miniboot.flm Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,84 @@ +# 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 diff -r 164db16a7f09 -r 0d178dffddca extension/lab_restricted_miniboot.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/lab_restricted_miniboot.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,22 @@ +# Copyright (c) 2005-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: +# +# Description: +# +# Meta information for the lab_restricted_miniboot extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/lab_restricted_miniboot.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/lab_restricted_miniboot.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,141 @@ +# lab_restricted_miniboot.mk +# +# 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: +# +# +# + +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + +#Set the directories +SRCDIR := $(EXTENSION_ROOT)/../../lab_restricted/unistore2/nandboot/miniboot_largeblk + +# Build directory (EPOCBLD too long) +BUILDLOC = $(EPOCROOT)epoc32/build/lab_restricted/unistore2/nandboot/miniboot/$(PLATFORM_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(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 + +ARMASM_OUT := $(shell armasm 2>&1) +ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) + +# Select the toolchain: ARM RVCT, then GCC +#TOOLVER := RVCT +OP := -- +OB := o + +#Arm RVCT tools +ASM_TRUE_MACROS += USE_CXSF +ASM := armasm +LINK := armlink +FROMELF := fromelf + +OBJEXT := o + +ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") +ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") + +AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) -I$(BUILDLOC) +LFLAGS := $(OP)ro-base $(LINKBASE) $(OP)entry BootEntry $(OP)FIRST BootEntry $(OP)map +SYMOPT := $(OP)symdefs +ASMTYP := ARMASM + +define do_asm + $(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< +endef + +define do_link + $(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) +endef + +define do_strip + $(FROMELF) $(OP)bin $(OP)output $@ $< +endef + +define do_omapsig + perl -S $(EPOCROOT)epoc32/tools/omapsig.pl $(LINKBASE) $< $@ +endef + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TMPTARGET2) : $(TMPTARGET) + $(do_strip) + +#omapsig +$(TARGET) : $(TMPTARGET2) + $(do_omapsig) + +#Asm objects + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") + diff -r 164db16a7f09 -r 0d178dffddca extension/lab_restricted_miniboot.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/lab_restricted_miniboot.xml Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r 164db16a7f09 -r 0d178dffddca extension/nand_fbr_offset.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/nand_fbr_offset.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the nand_fbr_offset extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/nand_fbr_offset.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/nand_fbr_offset.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,85 @@ +# Copyright (c) 2006-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: +# +# Description: +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +# Build directory (EPOCBLD too long) +BUILDLOC = $(EXTENSION_ROOT)/drivers + +## Set the target name +SRC := $(SRCDIR)/nand_fbr_offset.h +TARGET = $(TARGETDIR)/nand_fbr_offset.inc + + + +#Include processing +FULLINCLUDES := $(addprefix $(SRCDIR)/,$(INCLUDES)) +#Object processing +FULLSRC := $(addprefix $(SRCDIR)/,$(SRC)) + +ifdef PROCESS_INCLUDES +GCCSRC := $(addprefix $(BUILDLOC)/,$(SRC)) +FULLINCLUDES := $(foreach f,$(FULLINCLUDES),$(basename $(f)).$(INCEXT)) +#Creation of headers +$(FULLINCLUDES) : $(SRCDIR)/%.$(INCEXT) : %.inc + $(do_headers) +else +#Armasm sytax specifc asm rule goes here +endif + + +#Rules +#vpath %.inc . $(SRCDIR) + + +MAKMAKE : + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(SRC) $(TARGET) ARMASM +# echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + + + +BLD SAVESPACE : + echo Nothing to do + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/$(TARGET)") +# -$(ERASE) "$(TARGET)") +# -$(ERASE) "$(BUILDLOC)/$(TARGET)") + diff -r 164db16a7f09 -r 0d178dffddca extension/ne1_tb_genbootinc.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/ne1_tb_genbootinc.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,22 @@ +# Copyright (c) 2005-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: +# +# Description: +# Meta information for the h4_genbootinc extension template +# + + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/ne1_tb_genbootinc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/ne1_tb_genbootinc.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,54 @@ +# Copyright (c) 2006-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: +# +# Description: +# h4_genbootinc.mk +# Generate assembler inc files from header files +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +XINCDIR := $(INC_PATH)/assp/naviengine +XGENDIR := $(INC_PATH)/assp/naviengine/$(MEMMODEL) + +MAKMAKE : all + +FREEZE : + +LIB : all + +CLEANLIB : + +RESOURCE : + +FINAL : + +BLD SAVESPACE : all + +RELEASABLES : + @echo $(XGENDIR)/naviengine.inc + +CLEAN : + -$(ERASE) $(call slash2generic,$(XGENDIR)/naviengine.inc) + @echo $(XGENDIR)/naviengine.inc + +all: $(XGENDIR)/naviengine.inc + +$(XGENDIR)/naviengine.inc : $(XINCDIR)/naviengine.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR)/naviengine.h $(XGENDIR)/naviengine.inc ARMASM + diff -r 164db16a7f09 -r 0d178dffddca extension/ne1_tb_restricted_coreldr.flm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/ne1_tb_restricted_coreldr.flm Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,281 @@ +# 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: +# +# Description: +# ne1_tb_restricted_coreldr.flm +# # NB! LINKBASE : Code execute address also set coreldr.lnk file +# # MUST REFLECT CORELOADER ADDRESS RELOCATION IN BOTH FILES!! +# +# + +ifeq ($($(NAME)_$(PLATFORM_PATH)_bootstrap_flm),) +$(NAME)_$(PLATFORM_PATH)_bootstrap_flm := 1 + +## THESE MACROS NEED TO BE SET EXPLICITLY TO TRUE OR BLANK + +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +USE_MMU := TRUE + +# This macro enables benchmarking code. Comment out or set FALSE if not required +WRITE_TIMINGS := +# Timer is not implemented for Naviengine. Do not enable! + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +DUMP_PAGE_TABLES := +# Page tables cannot be dumped on Naviengine due to the NANDController used. Do not enable! + +# This macro enables the MMU enabled version of the coreldr to call RestartAuxiliaryCores +# before it runs the core image. This function should be defined in the variant, to +# restart the auxiliary cores, which it should have paused on startup. +RUNS_WITH_SMP := TRUE + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +# Set the directories; based on calling bld.inf +GENSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +# Generic drivers +BLSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/util/ONBL2 +XSRSRCDIR1 := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/OAM/OSLess +XSRSRCDIR2 := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/LLD/DNandO +# Coreloader ASM... +SPECSRCDIR := $(EXTENSION_ROOT)/../navienginebsp/ne1_tb/nandboot +# PAM - Platform specific Version +SPECXSRSRCDIR := $(EXTENSION_ROOT)/pam +SPECXSRSRCDIR1 := $(EXTENSION_ROOT)/lld + +# Platform Variant includes +VARIANTINC := $(INC_PATH)/ne1_tb +VARIANTINC2 := $(EXTENSION_ROOT)/../navienginebsp/ne1_tb/bootstrap +VARIANTINC3 := $(EXTENSION_ROOT)/../navienginebsp/ne1_tb/nand $(EXTENSION_ROOT)/../navienginebsp/naviengine_assp $(INC_PATH)/assp/naviengine/$(MEMMODEL) + +# Generic driver file includes +GENINC1 := $(INC_PATH) $(EPOCROOT)/epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 $(INC_PATH)/memmodel/epoc $(INC_PATH)/kernel $(INC_PATH)/kernel/arm $(INC_PATH)/nkern $(INC_PATH)/nkern/arm +GENXSRINC := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/inc +GENINCPATH:= $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR1) $(XSRSRCDIR2) $(SPECXSRSRCDIR) $(SPECXSRSRCDIR1) $(VARIANTINC) $(VARIANTINC2) $(VARIANTINC3) $(GENINC1) $(GENDRIVERINC) $(GENINC2) $(GENINC3) $(GENINC4) $(GENXSRINC) + + +# Set the source/include/target directories + +# epoc32 folder for exported header files +EPOCINCDIR := $(INC_PATH)/ne1_tb + +# Build directory +BUILDLOC := $(EPOCBLD)/ne1_tb_restricted_coreldr_flm/$(PLATFORM_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)/epoc32/release/$(PLATFORM_PATH) +BINTARGET := $(TARGETDIR)/$(NAME).bin +TMPTARGET := $(BUILDLOC)/$(NAME).elf + +# Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) +vpath %.inc . $(SPECSRCDIR) $(EPOCINCDIR) +vpath %.ginc . $(BUILDLOC) + + +# from base/e32/include/drivers/... +VHEADERS := nanddevice.h +# the following .inc files get built as part of the process +BUILTINCLUDES := nanddevice.inc config.inc +BUILTINCLUDES2 := nand_plat.inc + +# +ASMSOURCE := coreldrasm.s +GENCPPSOURCE := inflate.cpp +BLCPPSOURCE := ONBL2.CPP +XSRCPPSOURCE1 := OSLessOAM.cpp +SPECXSRCPPSOURCE := pam.cpp +SPECXSRCPPSOURCE1 := pnl.cpp + +XSRLIB := $(EPOCROOT)/epoc32/release/armv5/$(CFG)/nbl2.lib + +# Only link in the MMU stuff if required +GENASMSOURCE := +ifeq "$(USE_MMU)" "TRUE" + GENASMSOURCE := coreldrmmu.s +endif + +HEADERS := +SPECHEADERS := nand_plat.h + +## Address at which coreloader binary is loaded and then started from +# +# On NaviEngine this number is base of ram + 208MB (permitting 208MB core images) +# this number is pretty arbitrary +# if necessary as long as the corresponding change is also made to +# KCoreLoaderAddress in variant_bootstrap.inc +# +LINKBASE := 0x8D000000 + +# Build up logical TRUE defines +ASM_TRUE_MACROS := + +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) DUMP_PAGE_TABLES +endif + +ifeq "$(RUNS_WITH_SMP)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) RUNS_WITH_SMP +endif + +# Build up logical FALSE defines +ASM_FALSE_MACROS := + +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS := $(ASM_FALSE_MACROS) USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS := $(ASM_FALSE_MACROS) WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS := $(ASM_FALSE_MACROS) DUMP_PAGE_TABLES +endif + + +# Arm RVCT tools +ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) USE_CXSF + +OBJEXT := o +INCEXT := inc + +ARMCCFLAGS := --arm -c -Otime --cpp --enum_is_int +ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 +ARMCCFLAGS := $(ARMCCFLAGS) -DXSR_NBL2 -DREAL_TARGET -DDEFERED_CHK -DSYMBIAN_SUPPORT_UNISTORE2 + +ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)/epoc32/include/rvct/rvct.h + +ifeq "$(CFG)" "UDEB" +ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG +endif + +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}") +ASM_LINKBASE_MACRO := --predefine "_LINKBASE_ SETA $(LINKBASE)" + +AFLAGS := -g --keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +LFLAGS := --entry BootEntry --ro-base $(LINKBASE) --FIRST BootEntry --map +SYMOPT := --symdefs +ASMTYP := ARMASM +LINKFILE := + +# include base commonly used functions +include $(EPOCROOT)/epoc32/tools/makefile_templates/base/base_rvct_common.mk + + +# Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) +# do h2inc +$(eval $(call base__h2inc,$(FULLBUILTINCLUDES),$(FULLVHEADERS))) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) +# do h2inc +$(eval $(call base__h2inc,$(FULLBUILTINCLUDES2),$(FULLVHEADERS2))) + +# object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +BLCPPOBJECTS := $(foreach f,$(BLCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLBLCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(BLCPPOBJECTS)) + +XSRCPPOBJECTS1 := $(foreach f,$(XSRCPPSOURCE1),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS1 := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS1)) + +SPECXSRCPPOBJECTS := $(foreach f,$(SPECXSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLSPECXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(SPECXSRCPPOBJECTS)) + +SPECXSRCPPOBJECTS1 := $(foreach f,$(SPECXSRCPPSOURCE1),$(basename $(f)).$(OBJEXT)) +FULLSPECXSRCPPOBJECTS1 := $(addprefix $(BUILDLOC)/,$(SPECXSRCPPOBJECTS1)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLBLCPPOBJECTS) $(FULLXSRCPPOBJECTS1) $(FULLSPECXSRCPPOBJECTS) $(FULLSPECXSRCPPOBJECTS1) $(XSRLIB) + + +FULLINCLUDES:= $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES:= $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES:= $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES:= $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + + +# Link +$(eval $(call base__link,$(TMPTARGET),$(FULLOBJECTS))) + +# Strip +$(eval $(call base__strip,$(BINTARGET),$(TMPTARGET))) + +# CPP objects +$(eval $(call base__compile,$(FULLGENCPPOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +$(eval $(call base__compile,$(FULLBLCPPOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(BLSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +$(eval $(call base__compile,$(FULLXSRCPPOBJECTS1),$(BUILDLOC)/%.$(OBJEXT),$(XSRSRCDIR1)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +$(eval $(call base__compile,$(FULLSPECXSRCPPOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(SPECXSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +$(eval $(call base__compile,$(FULLSPECXSRCPPOBJECTS1),$(BUILDLOC)/%.$(OBJEXT),$(SPECXSRSRCDIR1)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +# Asm objects +$(eval $(call base__asm,$(FULLGENASMOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES))) + +$(eval $(call base__asm,$(FULLASMOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES))) + +# +TARGET :: $(TARGETDIR) $(BUILDLOC) $(BINTARGET) + +# --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 diff -r 164db16a7f09 -r 0d178dffddca extension/ne1_tb_restricted_coreldr.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/ne1_tb_restricted_coreldr.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2008-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: +# +# Description: +# Meta information for the Navi_restricted_coreldr extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/ne1_tb_restricted_coreldr.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/ne1_tb_restricted_coreldr.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,402 @@ +# Copyright (c) 2008-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: +# +# Description: +# ne1_tb_restricted_coreldr.mk +# # NB! LINKBASE : Code execute address also set coreldr.lnk file +# # MUST REFLECT CORELOADER ADDRESS RELOCATION IN BOTH FILES!! +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + +## If any of these macros are changed, then execute "abld clean coreldr" from this directory +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +USE_MMU := TRUE + +# This macro enables benchmarking code. Comment out or set FALSE if not required +#WRITE_TIMINGS := TRUE +# Timer is not implemented for Naviengine. Do not enable! + + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +# DUMP_PAGE_TABLES := TRUE +# Page tables cannot be dumped on Naviengine due to the NANDController used. Do not enable! + +# This macro enables the MMU enabled version of the coreldr to call RestartAuxiliaryCores +# before it runs the core image. This function should be defined in the variant, to +# restart the auxiliary cores, which it should have paused on startup. +RUNS_WITH_SMP := TRUE + +# Macro used to enable support for Shadowed Memory Regions feature in loader +# See also varaint\config.inc to enable in bootstrap +SUPPORTS_SMR := TRUE + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +ifneq "$(SUPPORTS_SMR)" "TRUE" + SUPPORTS_SMR := FALSE +endif + +#Set the directories; based on calling bld.inf +GENSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +#Generic drivers +BLSRCDIR := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/XSR/UTIL/ONBL2 +XSRSRCDIR1 := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/XSR/OAM/OSLess +XSRSRCDIR2 := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/XSR/LLD/DNandO +#Coreloader ASM... +SPECSRCDIR := $(EXTENSION_ROOT)/../navienginebsp/ne1_tb/nandboot +#PAM - Platform specific Version +SPECXSRSRCDIR := $(EXTENSION_ROOT)/pam +SPECXSRSRCDIR1 := $(EXTENSION_ROOT)/lld + +#Platform Variant includes +VARIANTINC := $(INC_PATH)/ne1_tb +VARIANTINC2 := $(EXTENSION_ROOT)/../navienginebsp/ne1_tb/bootstrap +VARIANTINC3 := $(EXTENSION_ROOT)/../navienginebsp/ne1_tb/nand $(EXTENSION_ROOT)/../navienginebsp/naviengine_assp $(INC_PATH)/assp/naviengine/$(MEMMODEL) + +#Generic driver file includes +#GENINC1 := $(INC_PATH) $(EPOCROOT)epoc32/include +GENINC1 := $(INC_PATH) +GENINC3 := $(EPOCROOT)epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 $(INC_PATH)/memmodel/epoc $(INC_PATH)/kernel $(INC_PATH)/kernel/arm $(INC_PATH)/nkern $(INC_PATH)/nkern/arm +GENXSRINC := $(EXTENSION_ROOT)/../../../kernelhwsrv/kernel/eka/drivers/unistore2/srca/xsr/inc +GENINCPATH:= $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR1) $(XSRSRCDIR2) $(SPECXSRSRCDIR) $(SPECXSRSRCDIR1) $(VARIANTINC) $(VARIANTINC2) $(VARIANTINC3) $(GENINC1) $(GENDRIVERINC) $(GENINC2) $(GENINC3) $(GENINC4) $(GENXSRINC) + + +# Set the source/include/target directories + +#epoc32 folder for exported header files +EPOCINCDIR = $(INC_PATH)/ne1_tb + +# Build directory (EPOCBLD too long) +BUILDLOC = $(EPOCROOT)epoc32/build/bsp/hwip_nec_naviengine/ne1_tb_restricted/unistore2/nandboot/coreldr/$(PLATFORM_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(TARGETDIR)$/$(NAME).bin +TMPTARGET = $(BUILDLOC)$/$(NAME).elf + +#Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) +vpath %.inc . $(SPECSRCDIR) $(EPOCINCDIR) +vpath %.ginc . $(BUILDLOC) + + +# from base/e32/include/drivers/... +VHEADERS := nanddevice.h +# the following .inc files get built as part of the process +BUILTINCLUDES := nanddevice.inc config.inc +BUILTINCLUDES2 := nand_plat.inc + + + +ASMSOURCE := coreldrasm.s +GENCPPSOURCE := inflate.cpp +BLCPPSOURCE := ONBL2.CPP +XSRCPPSOURCE1 := OSLessOAM.cpp +SPECXSRCPPSOURCE := pam.cpp +SPECXSRCPPSOURCE1 := pnl.cpp + +XSRLIB := $(EPOCROOT)epoc32/release/armv5/$(CFG)/nbl2.lib + +ifeq "$(USE_MMU)" "TRUE" + #generic version found in base/e32utils/nandboot/coreldr/... + GENASMSOURCE := coreldrmmu.s # only link in the MMU stuff if required +endif + +HEADERS := +SPECHEADERS := nand_plat.h + +## Address at which coreloader binary is loaded and then started from +# +# On NaviEngine this number is base of ram + 208MB (permitting 208MB core images) +# this number is pretty arbitrary +# if necessary as long as the corresponding change is also made to +# KCoreLoaderAddress in variant_bootstrap.inc +# +LINKBASE = 0x8D000000 + +#ARMASM_OUT := $(shell armasm 2>&1) +#ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) +ARMASM_OUT := $(wordlist 2, 4, $(shell armasm --vsn 2>&1)) + +# Select the toolchain: ARM RVCT, then GCC + +# Use GCC toolchain if no other is available +TOOLVER := GCC +#RVCTSTR := $(strip $(findstring RVCT, $(ARMASM_OUT_4))) +RVCTSTR := $(strip $(findstring RVCT,$(ARMASM_OUT))) +ifeq "$(RVCTSTR)" "RVCT" + TOOLVER := RVCT + OP := -- + OB := o +endif + +# Build up logical TRUE defines +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(SUPPORTS_SMR)" "TRUE" + ASM_TRUE_MACROS += SUPPORTS_SMR +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS += DUMP_PAGE_TABLES +endif + +ifeq "$(RUNS_WITH_SMP)" "TRUE" + ASM_TRUE_MACROS += RUNS_WITH_SMP +endif + +# Build up logical FALSE defines +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(SUPPORTS_SMR)" "FALSE" + ASM_FALSE_MACROS += SUPPORTS_SMR +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS += DUMP_PAGE_TABLES +endif + +#Arm RVCT tools +ifeq "$(TOOLVER)" "RVCT" +ASM_TRUE_MACROS += USE_CXSF +ASM := armasm +LINK := armlink +FROMELF := fromelf +CPP := armcc + +OBJEXT := o +INCEXT := inc + +ARMCCFLAGS := --arm -c -Otime --cpp +ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 +ARMCCFLAGS := $(ARMCCFLAGS) -DXSR_NBL2 -DREAL_TARGET -DDEFERED_CHK -DSYMBIAN_SUPPORT_UNISTORE2 + + +ifeq "$(SUPPORTS_SMR)" "TRUE" + ARMCCFLAGS := $(ARMCCFLAGS) -DSUPPORTS_SMR +endif + + + + ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)epoc32/include/rvct/rvct.h + + ifeq "$(CFG)" "UDEB" + ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG + endif + +ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") +ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") +ASM_LINKBASE_MACRO := $(OP)predefine "_LINKBASE_ SETA $(LINKBASE)" + +AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +LFLAGS := $(OP)entry BootEntry $(OP)ro-base $(LINKBASE) $(OP)FIRST BootEntry $(OP)map +SYMOPT := $(OP)symdefs +ASMTYP := ARMASM +LINKFILE := + +define do_compile +$(CPP) $(ARMCCFLAGS) $< -o $@ +endef +define do_h2inc +perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ ARMASM +endef +define do_asm +$(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< +endef +define do_link +$(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) +endef +define do_strip +$(FROMELF) $(OP)bin $(OP)output $@ $< +endef +endif + +#Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) +$(FULLBUILTINCLUDES) : $(FULLVHEADERS) + $(do_h2inc) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) +$(FULLBUILTINCLUDES2) : $(FULLVHEADERS2) + $(do_h2inc) + +#object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +BLCPPOBJECTS := $(foreach f,$(BLCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLBLCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(BLCPPOBJECTS)) + +XSRCPPOBJECTS1 := $(foreach f,$(XSRCPPSOURCE1),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS1 := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS1)) + +SPECXSRCPPOBJECTS := $(foreach f,$(SPECXSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLSPECXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(SPECXSRCPPOBJECTS)) + +SPECXSRCPPOBJECTS1 := $(foreach f,$(SPECXSRCPPSOURCE1),$(basename $(f)).$(OBJEXT)) +FULLSPECXSRCPPOBJECTS1 := $(addprefix $(BUILDLOC)/,$(SPECXSRCPPOBJECTS1)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLBLCPPOBJECTS) $(FULLXSRCPPOBJECTS1) $(FULLSPECXSRCPPOBJECTS) $(FULLSPECXSRCPPOBJECTS1) $(XSRLIB) + +ifdef PROCESS_INCLUDES + +GCCSRC := $(addprefix $(BUILDLOC)/,$(SRC)) + +#Creation of headers +FULLINCLUDES := $(foreach f,$(INCLUDES),$(basename $(f)).$(INCEXT)) +FULLINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLINCLUDES)) + +$(FULLINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLBLDINCLUDES := $(foreach f,$(BLDINCLUDES),$(basename $(f)).$(INCEXT)) +FULLBLDINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLBLDINCLUDES)) +$(FULLBLDINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLPLATINCLUDES := $(foreach f,$(PLATINCLUDES),$(basename $(f)).$(INCEXT)) +FULLPLATINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLPLATINCLUDES)) +$(FULLPLATINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLGENINCLUDES := $(foreach f,$(GENINCLUDES),$(basename $(f)).$(INCEXT)) +FULLGENINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLGENINCLUDES)) +$(FULLGENINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +else +FULLINCLUDES:= $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES:= $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES:= $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES:= $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + +#Arm RVCT specifics here + +endif + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TARGET) : $(TMPTARGET) + $(do_strip) + +#CPP objects +$(FULLGENCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLBLCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(BLSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLXSRCPPOBJECTS1) : $(BUILDLOC)/%.$(OBJEXT) : $(XSRSRCDIR1)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLSPECXSRCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECXSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLSPECXSRCPPOBJECTS1) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECXSRSRCDIR1)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +#Asm objects +$(FULLGENASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + @echo BLD + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") + diff -r 164db16a7f09 -r 0d178dffddca extension/ne1_tb_restricted_coreldr.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/ne1_tb_restricted_coreldr.xml Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 164db16a7f09 -r 0d178dffddca extension/omap3_genbootinc.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/omap3_genbootinc.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,22 @@ +# Copyright (c) 2008-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: +# +# Description: +# Meta information for the omap3_genbootinc extension template +# + + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/omap3_genbootinc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/omap3_genbootinc.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,59 @@ +# Copyright (c) 2006-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: +# +# Description: +# Generate assembler inc files from header files +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + +# This will need to change when the directory gets renamed +XINCDIR := $(INC_PATH)/tiomap3/variant/common +XINCDIR2 := $(INC_PATH)/tiomap3/assp/common + + +MAKMAKE : all + +FREEZE : + +LIB : all + +CLEANLIB : + +RESOURCE : + +FINAL : + +BLD SAVESPACE : all + +RELEASABLES : + @echo $(XINCDIR)/nand_fbr_offset.inc + @echo $(XINCDIR2)/customrestartreasons.inc + +CLEAN : + -$(ERASE) $(call slash2generic,$(XINCDIR)/nand_fbr_offset.inc) +# -$(ERASE) $(XINCDIR)/nand_fbr_offset.inc + @echo $(XINCDIR2)/customrestartreasons.inc + +all: $(XINCDIR2)/customrestartreasons.inc $(XINCDIR)/nand_fbr_offset.inc + +$(XINCDIR)/nand_fbr_offset.inc : $(XINCDIR)/nand_fbr_offset.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR)/nand_fbr_offset.h $(XINCDIR)/nand_fbr_offset.inc ARMASM + +$(XINCDIR2)/customrestartreasons.inc : $(XINCDIR2)/customrestartreasons.h + perl $(EPOCROOT)epoc32/tools/h2inc.pl $(XINCDIR2)/customrestartreasons.h $(XINCDIR2)/customrestartreasons.inc ARMASM diff -r 164db16a7f09 -r 0d178dffddca extension/omap3_restricted_coreldr.flm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/omap3_restricted_coreldr.flm Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,244 @@ +# 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: +# +# Description: +# # NB! LINKBASE : Code execute address also set coreldr.lnk file +# # MUST REFLECT CORELOADER ADDRESS RELOCATION IN BOTH FILES!! +# + +ifeq ($($(NAME)_omap3_resricted_coreldr_flm),) +$(NAME)_omap3_resricted_coreldr_flm := 1 + +## THESE MACROS NEED TO BE SET EXPLICITLY TO TRUE OR BLANK + +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +USE_MMU := + +## This macro enables benchmarking code. Comment out or set FALSE if not required +WRITE_TIMINGS := + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +DUMP_PAGE_TABLES := + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +# Set the directories +GENSRCDIR := $(EXTENSION_ROOT)/../../../../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +XSRSRCDIR := $(EXTENSION_ROOT)/../../../../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr/unistore2 +SPECSRCDIR := $(EXTENSION_ROOT)/../../../assp/common/nandboot/coreldr_largeblk + +VARIANTINC := $(INC_PATH)/tiomap3/variant/$(VARIANT_PATH) +VARIANTINC2 := $(EXTENSION_ROOT)/../../../assp/common/bootstrap +VARIANTINC3 := $(EXTENSION_ROOT)/../../34xx_sdp/nand +VARIANTINC4 := $(INC_PATH)/tiomap3/variant/common + +GENINC1 := $(INC_PATH) $(EPOCROOT)/epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 +GENINCPATH := $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR) $(VARIANTINC) $(VARIANTINC2) $(VARIANTINC3) $(VARIANTINC4) $(GENINC1) $(GENDRIVERINC) $(GENINC2) + +# Set the source/include/target directories +GSRCDIR := ../../../assp/common/nandboot +VINCDIR := ../../../h4/inc +GINCDIR := ../../../shared/inc +EPOCINCDIR := $(INC_PATH)/tiomap3/variant/34xx_sdp + +# Build directory +BUILDLOC := $(EPOCBLD)/omap3_restricted_coreldr_flm/$(PLATFORM_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)/epoc32/release/$(PLATFORM_PATH) +BINTARGET := $(TARGETDIR)/$(NAME).bin +TMPTARGET := $(BUILDLOC)/$(NAME).elf + +# Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) +vpath %.inc . $(SPECSRCDIR) $(EPOCINCDIR) +vpath %.ginc . $(BUILDLOC) + +INCLUDES := + +VHEADERS := nanddevice.h +BUILTINCLUDES := nanddevice.inc config.inc +BUILTINCLUDES2 := nand_plat.inc + +ASMSOURCE := coreldrasm_largeblk.s +GENCPPSOURCE := coreldr.cpp inflate.cpp +XSRCPPSOURCE := coreldrxsr.cpp + +# Only link in the MMU stuff if required +GENASMSOURCE := +ifeq "$(USE_MMU)" "TRUE" + GENASMSOURCE := coreldrmmu.s +endif + +HEADERS := inflate.h coreldr.h +SPECHEADERS := nand_plat.h + +## Address at which coreloader binary is loaded and then started from +# +# On H4 this number is base of ram + 48MB (permitting 48MB core images) +# this number is pretty arbitrary and may be raised higher into ram +# if necessary as long as the corresponding change is also made to +# KCoreLoaderAddress in variant_bootstrap.inc +# +LINKBASE := 0x83000000 + +# Build up logical TRUE defines +ASM_TRUE_MACROS := + +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) DUMP_PAGE_TABLES +endif + +# Build up logical FALSE defines +ASM_FALSE_MACROS := + +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS := $(ASM_FALSE_MACROS) USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS := $(ASM_FALSE_MACROS) WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS := $(ASM_FALSE_MACROS) DUMP_PAGE_TABLES +endif + + +# Arm RVCT tools +ASM_TRUE_MACROS := $(ASM_TRUE_MACROS) USE_CXSF + +OBJEXT := o +INCEXT := inc + +ARMCCFLAGS := --arm -c -Otime --cpp --enum_is_int +ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 +ARMCCFLAGS := $(ARMCCFLAGS) -DSYMBIAN_SUPPORT_UNISTORE2 + +ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)/epoc32/include/rvct/rvct.h + +ifdef MACRO +ARMCCFLAGS := $(ARMCCFLAGS) -D$(MACRO) +endif + +ifeq "$(CFG)" "UDEB" +ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG +endif + +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}") +ASM_LINKBASE_MACRO := --predefine "_LINKBASE_ SETA $(LINKBASE)" + +AFLAGS := -g --keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) +LFLAGS := --entry BootEntry --ro-base $(LINKBASE) --FIRST BootEntry --map +SYMOPT := --symdefs +ASMTYP := ARMASM +LINKFILE := + +# Include base commonly used functions with RVCT toolchain +include $(EPOCROOT)/epoc32/tools/makefile_templates/base/base_rvct_common.mk + + +# CPP source processing +FULLCPPSOURCE := $(addprefix $(GENSRCDIR)/,$(GENCPPSOURCE)) + +# Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) + +$(eval $(call base__h2inc,$(FULLBUILTINCLUDES),$(FULLVHEADERS))) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) + +$(eval $(call base__h2inc,$(FULLBUILTINCLUDES2),$(FULLVHEADERS2))) + +# Object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +XSRCPPOBJECTS := $(foreach f,$(XSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLXSRCPPOBJECTS) + + +FULLINCLUDES := $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES := $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES := $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES := $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + + +# Link +$(eval $(call base__link,$(TMPTARGET),$(FULLOBJECTS))) + +# Strip +$(eval $(call base__strip,$(BINTARGET),$(TMPTARGET))) + +# CPP objects +$(eval $(call base__compile,$(FULLGENCPPOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +$(eval $(call base__compile,$(FULLXSRCPPOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(XSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS))) + +# Asm objects +$(eval $(call base__asm,$(FULLGENASMOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES))) + +$(eval $(call base__asm,$(FULLASMOBJECTS),$(BUILDLOC)/%.$(OBJEXT),$(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES))) + +# +TARGET :: $(TARGETDIR) $(BUILDLOC) $(BINTARGET) + +# --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 diff -r 164db16a7f09 -r 0d178dffddca extension/omap3_restricted_coreldr.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/omap3_restricted_coreldr.meta Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,21 @@ +# Copyright (c) 2008-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: +# +# Description: +# Meta information for the omap3_restricted_coreldr extension template +# + +platform win32 +makefile gnumake +techstream base + + diff -r 164db16a7f09 -r 0d178dffddca extension/omap3_restricted_coreldr.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/omap3_restricted_coreldr.mk Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,391 @@ +# Copyright (c) 2008-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: +# +# Description: +# # NB! LINKBASE : Code execute address also set coreldr.lnk file +# # MUST REFLECT CORELOADER ADDRESS RELOCATION IN BOTH FILES!! +# +# + +# To guarantee there is a slash at the end of EPOCROOT in case there is not. +# This is needed to ensure compatibility with SBSv1. +TMPROOT:=$(subst \,/,$(EPOCROOT)) +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ + +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk + + +## If any of these macros are changed, then execute "abld clean coreldr" from this directory +## Use this macro if it is required to use the MMU +## if the MMU is not require either comment it out or set it FALSE +## USE_MMU := TRUE + +## This macro enables benchmarking code. Comment out or set FALSE if not required +#WRITE_TIMINGS := TRUE + +## This macro causes the page tables to be output. Comment out or set FALSE if not required +## If this option is selected then the MMU code will be enabled +#DUMP_PAGE_TABLES := TRUE + + +## Make sure all 3 macros are either TRUE or FALSE +# Enforce USE_MMU if page table is to be dumped +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + USE_MMU := TRUE +else + DUMP_PAGE_TABLES := FALSE +endif + +ifneq "$(USE_MMU)" "TRUE" + USE_MMU := FALSE +endif + +ifneq "$(WRITE_TIMINGS)" "TRUE" + WRITE_TIMINGS := FALSE +endif + +#Set the directories +GENSRCDIR := $(EXTENSION_ROOT)/../../../../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr +XSRSRCDIR := $(EXTENSION_ROOT)/../../../../../../kernelhwsrv/kerneltest/e32utils/nandboot/coreldr/unistore2 +SPECSRCDIR := $(EXTENSION_ROOT)/../../../assp/common/nandboot/coreldr_largeblk + +VARIANTINC := $(INC_PATH)/tiomap3/variant/$(VARIANT_PATH) +VARIANTINC2 := $(EXTENSION_ROOT)/../../../assp/common/bootstrap +VARIANTINC3 := $(EXTENSION_ROOT)/../../34xx_sdp/nand +VARIANTINC4 := $(INC_PATH)/tiomap3/variant/common + +GENINC1 := $(INC_PATH) $(EPOCROOT)epoc32/include +GENDRIVERINC := $(INC_PATH)/drivers +GENINC2 := $(INC_PATH)/drivers/unistore2 +GENINCPATH:= $(GENSRCDIR) $(SPECSRCDIR) $(XSRSRCDIR) $(VARIANTINC) $(VARIANTINC2) $(VARIANTINC3) $(VARIANTINC4) $(GENINC1) $(GENDRIVERINC) $(GENINC2) + +# Set the source/include/target directories +GSRCDIR = ../../../assp/common/nandboot +VINCDIR = ../../../h4/inc +GINCDIR = ../../../shared/inc +EPOCINCDIR = $(INC_PATH)/tiomap3/variant/34xx_sdp + +# Build directory (EPOCBLD too long) +BUILDLOC = $(EPOCROOT)epoc32/build/tiomap3/$(VARIANT_PATH)_restricted/unistore2/nandboot/coreldr/$(PLATFORM) +#BUILDLOC = $(EPOCROOT)epoc32/build/tiomap3/34xx_sdp_restricted/unistore2/nandboot/coreldr/$(PLATFORM) +#BUILDLOC = $(EPOCBLD)/$(PLATFORM_PATH)/$(CFG) # Error as $(EPOCBLD) include platform +#BUILDLOC = $(EPOCBLD)/$(CFG_PATH) + +# Set the target name +TARGETDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH) +TARGET = $(TARGETDIR)/$(NAME).bin +TMPTARGET = $(BUILDLOC)/$(NAME).elf + +#Rules +vpath %.s . $(SPECSRCDIR) $(SRCDIR) +vpath %.inc . $(SPECSRCDIR) $(EPOCINCDIR) +vpath %.ginc . $(BUILDLOC) + +INCLUDES := + +VHEADERS := nanddevice.h +BUILTINCLUDES := nanddevice.inc config.inc +BUILTINCLUDES2 := nand_plat.inc + +ASMSOURCE := coreldrasm_largeblk.s +GENCPPSOURCE := coreldr.cpp inflate.cpp +XSRCPPSOURCE := coreldrxsr.cpp + +ifeq "$(USE_MMU)" "TRUE" + GENASMSOURCE := coreldrmmu.s # only link in the MMU stuff if required +endif + +HEADERS := inflate.h coreldr.h +SPECHEADERS := nand_plat.h + +## Address at which coreloader binary is loaded and then started from +# +# On H4 this number is base of ram + 48MB (permitting 48MB core images) +# this number is pretty arbitrary and may be raised higher into ram +# if necessary as long as the corresponding change is also made to +# KCoreLoaderAddress in variant_bootstrap.inc +# +LINKBASE = 0x83000000 + + + +ARMASM_OUT := $(shell armasm 2>&1) +ARMASM_OUT_4 := $(word 4,$(ARMASM_OUT)) + +# Select the toolchain: ARM RVCT, then GCC + +# Use GCC toolchain if no other is available +TOOLVER := GCC +RVCTSTR := $(strip $(findstring RVCT, $(ARMASM_OUT_4))) +ifeq "$(RVCTSTR)" "RVCT" + TOOLVER := RVCT + OP := -- + OB := o +endif + +# Build up logical TRUE defines +ifeq "$(USE_MMU)" "TRUE" + ASM_TRUE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "TRUE" + ASM_TRUE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "TRUE" + ASM_TRUE_MACROS += DUMP_PAGE_TABLES +endif + +# Build up logical FALSE defines +ifeq "$(USE_MMU)" "FALSE" + ASM_FALSE_MACROS += USE_MMU +endif + +ifeq "$(WRITE_TIMINGS)" "FALSE" + ASM_FALSE_MACROS += WRITE_TIMINGS +endif + +ifeq "$(DUMP_PAGE_TABLES)" "FALSE" + ASM_FALSE_MACROS += DUMP_PAGE_TABLES +endif + +#Arm RVCT tools +ifeq "$(TOOLVER)" "RVCT" + ASM_TRUE_MACROS += USE_CXSF + ASM := armasm + LINK := armlink + FROMELF := fromelf + CPP := armcc + + OBJEXT := o + INCEXT := inc + + ARMCCFLAGS := --arm -c -Otime --cpp + ARMCCFLAGS := $(ARMCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + ARMCCFLAGS := $(ARMCCFLAGS) -DEKA2 + ARMCCFLAGS := $(ARMCCFLAGS) -DSYMBIAN_SUPPORT_UNISTORE2 + + ARMCCFLAGS := $(ARMCCFLAGS) --preinclude $(EPOCROOT)epoc32/include/rvct/rvct.h + + ifdef MACRO + ARMCCFLAGS := $(ARMCCFLAGS) -D$(MACRO) + endif + + ifeq "$(CFG)" "UDEB" + ARMCCFLAGS := $(ARMCCFLAGS) -D_DEBUG + endif + + ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),$(OP)predefine "$(macro) SETL {TRUE}") + ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),$(OP)predefine "$(macro) SETL {FALSE}") + ASM_LINKBASE_MACRO := $(OP)predefine "_LINKBASE_ SETA $(LINKBASE)" + + AFLAGS := -g $(OP)keep $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -I$(BUILDLOC) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + LFLAGS := $(OP)entry BootEntry $(OP)ro-base $(LINKBASE) $(OP)FIRST BootEntry $(OP)map + SYMOPT := $(OP)symdefs + ASMTYP := ARMASM + LINKFILE := + + define do_compile + $(CPP) $(ARMCCFLAGS) $< -o $@ + endef + define do_h2inc + perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ ARMASM + endef + define do_asm + $(ASM) $(AFLAGS) -$(OB) $@ $(OP)LIST $(join $(basename $@),.lst) $< + endef + define do_link + $(LINK) $(LFLAGS) -$(OB) $@ $(FULLOBJECTS) + endef + define do_strip + $(FROMELF) $(OP)bin $(OP)output $@ $< + endef +endif + + +#GCC build options +ifeq "$(TOOLVER)" "GCC" + ASM := as + AFLAGS := -mapcs-32 -R -n -I$(BUILDLOC) + + ASM_TRUE_MACRO_CMD := $(foreach macro,$(ASM_TRUE_MACROS),--defsym $(macro)=1) + ASM_FALSE_MACRO_CMD := $(foreach macro,$(ASM_FALSE_MACROS),--defsym $(macro)=0) + ASM_LINKBASE_MACRO := --defsym _LINKBASE_=$(LINKBASE) + + LINKFLAGS = -n --section-alignment 4 --file-alignment 2 -no-whole-archive + GCCFLAGS=-march=armv4 -nostdinc -pipe -c -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas + GCCFLAGS := $(GCCFLAGS) $(foreach dir,$(GENINCPATH),$(join -I, $(dir))) + GCCDEFS = -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ -D__MARM__ -D__MARM_ARM4__ -DEKA2 -DSYMBIAN_SUPPORT_UNISTORE2 + ifeq "$(CFG)" "UDEB" + GCC = gcc -x c++ -g -O2 $(GCCFLAGS) -D_DEBUG -D_UNICODE $(GCCDEFS) + else + GCC = gcc -x c++ -s -fomit-frame-pointer -O2 $(GCCFLAGS) -DNDEBUG -D_UNICODE $(GCCDEFS) + endif + + LINKFILE = $(SPECSRCDIR)/coreldr.lnk + OBJEXT := o + INCEXT := ginc + + PROCESS_INCLUDES := 1 + define do_compile + $(GCC) -o $@ $< + endef + define do_h2inc + perl $(EPOCROOT)epoc32/tools/h2inc.pl $< $@ AS + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $@ $(join $(basename $@),.ginc) + endef + define do_includes + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $< $@ + endef + define do_asm + perl $(EPOCROOT)epoc32/tools/armasm2as.pl $< $(join $(basename $@),.s) + $(AS) $(AFLAGS) $(ASM_TRUE_MACRO_CMD) $(ASM_FALSE_MACRO_CMD) $(ASM_LINKBASE_MACRO) -o $@ $(join $(basename $@),.s) + endef + define do_strip + strip -O binary -o "$(TARGET)" "$(TMPTARGET)" + echo Built $(TARGET) + endef + define do_link + ld -o "$(TMPTARGET)" --start $(FULLOBJECTS) --script=$(LINKFILE) + endef +endif + + +#CPP source processing +FULLCPPSOURCE := $(addprefix $(GENSRCDIR)/,$(GENCPPSOURCE)) + +#Header processing +FULLHEADERS := $(addprefix $(GENSRCDIR)/,$(HEADERS)) +FULLSPECHEADERS := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) + +FULLVHEADERS := $(addprefix $(GENDRIVERINC)/,$(VHEADERS)) +FULLBUILTINCLUDES := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES)) +$(FULLBUILTINCLUDES) : $(FULLVHEADERS) + $(do_h2inc) + +FULLVHEADERS2 := $(addprefix $(VARIANTINC)/,$(SPECHEADERS)) +FULLBUILTINCLUDES2 := $(addprefix $(BUILDLOC)/,$(BUILTINCLUDES2)) +$(FULLBUILTINCLUDES2) : $(FULLVHEADERS2) + $(do_h2inc) + +#object names +GENCPPOBJECTS := $(foreach f,$(GENCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(GENCPPOBJECTS)) + +XSRCPPOBJECTS := $(foreach f,$(XSRCPPSOURCE),$(basename $(f)).$(OBJEXT)) +FULLXSRCPPOBJECTS := $(addprefix $(BUILDLOC)/,$(XSRCPPOBJECTS)) + +ASMOBJECTS := $(foreach f,$(ASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLASMOBJECTS := $(addprefix $(BUILDLOC)/,$(ASMOBJECTS)) + +GENASMOBJECTS := $(foreach f,$(GENASMSOURCE),$(basename $(f)).$(OBJEXT)) +FULLGENASMOBJECTS := $(addprefix $(BUILDLOC)/,$(GENASMOBJECTS)) + +FULLOBJECTS := $(FULLASMOBJECTS) $(FULLGENASMOBJECTS) $(FULLGENCPPOBJECTS) $(FULLXSRCPPOBJECTS) + +ifdef PROCESS_INCLUDES + +GCCSRC := $(addprefix $(BUILDLOC)/,$(SRC)) + +#Creation of headers +FULLINCLUDES := $(foreach f,$(INCLUDES),$(basename $(f)).$(INCEXT)) +FULLINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLINCLUDES)) + +$(FULLINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLBLDINCLUDES := $(foreach f,$(BLDINCLUDES),$(basename $(f)).$(INCEXT)) +FULLBLDINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLBLDINCLUDES)) +$(FULLBLDINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLPLATINCLUDES := $(foreach f,$(PLATINCLUDES),$(basename $(f)).$(INCEXT)) +FULLPLATINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLPLATINCLUDES)) +$(FULLPLATINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +FULLGENINCLUDES := $(foreach f,$(GENINCLUDES),$(basename $(f)).$(INCEXT)) +FULLGENINCLUDES := $(addprefix $(BUILDLOC)/,$(FULLGENINCLUDES)) +$(FULLGENINCLUDES) : $(BUILDLOC)/%.$(INCEXT) : %.inc + $(do_includes) + +else +FULLINCLUDES:= $(addprefix $(SPECSRCDIR)/,$(INCLUDES)) +FULLPLATINCLUDES:= $(addprefix $(PLATSRCDIR)/,$(PLATINCLUDES)) +FULLGENINCLUDES:= $(addprefix $(GENSRCDIR)/,$(GENINCLUDES)) +FULLBLDINCLUDES:= $(addprefix $(H2BLDDIR)/,$(BLDINCLUDES)) + +#Arm RVCT specifics here + +endif + + +#Link +$(TMPTARGET) : $(FULLOBJECTS) + $(do_link) + +#strip +$(TARGET) : $(TMPTARGET) + $(do_strip) + +#CPP objects +$(FULLGENCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +$(FULLXSRCPPOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(XSRSRCDIR)/%.cpp $(FULLHEADERS) $(FULLSPECHEADERS) + $(do_compile) + +#Asm objects +$(FULLGENASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(GENSRCDIR)/$(GENASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBUILTINCLUDES3) $(FULLDRIVERINCLUDES) $(FULLARMINCLUDES) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +$(FULLASMOBJECTS) : $(BUILDLOC)/%.$(OBJEXT) : $(SPECSRCDIR)/$(ASMSOURCE) $(FULLINCLUDES) $(FULLBUILTINCLUDES) $(FULLBUILTINCLUDES2) $(FULLBLDINCLUDES) $(FULLGENINCLUDES) $(FULLPLATINCLUDES) + $(do_asm) + +# make the work directories +$(TARGETDIR) : + $(call ifnotexistd,"$(TARGETDIR)") + +$(BUILDLOC) : + $(call ifnotexistd,"$(BUILDLOC)") + + + +MAKMAKE : + echo Nothing to do + +FREEZE : + echo Nothing to do + +LIB : + echo Nothing to do + +CLEANLIB : + echo Nothing to do + +RESOURCE : + echo Nothing to do + +FINAL : + echo Nothing to do + +BLD SAVESPACE : $(TARGETDIR) $(BUILDLOC) $(TARGET) + +RELEASABLES : + @echo "$(TARGET)" + +CLEAN : + -$(ERASE) $(call slash2generic,"$(TARGET)") + -$(ERASE) $(call slash2generic,"$(BUILDLOC)/*.*") +# -$(ERASE) "$(TARGET)" +# -$(ERASE) "$(BUILDLOC)/*.*" + diff -r 164db16a7f09 -r 0d178dffddca extension/omap3_restricted_coreldr.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/omap3_restricted_coreldr.xml Thu Oct 28 03:37:27 2010 +0530 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff -r 164db16a7f09 -r 0d178dffddca haitest/bspsvs/suite/group/release.doc Binary file haitest/bspsvs/suite/group/release.doc has changed diff -r 164db16a7f09 -r 0d178dffddca package_definition.xml --- a/package_definition.xml Thu Oct 14 15:35:36 2010 +0530 +++ b/package_definition.xml Thu Oct 28 03:37:27 2010 +0530 @@ -1,6 +1,9 @@ + + +