1#!/bin/bash 2 3COMPATIBLE=$(cat /proc/device-tree/compatible) 4 5if [ -e "/sys/devices/platform/f8000000.pcie/pcie_reset_ep" ] ; 6then 7 echo "upgrading npu with pcie image......\n" 8 9 if [[ $COMPATIBLE =~ "rk3399pro-evb-v14-linux" ]]; 10 then 11 cd /usr/share/npu_fw_pcie/ 12 npu_upgrade_pcie_combine MiniLoaderAll.bin uboot.img trust.img boot.img 13 cd /usr/bin/ 14 mv npu_powerctrl_combine npu_powerctrl 15 else 16 cd /usr/share/npu_fw_pcie/ 17 npu_upgrade_pcie MiniLoaderAll.bin uboot.img trust.img boot.img 18 fi 19else 20 echo "upgrading npu with usb image......\n" 21 cd /usr/share/npu_fw/ 22 npu_upgrade MiniLoaderAll.bin uboot.img trust.img boot.img 23fi 24 25sleep 1 26 27echo "update npu image ok\n" 28