Professional Documents
Culture Documents
1.0.7 to 1.0.10
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website: https://e.huawei.com
Overview
This document describes how to install and upgrade the driver and firmware
packages and provides FAQs and troubleshooting methods.
Intended Audience
This document is intended for upgrade engineers who must:
● Be familiar with the product networking and related network element (NE)
versions.
● Have device maintenance experience and be familiar with device operation
and maintenance.
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol Description
Change History
Issue Release Date Description
Contents
2 Upgrade................................................................................................................................... 15
2.1 Before You Start.................................................................................................................................................................... 15
2.2 Preparations for Upgrade................................................................................................................................................... 16
2.3 Upgrading Components (.run)......................................................................................................................................... 19
2.3.1 Upgrading the Ascend 910 AI Processor Firmware............................................................................................... 20
2.3.2 Upgrading the Ascend 910 AI Processor Driver...................................................................................................... 21
2.4 Upgrading Components (.deb)........................................................................................................................................ 22
2.4.1 Using dpkg........................................................................................................................................................................... 22
2.4.2 Using apt-get...................................................................................................................................................................... 23
3 FAQs..........................................................................................................................................26
3.1 Driver Source Code Compilation..................................................................................................................................... 26
3.2 Software Package Unavailable......................................................................................................................................... 27
3.3 How Do I Check Whether the Device Is Running Properly.................................................................................... 28
3.4 BC_Linux Image Source Configuration.......................................................................................................................... 29
3.5 Inconsistent Driver and Firmware Versions Due to Incorrect Upgrade Sequence..........................................30
3.6 How Do I Handle a .deb Package Installation or Upgrade Failure?................................................................... 31
3.7 Driver 20.2.0 or Later Failed to Be Rolled Back to an Earlier Version................................................................ 32
A Appendixes............................................................................................................................. 33
A.1 Parameters.............................................................................................................................................................................. 33
A.2 Scripts....................................................................................................................................................................................... 36
A.3 Tools.......................................................................................................................................................................................... 37
NOTE
Procedure
Step 1 Visit the A800-9010 page.
Step 2 Select the target version A800-9010 X.X.X.
For details about the mapping between the firmware, driver, and CANN, see
CANN Version Mapping.
----End
The OS version and architecture must comply with Table 1-2 or Table 1-3.
▪ If it does not exist, you can provide the source code path during
installation. For details, see Step 5.
● For CentOS 8.2+x86, run the rpm -qa | grep elfutils-libelf-devel command
to check whether elfutils-libelf-devel has been installed. If its information is
displayed, elfutils-libelf-devel has been installed.
● If the binary driver package is used for installation, the kernel version of the
current host OS must be the same as that required in Table 1-2. If the kernel
versions are inconsistent, use either of the following methods:
– Recompile the source code. For details, see 3.1 Driver Source Code
Compilation.
– Check whether the software package has been installed by referring to
Checking Whether a Component Has Been Installed in the Operating
Environment. If no, update the system kernel. If yes, uninstall the
software package and then update the kernel.
● If the general driver package is used for installation, the kernel version of the
current host OS must be the same as that required in Table 1-3. Otherwise,
the driver package may fail to be installed or functions may be affected.
NOTE
● The running user is specified for the driver component. It is not supported to specify the
running user for firmware. The running user of firmware is the same as that of the
driver.
● In the preceding commands, replace username with the actual user name.
● Permission control may pose security risks. Therefore, you are advised to create a
running user that does not belong to the root user group.
● After the HwHiAiUser user is created, do not disable the login authentication function
of the user.
● The password validity period is 90 days. You can change the validity period in the /etc/
login.defs file or run the chage command to set the validity period. For details, see
Setting the User Account Validity Period.
Command:
chage [-m mindays] [-M maxdays] [-d lastday] [-I inactive] [-E expiredate] [-
W warndays] user
-I Maximum idle period (in days) after which the user account
will be disabled. After the specified time period has expired, the
password will be invalid.
NOTE
● Table 1-4 lists only common parameters. You can run the chage --help command to
display detailed parameter description.
● The date is in the format of YYYY-MM-DD. For example, chage -E 2019-12-01 test
indicates that user test will expire on December 1, 2019.
● If User is not specified, the default user root will be used.
For example, to change the validity period of the user account test to December
31, 2019, run the following command:
chage -E 2019-12-31 test
CAUTION
Prerequisites
● The GCC tool and kernel source code corresponding to the target OS and its
kernel version exist. For details, see 1.2.3 Checking the OS Requirements
and Environment.
● The open-source tool Makeself v2.4.0 has been downloaded from https://
github.com/megastep/makeself or https://github.com/megastep/
makeself/releases/tag/release-2.4.0.
● Run the which pigz command to check whether the pigz tool has been
installed. If the location of the pigz tool is displayed, it has been installed.
NOTE
Step 6 Install the driver. For details, see 1.3 Installing the Driver and Firmware.
----End
NOTE
Step 7 Install the driver. For details, see 1.3 Installing the Driver and Firmware.
----End
----End
Procedure
Install the software driver package and then the .run firmware package. The
procedures for installing the software packages are the same. Replace the
asterisks (*) in the software packages based on the actual situation.
Step 1 Log in to the operating environment as user root and upload the *.run packages
to any directory, for example, /opt, in the operating environment.
Step 2 Grant the execute permission on the software packages to the installation user.
Run the ls -l command in the directory where the software package is stored to
check whether the installation user has the permission to execute the file. If the
installation user does not have the permission, run the following command:
chmod +x *.run
Step 3 Run the following command to check the consistency and integrity of the software
package installation file:
./*.run --check
Step 4 Run the following command to perform installation:
● If the installation path of the software package has been specified, for
example, /test/HiAI/, run the ./*.run --full --install-path=/test/HiAI/
command.
● If the software package is installed in the default installation directory, run
the ./*.run --full command.
NOTE
– The installation path is specified for the driver component. It is not supported to
specify the installation path for firmware. The installation path of firmware is the
same as that of the driver.
– If the driver is installed in a specified path:
▪ In the scenario where the specified path does not exist, a directory is
automatically created during the installation. If there are multiple levels of
directories, the directory is automatically created only when the last level of
directory does not exist.
Step 5 For a general driver package, if the following information is displayed, the DKMS
is not installed and the default kernel source code path /lib/modules/`uname -r`/
build does not exist. Enter the following information as prompted:
[WARNING]rebuild ko has something wrong, detail in /var/log/ascend_seclog/ascend_rebuild.log
Do you want to try build driver after input kernel absolute path? [y/n]:
NOTE
● If DKMS and related components such as kernel-header and kernel-devel have been
installed, the system automatically compiles and installs the DKMS driver.
● If DKMS has not been installed but the default kernel source code path /lib/modules/
`uname -r`/build already exists, the kernel is automatically used for driver compilation.
● Firmware:
Firmware package install success! Reboot needed for installation/upgrade to take effect!
Step 10 Run the npu-smi info command to check whether the NPU tool is successfully
installed.
The installation is successful if the following information is displayed. Otherwise,
the installation fails. Contact Huawei technical support.
NOTE
● In the command output, the field after npu-smi is the NPU tool version, and the field
after Version: is the NPU driver version.
● For details about how to use other commands, see Atlas 800 Training Server npu-smi
Command Reference (Model 9010).
----End
Important Notes
● After the .run installation package is used, do not manually set the
environment variable export LD_LIBRARY_PATH to the original SO file of
the .rar package. Otherwise, the tool in the .run installation package may
connect to the dynamic library of the earlier version. The third-party library
file path and non-run installation package release library file path are not
affected.
● Observe the following when viewing logs: The log time is the system time.
The time on the device is the same as that on the host. You can run the date
command to change the time on the host.
For example, to set the system time to 17:55:55, run the date -s 17:55:55
command.
Replace install_path with the actual installation path, package_name with the actual
package name, the firmware package with the actual firmware, and the driver
package with actual driver.
----End
2 Upgrade
During the Atlas 800 training server (model 9010) software upgrade, the system
needs to be reset, which interrupts services.
Precautions
Table 2-1 lists the precautions for the upgrade of the Atlas 800 training server
(model 9010).
No. Description
No. Description
Version Requirements
You are advised to use the driver version and firmware version in the same
software version list of Atlas 800 training server (model 9010) to ensure that they
match each other.
Update Process
Upgrade software packages in the sequence of firmware > driver.
1 Check 1. Query and record the version of Atlas 800 training server
the (model 9010) in the current system.
softwar 2. Determine the target version.
e
version.
2 System Check alarms of the Atlas 800 training server (model 9010).
status ● If no active alarm exists, perform the upgrade.
● If there are active alarms, contact Huawei technical support
to confirm the alarms.
NOTE
Procedure
Step 1 Obtain the A800-9010-npu-firmware_<version>.run package. For details, see 2.2
Preparations for Upgrade.
Step 2 Log in to the Atlas 800 training server (model 9010) as the root user.
cd /opt
Step 5 Run the following command to change the permission on the A800-9010-npu-
firmware_<version>.run package:
NOTE
reboot
In the installation directory, run the following command to check whether the
target version is correct:
cat version.info
NOTE
----End
NOTE
Upgrading the driver does not change the username and password of the system.
Procedure
Step 1 Obtain the driver package A800-9010-npu-driver_x.x.x_debian9.9-x86_64.run.
For details, see 2.2 Preparations for Upgrade.
Step 2 Log in to the Atlas 800 training server (model 9010) as the root user.
Step 3 Upload the A800-9010-npu-driver_x.x.x_debian9.9-x86_64.run package to any
directory on the Linux OS, for example, /opt.
Step 4 Go to the directory where the A800-9010-npu-driver_x.x.x_debian9.9-x86_64.run
package is stored, for example, /opt.
cd /opt
Step 5 Run the following command to change the permission on the A800-9010-npu-
driver_x.x.x_debian9.9-x86_64.run package:
chmod u+x A800-9010-npu-driver_x.x.x_debian9.9-x86_64.run
Step 6 Run the ./A800-9010-npu-driver_x.x.x_debian9.9-x86_64.run --check command
to check the consistency and integrity of the .run package.
Step 7 Upgrade the driver.
You can run the ./A800-9010-npu-driver_x.x.x_debian9.9-x86_64.run --upgrade
command to upgrade the driver.
If information similar to the following is displayed, the upgrade is successful:
Driver package install success! Reboot needed for installation/upgrade to take effect!
NOTE
● During the driver upgrade, the dynamic library libdcmi.so and header file
dcmi_interface_api.h are copied to the /usr/local/dcmi/ directory.
● For details about how to resolve problems that may occur during the driver upgrade,
see 3 FAQs.
● During the driver upgrade, the log information about the Ascend 910 driver is generated
in the /var/log/ascend_seclog/ascend_install.log file.
reboot
In the installation directory, run the following command to check whether the
target version is correct:
cat version.info
NOTE
----End
dpkg -i A800-9010-npu-driver_<version>_debian9.9-x86_64.deb
dpkg -i A800-9010-npu-firmware_<version>.deb
dpkg -r ascend910-firmware
dpkg -r ascend910-driver
NOTE
If a software package needs to be reinstalled when you uninstall the firmware and driver,
the software package failed to be installed. In this case, you need to reinstall the software
package to ensure that the installation is successful. If the software package fails to be
installed, rectify the fault by referring to 3.6 How Do I Handle a .deb Package Installation
or Upgrade Failure?.
Querying the Installation Information about the .deb Driver and Firmware
Packages
dpkg -l | grep Ascend
The firmware package has an internal dependency on the driver package because the
firmware upgrade uses the upgrade tool in the driver package.
Installation or Upgrade
Install or upgrade the .deb driver and firmware packages in the local source:
● Install or upgrade the driver and then the firmware:
apt-get install ascend910-driver
apt-get install ascend910-firmware
● Install or upgrade the firmware:
apt-get install ascend910-firmware
NOTE
The firmware depends on the driver. This command installs the driver first and then
the firmware.
If a software package needs to be reinstalled when you uninstall the firmware and
driver, the software package failed to be installed. In this case, you need to reinstall
the software package to ensure that the installation is successful. If the software
package fails to be installed, rectify the fault by referring to 3.6 How Do I Handle
a .deb Package Installation or Upgrade Failure?.
● Uninstall the driver.
apt-get remove ascend910-driver
NOTE
The firmware depends on the driver. This command uninstalls the firmware first and
then the driver.
Re-installation
apt-get --reinstall install ascend910-firmware
apt-get --reinstall install ascend910-driver
Querying the Installation Information about the .deb Driver and Firmware
Packages
apt list ascend* or dpkg -l | grep Ascend
Default Installation
The default user is root. You can run the Installation or Upgrade commands
directly without extra operations.
export ASCEND_INSTALL_FOR_ALL=true
NOTE
If this parameter is included in the installation or upgrade command, all users have the
same permission on the directories and files created by the runfile installation engineer as
the installation group. Make sure the security risks are considered before you include this
parameter.
Before running the installation or upgrade command, set the environment variables.
Step 1 (Optional) During the installation, set any non-root account to use Ascend AI
Processors.
export ASCEND_INSTALL_FOR_ALL=true
NOTE
If this parameter is included in the installation or upgrade command, all users have the
same permission on the directories and files created by the runfile installation engineer as
the installation group. Make sure the security risks are considered before you include this
parameter.
Run the following commands to clear the environment variables related to the installation:
unset ASCEND_USER_NAME
unset ASCEND_USER_GROUP
unset ASCEND_INSTALL_FOR_ALL
----End
3 FAQs
Prerequisites
Run the following command to check whether the software packages, such as
DKMS, GCC, and linux-header, have been installed:
● Ubuntu/Debian:
dpkg-query -s dkms (Run this command to query DKMS only when you want
to use the automatic compilation mode.)
dpkg-query -s gcc
dpkg-query -s linux-headers-$(uname -r)
● CentOS/BC_Linux:
rpm -qa | grep dkms (Run this command to query DKMS only when you
want to use the automatic compilation mode.)
rpm -qa | grep gcc
rpm -qa | grep kernel-*-headers-$(uname -r)
rpm -qa | grep kernel-*-devel-$(uname -r)
NOTE
● For Ubuntu or Debian, you need to install the DKMS, GCC, and linux-header software
packages. If the software packages are not installed, obtain them from the official
websites and install them.
● For CentOS or BC_Linux, you need to install the DKMS, GCC, kernel-*-headers, and
kernel-*-devel software packages. If the software packages are not installed, obtain
them from the official websites and install them.
● You are advised to install the dkms-2.6.1-1.el7.noarch.rpm software package.
Automatic Compilation
During the installation of the .run software package, if the kernel version is
inconsistent with the driver image version in the software package, compilation of
the driver source code is performed automatically before the software package
installation.
For details about how to install the .run software package, see 1.3 Installing the
Driver and Firmware.
Manual Compilation
During the installation, if the kernel version is consistent with that of the Driver
image in the .run package, automatic compilation of the Driver source code will
not be triggered. In the subsequent use, however, if the kernel is updated, you
need to manually execute the script for compiling the Driver source code in the
installation path of the .run software package.
This script compiles the Driver source code and adds the code to the DKMS
framework. After the script is executed, the Driver image linked to the .run
package is automatically updated.
– run_driver_dkms_uninstall.sh
NOTE
This script uninstalls the Driver source code and removes the code from the
DKMS framework. The removal does not affect the installed .run package, but
automatic compilation is no longer supported after the removal.
Solution
Step 1 Manually uninstall the .ko driver.
1. Query the .ko driver list.
lsmod|grep drv
2. Uninstall all the queried .ko drivers. Separate .ko drivers with spaces in the
uninstallation command. For example, to uninstall .ko drivers ko1 and ko2,
run the following command:
rmmodko1 ko2
Step 2 Pack the rootfs.
dracut --force
Step 3 Restart the environment.
reboot
----End
Step 2 Go to the driver installation path and use the upgrade-tool to check the version
of the file system running on the device.
cd /usr/local/Ascend/driver/tools/
./upgrade-tool --device_index -1 --system_version
If the query is successful, the device is started properly and the information similar
to the following is displayed.
----End
Procedure
Step 1 Log in to the operating environment as user root.
Step 2 Save the original .repo file as a backup file.
mv /etc/yum.repo.d/BCLinux-Base.repo /etc/yum.repo.d/BCLinux-
Base.repo.bak
Step 3 On the KVM, mount the OS ISO file.
1. Log in to the remote virtual console.
Press i to edit the file and add the following content to the file:
[base-local]
name=iso
baseurl=file:///mnt
enable=1
gpgcheck=0
After the modification is complete, press Esc to exit editing mode and enter :wq!
to save the modification and exit.
Step 7 Update the Yum source.
yum clean all
yum makecache
Step 8 View the .repo list.
yum repolist
If the following information is displayed, the local source is configured
successfully:
----End
00: e5 19 01 d8 46 05 10 00 20 00 00 12 08 00 80 00
10: 0c 00 00 00 08 28 00 00 04 00 00 c0 00 00 00 00
20: 0c 00 00 00 00 28 00 00 00 00 00 00 00 02 00 01
30: 00 00 00 00 40 00 00 00 00 00 00 00 ff 01 00 00
40: 10 a0 02 00 e2 8f 64 00 3f 21 09 00 04 f9 43 00
50: 08 00 04 01 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 10 00 10 00 00 00 00 00 1e 1e 8f 01
70: 04 00 1f 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 03 a0 00 00 00 00 00 00
a0: 11 b0 ff 83 00 00 01 00 00 40 01 00 00 00 00 00
b0: 01 b8 03 00 08 00 00 00 09 c8 10 01 02 00 00 00
c0: 50 b0 11 00 75 00 00 00 09 dc 14 02 02 00 00 00
d0: 16 b1 11 00 00 75 00 00 16 b1 11 00 09 ec 10 03
e0: 02 00 00 00 00 75 00 00 00 00 00 00 09 00 10 04
f0: 02 00 00 00 00 30 00 00 80 00 00 00 00 00 00 00
NOTE
In the preceding example, the red information in the d0 address indicates that the firmware
version is C75B116.
----End
cat version.info
Version=1.75.T11.0.B116
NOTE
Solution
If the preceding command output indicates that the driver version is inconsistent
with the firmware version, perform the following operations:
Solution
If the .deb package fails to be installed or upgraded, you need to manually delete
the cache information. The procedure is as follows:
Step 1 Delete the configuration file list of the failed package (the ascend910-driver
package is used as an example):
rm /var/lib/dpkg/info/ascend910-driver*
Step 3 Delete the residual files in the directory of the software that fails to be installed.
(The directory in the example is the default installation directory. Replace it with
the actual installation directory.)
rm -rf /usr/local/Ascend/driver
----End
Step 1 Log in to the operating environment as the root user and run the following
command to uninstall the driver. The default installation path /usr/local/Ascend/
driver/ is used as an example.
[root@localhost ~]# /usr/local/Ascend/driver/script/uninstall.sh
Step 2 Run the following hot reset command if the system prompts you to restart the
system for the uninstallation to take effect. Skip this step if a message is displayed
indicating that the uninstallation takes effect immediately.
[root@localhost ~]# reboot
Step 3 Run the following command to delete the ascend_check directory from the root
path:
[root@localhost ~]# rm -rf /root/ascend_check
----End
A Appendixes
A.1 Parameters
Description
One-click installation is supported in the command line. You can select parameters
as required to complete the installation. All parameters are optional.
NOTICE
If the parameters queried by running the ./*.run --help command are not
described in the following table, this parameter is reserved or applies to other chip
versions. You do not need to pay attention to this parameter.
Parameter Description
--run Indicates the running mode, which installs only the files
required in a running scenario.
Parameter Description
--install- Initial installation: You can specify the running user name.
username=<userna Otherwise, HwHiAiUser is used by default.
me> Overwrite: The user name used in the last installation is
adopted.
NOTE
● You are not advised to specify user root for security
considerations.
● The user name and user group cannot be specified during
firmware installation. The user name and user group of the
driver is used.
● This parameter must be used together with --install-
usergroup=<usergroup>, and the value of username must be
the same as that of the created user (1.2.4 Creating a
Running User).
--install- Initial installation: You can specify the running user group
usergroup=<usergr name. Otherwise, HwHiAiUser is used by default.
oup> Overwrite: The user group name used in the last
installation is adopted.
NOTE
This parameter must be used together with --install-
username=<username>, and the value of usergroup must be the
same as that of the created user group created (1.2.4 Creating a
Running User).
--uninstall Uninstalls.
--noexec Does not run the installation script. This parameter is used
together with the --extract=path parameter. Format: --
noexec --extract=path
Parameter Description
--tar arg1 [arg2 ...] Runs the tar command on the software package. Use the
arguments following tar as the command arguments. For
example, the --tar xvf command indicates that the .run
package will be decompressed to the current directory.
Example:
A.2 Scripts
The scripts in Table A-2 are automatically called to install, uninstall, and update
the .run software package. The script storage path is subject to the path specified
during the installation. The following uses the default path /usr/local/Ascend as
an example.
A.3 Tools
The following describes how to run the tools described in Table A-3.
Step 1 Log in to the host server as the running user (HwHiAiUser by default) specified
during runfile installation.
Step 2 Go to the tool directory, for example, /usr/local/Ascend/driver/tools. The
command format is: cd /usr/local/Ascend/driver/tools.
Step 3 Run the commands in Table A-3 to call the tools. The following uses the default
installation path of the driver as an example.
----End