Skip to content

Commit 933ba18

Browse files
committed
make: raise oversize alert if overlay size is less than 128KB
1 parent ceb7a4c commit 933ba18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ FIRMWARE_NOBOOT_SIZE = $(shell echo $$(($(FLASH_SIZE) - $(U_BOOT_PARTITION_SIZE)
114114
# dynamic partitions
115115
OVERLAY_SIZE = $(shell echo $$(($(FLASH_SIZE) - $(OVERLAY_OFFSET))))
116116
OVERLAY_SIZE_NOBOOT = $(shell echo $$(($(FIRMWARE_NOBOOT_SIZE) - $(OVERLAY_OFFSET_NOBOOT))))
117+
OVERLAY_MINUMUM_SIZE := 131072
117118

118119
# partition offsets
119120
U_BOOT_OFFSET = 0
@@ -214,7 +215,7 @@ delete_bin_update:
214215
if [ -f $(FIRMWARE_BIN_NOBOOT) ]; then rm $(FIRMWARE_BIN_NOBOOT); fi
215216

216217
create_overlay: $(U_BOOT_BIN)
217-
if [ $(OVERLAY_SIZE) -lt 0 ]; then $(FIGLET) "OVERSIZE"; fi
218+
if [ $(OVERLAY_SIZE) -lt $(OVERLAY_MINUMUM_SIZE) ]; then $(FIGLET) "OVERSIZE"; fi
218219
if [ -f $(OVERLAY_BIN) ]; then rm $(OVERLAY_BIN); fi
219220
$(OUTPUT_DIR)/host/sbin/mkfs.jffs2 --little-endian --pad=$(OVERLAY_SIZE) \
220221
--root=$(BR2_EXTERNAL)/overlay/upper/ --eraseblock=$(ALIGN_BLOCK) \

0 commit comments

Comments
 (0)