Заливка(восстановление) u-boot(ais) в NAND с использованием FlashAndBootUtils по UART2.
Стираем ais в nand (перед этим установить режим загрузки модуля по UART2):
mono sfh_OMAP-L138.exe -erase -targetType OMAPL138_SOM -flashType NAND -p /dev/ttyUSB0 -v
Заливаем ais в nand:
mono sfh_OMAP-L138.exe -flash_noubl -targetType OMAPL138_SOM -flashType NAND -p /dev/ttyUSB0 -v u-boot_am180x_omapl138_nonsecure.ais
Для сборки понадобятся:
Загрузить OMAP-L138_FlashAndBootUtils_2_40.tar.gz и OMAP-L138_FlashAndBootUtils_2_40_add_inmys_som.patch в папку, перейти в эту папку
tar -xzf OMAP-L138_FlashAndBootUtils_2_40.tar.gz cd OMAP-L138_FlashAndBootUtils_2_40 make -C OMAP-L138/GNU clean patch -p1 < ../OMAP-L138_FlashAndBootUtils_2_40_add_inmys_som.patch cd OMAP-L138/GNU
устанавливаем в следующей команде CROSSCOMPILE, DSP_CROSSCOMPILE и DSP_LIB_PATH
make CROSSCOMPILE=/same...path/toolchain/arm-2009q1-203/bin/arm-none-linux-gnueabi- DSP_CROSSCOMPILE=/same...path/toolchain/TI_CGT_C6000_6.1.9/bin/ DSP_LIB_PATH=/same...path/toolchain/TI_CGT_C6000_6.1.9/lib/
sfh_OMAP-L138.exe должен быть в папке GNU, sft_OMAPL138_SOM_NAND.bin - в папке sft
$ mono sfh_OMAP-L138.exe -erase -targetType OMAPL138_SOM -flashType NAND -p /dev/ttyUSB0 -v ----------------------------------------------------- TI Serial Flasher Host Program for OMAP-L138 (C) 2013, Texas Instruments, Inc. Ver. 1.67 ----------------------------------------------------- [TYPE] Global erase [TARGET] OMAPL138_SOM [DEVICE] NAND [NAND Block] 1 Attempting to connect to device /dev/ttyUSB0... Press any key to end this program at any time. (AIS Parse): Read magic word 0x41504954. (AIS Parse): Waiting for BOOTME... (power on or reset target now) (AIS Parse): BOOTME received! (AIS Parse): Performing Start-Word Sync... (AIS Parse): Performing Ping Opcode Sync... (AIS Parse): Processing command 0: 0x58535901. (AIS Parse): Performing Opcode Sync... (AIS Parse): Loading section... (AIS Parse): Loaded 14100-Byte section to address 0x80000000. (AIS Parse): Processing command 1: 0x58535901. (AIS Parse): Performing Opcode Sync... (AIS Parse): Loading section... (AIS Parse): Loaded 1352-Byte section to address 0x80003714. (AIS Parse): Processing command 2: 0x58535906. (AIS Parse): Performing Opcode Sync... (AIS Parse): Performing jump and close... (AIS Parse): AIS complete. Jump to address 0x80000000. (AIS Parse): Waiting for DONE... (AIS Parse): Boot completed successfully. Waiting for SFT on the OMAP-L138... Target: BOOTUBL Target: DONE Target: SIZE Target: 00000001 Erasing flash 0% [ ------------------------------------------------------------ ] 100% ████████████████████████████████████████████████████████████ 100% ████████████████████████████████████████████████████████████ Erase complete Target: DONE Target: DONE