common: Create usbdisk.img file with FAT32 file system
This change adds usbdisk.img file with FAT32 file system using size provided from platform specific makefile. Change-Id: Ica6a60bf7bf54e542de6b3cef57bd5d89a9fd353
This commit is contained in:
parent
17233a0cf3
commit
3a15cf4f19
|
@ -13,6 +13,7 @@ INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img
|
|||
INSTALLED_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img
|
||||
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
|
||||
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
|
||||
INSTALLED_USBIMAGE_TARGET := $(PRODUCT_OUT)/usbdisk.img
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Generate secure boot image
|
||||
|
@ -100,6 +101,23 @@ ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DTIMAGE_TARGET)
|
|||
ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_DTIMAGE_TARGET)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Generate usbdisk.img FAT32 image
|
||||
# Please NOTICE: the valid max size of usbdisk.bin is 10GB
|
||||
#---------------------------------------------------------------------
|
||||
ifneq ($(strip $(BOARD_USBIMAGE_PARTITION_SIZE_KB)),)
|
||||
define build-usbimage-target
|
||||
$(hide) mkfs.vfat -n "Internal SD" -F 32 -C $(PRODUCT_OUT)/usbdisk.tmp $(BOARD_USBIMAGE_PARTITION_SIZE_KB)
|
||||
$(hide) dd if=$(PRODUCT_OUT)/usbdisk.tmp of=$(INSTALLED_USBIMAGE_TARGET) bs=1024 count=20480
|
||||
$(hide) rm -f $(PRODUCT_OUT)/usbdisk.tmp
|
||||
endef
|
||||
|
||||
$(INSTALLED_USBIMAGE_TARGET):
|
||||
$(build-usbimage-target)
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_USBIMAGE_TARGET)
|
||||
ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_DTIMAGE_TARGET)
|
||||
endif
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Generate CDROM image
|
||||
#----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue