1.ã¯ããã«
çµå±ã®ãšãããã¢ãã€ã«ããã€ã¹ïŒMUïŒã®ç©çã¡ã¢ãªã®ã¬ã€ã¢ãŠãã¯ãéçºè ãå¿ èŠãšããç¥èã®èšè¿°ãäžååãªã»ã¯ã·ã§ã³ã§ãã ãªããªã ã¡ã¢ãªã¯ããã€ã¯ãããã»ããµãŸãã¯ãã€ã¯ãã³ã³ãããŒã©ã«åºã¥ããŠäœæããããã¹ãŠã®ããã€ã¹ã«ååšãããã§ã«æ°åååãããŸããããã¯éåžžã«äººæ°ã®ããç¥èã®ã»ã¯ã·ã§ã³ã§ããããŸãã
ãã®èšäºã§ã¯ãMUã®ã¿ã®ã¡ã¢ãªã¬ã€ã¢ãŠãã®åŽé¢ã«ã€ããŠèª¬æããŸãã ããã§ã¯ãããŸããŸãªã¡ãŒã«ãŒãå¯æ¥ã«çµ¡ã¿åã£ãããŒã¯ã¢ããèšè¿°ãã¡ã€ã«ã絡ã¿åã£ãŠããããããã®ãã¡ã€ã«èªäœã®æ§é ã«é¢ããçè«çãªããŒã¿ãã»ãŒå®å šã«æ¬ èœããŠããŸãã
MUã®ç©çã¡ã¢ãªã®ã¬ã€ã¢ãŠãã¯ãã¡ã¢ãªããŒãã£ã·ã§ã³ã®ãã©ã¡ãŒã¿ã®èª¬æã®ããŒãã«ãŸãã¯ãªã¹ãã«åºã¥ããŠåœ¢æãããŸãã ã»ãšãã©ãã¹ãŠã®è£œé äŒç€Ÿã«ã¯ããããã®ããŒãã«ã®ç¬èªã®åœ¢åŒïŒæ§é ïŒããããŸãã ãã ããã»ã¯ã·ã§ã³ãã©ã¡ãŒã¿ã®ãã¹ãŠã®èª¬æã«ã¯å€ãã®å ±éç¹ããããããããããåäžã®ã³ã³ããã¹ãã§èæ ®ããããšãã§ããŸãã
ãã£ã¹ã¯ãªãã·ã§ã³ããŒãã«ã«åºã¥ããŠãã¡ã¢ãªããŒã¯ã¢ãããã¡ã€ã«ãäœæãããããŒãã£ã·ã§ã³ã€ã¡ãŒãžã®åœ¢åŒã§MUã®ã¡ã¢ãªã«çŽæ¥ãã©ãã·ã¥ãããŸãã
2.ã¡ã¢ãªããŒã¯ã¢ãããšã¯äœã§ããïŒ
ãã詳现ã«ã¯ãMUã¡ã¢ãªã®ããŒãã³ã°ãšãã®å¿ èŠæ§ã«ã€ããŠã¯ãããšãã°[1]ã§èŠãããšãã§ããŸãã ã¡ã¢ãªããã€ã¹ãšãã®ã¬ã€ã¢ãŠãã説æããå¥ã®åºçç©ããããŸã[2]ã
ã€ãŸããã¡ã¢ãªããŒã¯ã¢ããã¯ãããã»ã¹ãšããŠãMUã®å éšç©çã¡ã¢ãªã®ããªã¥ãŒã å šäœããç°ãªãæ©èœç®çãç°ãªããã¡ã€ã«ã·ã¹ãã ãç°ãªãã¢ã¯ã»ã¹æš©ãæã€ããšãã§ããåå¥ã®ã»ã¯ã·ã§ã³ã«åæ£ããŸãã ããã«ããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã çšã«ããŒã¿ã¹ãã¬ãŒãžãšãŠãŒã¶ãŒäœæ¥çšã«å¥ã ã®ã¡ã¢ãªé åãå²ãåœãŠãå¿ èŠã«å¿ããŠãäºãã«ç¬ç«ããŠããŒãã£ã·ã§ã³ãæå·åãŸãã¯ãã©ãŒãããããããšãã§ããŸãã
ããŒã¯ã¢ãããå®è¡ããå ŽåãMUã®éçºè ã¯ãã¡ã¢ãªããŒã¯ã¢ããã¹ããŒã ãšåŒã°ããããã€ãã®ã«ãŒã«ã«åŸãå¿ èŠããããŸãã ããŒã¯ã¢ããã¹ããŒã ã¯ãç©çã¡ã¢ãªã®ãã¹ãŠã®ã»ã¯ã·ã§ã³ã®é 眮ãèšè¿°ããŸããé åºããªãã»ãããååãã€ãŸã ã©ãã«ãŸãã¯ã»ã¯ã·ã§ã³åã ä»ã®ãã©ã¡ãŒã¿ã瀺ãããå ŽåããããŸãïŒãã®ãµã€ãºãã¿ã€ããé åããã©ã°ãªã©ã
ã¡ã¢ãªããŒã¯ã¢ãããå®è¡ããã«ã¯ãããã¹ããšãã€ããªïŒãã€ããªRAWãã¡ã€ã«ïŒã®2çš®é¡ã®ãã¡ã€ã«ã䜿çšãããŸãã
ããã¹ããã¡ã€ã«ã¯ãã¡ã¢ãªã®ãã¹ãŠã®ã»ã¯ã·ã§ã³ã®ãªã¹ãïŒãªã¹ãïŒã§ãããåãšã³ããªã«ã¯ãããã®ã»ã¯ã·ã§ã³ã®äž»èŠãªãã©ã¡ãŒã¿ãŒã®èª¬æãå«ãŸããŠããŸãã è€æ°ã®æäœãå®è¡ãããšãã«äœ¿çšãããŸãã
- ãã©ãã·ã£ãŒã¯ãMUã®äœæãããã¡ã¢ãªã¬ã€ã¢ãŠãã®ã»ã¯ã·ã§ã³ãåããŸãã ãããã®ããŒãã£ã·ã§ã³ã®ã€ã¡ãŒãžããã©ãã·ã¥ããŸãã
- ãã€ããªããŒã¯ã¢ãããã¡ã€ã«ãèªåçã«äœæããå Žåãã€ãŸã ããŒã¯ã¢ããããŒãã£ã·ã§ã³ã€ã¡ãŒãžã
ãã€ããªããŒã¯ã¢ãããã¡ã€ã«ã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ïŒOSïŒã®æäœãç解ã§ããæ§é åããã圢åŒã®ã¡ã¢ãªããŒã¯ã¢ãããå«ãŸããŠããŸãã MUã®ãã¡ãŒã ãŠã§ã¢ã«é 眮ãããããŒãã£ã·ã§ã³ã»ã¯ã·ã§ã³ã«çŽæ¥ãã©ãã·ã¥ãããŠç©çã¡ã¢ãªã«æžã蟌ãŸããŸãã
ã¡ã¢ãªããŒã¯ã¢ãããäœæããããã»ã¹ã¯ã次ã®ã¢ã«ãŽãªãºã ã§èª¬æã§ããŸãã
- äžé£ã®ã¡ã¢ãªããŒãã£ã·ã§ã³ãèšç»ãããŠããŸãã
- ãã¹ãŠã®ã¡ã¢ãªã»ã¯ã·ã§ã³ã®èª¬æçšã®ããã¹ããã¡ã€ã«ãäœæãããããŒã¯ã¢ããã»ã¯ã·ã§ã³èªäœãå¿ããŸããã
- ãã€ããªãã¡ã€ã«ã¯ãããã¹ããã¡ã€ã«ããŒã¿ã«åºã¥ããŠäœæãããŸããããã¹ããã¡ã€ã«ããŒã¿ã¯ãããŒã¯ã¢ããã»ã¯ã·ã§ã³èªäœãå«ããèšè¿°ãããã¡ã¢ãªã»ã¯ã·ã§ã³ã®ç»åã§ãã
ã¡ã¢ãªã¬ã€ã¢ãŠãã¹ããŒã ãšãã©ã¡ãŒã¿ãŒèšè¿°ããŒãã«ã®æ§é ãããã«è©³ããèŠãŠã¿ãŸãããã
3.ã¡ã¢ãªã¬ã€ã¢ãŠãã¹ããŒã
ã»ãšãã©ã®å Žåã MbrãšGptã® 2ã€ã®ã¡ã¢ãªããŒã¯ã¢ããã¹ããŒã ã䜿çšãããŸãã
ã¡ã¢ãªã¬ã€ã¢ãŠãã¹ããŒã ã®å ŽåãMUã®ãŠãŒã¶ãŒé åã®ã»ã¯ã·ã§ã³ã®æåã¯åžžã«ããŒãã£ã·ã§ã³ã»ã¯ã·ã§ã³ïŒMbrãGptãParameterïŒã§ããå¿ èŠããããŸãã
3.1.Mbrã¡ã¢ãªã¬ã€ã¢ãŠã
Mbrã¹ããŒã ã«ããã°ãMUã¡ã¢ãªã¯äžé£ã®ããŒãã£ã·ã§ã³ãšããŠè¡šããããã¹ã¿ãŒããŒãã¬ã³ãŒããŸãã¯ããŒãã£ã·ã§ã³èšè¿°ããŒãã«ãå«ãMbr ïŒãã¹ã¿ãŒããŒãã¬ã³ãŒãïŒã«ãã£ãŠè£å®ãããŸãã Mbr㯠ãMUã¡ã¢ãªã®æåã®ïŒãŒãïŒã»ã¯ã¿ãŒã«ç©ççã«é 眮ãããŠããŸãã
å³1 ã ãã¹ã¿ãŒããŒãã¬ã³ãŒãã
Mbrã«ã¯çœ²åãå«ãŸããŠããŸãã å±æ§Mbr ãããã³ã»ã¯ã·ã§ã³ã®èª¬æã®ããŒãã«ã
Mbr [3]ã®å éšæ§é ã«ãããããŒãã£ã·ã§ã³ã«é¢ãã4ã€ã®ã¬ã³ãŒãã®ã¿ãé 眮ã§ããŸããããã¯ãçŸä»£ã®ç¶æ³ã§ã¯å€§ããªæ¬ ç¹ã§ãã ã¡ã¢ãªãããå€ãã®ããŒãã£ã·ã§ã³ã«åå²ããå Žåã¯ãè¿œå ã®ïŒæ¡åŒµïŒããŒãã¬ã³ãŒãExtended Boot RecordïŒ Ebr ïŒã䜿çšãããŸãã åæã«ãã»ã¯ã·ã§ã³ã®1ã€ã«ã€ããŠèšè¿°ãã代ããã«ã Ebrã®ã¿ãå«ãè¿œå ã®ïŒæ¡åŒµïŒã»ã¯ã·ã§ã³ã«é¢ãããšã³ããªãMbrã«é 眮ãããŸã ã
Ebrèªäœã¯Mbrãšåæ§ã«èšèšãããŠãããåãæ¹æ³ã§äœ¿çšããå¿ èŠããããŸãã ã€ãŸãã EbrããŒãã«ã«ããŒã¿ãå ¥åãããšãã«ãããŒãã£ã·ã§ã³ãšã³ããªã«ååãªã¹ããŒã¹ããªãå Žåã次ã®EbrããŒãã«ãäœæãããŸãã
Mbrãšãã¹ãŠã®Ebrã¯ã察å¿ããåå¥ã®ã¡ã¢ãªã»ã¯ã·ã§ã³ã«é 眮ããããã©ãã·ã¥ãããåå¥ã®ã€ã¡ãŒãžãã¡ã€ã«ã«é 眮ã§ããŸãã ããã«ã Ebrãå«ããã¹ãŠã®ãã¡ã€ã«ã«ã¯ãé çªã«çªå·ãä»ããããååããããŸãïŒ Ebr1 ã Ebr2 ã...
å¥ã®å®æœåœ¢æ ã§ã¯ã ïœïœã¯åäžã®ç»åãã¡ã€ã«ã«é£ç¶ããŠé 眮ããã次ã«ãã®ç»åã¯ããããã¡ã¢ãªã®ïŒã€ã®ïŒ¥ïœïœã»ã¯ã·ã§ã³ã«é 眮ãããã
3.2ã GPTã¡ã¢ãªã¬ã€ã¢ãŠã
GptããŒãã£ã·ã§ã³ããŒãã«ïŒGUIDããŒãã£ã·ã§ã³ããŒãã«ïŒã¯ã BIOSã®ä»£ããã«ã¡ã¢ãªãããŒãã£ã·ã§ã³åããããŒãã£ã·ã§ã³ãããŒãããããã«äœ¿çšãããæšæºã§ããExtensible Firmware InterfaceïŒ EFI ïŒã®äžéšã§ãã ããŒãã£ã·ã§ã³ã®èª¬æãå¥ã®åœ¢åŒã«ç§»è¡ããããšã§ã Mbrã¹ããŒã ã®æãé倧ãªæ¬ ç¹ã§ããå°æ°ã®ããŒãã£ã·ã§ã³ãæé€ããããšãã§ããŸããã Gptã»ã¯ã·ã§ã³ã®èª¬æè¡šã«ã¯ãæ倧128åã®ããŒãã£ã·ã§ã³ãé 眮ã§ããŸãã ããŒãã«èªäœã®æ§é ã¯[4]ã«ãããŸãã
Gpt-ã¹ããŒã ã«ããã°ãMUã¡ã¢ãªã¯ãMUãæ©èœããããã«å¿ èŠãªäžé£ã®ããŒãã£ã·ã§ã³ã§ãããã¡ã€ã³ãšåŒã°ããGpt-ããŒãã£ã·ã§ã³èšè¿°ããŒãã«ãåã«è¿œå ãããŸãã åæã«ããã¹ãŠã®ã»ã¯ã·ã§ã³ã®åŸã«ãããã¯ã¢ãããšåŒã°ããè¿œå ã®GptããŒãã«ãé 眮ãããŸãã ããŒãã«ã®ãã®é 眮ã¯ãçè«çã«ã¯ãã¬ã€ã¢ãŠãã®ä¿¡é Œæ§ãåäžãããŸãã ã¡ã€ã³ã®GptããŒãã«ã«é害ãŸãã¯æå·ãçºçããå Žåã OSã¯ããã¯ã¢ããã䜿çšããŠäœæ¥ããããã¡ã€ã³ã®GptããŒãã«ã埩å ãããã§ããŸãã
4.ã¡ã¢ãªã®ã»ã¯ã·ã§ã³ã®èª¬æã®è¡š
MUã®ã¡ã¢ãªããŒãã£ã·ã§ã³ã®èª¬æã®è¡šã«ã¯ãã¡ã¢ãªã¬ã€ã¢ãŠãã®äœæã«å¿ èŠãªãã¹ãŠã®ããŒãã£ã·ã§ã³ã«é¢ããæ å ±ãå«ãŸããŠããŸãã è¡šã®åè¡ïŒã¬ã³ãŒãïŒã¯1ã€ã®ã»ã¯ã·ã§ã³ã説æããéåžžã¯æ¬¡ã®ãã©ã¡ãŒã¿ãŒãå«ã¿ãŸãã
- -ã»ã¯ã·ã§ã³ã®ã©ãã«ïŒååãŸãã¯ååïŒã
- -ã»ã¯ã·ã§ã³ãªãã»ããã
ãªããªã ãããã®ããŒãã«ã¯ããã©ãã·ã£ãŒïŒããã°ã©ããŒïŒã䜿çšããŠããŒãã£ã·ã§ã³ã€ã¡ãŒãžãã¡ã¢ãªã«çŽæ¥ãã©ãã·ã¥ãããšãã«MUã¡ãŒã«ãŒã«ãã£ãŠäœ¿çšãããã¬ã³ãŒãã«ã¯ããŒãã£ã·ã§ã³ããããã£ã®æ£ããèšå®ã«å¿ èŠãªè¿œå ãã©ã¡ãŒã¿ãŒãå«ãŸããå ŽåããããŸãã
- -ããŒãã£ã·ã§ã³ã€ã¡ãŒãžãå«ããã¡ã€ã«ã®ååã
- -ã»ã¯ã·ã§ã³ãµã€ãºã
- -ã»ã¯ã·ã§ã³ã®é åã
- -ã»ã¯ã·ã§ã³ãã©ã°ãããšãã°ããèªã¿åãå°çšãããæå·åãããFastbootã®å®è¡äžã¯æžã蟌ã¿ãèš±å¯ãããŸããã
ç©ççã«ã¯ãã»ã¯ã·ã§ã³ã®èª¬æããŒãã«ã¯txtãŸãã¯xml圢åŒã®ããã¹ããã¡ã€ã«ã§ãã ç§ã®å®è·µã§ã¯ã次ã®çš®é¡ãèŠã€ãããŸããã
- - ãã©ã¡ãŒã¿ãã¡ã€ã« ã RKãããã«åºã¥ããMUã®ã¡ãŒã«ãŒã䜿çšãã圢åŒ-txt;
- -rawprogram0ãã¡ã€ã« ã Qualcommãããã«åºã¥ãMUã®ã¡ãŒã«ãŒã䜿çšãã圢åŒ-xmlã
- -otaãã¡ã€ã« ã ãairãïŒOTA-updateïŒã«ããèªåæŽæ°äžã«MUã®ãã¹ãŠã®ã¡ãŒã«ãŒããã¡ãŒã ãŠã§ã¢ã®ããŒã¯ã¢ãããèšè¿°ããããã«äœ¿çšããããŠãããŒãµã«ãã¡ã€ã«ã圢åŒ-txt;
- - ã¹ãã£ãã¿ãã¡ã€ã« ã MTKãããã«åºã¥ãMUã¡ãŒã«ãŒã䜿çšãã圢åŒ-txtã
ãããã®æ§é ãããã«è©³ããèŠãŠã¿ãŸãããã
4.1ã ãã©ã¡ãŒã¿ãã¡ã€ã«
RKãããäžã®MUãã¡ãŒã ãŠã§ã¢ã«ã¯ã PARAMETERããã¹ããã¡ã€ã«ãå«ãŸããŠããŸããããã¯ããããã¯ã¿ã€ãã®ç©çã¡ã¢ãªã®æ§é ïŒæ§æãšèªã¿èŸŒã¿ïŒãèšè¿°ããããšãç®çãšããŠããŸãã ãŸããLinux OSã§ã䜿çšãããŠããŸããã
Cube u30gt-Mã³ã³ãããŒã«ãŠãããã®PARAMETERãã¡ã€ã«ã®å 容ã®å ã®ãã¥ãŒã以äžã«ç€ºããŸãã
FIRMWARE_VERïŒ4.0.4å³2 RK ãã©ã¡ãŒã¿ãŒãã¡ã€ã«
MACHINE_MODELïŒU30GT-M
MACHINE_IDïŒ007
ã¡ãŒã«ãŒïŒRK30SDK
ããžãã¯ïŒ0x5041524D
ATAGïŒ0x60000800
æ©æ¢°ïŒ3066
CHECK_MASKïŒ0xFF
KERNEL_IMGïŒ0x60408000
RECOVERY_KEYïŒ0.4ãCã6.0
COMBINATION_KEYïŒ0.4ãCã6.0
CMDLINEïŒconsole = ttyFIQ0 androidboot.console = ttyFIQ0 init = / init initrd = 0x62000000,0x00800000 mtdparts = rk29xxnandïŒ0x00002000 @ 0x00002000ïŒmiscïŒã0x00004000 @ 0x00004000ïŒã«ãŒãã«ïŒã0x00008000 @ 0x0000x00008000ïŒããŒãïŒ ã0x000C0000 @ 0x00018000ïŒããã¯ã¢ããïŒã0x00040000 @ 0x000D8000ïŒãã£ãã·ã¥ïŒã0x00200000 @ 0x00118000ïŒãŠãŒã¶ãŒããŒã¿ïŒã0x00002000 @ 0x00318000ïŒkpanicïŒã0x00120000 @ 0x0031A000ïŒã·ã¹ãã ïŒã-@ 0x0043A000ïŒãŠãŒã¶ãŒïŒ
4.1.1ã PARAMETERãã¡ã€ã«ã®ãã©ã¡ãŒã¿ãŒã®èª¬æ
PARAMETERãã¡ã€ã«ã«ã¯ã次ã®ãã©ã¡ãŒã¿ãŒãå«ãŸããå ŽåããããŸãã
- FIRMWARE_VERãã©ã¡ãŒã¿ãŒã¯ã4.0.4ãŸãã¯1.11ãªã©ã®ãã¡ãŒã ãŠã§ã¢ããŒãžã§ã³çªå·ã瀺ããŸãã
- MACHINE_MODELãã©ã¡ãŒã¿ãŒã¯ããã¡ãŒã ãŠã§ã¢ã察象ãšããã¢ãã«ã®ååã瀺ããŸãã
- MACHINE_IDãã©ã¡ãŒã¿ãŒã¯ã¢ãã«èå¥åã瀺ããŸãã
- MANUFACTURERãã©ã¡ãŒã¿ãŒã¯è£œé å ã瀺ããŸãã
- MAGICãã©ã¡ãŒã¿ãŒã«ã¯ã PARAMETERãã¡ã€ã«ã®çœ²åãå«ãŸããŠããŸãããã®ãã¡ã€ã«ã«ã¯ã4æåã®æååã PARM ããå«ãŸããŠããŸãã
- ATAGãã©ã¡ãŒã¿ãŒã ãã®æå³ã¯ç§ã«ã¯ç¥ãããŠããªãã
- MACHINEãã©ã¡ãŒã¿ãŒã¯ãMUã§äœ¿çšãããããã»ããµãŒã®ã¿ã€ãã瀺ããŸãã
- ãã©ã¡ãŒã¿CHECK_MASK ãã®æå³ã¯ç§ã«ã¯ç¥ãããŠããªãã
- KERNEL_IMGãã©ã¡ãŒã¿ã«ã¯ãããŒãæã®ã¡ã¢ãªå ã®ã«ãŒãã«ã€ã¡ãŒãžã®ãã€ãåäœã®ãªãã»ãããå«ãŸããŸãã ããšãã°ã0x6040800;
- ãã©ã¡ãŒã¿RECOVERY_KEYããã³COMBINATION_KEY ç§ã¯åœŒãã®ç®çãããããŸããã
- CMDLINEãã©ã¡ãŒã¿ãŒã«ã¯ãããã€ã¹ã®èµ·åæã«ã«ãŒãã«ã«æž¡ãããã³ãã³ãã©ã€ã³ãå«ãŸããŸãã
éçºè ã«ãšã£ãŠæãèå³æ·±ãã®ã¯ã CMDLINEãã©ã¡ãŒã¿ãŒã§ãã ããã€ã¹ãæ§æããããã®ããŒå€ã®ã»ãããå«ãŸããŠããŸãã
CMDLINEãã©ã¡ãŒã¿ãŒã®æ§é ãåå¥ã«æ€èšããŠãã ããã
4.1.2ã CMDLINEãã©ã¡ãŒã¿ãŒãšãã®æ©èœ
ã³ãã³ãã©ã€ã³åœ¢åŒãããªãã¡ CMDLINEã®åœ¢åŒã¯æ¬¡ã®ãšããã§ãã
CMDLINEïŒkey1 = value1 [key2 = value2]ãããã§
- key1-ããŒ1ã®ååã
- value1ã¯ããŒ1ã®å€ã§ãã
å¯èœãªããŒã®ãªã¹ãã¯æ¬¡ã®ãšããã§ãã
- console ã androidboot.consoleã¯ãã³ã³ãœãŒã«ããã€ã¹ã®ã¿ã€ãã瀺ããŸãã
- initã䜿çšãããšãMUã®åæåã«äœ¿çšãããããã»ã¹ãæå®ã§ããŸãã
- initrdã䜿çšãããšãèµ·åæã«äœ¿çšãããinitrdã®ãã©ã¡ãŒã¿ãŒãæå®ã§ããŸãã ã¡ã¢ãªã®ãã®ã»ã¯ã·ã§ã³ã®ãªãã»ãããšãµã€ãºã
- mtdpartsã«ã¯ãã¡ã¢ãªã¬ã€ã¢ãŠãã®èª¬æãå«ãŸããŠããŸãã
- rootã䜿çšãããšãrootãŠãŒã¶ãŒã®ãã©ã«ããŒãæå®ã§ããŸãã
åæ§ã«ã mtdpartsãã©ã¡ãŒã¿ãŒã®æ§é ã¯æ¬¡ã®ãšããã§ãã
mtdparts = <mtddef> [; <mtddef>]ãããã§
mtddef-ãããã¯ã¿ã€ãããã€ã¹ïŒCUïŒã®ã¡ã¢ãªã¬ã€ã¢ãŠãã®èª¬æã MUã«è€æ°ã®ã³ã³ãããŒã«ãŠããããå«ãŸããå Žåãè€æ°ã®èšè¿°ãå«ãŸããããšããããŸãããããã®èšè¿°ã¯ãééãªãé£ç¶ããŠé 眮ãããã»ãã³ãã³ã§åºåãããŸãã
åã³ã³ãããŒã«ãŠãããã®ã¡ã¢ãªã¬ã€ã¢ãŠãã®èª¬æã«ã¯ã次ã®æ§é ããããŸãã
mtddefïŒ= <mtd-id>ïŒ<partdef> [ã<partdef>]ãããã§
- mtd-idã¯ããã®å¶åŸ¡ãŠãããã管çããããã«äœ¿çšããããã©ã€ããŒïŒæ¡åŒµåã.koã®ãã¡ã€ã«ïŒïŒããšãã°ãNANDã¡ã¢ãªãã©ã€ããŒrk29xxnand.koïŒã§ãã
- < partdef >ã¯ãã³ã³ãïŒ "ã"ïŒã§åºåããããç¹å®ã®å¶åŸ¡ãŠãããã®ã¡ã¢ãªã»ã¯ã·ã§ã³ã®ãã©ã¡ãŒã¿ãŒã®èª¬æãå«ãäžé£ã®partdefæ§é ã§ãã
åpartdevãšã³ããªã«ã¯ã1ã€ã®ã¡ã¢ãªã»ã¯ã·ã§ã³ã®èª¬æãå«ãŸããåäœã¯æž¬å®åäœãšããŠååŸããããã®ãµã€ãºã¯0x200ïŒ512ïŒãã€ãã§ã次ã®æ§é ãæã¡ãŸãã
part_size @ part_offsetïŒã©ãã«ïŒ[ãã©ã°]
part_sizeãã©ã¡ãŒã¿ãŒã¯ããããã¯ã®ã»ã¯ã·ã§ã³ã®ãµã€ãºã16é²è¡šèšã§è¡šããŸãã ãµã€ãºã®ä»£ããã«ãã€ãã¹èšå·ïŒ "-"ïŒã瀺ãããŠããå Žåãããã¯å¯èœãªæ倧ãµã€ãºãæå³ããŸãã ã¡ã¢ãªã®ç©ççãªæåŸãŸã§ã
part_offsetãã©ã¡ãŒã¿ãŒã¯ãã»ã¯ã·ã§ã³ãªãã»ããããããã¯åäœã§è¡šãã16é²è¡šèšã§è¡šãããŸãã ãªãã»ããã¯åžžã«0x1000ã®å¢çã«æããããŸãã
labelãã©ã¡ãŒã¿ãŒïŒã»ã¯ã·ã§ã³åïŒã¯ãæ¬åŒ§ã§å²ãŸããã»ã¯ã·ã§ã³ã®æååèå¥åã§ãïŒäŸïŒïŒbootïŒïŒã
flagãã©ã¡ãŒã¿ãŒã¯ãã ro ããšãã1ã€ã®å€ã®ã¿ãåãããšãã§ããŸããããã¯ãã»ã¯ã·ã§ã³ãèªã¿åãå°çšã§ããããšãæå³ããŸãã ãã©ã°ããªãããšã¯ãã»ã¯ã·ã§ã³ãèªã¿åãããã³æžã蟌ã¿å¯èœã§ããããšãæå³ããŸãã
ããã€ãã®éåžžã«éèŠãªç¹ïŒ
- 1ã€ã®å¶åŸ¡ãŠãããã«å«ãŸãããã¹ãŠã®å¶åŸ¡ãŠãããã®ã¡ã¢ãªããŒã¯ã¢ããã®èª¬æã¯ãåå¶åŸ¡ãŠãããããšã«è¡ããšã«æžã蟌ãŸããã»ãã³ãã³ã§åºåãããŸãã
- åå¶åŸ¡ãŠãããã®ã¡ã¢ãªã¬ã€ã¢ãŠãã®èª¬æãã€ãŸã ã³ã³ãããŒã«ãŠãããã®ãã¹ãŠã®ã»ã¯ã·ã§ã³ã¯ããã€ãããŒã·ã§ã³ãå¥ã®ãã©ã³ãžã·ã§ã³ãªãã§1è¡ã§èšè¿°ãããŸãã ã»ã¯ã·ã§ã³ãšã³ããªã¯ã³ã³ãã§åºåãããŸãã
- ã¡ã¢ãªå ã®ã»ã¯ã·ã§ã³ã¯é£ç¶ããŠé 眮ãããŸãã ãããã®éã«ãç©Žãã¯ãããŸããã
4.2ã Rawprogram0ãã¡ã€ã«
rawprogram0.xmlãã¡ã€ã«ã¯ ã Qualcommãããã«åºã¥ãMUã®ã¡ã¢ãªã¬ã€ã¢ãŠããèšè¿°ããããšãç®çãšããŠããã次ã®æ§é ãæã£ãŠããŸãã
rawprogram0ãã¡ã€ã«
å³3 ã Lenovo s90aã®rawprogram0.xmlãã¡ã€ã«ã®è¡šç€º
<?xml version="1.0" ?> <data> <!--NOTE: This is an ** Autogenerated file **--> <!--NOTE: Sector size is 512bytes--> <program ... filename="NON-HLOS.bin" label="modem" num_partition_sectors="131072" ... size_in_KB="65536.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072" /> <program ... filename="sbl1.mbn" label="sbl1" num_partition_sectors="1024" ... size_in_KB="512.0" sparse="false" start_byte_hex="0x8000000" start_sector="262144" /> <program ... filename="sbl1.mbn" label="sbl1bak" num_partition_sectors="1024" ... size_in_KB="512.0" sparse="false" start_byte_hex="0x8080000" start_sector="263168" /> <program ... filename="emmc_appsboot.mbn" label="aboot" num_partition_sectors="4096" ... size_in_KB="2048.0" sparse="false" start_byte_hex="0x8100000" start_sector="264192" /> <program ... filename="emmc_appsboot.mbn" label="abootbak" num_partition_sectors="4096" ... size_in_KB="2048.0" sparse="false" start_byte_hex="0x8300000" start_sector="268288" /> ... <program ... filename="boot.img" label="boot" num_partition_sectors="40960" ... size_in_KB="20480.0" sparse="false" start_byte_hex="0xc00c000" start_sector="393312" /> <program ... filename="recovery.img" label="recovery" num_partition_sectors="40960" ... size_in_KB="20480.0" sparse="false" start_byte_hex="0xd40c000" start_sector="434272" /> <program ... filename="splash.img" label="splash" num_partition_sectors="40960" ... size_in_KB="20480.0" sparse="false" start_byte_hex="0xe80c000" start_sector="475232" /> ... <program ... filename="system_1.img" label="system" num_partition_sectors="262160" physical_partition_number="0" start_sector="1179648" /> <program ... filename="system_2.img" label="system" num_partition_sectors="16" physical_partition_number="0" start_sector="1442824" /> <program ... filename="system_3.img" label="system" num_partition_sectors="256992" physical_partition_number="0" start_sector="1446936" /> <program ... filename="system_4.img" label="system" num_partition_sectors="16" physical_partition_number="0" start_sector="1703936" /> <program ... filename="system_5.img" label="system" num_partition_sectors="258024" physical_partition_number="0" start_sector="1708048" /> ... <program ... filename="userdata_12.img" label="userdata" num_partition_sectors="16" physical_partition_number="0" start_sector="8302592" /> <program ... filename="userdata_13.img" label="userdata" num_partition_sectors="16" physical_partition_number="0" start_sector="8564736" /> <program ... filename="userdata_14.img" label="userdata" num_partition_sectors="16" physical_partition_number="0" start_sector="8565256" /> <program ... filename="gpt_main0.bin" label="PrimaryGPT" num_partition_sectors="34" ... size_in_KB="17.0" sparse="false" start_byte_hex="0x0" start_sector="0" /> <program ... filename="gpt_backup0.bin" label="BackupGPT" num_partition_sectors="33" ... size_in_KB="16.5" sparse="false" start_byte_hex="(512*NUM_DISK_SECTORS)-16896." start_sector="NUM_DISK_SECTORS-33." /> </data>
ããã«ã¯ãã¿ã€ãprogramã® xml-elementsã®åœ¢åŒã§ã»ã¯ã·ã§ã³ã®ãã©ã¡ãŒã¿ãŒã説æããè¡šãå«ãŸããŠããŸãã ãã¹ãŠã®ã»ã¯ã·ã§ã³ã¯ãMUã®ã¡ã¢ãªã«é 眮ãããé åºã§å³å¯ã«ãªã¹ããããŠããŸãã
åxmlèŠçŽ ã«ã¯ã次ã®xmlå±æ§ãå«ããããšãã§ããŸãã
SECTOR_SIZE_IN_BYTES - ;
file_sector_offset - , ;
filename - , ;
label - ;
num_partition_sectors - ;
physical_partition_number - ;
size_in_kb - , ;
sparse - sparse-;
start_byte_hex - , ;
start_sector - , .
4.3ã 倪ç°ãã¡ã€ã«
ããã¯ããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã®æ§é ãèšè¿°ããå¯äžã®èšè¿°ãã¡ã€ã«ã§ãããã¡ã¢ãªã¬ã€ã¢ãŠãã§ã¯ãããŸããã
ããšãã°ãMT6582 MTKãããäžã®MT otaæŽæ°ãã¡ã€ã«ã¯æ¬¡ã®ãšããã§ãã
otaãã¡ã€ã«
å³4 倪ç°ãã¡ã€ã«
PRELOADER 0x0
MBR 0x1400000
EBR1 0x1480000
PRO_INFO 0x1500000
NVRAM 0x1800000
PROTECT_F 0x1d00000
PROTECT_S 0x2700000
SECCFG 0x3100000
UBOOT 0x3120000
BOOTIMG 0x3180000
RECOVERY 0x4580000
SEC_RO 0x5980000
MISC 0x5f80000
LOGO 0x6000000
EXPDB 0x6300000
ANDROID 0x6d00000
CACHE 0x46d00000
USRDATA 0x72900000
otaã¢ããããŒãã®ãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã«ã€ã¡ãŒãžãååšããã»ã¯ã·ã§ã³ã®èª¬æãå«ãŸããŠããŸããåã»ã¯ã·ã§ã³ã®æ§é ã¯æ¬¡ã®ãšããã§ãã
label part_offset,
- label-æŽæ°ãããã»ã¯ã·ã§ã³ã®ã©ãã«ã
- part_offset -otaæŽæ°ãã¡ã€ã«å ã®ããŒãã£ã·ã§ã³ã€ã¡ãŒãžã®ãªãã»ããã
ãã¡ãŒã ãŠã§ã¢å ã®ãã¹ãŠã®ã€ã¡ãŒãžã¯ãç©Žããªãã§å³å¯ã«é£ç¶ããŠé 眮ãããããã part_size_nã»ã¯ã·ã§ã³ã®åã€ã¡ãŒãžã®ãµã€ãºã¯æ¬¡ã®åŒã䜿çšããŠèšç®ãããŸãã
part_size_1 = part_offset_2 - part_offset_1
4.4ã æ£åžå³ãã¡ã€ã«
ã¹ãã£ãã¿ãã¡ã€ã«ã«ã¯ã MTKãããã«åºã¥ããŠæ§ç¯ãããMUã®ã¡ã¢ãªã¬ã€ã¢ãŠãã®èª¬æãå«ãŸããŠããŸãã ãã®ãã¡ã€ã«ã®æ§é ã«ã¯3ã€ã®ããŒãžã§ã³ããããŸããããã¯ãã¡ã¢ãªãããèªäœãšMTKããã»ããµãããã®äž¡æ¹ã®æ©èœã®æŽå²ççºå±ã«é¢é£ããŠããŸãã
4.4.1ã ããŒãžã§ã³1
æåã®ããŒãžã§ã³ã®ããŒã¯ã¢ããèšè¿°ãã¡ã€ã«ã«ã¯ãåã¡ã¢ãªã»ã¯ã·ã§ã³ã®èšè¿°ã®ãªã¹ããå«ãŸããŠããã次ã®åœ¢åŒã«ãªã£ãŠããŸãã
ã¹ãã£ãã¿ãã¡ã€ã«ããŒãžã§ã³1
å³5 ã æåã®ããŒãžã§ã³ã®æ£åžå³ãã¡ã€ã«
PRELOADER 0x0000000000
{
}
MBR 0x0000600000
{
}
EBR1 0x0000680000
{
}
__NODL_PMT 0x0000700000
{
}
...
ANDROID 0x0005380000
{
}
CACHE 0x002DD80000
{
}
USRDATA 0x0035B80000
{
}
FAT 0x0095B80000
{
}
__NODL_BMTPOOL 0x07FEB00000
{
}
ã¡ã¢ãªã®åã»ã¯ã·ã§ã³ã¯ã次ã®æ§é ã§èšè¿°ãããŸãã
[__NODL_]name offset [length] { flag },
- __NODL_- ãããŠã³ããŒããªããã¯ãããŒãã£ã·ã§ã³ããã©ãã·ã¥ãããŠãããããã©ãã·ã£ãŒã§åŠçãããšãã«ã¹ããããããããšã瀺ããŸãã ãããã£ãŠããã©ãã·ã£ãŒã¯ãã®ã»ã¯ã·ã§ã³ã®ç»åãã¡ã€ã«ãå¿ èŠãšããŸããã
- name-ã»ã¯ã·ã§ã³ã©ãã«ã
- offset-ãã€ãåäœã®ã»ã¯ã·ã§ã³ãªãã»ããã
- length-ã»ã¯ã·ã§ã³ã®é·ãïŒãã€ãåäœïŒã
- flag-ã»ã¯ã·ã§ã³ãã©ã°ã roãšã³ããªãã»ã¯ã·ã§ã³ãèªã¿åãå°çšã§ããããšã瀺ãèšå·ãå«ãŸããå ŽåããããŸãã
æãäžè¬çã«äœ¿çšãããççž®ã¬ã³ãŒãã¯æ¬¡ã®ãšããã§ãã
name offset { }
ãã®ãããªã¡ã¢ãªããŒãã£ã·ã§ã³ã®èª¬æã§ã¯ã次ã®ããšãåæãšããŠããŸãã
- åã»ã¯ã·ã§ã³ã®é·ãã¯æ¬¡ã®ã»ã¯ã·ã§ã³ã®å§ãŸããŸã§ã§ãééãåãç®ã¯ãããŸããã
- 2ã€ã®ã»ã¯ã·ã§ã³ã®éã«3çªç®ã®ïŒé衚瀺ã®ïŒã»ã¯ã·ã§ã³ã¯ãããŸããã
4.4.2ã ããŒãžã§ã³2
2çªç®ã®ããŒãžã§ã³ã®ã¡ã¢ãªã¬ã€ã¢ãŠãèšè¿°ã®ã¹ãã£ãã¿ãã¡ã€ã«ã«ã¯ãããããŒãšåã¡ã¢ãªã»ã¯ã·ã§ã³ã®èšè¿°ããŒãã«ãçŽæ¥å«ãŸããŠããŸãã 次ã®åœ¢åŒããããŸãã
ã¹ãã£ãã¿ãã¡ã€ã«ããŒãžã§ã³2
å³6 ã 2çªç®ã®ããŒãžã§ã³ã®æ£åžå³ãã¡ã€ã«
########################################################## # # General Setting # ########################################################## - general: MTK_PLATFORM_CFG info: - config_version: V1.1.2 platform: MT6592 project: vanzo92_wet_jb9 storage: EMMC boot_channel: MSDC_0 block_size: 0x20000 ########################################################## # # Layout Setting # ########################################################## - partition_index: SYS0 partition_name: PRELOADER file_name: preloader_vanzo92_wet_jb9.bin is_download: true type: SV5_BL_BIN linear_start_addr: 0x0 physical_start_addr: 0x0 partition_size: 0x40000 region: EMMC_BOOT_1 storage: HW_STORAGE_EMMC boundary_check: true is_reserved: false operation_type: BOOTLOADERS reserve: 0x00 - partition_index: SYS1 partition_name: MBR file_name: MBR is_download: true type: NORMAL_ROM linear_start_addr: 0x0 physical_start_addr: 0x0 partition_size: 0x80000 region: EMMC_USER storage: HW_STORAGE_EMMC boundary_check: true is_reserved: false operation_type: UPDATE reserve: 0x00
ããããŒã«ã¯ãã¡ãŒã ãŠã§ã¢ãã©ã¡ãŒã¿å šäœãå«ãŸãã次ã®ãã£ãŒã«ããå«ãŸããŸãã
- config_versionã¯ããããŒã®ããŒãžã§ã³ã§ãã V1.1.1ãŸãã¯V1.1.2ã®å ŽåããããŸãã
- ãã©ãããã©ãŒã -MT6582ãªã©ã®ããŒããŠã§ã¢ãã©ãããã©ãŒã ïŒãããã®ã¿ã€ãïŒã
- project-ãã¡ãŒã ãŠã§ã¢éçºãããžã§ã¯ãã®ååã
- ã¹ãã¬ãŒãž -EMMCãªã©ã䜿çšãããã¡ã¢ãªããã€ã¹ã®ã¿ã€ãã
- boot_channel-èµ·åããã€ã¹ã®ã¿ã€ãã
- block_size-ãã€ãåäœã®ãããã¯ãµã€ãºãããšãã°ãEMMCã®å Žåããã®ãã£ãŒã«ãã®å€ã¯0x20000ã§ãã
ã¡ã¢ãªã®åã»ã¯ã·ã§ã³ã¯ã次ã®äžé£ã®ãã£ãŒã«ãã§èª¬æãããŸãã
partition_index-ããŒãã£ã·ã§ã³ã©ãã«ã
partition_name-ããŒãã£ã·ã§ã³åã
file_name-ã»ã¯ã·ã§ã³å ã®ãã©ãã·ã¥çšã®ã€ã¡ãŒãžãå«ããã¡ã€ã«ã®ååããŸãã¯ã€ã¡ãŒãžãäžèŠãªå Žåã¯NONEã
is_download-ããŒããããŠããããŒãã£ã·ã§ã³ã®å åïŒ __NODL_ã®ãããªãã® ïŒ;
type-ã»ã¯ã·ã§ã³ã®ã¿ã€ãã ã»ã¯ã·ã§ã³ã®å 容ã瀺ããŸãã 次ã®å€ãåãããšãã§ããŸãã
- EXT4_IMG-ã»ã¯ã·ã§ã³ã«ã¯EXT4ãã¡ã€ã«ã·ã¹ãã ã®äžéšãå«ãŸããŸãã
- NORMAL_ROM-ã»ã¯ã·ã§ã³ã«ã¯ãä¿åãããã€ã¡ãŒãžãŸãã¯åå¥ã®ãã¡ã€ã«ãå«ãŸããŸãã
- SV5_BL_BIN-ã»ã¯ã·ã§ã³ã«ã¯ãããŒãããŒããŒã®ãçã®ã³ãŒããïŒçã®ã³ãŒãïŒãå«ãŸããŸãã
physical_start_addr -MUã®ã¡ã¢ãªå ã®ã»ã¯ã·ã§ã³ãªãã»ããïŒç©çã¢ãã¬ã¹ïŒããã€ãã
partition_size-ãã€ãåäœã®ããŒãã£ã·ã§ã³ãµã€ãºã
region-ã»ã¯ã·ã§ã³ãããå°åã®ååã 次ã®å€ãåãããšãã§ããŸãã
- EMMC_BOOT_1-ããŒãããŒããŒã®æåã®é åïŒé åïŒã
- EMMC_BOOT_2-ããŒãããŒããŒã®2çªç®ã®é åã
- EMMC_USER-ãŠãŒã¶ãŒé åã
boundary_check-ã€ã³ã¿ãŒãã§ãŒã¹ãæããå¿ èŠãããããšã®ãµã€ã³ã
is_reserved-ããã¯ã¢ããã®å¿ èŠæ§ã®å åã
operation_type-æäœã®ã¿ã€ãã 次ã®å€ãåãããšãã§ããŸãã
- BINREGION- ãçã®ã³ãŒããã®é åã
- ããŒãããŒããŒ-ããŒãããŒããŒã
- INVISIBLE-äžå¯èŠã»ã¯ã·ã§ã³ã
- ä¿è·-ä¿è·ãããã»ã¯ã·ã§ã³ã
- äºçŽæžã¿-äºçŽæžã¿ã
- æŽæ° -æŽæ°ãããã»ã¯ã·ã§ã³ã
- ãªã¶ãŒã -å€ãããããŸããã
äœæ¥äžããã©ãã·ã£ãŒã¯ããŒãã£ã·ã§ã³èšè¿°ããŒãã«ãããã©ã¡ãŒã¿ãŒãéžæããŸããäž»ãªãã®ã¯ãéå§ã¢ãã¬ã¹ãšãã©ãŒãããé·ã§ãã
MT6572-MT6577ãããã®å Žåã Begin Addressãã©ãã·ã£ãŒã®å€ã¯linear_start_addrãã£ãŒã«ãã®å€ã䜿çšããŸããããã¯ãã¡ã¢ãªå ã®ã»ã¯ã·ã§ã³ïŒ1ã€ã®ãœãªããé åãè¡šãïŒã®çã®ãªãã»ãããåæ ããŸãã ãããã«ã¯é åã®æäœæ¹æ³ãããããã䜿çšããã¡ã¢ãªã«ã¯ããŒãã£ã·ã§ã³ãé 眮ããããã®é åã1ã€ãããããŸããã§ããã ããã«ãphysical_start_addrãã£ãŒã«ãã®å€ã¯åžžã«ãŒãã§ãã
MT6582ãããã¯ãã§ã«é åã®æäœæ¹æ³ãç¥ã£ãŠããŸããã䜿çšãããã¡ã¢ãªã«ã¯ãŸã é åã1ã€ãããããŸããã ãããã£ãŠããã©ãã·ã£ãŒã¯ã Begin Addresså€ãšããŠã physical_start_addrãã£ãŒã«ãã®å€ãæ¢ã«äœ¿çšããŸããããã¯ãããã°ã©ã ã§ã¡ã¢ãªå ã«äœæãããé åå ã®ã»ã¯ã·ã§ã³ãªãã»ãããåæ ããŸããlinear_start_addrãã£ãŒã«ãã«ã¯ãã¡ã¢ãªãããã®å é ããã®ãªãã»ããå€ãå«ãŸããŸãã
MT6592ããã以éãMTKã®MTã¯ã¡ã¢ãªé åã§æ¬æ Œçãªäœæ¥ãè¡ãããããã©ãã·ã£ãŒä»ãã®MT6592以äžã®ãããã§ã¯ã physical_start_addrãã£ãŒã«ãã®å€ãéå§ã¢ãã¬ã¹å€ãšããŠäœ¿çšãããŸãã
ãã©ãã·ã£ãŒã¯åžžã«ã partition_sizeãã£ãŒã«ãããFormat Lengthãã£ãŒã«ãã®å€ãåãåããŸãã
5.ã¡ã¢ãªã¬ã€ã¢ãŠããã¡ã€ã«ã
ã¡ã¢ãªããŒã¯ã¢ãããã¡ã€ã«ã«ã¯ãã¡ã¢ãªããŒã¯ã¢ããããŒãã£ã·ã§ã³ã®ã€ã¡ãŒãžãå«ãŸããŠããŸãã ãããã®æ§é ã¯ãã¬ã€ã¢ãŠãã¹ããŒã ïŒ GptãŸãã¯Mbr ïŒããã³ç®çïŒããã¯ã¢ããããŒã¯ã¢ãããã¡ã€ã«PmtãŸãã¯Gptãªã© ïŒã«äŸåããŸãã
次ã®ã¿ã€ãã®ããŒã¯ã¢ãããã¡ã€ã«ãèŠã€ãããŸãã
- Mbrãã¡ã€ã«ãšEbrãã¡ã€ã«ã Mbr-ã¡ã¢ãªã¬ã€ã¢ãŠãå³ã䜿çšããŠããã¹ãŠã®MUã¡ãŒã«ãŒã䜿çšã
- Gptãã¡ã€ã«ã Gpt-ã¡ã¢ãªã¬ã€ã¢ãŠãå³ã䜿çšããŠããã¹ãŠã®MUã¡ãŒã«ãŒã䜿çšã
- ãã©ã¡ãŒã¿ãã¡ã€ã«ã RKãããã«åºã¥ãMUã®ã¡ãŒã«ãŒã䜿çšããŸãã
- Pmtãã¡ã€ã«ã ããã¯ã¢ããã¡ã¢ãªââã¬ã€ã¢ãŠããã¡ã€ã«ãäœæããããã«MTKãããã«åºã¥ããMUã®ã¡ãŒã«ãŒã«ãã£ãŠäœ¿çšãããŸãã
- ããããã¡ã€ã«ã Samsungãããã«åºã¥ãMUã¡ãŒã«ãŒã䜿çšããŸãã
5.1ã MBRãã¡ã€ã«
Mbrãã¡ã€ã«ã¯ã Mbrã¹ããŒã ã䜿çšããã¡ã¢ãªã¬ã€ã¢ãŠãã®ããŒãã£ã·ã§ã³ã®ã€ã¡ãŒãžã§ããããµã€ãºã¯1ã»ã¯ã¿ãŒã§ãã 512ãã€ã
MUã§ã¯ãããããMbrãã¡ã€ã«ã®å€å žçãªæ§é ã䜿çšãããŸã[5]ã
å³7 ã ã¯ã©ã·ãã¯Mbrãã¡ã€ã«æ§é
åã»ã¯ã·ã§ã³ãã©ã¡ãŒã¿ãŒã¬ã³ãŒãã«ã¯ã次ã®ãã£ãŒã«ããå«ãŸããŸãããããã®å€ã¯ãåŸæ¥ã®Mbræ§é ã§åãå ¥ãããããã®ãšã¯ç°ãªããŸãã
============================================================== | â | | , | | | | | | | | | | / | | | hex | | |=====|===========|========|==============|====================| | 1 | IsBoot | 001 | 0x00 | | | 2 | - | 003 | 0x01 | | | 3 | Type | 001 | 0x04 | | | 4 | - | 003 | 0x05 | | | 5 | Offset | 0x04 | 0x08 | | | 6 | Size | 0x04 | 0x0 | | ==============================================================
IsBootãã£ãŒã«ãã®ãµã€ãºã¯1ãã€ãã§ãããŒãã£ã·ã§ã³ã®ã¢ã¯ãã£ããã£ã瀺ãããã«äœ¿çšãããŸãããã®äžäœãããã¯ããŒãããŒãã£ã·ã§ã³ã瀺ããŸãã
080 - ; 000 - .
Typeãã£ãŒã«ãã®ãµã€ãºã¯1ãã€ãã§ãMUã¡ãŒã«ãŒãèšè¿°ãããŠããã»ã¯ã·ã§ã³ã®ã¿ã€ãã瀺ãããã«äœ¿çšããŸãã ããŒãã£ã·ã§ã³ã¿ã€ãã®æå®ã¯ã¡ãŒã«ãŒã«ãã£ãŠç°ãªãå ŽåããããŸãããäžè¬çãªå€ãããã€ããããŸãã
================================================================ | â | | | | | / | | hex | | |=====|===========|==========|===================================| | 01 | Not | 0x00 | | | 02 | Fat12 | 0x01 | Fat12 | | 03 | Fat16 | 0x04 | Fat16 | | 04 | Extend | 0x05 | (EBR) | | 05 | Fat32 | 0x0B | Fat32 | | 06 | Fat32Lba | 0x0C | Fat32 LBA | | 07 | LinuxSwap | 0x82 | Swap Linux | | 08 | Linux | 0x83 | Linux | | 09 | LinuxEx | 0x85 | Linux | | 10 | Gpt | 0xEE | GUID (GPT) | | 11 | Bbt | 0xFF | Bad block table | ================================================================
[ ãªãã»ãã]ãã£ãŒã«ãã®ãµã€ãºã¯4ãã€ãã§ãã»ã¯ã¿ãŒã§è¡šãããã»ã¯ã·ã§ã³ãªãã»ããå€ãå«ãŸããŠããŸãã
[ ãµã€ãº]ãã£ãŒã«ãã®ãµã€ãºã¯4ãã€ãã§ãããŒãã£ã·ã§ã³ã®ãµã€ãºãå«ãŸããŸãããããã»ã¯ã¿ãŒã§è¡šãããŸãã
0x01FEã§ã¯ã Mbrãã¡ã€ã«ã®çœ²åã0xAA55ã«èšå®ãããŸãã
5.2ã EBRãã¡ã€ã«
Ebrãã¡ã€ã«ã¯ã Mbrã¹ããŒã ã䜿çšããŠå®è¡ãããã¡ã¢ãªããŒã¯ã¢ããã®æ¡åŒµã»ã¯ã·ã§ã³ã®ã€ã¡ãŒãžã§ãã Mbrãã¡ã€ã«ãšåãæ§é ãšãµã€ãºãæã£ãŠããŸãã
å³8 ã å€å žçãªEbrãã¡ã€ã«æ§é
éãã¯ã Ebr-ãã¡ã€ã«ã§ã¯ã¢ã¯ãã£ããã£ã®ãµã€ã³ãåžžã«0ã«èšå®ãããŠãããå¿ èŠã«å¿ããŠãããã®ãã¡ã€ã«ã63å以äžååšããå¯èœæ§ããããããããããé 眮ããã«ã¯æ倧63åã®ããŒãã£ã·ã§ã³ãäœæããå¿ èŠããããç¡é§ãå€ãã¡ã¢ãªæ¶è²»éMUã
ããšãã°ãStar Z2 ã³ã³ãããŒã«ãŠãããã®ããã«ãã¡ã¢ãªããŒãã£ã·ã§ã³ãæ¯èŒçå°ãªãå Žåãå¥ã ã®ããŒãã£ã·ã§ã³ã«ããå¥ã ã®Ebr1ããã³Ebr2ãã¡ã€ã«ã 䜿çšãããŸãã ããããããšãã°ãå€ãã®ããŒãã£ã·ã§ã³ãããå Žåããã¹ãŠã®Ebrãã¡ã€ã«ã1ã€ã«çµåããŠãå ±éãã¡ã€ã«ã1ã€ã®ã¡ã¢ãªããŒãã£ã·ã§ã³ã«é 眮ã§ããŸãã
5.3ã Gptãã¡ã€ã«
gptãã¡ã€ã«ã«ã¯ã gptã¹ããŒã ã«å¿ããã¡ã¢ãªã¬ã€ã¢ãŠãã®ã€ã¡ãŒãžãå«ãŸããŠããŸãã ã»ãšãã©ã®å ŽåãMUã¯Gpt- schemeã®æšæºæ§é ãæã£ãŠãããããå®éã«ã¯ãã¡ãŒã ãŠã§ã¢ã«ã¯2ã€ã®Gpt- ãã¡ã€ã«ããããŸããã¡ã€ã³ã¯pgpt ïŒ primary ïŒãŸãã¯gpt_mainãšåŒã°ããã»ã«ã³ããªïŒbackupïŒã¯sgpt ïŒ secondary ïŒãŸãã¯gpt_backupãšåŒã°ããŸãã
ã¡ã€ã³Gpt-ãã¡ã€ã«ã¯MUã®ã¡ã¢ãªã«ããããŒãã»ã¯ã¿ãŒããå§ãŸãã34ã»ã¯ã¿ãŒãå æãã次ã®æ§é ãæã£ãŠããŸãã
- æåã®ã»ã¯ã¿ãŒå šäœãä¿è·ãšåŒã°ããMbrã«ãã£ãŠå æãããŠããŸãïŒ PMBR-ä¿è·ãã¹ã¿ãŒããŒãã¬ã³ãŒãïŒã
- 2çªç®ã®ã»ã¯ã¿ãŒå šäœãGptããããŒãå æããããããµã€ãºã512ãã€ãã§ãã
- 3çªç®ãã34ãŸã§ïŒ32ã»ã¯ã¿ãŒïŒã¯ã Gpt-ããŒãã«èšè¿°ã»ã¯ã·ã§ã³ã§ãã åã¬ã³ãŒãã®ãµã€ãºã¯128ãã€ãã§ãããããŒãã«å ã®åèšã§128ã¬ã³ãŒããè¶ ããããšã¯ã§ããŸããããããã£ãŠã128 * 128 = 16384ãã€ããå¿ èŠã§ãã 32ã»ã¯ã¿ãŒã
ããã¯ã¢ããGpt-ãã¡ã€ã«ã¯33ã»ã¯ã¿ãŒãå æããMUã®ã¡ã¢ãªå ã®ã¡ã¢ãªã®çµããè¿ãã«ããããã Gpt-ãã¡ã€ã«ã®æåŸã®ã»ã¯ã¿ã¯ã¡ã¢ãªã®ç©ççã«æåŸã®ã»ã¯ã¿ã«ãããŸãã 次ã®æ§é ã«ãªã£ãŠããŸãã
- æåãã32ã»ã¯ã¿ãŒïŒ32ã»ã¯ã¿ãŒïŒãŸã§ãã»ã¯ã·ã§ã³ã®èª¬æã®GptããŒãã«ãå æãããŠããŸãã
- 33ã»ã¯ã¿ãŒå šäœãGptããããŒãå æããŸãã
5.4ã ãã©ã¡ãŒã¿ãã¡ã€ã«
ãã©ã¡ãŒã¿ãã¡ã€ã«ãã€ãŸã ã¡ã¢ãªããŒã¯ã¢ãããå«ãã»ã¯ã·ã§ã³ã®ç»åã«ã¯ããã®ã»ã¯ã·ã§ã³ã®ãµã€ãºã«é¢ä¿ãªããããã¹ããã¡ã€ã«PARAMETERã®ã¿ãå«ãŸããŸãã ããšãã°ãR30 U30GT-Hããã€ã¹ã®ãã¡ãŒã ãŠã§ã¢å ã®ãã©ã¡ãŒã¿ãŒãã¡ã€ã«ã®å€èŠ³ã¯æ¬¡ã®ãšããã§ã[6]ã
å³9 ã RK3066ããã»ããµãŒäžã®U30GT-Hããã®ãã©ã¡ãŒã¿ãŒãã¡ã€ã«
5.5ã Pmtãã¡ã€ã«
pmtãã¡ã€ã«ã¯ã MTK瀟ã®éçºè ã䜿çšããã¡ã¢ãªã¬ã€ã¢ãŠãã®ããã¯ã¢ããããŒãã£ã·ã§ã³ã®ã€ã¡ãŒãžã§ããããµã€ãºã¯4096ãã€ãã§ãã
PMTããŒãã£ã·ã§ã³ã€ã¡ãŒãžã¯ã2ã€ã®ã¡ã¢ãªããŒãã£ã·ã§ã³èšè¿°ããŒãã«ã§æ§æãããŸãã æåã¯ããŒã¹ã§ããã®åŸã¯ã»ã¯ã·ã§ã³ã®èª¬æçšã®ããã¯ã¢ãããŸãã¯ãã©ãŒããŒãã«ã§ãã
åããŒãã«ã¯æ¬¡ã®ãã®ã§æ§æãããŸãã
- -ã»ã¯ã·ã§ã³ã®èª¬æè¡šã®åé ã®çœ²åã å®è¡šã®å Žåãããã¯æ¬¡ã®ãPTv1ãæåã®æååã§ãã
å³10ïŒããŒã¹ããŒãã«ã®çœ²å
ãŸããããã¯ã¢ããããŒãã«ã®å Žåããã®è¡ã®åœ¢åŒã¯ãMPT1ãã§ãã
å³ 11ïŒããã¯ã¢ããããŒãã«ã®çœ²å
- -ã¡ã¢ãªãŒã®ã»ã¯ã·ã§ã³ãèšè¿°ããã¬ã³ãŒããå«ãããŒãã«èªäœã«çŽæ¥ã ããŒãã«ã®çµããã«ã¯ãã空ã®ãã¬ã³ãŒããã€ãŸã ãã¹ãŠã®ãã£ãŒã«ãã«ã³ãŒã0x00ãå«ãã¬ã³ãŒãã
- -ããŒãã«ã®çµããã®çœ²åã å®è¡šã®å Žåãããã¯æ¬¡ã®æååã 'PTv1' \ x01 \ x01 \ x03 \ x01ãã§ãã
å³12ïŒããŒã¹ããŒãã«ã®çµããã®çœ²å
ããã¯ã¢ããããŒãã«ã®å Žåããã®è¡ã®åœ¢åŒã¯ã 'MPT1' \ x01 \ x00 \ x03 \ x01ãã§ãã
å³ 13ïŒããã¯ã¢ããããŒãã«ã®çœ²åã®çµãã
åã¬ã³ãŒãã®æ§é ã¯ã4ã€ã®ãã£ãŒã«ãã§æ§æããã0x58ïŒ88ïŒãã€ãã®ãµã€ãºã§ããã次ã®åœ¢åŒããšããŸãã
======================================================== | â | | , | | | | / | | | hex | | |=====|===========|========|==========|==================| | 1 | Name | 040 | 0x00 | | | 2 | Size | 008 | 0x40 | | | 3 | Offset | 0x08 | 0x48 | | | 4 | mask_flag | 0x08 | 0x50 | | ========================================================
5.6ã ããããã¡ã€ã«
Pitãã¡ã€ã«ïŒ ããŒãã£ã·ã§ã³æ å ±ããŒãã« ïŒã¯ã Samsung MUã®éçºè ã䜿çšããã¡ã¢ãªã¬ã€ã¢ãŠãã»ã¯ã·ã§ã³ã®ã€ã¡ãŒãžã§ããããµã€ãºã¯4096ãã€ãã§ãã ç»åã®æ§é ã«é¢ããæ å ±ã¯[7ã8]ããååŸãããŸãã
ããããã¡ã€ã«ã¯ãããããŒãšã»ã¯ã·ã§ã³ãã©ã¡ãŒã¿ãŒã®èª¬æããŒãã«ã§æ§æãããŸãã
ããããŒã®ãµã€ãºã¯28ãã€ãã§ã次ã®ãã£ãŒã«ããå«ãŸããŠããŸãã
====================================================== | â | | , | | | | / | | | hex | | |=====|========|========|==========|===================| | 1 | Magic | 004 | 0x00 | | | 2 | Count | 004 | 0x04 | | | 3 | Name | 018 | 0x08 | | ======================================================
次ã¯ãã»ã¯ã·ã§ã³ã¬ã³ãŒãã§æ§æãããã»ã¯ã·ã§ã³ãã©ã¡ãŒã¿ãŒã®èª¬æã®è¡šã§ãã ããŒãã«ã®çµããã®ãµã€ã³ã¯ç©ºã®ã¬ã³ãŒãã§ãã åãšã³ããªã«ã¯æ¬¡ã®ãã£ãŒã«ããå«ãŸããŸãã
================================================================ | â | | | | | / | | hex | | |=====|===========|==========|===================================| | 01 | binary | 0x00 | BINARY_TYPE_ | | 02 | device | 0x04 | PARTITION_DEV_TYPE_ | | 03 | id | 0x08 | | | 04 | flags | 0x0C | | | 05 | update | 0x10 | PARTITION_UPDATE_ATTR | | 06 | part_off | 0x14 | | | 07 | part_len | 0x18 | | | 08 | offset | 0x1C | - | | 09 | file_size | 0x20 | - | | 10 | label | 0x24 | | | 11 | file_name | 0x44 | - | | 11 | fota_name | 0x64 | FOTA- | ================================================================
ãã€ããªãã£ãŒã«ãã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ã¿ã€ããå«ãŸããŠããŸãã æå¹ãªå€ã¯æ¬¡ã®ãšããã§ãã
0 - APP ( ); 1 - MODEM ( ).
ããã€ã¹ãã£ãŒã«ãã«ã¯ã ããã€ã¹ã®ã¿ã€ããå«ãŸããŸãã æå¹ãªå€ã¯æ¬¡ã®ãšããã§ãã
0 - unknown; 1 - file/fat; 2 - mmc;
idãã£ãŒã«ãã«ã¯ããã¡ãŒã ãŠã§ã¢ã®ã»ã¯ã·ã§ã³ã®ã·ãªã¢ã«çªå·ãå«ãŸããŠããŸãã
flagsãã£ãŒã«ãã«ã¯ãã»ã¯ã·ã§ã³ã®ãã©ã°ãå«ãŸããŸãã 次ã®å€ããšãããšããããŸãã
000 - RO; 001 - R/W; 0x02 - STL.
æŽæ°ãã£ãŒã«ãã«ã¯ãæŽæ°æã®ã»ã¯ã·ã§ã³ã®ãã©ã°ãå«ãŸããŸãã 次ã®å€ããšãããšããããŸãã
0x00 - unknown; 0x01 - FOTA; 0x02 - secure;
part_offãã£ãŒã«ãã«ã¯ããããã¯åäœã§è¡šãããã¡ã¢ãªå ã®ã»ã¯ã·ã§ã³ãªãã»ãããå«ãŸããŸãã
part_lenãã£ãŒã«ãã«ã¯ããããã¯åäœã§è¡šãããã¡ã¢ãªå ã®ã»ã¯ã·ã§ã³ã®ãµã€ãºãå«ãŸããŸãã
ãªãã»ãããã£ãŒã«ãã«ã¯ããã¡ãŒã ãŠã§ã¢å ã®ã€ã¡ãŒãžãã¡ã€ã«ã®ãªãã»ããããããã¯åäœã§è¡šç€ºãããŸãã
file_sizeãã£ãŒã«ãã«ã¯ããããã¯åäœã§è¡šãããç»åãã¡ã€ã«ã®ãµã€ãºãå«ãŸããŸãã
ã©ãã«ãã£ãŒã«ãã¯32ãã€ãé·ã§ããŒãïŒ0x00ïŒã§çµäºããã¡ã¢ãªã»ã¯ã·ã§ã³ã©ãã«ãå«ãŸããŠããŸãã
file_nameãã£ãŒã«ãã«ã¯ããŒãïŒ0x00ïŒã§çµäºãããã¡ãŒã ãŠã§ã¢ã»ã¯ã·ã§ã³ã®ã€ã¡ãŒãžãã¡ã€ã«ã®ååãå«ãŸããŸãã
fota_nameãã£ãŒã«ãã«ã¯ããŒãïŒ0x00ïŒã§å®äºããFOTAæŽæ°ã®ãã¡ãŒã ãŠã§ã¢ã»ã¯ã·ã§ã³ã®ã€ã¡ãŒãžãã¡ã€ã«ã®ååãå«ãŸããŸãã
6.䜿çšæ å ±ã
1. ãã¡ã¢ãªããŒã¯ã¢ãããšã¯ã
2. ããã£ã¹ã¯ã¬ã€ã¢ãŠãã®æŠèŠã
3. ãMBRããã³EBRãšã¯ã
4. ãGPTãšã¯ã
5. ããã¹ã¿ãŒããŒãã¬ã³ãŒãã
6. ãã¹ããã¯ãã¡ãŒã ãŠã§ã¢v1.09ïŒ2012-11-21ïŒã
7. ãã¡ã€ã«bootloader.c
8. ããã