opiaimax: install npu driver

This commit is contained in:
leeboby
2024-08-16 09:29:48 +08:00
parent b7fb0db0ac
commit 6968742411
5 changed files with 33 additions and 8 deletions

View File

@@ -1885,6 +1885,22 @@ install_wiringop()
rm $SDCARD/root/*.deb >/dev/null 2>&1
}
install_310b-npu-driver()
{
local driver_path="$EXTER/cache/sources/ascend-driver"
local driver_name="Ascend-hdk-310b-npu-driver_23.0.5_linux-aarch64-opiaimax.run"
local driver=${driver_path}/${driver_name}
if [[ -f "${driver}" ]]; then
display_alert "Installing" "$driver_name" "info"
cp "${driver}" "${SDCARD}/opt/"
chmod +x "${SDCARD}/opt/Ascend-hdk-310b-npu-driver_23.0.5_linux-aarch64-opiaimax.run"
chroot "${SDCARD}" /bin/bash -c "/opt/${driver_name} --chroot --full --install-username=orangepi --install-usergroup=orangepi --install-for-all"
fi
}
install_docker() {
[[ $install_docker != yes ]] && return

View File

@@ -449,6 +449,12 @@ if [[ ${IGNORE_UPDATES} != yes ]]; then
fi
if [[ ${BOARD} =~ orangepiaimax ]]; then
[[ $BUILD_OPT =~ image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/ascend-driver.git" "${EXTER}/cache/sources/ascend-driver" "branch:main"
fi
if [[ ${BOARD} =~ orangepi4|orangepi4-lts|orangepi800 && $RELEASE =~ focal|buster|bullseye|bookworm ]]; then
[[ ${BUILD_OPT} == image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/rk-rootfs-build.git" "${EXTER}/cache/sources/rk-rootfs-build-${RELEASE}" "branch:rk-rootfs-build-${RELEASE}"