diff --git a/make/flash-images.mk b/make/flash-images.mk index 800c5d66..9353f44b 100644 --- a/make/flash-images.mk +++ b/make/flash-images.mk @@ -167,15 +167,15 @@ SECOND_KERNEL_PARTITION_OFFSET = "$(shell expr $(ROOTFS_PARTITION_OFFSET) \+ $(R THIRD_KERNEL_PARTITION_OFFSET = "$(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" FOURTH_KERNEL_PARTITION_OFFSET = "$(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" -# USERDATA_PARTITION values -MULTI_ROOTFS_PARTITION_OFFSET = "$(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" -MULTI_ROOTFS_PARTITION_SIZE = 2321408 # 2731008 - 204800 - 204800 +LINUX_SWAP_PARTITION_OFFSET = "$(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" +LINUX_SWAP_PARTITION_SIZE = 262144 -LINUX_SWAP_PARTITION_OFFSET = "$(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE))" -LINUX_SWAP_PARTITION_SIZE = 204800 +# USERDATA_PARTITION values +MULTI_ROOTFS_PARTITION_OFFSET = "$(shell expr $(LINUX_SWAP_PARTITION_OFFSET) \+ $(LINUX_SWAP_PARTITION_SIZE))" +MULTI_ROOTFS_PARTITION_SIZE = 2206720 # 2731008 - 262144 - 262144 -STORAGE_PARTITION_OFFSET = "$(shell expr $(LINUX_SWAP_PARTITION_OFFSET) \+ $(LINUX_SWAP_PARTITION_SIZE))" -#STORAGE_PARTITION_SIZE = 204800 # remaining flash memory +STORAGE_PARTITION_OFFSET = "$(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE))" +#STORAGE_PARTITION_SIZE = 262144 # remaining flash memory flash-image-hd5x-multi: | $(IMAGE_DIR) rm -rf $(IMAGE_BUILD_DIR) @@ -193,16 +193,16 @@ flash-image-hd5x-multi: | $(IMAGE_DIR) parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel2 $(SECOND_KERNEL_PARTITION_OFFSET) $(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel3 $(THIRD_KERNEL_PARTITION_OFFSET) $(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel4 $(FOURTH_KERNEL_PARTITION_OFFSET) $(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) - parted -s $(EMMC_IMAGE) unit KiB mkpart userdata ext4 $(MULTI_ROOTFS_PARTITION_OFFSET) $(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE)) parted -s $(EMMC_IMAGE) unit KiB mkpart swap linux-swap $(LINUX_SWAP_PARTITION_OFFSET) $(shell expr $(LINUX_SWAP_PARTITION_OFFSET) \+ $(LINUX_SWAP_PARTITION_SIZE)) + parted -s $(EMMC_IMAGE) unit KiB mkpart userdata ext4 $(MULTI_ROOTFS_PARTITION_OFFSET) $(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE)) parted -s $(EMMC_IMAGE) unit KiB mkpart storage ext4 $(STORAGE_PARTITION_OFFSET) 100% dd if=/dev/zero of=$(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) bs=$(BLOCK_SIZE) count=$(shell expr $(BOOT_PARTITION_SIZE) \* $(BLOCK_SECTOR)) mkfs.msdos -S 512 $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) echo "boot emmcflash0.linuxkernel '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p3 rootsubdir=linuxrootfs1 kernel=/dev/mmcblk0p2 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP echo "boot emmcflash0.linuxkernel '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p3 rootsubdir=linuxrootfs1 kernel=/dev/mmcblk0p2 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_1 - echo "boot emmcflash0.linuxkernel2 '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p7 rootsubdir=linuxrootfs2 kernel=/dev/mmcblk0p4 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_2 - echo "boot emmcflash0.linuxkernel3 '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p7 rootsubdir=linuxrootfs3 kernel=/dev/mmcblk0p5 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_3 - echo "boot emmcflash0.linuxkernel4 '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p7 rootsubdir=linuxrootfs4 kernel=/dev/mmcblk0p6 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_4 + echo "boot emmcflash0.linuxkernel2 '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p8 rootsubdir=linuxrootfs2 kernel=/dev/mmcblk0p4 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_2 + echo "boot emmcflash0.linuxkernel3 '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p8 rootsubdir=linuxrootfs3 kernel=/dev/mmcblk0p5 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_3 + echo "boot emmcflash0.linuxkernel4 '$(HD5X_BRCM_CMA) root=/dev/mmcblk0p8 rootsubdir=linuxrootfs4 kernel=/dev/mmcblk0p6 rw rootwait $(BOXMODEL)_4.boxmode=$(HD5X_BOXMODE)'" > $(IMAGE_BUILD_DIR)/STARTUP_4 mcopy -i $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) -v $(IMAGE_BUILD_DIR)/STARTUP :: mcopy -i $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) -v $(IMAGE_BUILD_DIR)/STARTUP_1 :: mcopy -i $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) -v $(IMAGE_BUILD_DIR)/STARTUP_2 ::