Browse Source

Support make emmcboot image

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Jianlong Huang 1 year ago
parent
commit
21f4651396
4 changed files with 16 additions and 9 deletions
  1. 10 3
      Makefile
  2. 3 3
      conf/genimage-vf2.cfg
  3. 3 3
      conf/genimage.cfg
  4. BIN
      genimage_generic

+ 10 - 3
Makefile

@@ -395,9 +395,9 @@ UBOOTFIT    = 04ffcafa-cd65-11e8-b974-70b3d592f0fa
 #   The default sector size is 512 Bytes
 #   The partition start should be align on 2048-sector boundaries
 # expand the vfat size to 300+M for the vpu/jpu or other debug
-SPL_START   = 2048
-SPL_END     = 6143
-UBOOT_START = 6144
+SPL_START   = 4096
+SPL_END     = 8191
+UBOOT_START = 8192
 UBOOT_END   = 16383
 UBOOT_SIZE  = $(shell expr $(UBOOT_END) - $(UBOOT_START) + 1)
 VFAT_START  = 16384
@@ -467,6 +467,13 @@ format-rootfs-image: format-boot-loader
 	rmdir tmp-mnt
 	rmdir tmp-rootfs
 
+.PHONY: sdimg img
+sdimg: $(buildroot_rootfs_ext)
+	@./genimage.sh
+
+img: sdimg
+	@./genimage_generic
+
 #usb config
 format-usb-disk: $(sbi_bin) $(uboot) $(fit) $(vfat_image)
 	@test -b $(DISK) || (echo "$(DISK): is not a block device"; exit 1)

+ 3 - 3
conf/genimage-vf2.cfg

@@ -6,15 +6,15 @@ image sdcard.img {
 	partition spl {
 		image = "work/u-boot-spl.bin.normal.out"
 		partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985
-		offset = 1M
+		offset = 2M
 		size = 2M
 	}
 
 	partition uboot {
 		image = "work/visionfive2_fw_payload.img"
 		partition-type-uuid = 5B193300-FC78-40CD-8002-E86C45580B47
-		offset = 3M
-		size = 5M
+		offset = 4M
+		size = 4M
 	}
 
 	partition image {

+ 3 - 3
conf/genimage.cfg

@@ -6,15 +6,15 @@ image sdcard.img {
 	partition spl {
 		image = "work/u-boot-spl.bin.normal.out"
 		partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985
-		offset = 1M
+		offset = 2M
 		size = 2M
 	}
 
 	partition uboot {
 		image = "work/evb_fw_payload.img"
 		partition-type-uuid = 5B193300-FC78-40CD-8002-E86C45580B47
-		offset = 3M
-		size = 5M
+		offset = 4M
+		size = 4M
 	}
 
 	partition image {

BIN
genimage_generic