Fastboot
Fastboot
Feature is apply to
• Virtualized Android platform.
• Any other platform required this feature
HW dependent HW independent
Fastboot
storage
LCD driver
Fastboot Logic
(optional)
Fastboot
communication
• SLB mode management detect KEY event or reboot info in IRAM non-clear
area to determine if SLB need boot to fastboot mode. (Also call bootloader
mode/seconder level bootloader mode).
• User could power off the phone and hold both “Vol +” key and “Menu” key
during phone power on to enter fastboot, alternately user could issue
command “adb reboot bootloader” command to Android to trigger the phone
reboot into fastboot mode. (See SLB mode management Dspec for details)
• When the phone boot into fastboot mode, fastboot module reset USB, and
config the USB driver into fastboot devices, fastboot logic layer
receives/response commands from/to fastboot communication layer, and use
fastboot storage interface to flash/erase/read from internal EMMC.
• Optionally fastboot can put an image on LCD and let user know the phone is
booting into fastboot mode.
In bootloader USB driver, for fastboot USB driver enumeration case, we should keep
waiting until the enumeration success.
HOST TARGET
getvar:version-bootloader
OKAY1336.100_M1S1
getvar: version
Get version of fastboot protocol supported. Should return “0.4”
getvar: product
Get product string, return XMMxxxx string.
reboot
Reboot phone into normal mode
reboot-booloader
Reboot phone into fastboot mode
HOST TARGET
getvar:secure Is_secure?
OKAYYES
OKAYNO
Unlock bootloader.
This command is implemented by many handset vendors and in essence it
opens the device for unsigned images and thus community development use.
At the same time there is a requirement that all access to secure storage is
prevented. (Refer to XMM6321_fastboot_oem_unlock_concept.doc for details)
HOST TARGET
oem unlock
HOST TARGET
yes
INFO Unlocking and rebooting into unlocked state
OKAY
No
FAILPlease run oem unlock first and read instructions
HOST TARGET
getvar:partition-type:system
OKAYext4
HOST TARGET
getvar:partition-size:system
OKAY0x1234AB
HOST TARGET
erase:system Do_erase
done
INFO Erasing partition: system
OKAY
Fail
FAIL Fail to erase partition: system
HOST TARGET
Download:1000
INFO Ready to receive: 0x1000 size of data
DATA1000
D
a <data>
t
a
: <data>
1
0
<data>
0
0
OKAY
HOST TARGET
Flash:system
INFO Flashing partition: system
D
a
t
a EMMC
: SYSTEM
1 Partition
0
0
0
OKAY
Flash:system
INFO Flashing partition: system
D
EMMC
a
SYSTEM
t
Partition
a
OKAY
typedef struct
{
FBS_BOOL_T get_security_status;
FBS_PCHAR_PT_T get_partition_type;
FBS_U32_PT_T get_partition_size;
FBS_FLASH_T flash_partition;
FBS_BOOL_T oem_unlock;
FBS_BOOL_PT_T erase_partition;
Storage FPs
Fastboot Logic
csp_fastboot_main csp_fastboot_set_storage_fp
Test case 1:
Fastboot devices: return IMEI
Test case 2:
Fastboot gervar:* return correct value.
Test case 3:
Oem unlock
Test case 4:
Flash XMM6321 software, let it boot,
Use ADB to put some file into cache partition.
Fastboot format cache.
The phone still can boot, and nothing in cache partition.
Test case 5:
For each partition, Erase and flash RAW binary, the phone still can
boot.
Test case 6:
Fastboot reboot will boot to normal mode
Test case 7:
Fastboot reboot bootloader will boot to fastboot mode again
TODO:
Apply this to other flash type when we need this feature.