From 279f3084bbb4781d872412f5e49c74f462f7844a Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 9 Feb 2011 12:26:42 -0800 Subject: [PATCH] Fix the case BOARD_FLASH_BLOCK_SIZE smaller than BOARD_NAND_PAGE_SIZE, eg generic_x86 Also don't build ota package for generic_x86. Change-Id: I7606d56b312ac2e0c3514a8f250e005e0c05a3f1 --- core/Makefile | 4 ++-- core/definitions.mk | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/Makefile b/core/Makefile index 9a460954b..3d92b60b9 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1085,7 +1085,7 @@ target-files-package: $(BUILT_TARGET_FILES_PACKAGE) ifneq ($(TARGET_SIMULATOR),true) ifneq ($(TARGET_PRODUCT),sdk) -ifneq ($(TARGET_DEVICE),generic) +ifeq ($(filter generic%,$(TARGET_DEVICE)),) ifneq ($(TARGET_NO_KERNEL),true) # ----------------------------------------------------------------- @@ -1140,7 +1140,7 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS) updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET) endif # TARGET_NO_KERNEL != true -endif # TARGET_DEVICE != generic +endif # TARGET_DEVICE != generic* endif # TARGET_PRODUCT != sdk endif # TARGET_SIMULATOR != true diff --git a/core/definitions.mk b/core/definitions.mk index b6f451548..a064e20c2 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1832,8 +1832,10 @@ endif # spare area for each page). # $(1): the partition data size define image-size-from-data-size -$(shell echo $$(($(1) / $(BOARD_NAND_PAGE_SIZE) * \ - ($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE))))) +$(strip $(eval _isfds_value := $(shell echo $$(($(1) / $(BOARD_NAND_PAGE_SIZE) * \ + ($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE))))))\ +$(if $(filter 0, $(_isfds_value)),$(shell echo $$(($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE)))),$(_isfds_value))\ +$(eval _isfds_value :=)) endef # $(1): The file(s) to check (often $@)