LTS

    Innovation Version

      Installation and Running

      This chapter describes how to obtain a pre-built image and how to run an image.

      Obtaining the Image

      The released pre-built images support only the ARM and AArch64 architectures, and are compatible only with the ARM virt-4.0 platform of QEMU. You can obtain the images through the following links:

      • qemu_arm for ARM Cortex A15 processor of 32-bit ARM architecture.
      • qemu_aarch64 for ARM Cortex A57 processor of 64-bit AArch64 architecture.

      You can deploy an openEuler Embedded image on a physical bare-metal server, cloud server, container, or VM as long as the environment supports QEMU emulator version 5.0 or later.

      Image Content

      The downloaded image consists of the following parts:

      • Kernel image zImage, which is built based on Linux 5.10 of the openEuler community. You can obtain the kernel configurations through the following links:

      • Root file system image:

        • openeuler-image-qemu-xxx.cpio.gz, which is the image of the standard root file system. It has received necessary security hardening and includes various software packages, such as audit, cracklib, OpenSSH, Linux PAM, shadow and software packages supported by iSula.
      • Software Development Kit (SDK)

        • openeuler-glibc-x86_64-xxxxx.sh: The self-extracting installation package of openEuler Embedded SDK. The SDK contains tools, libraries, and header files for developing user mode applications and kernel modules.

      Running the Image

      You can run the image to experience the functions of openEuler Embedded, and develop basic embedded Linux applications.

      Precautions

      • You are advised to use QEMU 5.0 or later to run the image. Some additional functions (the network and shared file system) depend on the virtio-net and virtio-fs features of QEMU. If these features are not enabled in QEMU, errors may occur during image running. In this case, you may need to recompile QEMU from the source code.

      • When running the image, you are advised to place the kernel image and root file system image in the same directory.

      Download and install QEMU by referring to the QEMU official website, or download and build from source. Use the following command to verify the installation:

      qemu-system-aarch64 --version
      

      Simplified Running Scenario

      In this scenario, the network and shared file system are not enabled in QEMU. You can use this scenario to experience the functions.

      1. Start QEMU.

        For ARM architecture (ARM Cortex A15), run the following command:

        qemu-system-arm -M virt-4.0 -m 1G -cpu cortex-a15 -nographic -kernel zImage -initrd <openeuler-image-qemu-xxx.cpio.gz>
        

        For AArch64 architecture (ARM Cortex A57), run the following command:

        qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd <openeuler-image-qemu-xxx.cpio.gz>
        

        Note:

      The standard root file system image is securely hardened and requires you to set a password for the root user during the first startup. The password strength has the follow requirements:

      1. Must contain at least eight characters.

      2. Including digits, letters, and special characters.

        @#$%^&*+|\=~`!?,.:;-_'"(){}[]/><

        For example, openEuler@2021.

      3. Check whether QEMU is started successfully.

        The shell of openEuler Embedded will be displayed after QEMU is successfully started and logged in.

      Shared File System Enabled Scenario

      Shared file system allows the host machine of QEMU emulator to share files with openEuler Embedded. In this way, programs that are cross-compiled on the host machine can run on openEuler Embedded after being copied to the shared directory.

      Assume that the /tmp directory of the host machine is used as the shared directory, and a hello_openeuler.txt file is created in the directory in advance. To enable the shared file system function, perform the following steps:

      1. Start QEMU.

        For ARM architecture (ARM Cortex A15), run the following command:

        qemu-system-arm -M virt-4.0 -m 1G -cpu cortex-a15 -nographic -kernel zImage -initrd <openeuler-image-qemu-xxx.cpio.gz>  -device virtio-9p-device,fsdev=fs1,mount_tag=host -fsdev local,security_model=passthrough,id=fs1,path=/tmp
        

        For AArch64 architecture (ARM Cortex A57), run the following command:

        qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd <openeuler-image-qemu-xxx.cpio.gz> -device virtio-9p-device,fsdev=fs1,mount_tag=host -fsdev local,security_model=passthrough,id=fs1,path=/tmp
        
      2. Mount the file system.

        After you start and log in to openEuler Embedded, run the following commands to mount the shared file system:

        cd /tmp
        mkdir host
        mount -t 9p -o trans=virtio,version=9p2000.L host /tmp/host
        

        That is, mount the 9p file system to the /tmp/host directory of openEuler Embedded to implement sharing mapping.

      3. Check whether the file system is shared successfully.

        In openEuler Embedded, run the following commands:

        cd /tmp/host
        ls
        

        If hello_openeuler.txt is discovered, the file system is shared successfully.

      Network Enabled Scenario

      The virtio-net of QEMU and the virtual NIC of the host machine allow for the network communication between the host machine and openEuler Embedded. In addition to sharing files using virtio-fs, you can transfer files between the host machine and openEuler Embedded using the network, for example, the scp command.

      1. Start QEMU.

        For ARM architecture (ARM Cortex A15), run the following command:

        qemu-system-arm -M virt-4.0 -m 1G -cpu cortex-a15 -nographic -kernel zImage -initrd <openeuler-image-qemu-xxx.cpio.gz> -device virtio-net-device,netdev=tap0 -netdev tap,id=tap0,script=/etc/qemu-ifup
        

        For AArch64 architecture (ARM Cortex A57), run the following command:

        qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd <openeuler-image-qemu-xxx.cpio.gz> -device virtio-net-device,netdev=tap0 -netdev tap,id=tap0,script=/etc/qemu-ifup
        
      2. Create a vNIC on the host machine.

        You can create a /qemu-ifup script in the /etc directory and run the script to create a tap0 vNIC on the host machine. The script details are as follows:

        #!/bin/bash
        ifconfig $1 192.168.10.1 up
        

        root permissions are required for running the script.

        chmod a+x qemu-ifup
        

        Use the qemu-ifup script to create a tap0 vNIC on the host machine. The IP address of the vNIC is 192.168.10.1.

      3. Configure the NIC of openEuler Embedded.

        Log in to openEuler Embedded and run the following command:

        ifconfig eth0 192.168.10.2
        
      4. Check whether the network connection is normal.

        In openEuler Embedded, run the following command:

        ping 192.168.10.1
        

        If the IP address can be pinged, the network connection between the host machine and openEuler Embedded is normal.

        Note:

        If you need openEuler Embedded to access the Internet through the host machine, create a bridge on the host machine. For details, see the related documents.

      Bug Catching

      Buggy Content

      Bug Description

      Submit As Issue

      It's a little complicated....

      I'd like to ask someone.

      PR

      Just a small problem.

      I can fix it online!

      Bug Type
      Specifications and Common Mistakes

      ● Misspellings or punctuation mistakes;

      ● Incorrect links, empty cells, or wrong formats;

      ● Chinese characters in English context;

      ● Minor inconsistencies between the UI and descriptions;

      ● Low writing fluency that does not affect understanding;

      ● Incorrect version numbers, including software package names and version numbers on the UI.

      Usability

      ● Incorrect or missing key steps;

      ● Missing prerequisites or precautions;

      ● Ambiguous figures, tables, or texts;

      ● Unclear logic, such as missing classifications, items, and steps.

      Correctness

      ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

      ● Incorrect schematic or architecture diagrams;

      ● Incorrect commands or command parameters;

      ● Incorrect code;

      ● Commands inconsistent with the functions;

      ● Wrong screenshots.

      Risk Warnings

      ● Lack of risk warnings for operations that may damage the system or important data.

      Content Compliance

      ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

      ● Copyright infringement.

      How satisfied are you with this document

      Not satisfied at all
      Very satisfied
      Submit
      Click to create an issue. An issue template will be automatically generated based on your feedback.
      Bug Catching
      编组 3备份