opiaimax: install npu driver
This commit is contained in:
parent
b7fb0db0ac
commit
6968742411
|
|
@ -49,5 +49,6 @@ external/cache/sources/orangepi-firmware*
|
||||||
external/cache/sources/wiringOP
|
external/cache/sources/wiringOP
|
||||||
external/cache/sources/wiringOP-Python
|
external/cache/sources/wiringOP-Python
|
||||||
external/cache/sources/rk3399_gst_xserver_libs
|
external/cache/sources/rk3399_gst_xserver_libs
|
||||||
|
external/cache/sources/ascend-driver
|
||||||
external/cache/sources/arm-trusted-firmware-sunxi-mainline
|
external/cache/sources/arm-trusted-firmware-sunxi-mainline
|
||||||
external/cache/debs/arm64/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb
|
external/cache/debs/arm64/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,5 @@ BOOT_SUPPORT_SPI="yes"
|
||||||
SKIP_BOOTSPLASH="yes" # Skip boot splash patch, conflicts with CONFIG_VT=yes
|
SKIP_BOOTSPLASH="yes" # Skip boot splash patch, conflicts with CONFIG_VT=yes
|
||||||
DISTRIB_TYPE_LEGACY="bullseye bookworm bionic focal jammy"
|
DISTRIB_TYPE_LEGACY="bullseye bookworm bionic focal jammy"
|
||||||
DISTRIB_TYPE_CURRENT="bullseye bookworm focal jammy"
|
DISTRIB_TYPE_CURRENT="bullseye bookworm focal jammy"
|
||||||
INSTALL_HEADERS="yes"
|
|
||||||
BOOTFS_TYPE="fat"
|
BOOTFS_TYPE="fat"
|
||||||
REVISION="1.0.0"
|
REVISION="1.0.0"
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ family_tweaks_s() {
|
||||||
|
|
||||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install usb-modeswitch tree dnsmasq v4l-utils swig python3-dev python3-setuptools bluez libncurses-dev" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
chroot $SDCARD /bin/bash -c "apt-get -y -qq install usb-modeswitch tree dnsmasq v4l-utils swig python3-dev python3-setuptools bluez libncurses-dev" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||||
|
|
||||||
|
[[ ${BOARD} =~ orangepiaimax ]] && install_310b-npu-driver
|
||||||
install_wiringop
|
install_wiringop
|
||||||
install_balenaEtcher
|
install_balenaEtcher
|
||||||
|
|
||||||
|
|
@ -181,11 +182,13 @@ family_tweaks_s() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Realtek 8811CU/8821CU usb modeswitch support
|
# Realtek 8811CU/8821CU usb modeswitch support
|
||||||
cp ${SDCARD}/lib/udev/rules.d/40-usb_modeswitch.rules ${SDCARD}/etc/udev/rules.d/40-usb_modeswitch.rules
|
if [[ -f ${SDCARD}/lib/udev/rules.d/40-usb_modeswitch.rules ]]; then
|
||||||
sed '/LABEL="modeswitch_rules_end"/d' -i ${SDCARD}/etc/udev/rules.d/40-usb_modeswitch.rules
|
cp ${SDCARD}/lib/udev/rules.d/40-usb_modeswitch.rules ${SDCARD}/etc/udev/rules.d/40-usb_modeswitch.rules
|
||||||
cat >> ${SDCARD}/etc/udev/rules.d/40-usb_modeswitch.rules <<-EOF
|
sed '/LABEL="modeswitch_rules_end"/d' -i ${SDCARD}/etc/udev/rules.d/40-usb_modeswitch.rules
|
||||||
# Realtek 8821CU Wifi AC USB
|
cat >> ${SDCARD}/etc/udev/rules.d/40-usb_modeswitch.rules <<-EOF
|
||||||
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"
|
# Realtek 8821CU Wifi AC USB
|
||||||
LABEL="modeswitch_rules_end"
|
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"
|
||||||
EOF
|
LABEL="modeswitch_rules_end"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1885,6 +1885,22 @@ install_wiringop()
|
||||||
rm $SDCARD/root/*.deb >/dev/null 2>&1
|
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() {
|
||||||
|
|
||||||
[[ $install_docker != yes ]] && return
|
[[ $install_docker != yes ]] && return
|
||||||
|
|
|
||||||
|
|
@ -449,6 +449,12 @@ if [[ ${IGNORE_UPDATES} != yes ]]; then
|
||||||
|
|
||||||
fi
|
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
|
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}"
|
[[ ${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}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue