Now need to do is:
1. Make the emmc_appsboot. When otapackage MBN packed into the ota
2. The Recovery of the upgrade will emmc_appsboot. MBN cover off before aboot
1. Modify the recovery. Fstab
File is located in the device/end/msm8953_64/recovery. The fstab, we need to add aboot partition mount, if you don't add this at the time of ota upgrade kit will test but
/dev/block/bootdevice/by name/system/system corruption ro, barrier=1 wait
/dev/block/bootdevice/by - name/cache/cache corruption noatime, nosuid, nodev, barrier=1, data=https://bbs.csdn.net/topics/ordered wait, check
/dev/block/bootdevice/by name/userdata/data corruption noatime, nosuid, nodev, barrier=1, data=https://bbs.csdn.net/topics/ordered, noauto_da_alloc wait, check, length=- 16384
/dev/block/mmcblk1p1/sdcard vfat nosuid, nodev wait
/dev/block/sda1/udisk vfat nosuid, nodev wait
/dev/block/bootdevice/by - name/boot/boot emmc defaults defaults
/dev/block/bootdevice/by - name/recovery/recovery emmc defaults defaults
/dev/block/bootdevice/by - name/misc/misc emmc defaults defaults
/dev/block/bootdevice/by - name/aboot aboot emmc defaults defaults
2. Since hanging on to aboot, so we have to create a aboot file node, find the bootable/recovery/etc/init. Rc add generated aboot directory, this step is convenient, also don't know the actual need
on init
Export ANDROID_ROOT/system
Export ANDROID_DATA/data
Export EXTERNAL_STORAGE/sdcard
Symlink/system/etc/etc
The mkdir/sdcard
The mkdir/udisk
The mkdir/system
The mkdir/data
The mkdir/cache
The mkdir/sideload
The mkdir/firmware
The mkdir/aboot
The mount TMPFS TMPFS/TMP
Chown root shell/TMP
Chmod 0775/TMP
Chmod 0775/aboot
3. Modify the build/tools/releasetools/ota_from_target_files py upgrade kit file
1. In the OPTIONS=common. Behind the OPTIONS to add a uboot OPTIONS
The OPTIONS=common. The OPTIONS
OPTIONS. Package_key=None
.
OPTIONS. Payload_signer_args=[]
OPTIONS. Uboot=None
2. In def option_handler (o, a) : function to add the -u option
Elif o=="-- payload_signer" :
OPTIONS. Payload_signer=a
Elif o=="-- payload_signer_args" :
OPTIONS. Payload_signer_args=shlex. Split (a)
Elif o in (" -u ") : # add by liaocj upgrade lk
OPTIONS. Uboot=a
The else:
Return False
Return True
3. com mon. Adding analytical -u ParseOptions opt
Args=common. ParseOptions (argv __doc__,
Extra_opts="bu: k: I: d: wne: t: a: 2 o",
4. Add lk files written to ota. Zip in order
In def WriteFullOTAPackage (input_zip output_zip) : behind the function in the boot. Img add
Common. CheckSize (boot_img data, "boot. Img," OPTIONS. An info_dict)
Common. ZipWriteStr (output_zip, "boot. Img", boot_img data)
Script. ShowProgress (0.05, 5)
Script. WriteRawImage ("/boot ", "boot. Img")
Script. ShowProgress (0.2, 10)
# add by liaocj upgrade to lk beg
If the OPTIONS. Uboot is not None:
Data=https://bbs.csdn.net/topics/open (OPTIONS. Uboot, "rb"). The read ()
Common. CheckSize (data, "aboot. Img" OPTIONS. An info_dict)
Common. ZipWriteStr (output_zip, "aboot. Img", data)
Script. WriteRawImage ("/aboot ", "aboot. Img")
Script. ShowProgress (0.4, 20)
# add by liaocj upgrade to lk end
5. Modify the build/core/Makefile, so that we can make the execution otapackage automatically generates the
$(INTERNAL_OTA_PACKAGE_TARGET) : $(BUILT_TARGET_FILES_PACKAGE)
@ echo "Package OTA: $@"
$(hide) PATH=$(foreach p, $(INTERNAL_USERIMAGES_BINARY_PATHS), $$$PATH (p) :) MKBOOTIMG=$(MKBOOTIMG) \
./build/tools/releasetools/ota_from_target_files -v \
- block \
- no_prereq \
- p $(HOST_OUT) \
- k $(KEY_CERT_PAIR) \
$(if $(UPGRADE_UBOOT), - u $(PRODUCT_OUT)/emmc_appsboot MBN) \
$(if $(OEM_OTA_CONFIG), - o $(OEM_OTA_CONFIG)) \
$(BUILT_TARGET_FILES_PACKAGE) $@
6. Check the compiled the ota packages
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull