Forráskód Böngészése

genimage: add better support

Waldemar Brodkorb 8 éve
szülő
commit
4830c53756

+ 7 - 3
mk/image.mk

@@ -272,14 +272,18 @@ ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package
 		-boot-load-size 4 -boot-info-table ${TARGET_DIR}
 
 ${FW_DIR}/${GENIMAGE}: ${TARGET_DIR} kernel-package
-	rm -rf ${FW_DIR}/temp
-	mkdir -p ${FW_DIR}/temp
+	@rm -rf ${FW_DIR}/temp
+	@mkdir -p ${FW_DIR}/temp
+	PATH='${HOST_PATH}' mke2img \
+		-G 4 \
+		-d "$(TARGET_DIR)" \
+		-o $(FW_DIR)/rootfs.ext $(MAKE_TRACE)
 	PATH='${HOST_PATH}' genimage \
 		--config "$(ADK_TOPDIR)/target/$(ADK_TARGET_CPU_ARCH)/$(ADK_TARGET_SYSTEM)/genimage.cfg" \
 		--tmppath "${FW_DIR}/temp" \
 		--rootpath "$(TARGET_DIR)" \
 		--inputpath "$(FW_DIR)" \
-		--outputpath "$(FW_DIR)"
+		--outputpath "$(FW_DIR)" $(MAKE_TRACE)
 
 imageclean:
 	rm -f $(FW_DIR)/$(ADK_TARGET_SYSTEM)-* ${BUILD_DIR}/$(ADK_TARGET_SYSTEM)-*

+ 3 - 2
target/config/Config.in.rootfs

@@ -152,8 +152,9 @@ config ADK_TARGET_ROOTFS_ARCHIVE
 
 config ADK_TARGET_ROOTFS_GENIMAGE
 	bool "Create a disk image for the target"
-	select ADK_KERNEL_EXT2_FS if ADK_TARGET_QEMU || ADK_TARGET_VBOX
-	select ADK_TARGET_QEMU_WITH_BLOCK
+	select ADK_KERNEL_EXT4_FS
+	select ADK_TARGET_QEMU_WITH_BLOCK if ADK_TARGET_QEMU
+	select ADK_HOST_BUILD_GENIMAGE
 	help
 	  Create a complete disk image for the target with genimage.
 

+ 25 - 4
target/config/Config.in.tools

@@ -27,10 +27,6 @@ config ADK_HOST_BUILD_FLEX
 	bool
 	default y
 
-config ADK_HOST_BUILD_GENIMAGE
-	bool
-	default y
-
 config ADK_HOST_BUILD_M4
 	bool
 	default y
@@ -112,6 +108,31 @@ config ADK_HOST_BUILD_XZ
 	default n
 
 # optional, but can be provided by host
+config ADK_HOST_BUILD_DOSFSTOOLS
+	bool
+	default n
+
+config ADK_HOST_BUILD_E2FSPROGS
+	bool
+	default n
+
+config ADK_HOST_BUILD_MKE2IMG
+	bool
+	default n
+
+config ADK_HOST_BUILD_MTOOLS
+	bool
+	default n
+
+config ADK_HOST_BUILD_GENIMAGE
+	bool
+	select ADK_HOST_BUILD_MKE2IMG
+	select ADK_HOST_BUILD_MTOOLS
+	select ADK_HOST_BUILD_GENEXT2FS
+	select ADK_HOST_BUILD_E2FSPROGS
+	select ADK_HOST_BUILD_DOSFSTOOLS
+	default n
+
 config ADK_HOST_NEED_CCACHE
 	bool
 	default n

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

@@ -3,22 +3,9 @@ image disk.img {
   hdimage {
   }
 
-  partition boot {
-    in-partition-table = "no"
-    image = "boot.img"
-    offset = 0
-    size = 512
-  }
-
-  partition grub {
-    in-partition-table = "no"
-    image = "grub.img"
-    offset = 512
-  }
-
   partition root {
     partition-type = 0x83
-    image = "rootfs.ext2"
+    image = "rootfs.ext"
   }
 
 }