File Burning
Prerequisites
- One Linux (Ubuntu 16.04 is recommended) server or virtual machine (VM) with network ports is available.
The Linux server or VM has qemu-user-static, binfmt-support, YAML, and cross compiler installed.
- The UART1 TX port and the UART1 RX port on the Atlas 200 AI accelerator module are directly connected, and the Linux server is connected to the Atlas 200 AI accelerator module using a network cable. The Atlas 200 AI accelerator module is powered on and started.
- eMMC card making is supported only when the file system version in the flash memory of the Atlas 200 AI accelerator module is 1.3.x.x.B893 or later, or 1.32.x.x.Do as follows to check the version of the file system:
- If you can access the OS by using a USB card reader, perform the following operations:
- Run the following command to switch to the driver directory:
cd /var/davinci/driver/
- Run the following command to obtain the version information about the file system in the flash memory:
./upgrade-tool --device_index -1 --component rootfs --version
- Run the following command to switch to the driver directory:
- If the file system version information in the flash memory cannot be obtained, try to make a card by burning a file. If the card fails to be made, contact Huawei technical support.
- If you can access the OS by using a USB card reader, perform the following operations:
Procedure
- Use WinSCP to upload the sd_tools.rar image tool package to a directory (for example, /home/ascend/mksd) in the Linux system. For details, see Using WinSCP to Transfer Files.
- Run the following command to switch to the root user:
su root
- Run the following command to go to the directory to which the sd_tools.rar image tool package is uploaded:
Command: cd Directory in which sd_tools.rar is stored
Example: cd /home/ascend/mksd
- Decompress the sd_tools.rar package and go to the sd_tools directory.
unrar x sd_tools.rar
cd sd_tools
- Use WinSCP to upload the mini_developerkit.rar and ubuntu-xxx-server-arm64.iso packages to the sd_tools directory, for example /home/ascend/mksd/sd_tools, on the Linux server. For details, see Using WinSCP to Transfer Files.
- xxx indicates the version number.
- The Ubuntu Linux version must be 16.04.3. Download the ubuntu-xxx-server-arm64.iso package of the required version from http://old-releases.ubuntu.com/releases/16.04.3/.
- The versions of the software packages in the directory must be the same.
- (Optional) Change the default IP addresses for the network cable connection mode and USB connection mode (NETWORK_CARD_DEFAULT_IP and USB_CARD_DEFAULT_IP) in the make_sd_card.py script.
The default IP address is 192.168.1.2 for USB connection and 192.168.0.2 for network cable connection.
- Run the following command to check whether the Atlas 200 AI accelerator module is reachable:
ping 192.168.0.2
The Atlas 200 AI accelerator module is reachable if the following information is displayed:
root@hi19110:/home/ascend/mksd/sd_tools# ping 192.168.0.2 PING 192.168.0.2 (192.168.0.2) 56 (84) bytes of data. 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.101 ms 64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=0.097 ms 64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=0.096 ms 64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=0.101 ms
- Run the make_sd_card.py script to make the SD/EMMC card.
python3 make_sd_card.py recover
If the following information is displayed, the SD card is being created:
root@ubuntu:/home/ascend/mksd# python3 make_sd_card.py local /dev/sdb Begin to make SD Card... Please make sure you have installed dependency packages: apt-get install -y qemu-user-static binfmt-support gcc-aarch64-linux-gnu g++-aarch64-linux-gnu Please input Y: continue, other to install them:Y
- Enter Y.
The SD card is created successfully if the following information is displayed:
Step: Start to make SD Card. It takes some time and please wait... Make SD Card successfully!
- (Optional) Create cards in batches.
Ensure that the model and specifications of the copied card are the same as those of the parent card.
- Method of making SD cards in batches:
- Method 1: Remove an SD card from the card reader and use a card duplicator for SD card copying.
- Method 2: Run the dd command to export the image from an SD card where the OS is created, and then burn the image to SD cards in batches.
- Run the following command to export the image. For details, see the usage of the Linux dd command.
Command: dd if=Parent drive letter of=Exported image name
Example: dd if=/dev/sda of=/root/tmp/sd.image
- Run the following command to burn the image to child cards:
Command dd if=Image name of=Child card drive letter
Example: dd if=/root/tmp/sd.image of=/dev/sdb
- Run the following command to export the image. For details, see the usage of the Linux dd command.
- Method of making eMMC cards in batches:
Copy the eMMC flash by using a burner. For details, see the method provided by the burner vendor.
- Method of making SD cards in batches:
- Disconnect UART1 TX and UART1 RX of the Atlas 200 AI accelerator module, power off the device, and then power it on.
- Log in to the OS of the Atlas 200 AI accelerator module. For details, see Logging In Over a Network Port by Using PuTTY.