forked from openkylin/platform_build
am dbd43691: am 3ef1d674: am 4985f06f: Merge "Make image-size-from-data-size not use hard coded values."
* commit 'dbd43691870fa64d1ad79371e3d796ed8e63b3b9': Make image-size-from-data-size not use hard coded values.
This commit is contained in:
commit
1ee80eefc7
|
@ -707,13 +707,15 @@ ifneq ($(BOARD_NAND_PAGE_SIZE),)
|
||||||
mkyaffs2_extra_flags := -c $(BOARD_NAND_PAGE_SIZE)
|
mkyaffs2_extra_flags := -c $(BOARD_NAND_PAGE_SIZE)
|
||||||
else
|
else
|
||||||
mkyaffs2_extra_flags :=
|
mkyaffs2_extra_flags :=
|
||||||
|
BOARD_NAND_PAGE_SIZE := 2048
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(BOARD_NAND_SPARE_SIZE),)
|
ifneq ($(BOARD_NAND_SPARE_SIZE),)
|
||||||
mkyaffs2_extra_flags += -s $(BOARD_NAND_SPARE_SIZE)
|
mkyaffs2_extra_flags += -s $(BOARD_NAND_SPARE_SIZE)
|
||||||
|
else
|
||||||
|
BOARD_NAND_SPARE_SIZE := 64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# system image
|
# system image
|
||||||
#
|
#
|
||||||
|
|
|
@ -1777,10 +1777,11 @@ endif
|
||||||
|
|
||||||
# Convert a partition data size (eg, as reported in /proc/mtd) to the
|
# Convert a partition data size (eg, as reported in /proc/mtd) to the
|
||||||
# size of the image used to flash that partition (which includes a
|
# size of the image used to flash that partition (which includes a
|
||||||
# 64-byte spare area for each 2048-byte page).
|
# spare area for each page).
|
||||||
# $(1): the partition data size
|
# $(1): the partition data size
|
||||||
define image-size-from-data-size
|
define image-size-from-data-size
|
||||||
$(shell echo $$(($(1) / 2048 * (2048+64))))
|
$(shell echo $$(($(1) / $(BOARD_NAND_PAGE_SIZE) * \
|
||||||
|
($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE)))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# $(1): The file(s) to check (often $@)
|
# $(1): The file(s) to check (often $@)
|
||||||
|
|
Loading…
Reference in New Issue