Browse Source

fallback to generic genimage config, the size of partition and filesystem still need to be made configurable

Waldemar Brodkorb 7 years ago
parent
commit
0fdcbb4efc

+ 23 - 0
adk/genimage/genimage-dual.cfg

@@ -0,0 +1,23 @@
+image disk.img {
+
+  hdimage {
+  }
+
+  partition root1 {
+    partition-type = 0x83
+    image = "rootfs.ext"
+    size = 64M
+  }
+
+  partition root2 {
+    partition-type = 0x83
+    image = "rootfs.ext"
+    size = 64M
+  }
+
+  partition cfgfs {
+    partition-type = 0x88
+    image = "cfgfs.img"
+  }
+
+}

+ 17 - 0
adk/genimage/genimage.cfg

@@ -0,0 +1,17 @@
+image disk.img {
+
+  hdimage {
+  }
+
+  partition root {
+    partition-type = 0x83
+    image = "rootfs.ext"
+    size = 64M
+  }
+
+  partition cfgfs {
+    partition-type = 0x88
+    image = "cfgfs.img"
+  }
+
+}

+ 7 - 1
mk/image.mk

@@ -293,6 +293,12 @@ ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package
 		-c boot/syslinux/boot.cat -no-emul-boot \
 		-boot-load-size 4 -boot-info-table ${TARGET_DIR}
 
+ifeq (,$(wildcard $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_SYSTEM)/$(ADK_TARGET_GENIMAGE_FILENAME)))
+GENCFG:=$(ADK_TOPDIR)/adk/genimage/$(ADK_TARGET_GENIMAGE_FILENAME)
+else
+GENCFG:=$(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_SYSTEM)/$(ADK_TARGET_GENIMAGE_FILENAME)
+endif
+
 ${FW_DIR}/${GENIMAGE}: ${TARGET_DIR} kernel-package
 	@rm -rf ${FW_DIR}/temp
 	@mkdir -p ${FW_DIR}/temp
@@ -312,7 +318,7 @@ endif
 		-d "$(TARGET_DIR)" \
 		-o $(FW_DIR)/rootfs.ext $(MAKE_TRACE)
 	PATH='${HOST_PATH}' genimage \
-		--config "$(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_SYSTEM)/$(ADK_TARGET_GENIMAGE_FILENAME)" \
+		--config "$(GENCFG)" \
 		--tmppath "${FW_DIR}/temp" \
 		--rootpath "$(TARGET_DIR)" \
 		--inputpath "$(FW_DIR)" \

+ 2 - 0
target/x86_64/qemu-x86_64/genimage-dual.cfg

@@ -19,11 +19,13 @@ image disk.img {
   partition root1 {
     partition-type = 0x83
     image = "rootfs.ext"
+    size = 64M
   }
 
   partition root2 {
     partition-type = 0x83
     image = "rootfs.ext"
+    size = 64M
   }
 
   partition cfgfs {

+ 1 - 0
target/x86_64/qemu-x86_64/genimage.cfg

@@ -19,6 +19,7 @@ image disk.img {
   partition root {
     partition-type = 0x83
     image = "rootfs.ext"
+    size = 64M
   }
 
   partition cfgfs {