8,367
edits
Changes
→How to burn a Linux image to eMMC using the dd command
=== How to burn a Linux image to eMMC using the dd command ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that by Linux images, I specifically mean images of Linux distributions such as Debian, Ubuntu, or OPi OS Arch downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-CM4-1.html Orange Pi's data download page].'''</big>|}
<ol style="list-style-type: decimal;">
<li><p>Using dd command to burn Linux image to eMMC needs TF card to complete, so first need to burn Linux image to TF card, and then use TF card to start the development board into the Linux system. For the method of burning a Linux image to a TF card, see the two sections for '''[[\lOrange Pi CM4#Method of burning Linux image to TF card based on Windows PC|the method of burning a Linux image to a TF Card based on a Windows PC]]''' and [[\lOrange Pi CM4#Method of burning Linux image to TF card based on Ubuntu PC|'''the method of burning a Linux image to a TF card based on an Ubuntu PC''']].</p></li><li><p>After starting the Linux system with the TF card, we first upload the decompressed Linux image file (Debian, Ubuntu image or OPi OS (Arch) image downloaded from the official website) to the TF card. For details about how to upload a Linux image file to the development board, see section [[\lOrange Pi CM4#Method of uploading files to the development board Linux system|'''Uploading Files to the Linux system on the Development Board''']].</p></li>
<li><p>After uploading the image to the Linux system of the development board, we can enter the storage path of the image file in the command line of the Linux system of the development board. For example, I saved the Linux image of the development board in the directory '''/home/orangepi/Desktop'''. Then go to the '''/home/orangepi/Desktop''' directory and you will see the uploaded image file.</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''</p>
<p>orangepi@orangepi:~/Desktop$ '''ls'''</p>
<p>Orangepicm4_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img</p>
|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''How to enter the development board Linux system command line?'''</p><p>'''1. For details about how to log in to the terminal through the serial port, see section [[\lOrange Pi CM4#How to use the debugging serial port|Debugging Serial Port]].'''</p><p>'''2. For details about how to remotely log in to the Linux operating system over ssh, see section "[[\lOrange Pi CM4#SSH remote login development board|Logging In to the Development Board over SSH]]".'''</p><p>'''3. If you are connected to a display screen such as HDMI or LCD, you can open a command line terminal on the desktop.'''</p></big>|}</li>
<li><p>Next, we first use the following command to identify the eMMC device node</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~/Desktop$ '''ls /dev/mmcblk*boot0 | cut -c1-12'''</p>
<p>'''<span style="color:#FF0000">/dev/mmcblk0</span>'''</p>|}</li>
<li><p>Then we can use the dd command to clear eMMC, pay attention to the '''of=''' parameter after please fill in the output result of the above command</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~/Desktop$ '''sudo dd bs=1M if=/dev/zero of=<span style="color:#FF0000">/dev/mmcblk0 </span> count=1000 status=progress'''</p><p>orangepi@orangepi:~/Desktop$ '''sudo sync'''</p>|}</li>
<li><p>You can then use the dd command to burn the Linux image of the development board into eMMC</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''if''' = parameter in the command is to fill in behind the Linux + Linux mirror mirror to store the full path name (such as'''<span class="mark">/home/orangepi/Desktop/Linux image name</span>'''). Since we have entered the path of the Linux image above, we only need to fill in the name of the Linux image.</p></li>
<li><p>Do not copy the Linux image name in the following command. Replace it with the actual image name (because the version of the image may be updated).</p>
{| class="wikitable" style="width:800px;" |-| <p>'''sudo dd bs=1M if=Orangepicm4_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img of=<span style="color:#FF0000">/dev/mmcblk0 </span> status=progress'''</p>
<p>'''sudo''' '''sync'''</p>
|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''<span style="color:#FF0000">Note that if you are uploading a.7z or.xz Linux image file, please decompress it before using the dd command to burn it.</span>'''</p><p>'''A detailed description of all the parameters of the dd command and more usage can be seen by running the man dd command on Linux.'''</p></big>|}</li></ol>
</li>
<li><p>After successfully burning the Linux image of the development board to eMMC, you can use the poweroff command to shut down. Then pull out the TF card, power it on again, and the Linux system in eMMC will be started.</p></li></ol>
<span id="method-of-burning-linux-image-to-spiflashnvme-ssd"></span>
== Method of burning Linux image to SPIFlash+NVMe SSD ==