Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a2ecaf5 authored by Ying Wang's avatar Ying Wang
Browse files

Fix the case image-size-from-data-size returns 0.

This time with correct escaping.

Change-Id: I660887ac62425e9960e266391b52979a7dff4617
parent bfaf531e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1833,8 +1833,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 $@)