== fbtool introduction == fbtool is a tool program running at host pc. It will send preloader and lk to platform via usb in order to support fastboot command. 1 source code vendor/mediatek/proprietary/external/datool 2 build windows: install visual studio. chdir windows and run nmake. output file --> out\fbtool.exe linux: osX: build android. mmm vendor/mediatek/proprietary/external/datool output file --> ${ANDROID_HOST_OUT}/bin/fbtool 3 usage fbtool [-a auth_file] preloader lk auth_file: device/${COMPANY}/${PROJECT}/fbtool-da/auth_sv5.auth preloader: device/${COMPANY}/${PROJECT}/fbtool-da/fbtool-da-pl.bin lk: device/${COMPANY}/${PROJECT}/fbtool-da/fbtool-da-lk.bin 3.1 usage with normal chip command : fbtool preloader lk preloader support the following files: device/${COMPANY}/${PROJECT}/fbtool-da/fbtool-da-pl.bin ${OUT}/obj/PRELOADER_OBJ/bin/preloader_${PROJECT}_NO_GFH.bin ${OUT}/preloader.bin ${OUT}/preloader.img We recommend to use pre-built binary fbtool-da-pl.bin in case customer disable the download support of preloader. lk support only device/${COMPANY}/${PROJECT}/fbtool-da/fbtool-da-lk.bin fbtool-da-lk.bin is generated by ./tool/gen-dalk-from-lk.py usage: python gen-dalk-from-lk.py ${CHIP_ID} ${OUT}/obj/BOOTLOADER_OBJ/build-${PROJECT}/lk-no-mtk-header.bin fbtool-da-lk.bin 3.2 usage with secure chip (enable DAA) command : fbtool -a auth_file preloader lk Generate an auth_file which contains the corresponding public key of private-key.pem (private-key.pem is used to sign preloader) (just like SP Flash tool). Sign preloader with ./tool/signfile-for-brom.sh usage: signfile-for-brom.sh private-key.pem fbtool-da-pl.bin private-key.pem is generated from openssl command. run the script and it will output a file : fbtool-da-pl.bin.sign. (fbtool-da-pl.bin is a pre-built preloader_${PROJECT}_NO_GFH.bin. DO NOT use preloader.bin or preloader.img to generate the sign file.) With DAA enabled, the fbtool will automatically use *.sign as the signature of pl & lk. Thus, we have to put fbtool-da-pl.bin and fbtool-da-pl.bin.sign in the same folder. put fbtool-da-lk.bin and fbtool-da-lk.bin.sign in the same folder.