USB fastboot

1 bootloader增加解鎖密碼
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c

index e4d46e4..1b4b450 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -2613,6 +2613,20 @@ void cmd_oem_unlock(const char *arg, void *data, unsigned sz)
 
 void cmd_oem_unlock_go(const char *arg, void *data, unsigned sz)
 {
+        // oem-start
+        char *p = (char *)arg;
+        if (!arg) {
+                fastboot_fail("[oem] key in password please, \"fastboot oem unlock-go [pwd]\"");
+                return;
+        }
+
+        while (isspace(*p)) p++;
+        if (strncmp(p, "12345678", strlen("12345678"))) {
+                fastboot_fail("[oem] wrong password, \"fastboot oem unlock-go [pwd]\"");
+                return;
+        }
+        // oem-end
+
     if(!device.is_unlocked || device.is_verified)
     {

         if(!is_allow_unlock) {

Fastboot command call chain as shown below, from the viewpoint of device-side.
Figure 1-1 Fastboot Command Call Chain

TODO:

2 Abbreviations
ARC:Argonant RISC Core
AT91SAM9260:SAM means Smart ARM-based
ATMEL SAMBA:ATMEL Smart ARM-based Boot Assistant
CC2530:TI ChipCon2530
DWC2:Design Ware Controller 2,Apple的嵌入式設備,包括iPad和iPhone都是使用的DWC2
ISP1161:Philips' Integrated host Solution Pairs 1161,“Firms introduce USB host controllers”,https://www.eetimes.com/document.asp?doc_id=1290054
SL811HS:Cypress/ScanLogic 811 Host/Slave,性能上與ISP1161(Integrated host Solution Pairs 1161)相當
TDI:TransDimension Inc.,該公司首先發明瞭將TT集成到EHCI RootHub中的方法,這樣對於嵌入式系統來說,就省去了OHCI/UHCI的硬件,同時降低了成本,作爲對該公司的紀念,Linux內核定義了宏ehci_is_TDI(ehci)
TLV:TI Low Value,高性價比
TPS:TI Performance Solution
TT:Transaction Translator(事務轉換器,將USB2.0的包轉換成USB1.1的包)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章