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
This commit is contained in:
Ying Wang 2011-02-09 12:26:42 -08:00
parent e5f114b3a5
commit 279f3084bb
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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 $@)