Browse Source

genimage: make rootsize configurable

Waldemar Brodkorb 1 month ago
parent
commit
b45da3c120
2 changed files with 8 additions and 2 deletions
  1. 1 1
      mk/image.mk
  2. 7 1
      target/config/Config.in.rootfs

+ 1 - 1
mk/image.mk

@@ -388,7 +388,7 @@ else
 	PATH='${HOST_PATH}' $(FAKEROOT) mkfs.ext2 \
 		-d "$(TARGET_DIR)" \
 		-r 1 -N 0 -m 5 -L "rootfs" \
-		$(FW_DIR)/rootfs.ext "128M" $(MAKE_TRACE)
+		$(FW_DIR)/rootfs.ext "$(ADK_TARGET_ROOTSIZE)M" $(MAKE_TRACE)
 	PATH='${HOST_PATH}' genimage \
 		--config "$(GENCFG)" \
 		--tmppath "${FW_DIR}/temp" \

+ 7 - 1
target/config/Config.in.rootfs

@@ -178,9 +178,15 @@ config ADK_TARGET_ROOTDEV
 	default "vda" if ADK_TARGET_SYSTEM_QEMU_LOONGARCH
 	default "sda"
 	help
-	  If you have a embedded device with multiple block devices and want to
+	  If you have an embedded device with multiple block devices and want to
 	  set the root device name.
 
+config ADK_TARGET_ROOTSIZE
+	int "Root filesystem size"
+	default 128
+	help
+	  Size of the rootfs image.
+
 config ADK_TARGET_DUAL_BOOT
 	bool "Activate dual-boot partition layout"
 	depends on ADK_TARGET_ROOTFS_GENIMAGE