kernel/eka/extension/rom.flm
author William Roberts <williamr@symbian.org>
Mon, 04 Oct 2010 16:16:03 +0100
changeset 282 664ff9a1a8fa
parent 277 1686aa1db1e4
permissions -rw-r--r--
Merge fix for Bug 2742, add rom.flm and rom_sbs.pl, add workaround for Bug 2149

#
# Copyright (c) 2009-2010 Symbian.  All rights reserved.
# 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".

# macro for all the rules
define rom

FINAL::	
ifeq ($(OSTYPE),unix)
	$(call startrule,rom) \
	echo "This is not supported currently"; \
	$(call endrule,rom)
else
	$(call startrule,rom) \
	$(PERL) $(EPOCROOT)/sf/os/kernelhwsrv/kernel/eka/rombuild/rom_sbs.pl --variant=$(REE_TARGET) --inst=$(REE_PLATFORM) --build=$(CFG) --type=$(TYPE) --clean $(ROM_OPTIONS) --name=$(FULL_ROM_NAME).img \
	$(call endrule,rom)
endif

	$(call startrule,copy) \
	mv rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_rom.oby; \
	mv ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_ROMBUILD.LOG; \
	mv $(FULL_ROM_NAME).img $(EPOCROOT)/epoc32/rom/$(FULL_ROM_NAME).img; \
	$(call endrule,copy)

endef

# expand
ROM_OPTIONS:=$(foreach macro,$(REE_DEFINES), -d $(macro))
REE_PLATFORM:=$(PLATFORM)
ifneq ($(findstring SMP,$(REE_PLATFORM)),)
  # SMP target, so select underlying instruction set
  ROM_OPTIONS:=$(ROM_OPTIONS) --xabi=$(PLATFORM)
  REE_PLATFORM:=$(subst SMP,,$(REE_PLATFORM))
endif

ifeq "$(ROM_NAME)" ""
ROM_NAME:=$(REE_TARGET)
endif
FULL_ROM_NAME:=$(ROM_NAME)_$(TYPE)_$(PLATFORM)_$(CFG)

$(eval $(rom))

# The items produced by this FLM:
RELEASEABLES:=$(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(FULL_ROM_NAME).img

## What targets -- declare the files produced here
$(eval $(call whatmacro, $(RELEASEABLES)))
## Clean up
$(eval $(call GenerateStandardCleanTarget, $(RELEASEABLES)))