1e41f4b71Sopenharmony_ci# Burning an Image
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ciThe following exemplifies how to burn an image to Hi3516DV300 using HiTool. You can also do so using DevEco Device Tool, by following instructions in [Burning an Image](quickstart-appendix-hi3516-ide.md#burning-an-image).
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ci## **Prerequisites**
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci- The source code of the development board has been compiled into files for burning.
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci- [HiTool](http://www.hihope.org/download/download.aspx) has been installed on the client platform (for example, a Windows-based computer).
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci- The USB port driver has been installed on the client platform. For details, see [Installing the USB Port Driver on the Hi3516D V300 Development Board](https://device.harmonyos.com/en/docs/documentation/guide/usb_driver-0000001058690393).
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci- A serial port terminal tool, such as IPOP, has been installed on the client platform.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci- The client platform and development board are connected using a USB cable and serial cable.
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci## Procedure
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci1. Prepare the files to be burnt.
23e41f4b71Sopenharmony_ci   1. On the client platform, create a folder for storing the files to be burnt, for example, **D:\liteos** or **D:\linux**.
24e41f4b71Sopenharmony_ci   2. Save the burning configuration file and boot file to the new folder.
25e41f4b71Sopenharmony_ci       - For the small system with the LiteOS kernel, the burning configuration file is **L1_3516_liteos.xml**, and the boot file is **[u-boot-hi3516dv300.bin](https://gitee.com/openharmony/device_board_hisilicon/tree/master/hispark_taurus/uboot/out/boot)**.
26e41f4b71Sopenharmony_ci          You need to prepare the **L1_3516_liteos.xml** file on your own by applying the template below:
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci          
29e41f4b71Sopenharmony_ci          ```
30e41f4b71Sopenharmony_ci          <?xml version="1.0" encoding="GB2312" ?>
31e41f4b71Sopenharmony_ci          <Partition_Info ProgrammerFile="">
32e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="fastboot" FlashType="emmc" FileSystem="none" Start="0" Length="1M" SelectFile="D:\liteos\u-boot-hi3516dv300.bin"/>
33e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="" FlashType="emmc" FileSystem="none" Start="1M" Length="9M" SelectFile="D:\liteos\OHOS_Image.bin"/>
34e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="" FlashType="emmc" FileSystem="none" Start="10M" Length="50M" SelectFile="D:\liteos\rootfs_vfat.img"/>
35e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="" FlashType="emmc" FileSystem="none" Start="60M" Length="50M" SelectFile="D:\liteos\userfs_vfat.img"/>
36e41f4b71Sopenharmony_ci          </Partition_Info>
37e41f4b71Sopenharmony_ci          ```
38e41f4b71Sopenharmony_ci       - For the small system with the Linux kernel, the burning configuration file is **L1_3516_linux.xml**, and the boot file is **[u-boot-hi3516dv300.bin](https://gitee.com/openharmony/device_board_hisilicon/tree/master/hispark_taurus/uboot/out/boot)**.
39e41f4b71Sopenharmony_ci          You need to prepare the **L1_3516_linux.xml** file on your own by applying the template below:
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ci          
42e41f4b71Sopenharmony_ci          ```
43e41f4b71Sopenharmony_ci          <?xml version="1.0" encoding="GB2312" ?>
44e41f4b71Sopenharmony_ci          <Partition_Info ProgrammerFile="">
45e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="fastboot" FlashType="emmc" FileSystem="none" Start="0" Length="1M" SelectFile="D:\linux\u-boot-hi3516dv300.bin"/>
46e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="ohos_image" FlashType="emmc" FileSystem="none" Start="1M" Length="9M" SelectFile="D:\linux\uImage_hi3516dv300_smp"/>
47e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="rootfs" FlashType="emmc" FileSystem="ext3/4" Start="10M" Length="50M" SelectFile="D:\linux\rootfs_ext4.img"/>
48e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="userfs" FlashType="emmc" FileSystem="ext3/4" Start="60M" Length="50M" SelectFile="D:\linux\userfs_ext4.img"/>
49e41f4b71Sopenharmony_ci          <Part Sel="1" PartitionName="userdata" FlashType="emmc" FileSystem="ext3/4" Start="110M" Length="1024M" SelectFile="D:\linux\userdata_ext4.img"/>
50e41f4b71Sopenharmony_ci          </Partition_Info>
51e41f4b71Sopenharmony_ci          ```
52e41f4b71Sopenharmony_ci   3. Download the compiled source package to the client platform, decompress the package, and copy the files required for burning to the folder created in step 1.
53e41f4b71Sopenharmony_ci      
54e41f4b71Sopenharmony_ci      For the Hi3516 development board, the files required for burning of the mini system are as follows:
55e41f4b71Sopenharmony_ci
56e41f4b71Sopenharmony_ci       - Small system with the LiteOS kernel: **OHOS_Image.bin**, **rootfs_vfat.img**, and **userfs_vfat.img**
57e41f4b71Sopenharmony_ci       - Small system with the Linux kernel: **uImage_hi3516dv300_smp**, **rootfs_ext4.img**, **userfs_ext4.img**, and **userdata_ext4.img**
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ci2. Burn the image files using HiTool.
60e41f4b71Sopenharmony_ci   1. Open HiTool.
61e41f4b71Sopenharmony_ci   2. Set up HiTool.
62e41f4b71Sopenharmony_ci      
63e41f4b71Sopenharmony_ci      Set the transfer mode to USB and burning mode to eMMC (the storage medium of the development board is eMMC).
64e41f4b71Sopenharmony_ci   3. Click **Browse** and select the burning configuration file (for example, **L1_3516_linux.xml**) from the folder created in step 1.
65e41f4b71Sopenharmony_ci      
66e41f4b71Sopenharmony_ci       ![en-us_image_0000001249937195](figures/en-us_image_0000001249937195.png)
67e41f4b71Sopenharmony_ci   4. After clicking the **Burn** button, press and hold the **Update** key next to the serial port on the development board, and remove and insert the USB cable.
68e41f4b71Sopenharmony_ci      
69e41f4b71Sopenharmony_ci      After the burning starts, logs are displayed in the console area at the bottom of HiTool.
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci      When the burning is complete, HiTool displays a dialog box indicating that the burning is successful.
72e41f4b71Sopenharmony_ci   5. Click **OK**.
73e41f4b71Sopenharmony_ci
74e41f4b71Sopenharmony_ci3. Import startup parameters.
75e41f4b71Sopenharmony_ci   1. Use the terminal tool to enable the serial port.
76e41f4b71Sopenharmony_ci   2. Restart the development board by removing and inserting its power supply. Press **Enter** in the serial port terminal tool within 3 seconds.
77e41f4b71Sopenharmony_ci      
78e41f4b71Sopenharmony_ci      If **hisilicon \#** is displayed on the terminal tool page, the serial port of the development board is connected.
79e41f4b71Sopenharmony_ci   3. Copy the following startup parameters in the serial port terminal tool and press **Enter** to complete the setup.
80e41f4b71Sopenharmony_ci       - Startup parameters corresponding to the small system with the LiteOS kernel:
81e41f4b71Sopenharmony_ci         
82e41f4b71Sopenharmony_ci          ```
83e41f4b71Sopenharmony_ci          setenv bootcmd "mmc read 0x0 0x80000000 0x800 0x4800;go 0x80000000";
84e41f4b71Sopenharmony_ci          setenv bootargs "console=ttyAMA0,115200n8 root=emmc fstype=vfat rootaddr=10M rootsize=50M rw";
85e41f4b71Sopenharmony_ci          saveenv
86e41f4b71Sopenharmony_ci          sa;reset
87e41f4b71Sopenharmony_ci          ```
88e41f4b71Sopenharmony_ci       - Startup parameters corresponding to small system with the Linux kernel:
89e41f4b71Sopenharmony_ci         
90e41f4b71Sopenharmony_ci          ```
91e41f4b71Sopenharmony_ci          setenv bootargs "mem=128M console=ttyAMA0,115200 root=/dev/mmcblk0p3 rw rootfstype=ext4 rootwait blkdevparts=mmcblk0:1M(boot),9M(kernel),50M(rootfs),50M(userfs),1024M(userdata)"
92e41f4b71Sopenharmony_ci          setenv bootcmd "mmc read 0x0 0x82000000 0x800 0x4800; mw 0x10FF0044 0x0600;mw 0x120D2010 0x00000000;mw 0x120D2400 0x000000ff;mw 0x120D2010 0x00000000; bootm 0x82000000"
93e41f4b71Sopenharmony_ci          saveenv;
94e41f4b71Sopenharmony_ci          reset
95e41f4b71Sopenharmony_ci          ```
96