debian12无法使用PhoenixSuit对全志芯片进行刷机,网上搜索后,发现还可以使用LiveSuit。
记录安装的过程,方便后面的同学使用。
参考全志官方网站:
https://linux-sunxi.org/LiveSuit
一、下载LiveSuit包
git clone https://github.com/linux-sunxi/sunxi-livesuite.git
二、编译usb驱动
sudo apt-get install dkms
cd sunxi-livesuite/
cd awusb/
make
出现报错:
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-26-amd64'
/usr/src/linux-headers-6.1.0-26-common/Makefile:149: =============== ERROR ==============
/usr/src/linux-headers-6.1.0-26-common/Makefile:150: 'SUBDIRS' was removed in Linux 5.3
/usr/src/linux-headers-6.1.0-26-common/Makefile:151: Use 'M=' or 'KBUILD_EXTMOD=' instead
/usr/src/linux-headers-6.1.0-26-common/Makefile:152: ====================================
/usr/src/linux-headers-6.1.0-26-common/Makefile:153: *** .. Stop.
根据报错,修改Makefile的内容,将其中的"SUBDIRS=“替换为"M=”。
再次make,编译通过。
加载usb驱动:
sudo insmod awusb.ko
三、打开LiveSuit
./LiveSuit.sh
Starting x86-64/LiveSuit.
x86-64/LiveSuit: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
出现libpng12库无法找到的错误,用apt和deb安装都不成功,这里使用源码编译这个libpng12库。
下载源码:
wget -c https://archive.debian.org/debian-security/pool/updates/main/libp/libpng/libpng_1.2.50.orig.tar.xz
tar xf libpng_1.2.50.orig.tar.xz
cd libpng_1.2.50/
./configure
make
编译完成后,可以在libpng_1.2.50/.lib/下找到生成的库文件。
将库文件链接到默认lib路径:
cd /lib/x86_64-linux-gnu
sudo ln -s /home/xxx/xxx/libpng-1.2.50/.libs/libpng12.so.0 .
现在可以成功打开LiveSuit了。
./LiveSuit.sh
Starting x86-64/LiveSuit.
library file path: /home/xxx/xxx/sunxi-livesuite/x86-64/plgvector.dll
library file path: /home/xxx/xxx/sunxi-livesuite/x86-64/LangPlg.dll
LoadFile 24
Open 274: Language file format is UTF-8
library file path: /home/xxx/xxx/sunxi-livesuite/x86-64/LiveProc.Plg
library file path: /home/xxx/xxx/sunxi-livesuite/x86-64/plgvector.dll
library file path: /home/xxx/xxx/sunxi-livesuite/x86-64/luaeFex.dll
Register./luaBase.dll l_RegAllFun Sucess!
Register./luaeFex.dll l_RegAllFun Sucess!
Register./luadec.dll l_RegAllFun Sucess!
IMAGEWTY
ItemTableSize = 1048576
Closing image now!
Clos image OK!
按着fel上电,就可以刷写了。