Compilation and Installation Guide (Robox Container)
Total Page:16
File Type:pdf, Size:1020Kb
Kunpeng BoostKit for ARM Native Compilation and Installation Guide (Robox Container) Issue 11 Date 2021-07-05 HUAWEI TECHNOLOGIES CO., LTD. Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd. Trademarks and Permissions 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. Issue 11 (2021-07-05) Copyright © Huawei Technologies Co., Ltd. i Kunpeng BoostKit for ARM Native Compilation and Installation Guide (Robox Container) Contents Contents 1 Robox Android Container Security Description................................................................1 1.1 Overview................................................................................................................................................................................... 1 1.2 Security Description................................................................................................................................................................ 1 1.2.1 Ubuntu Security Update.................................................................................................................................................... 1 1.2.2 Docker Security Hardening...............................................................................................................................................2 1.2.3 Android Security Update................................................................................................................................................... 2 2 Robox Android Container Compilation Guide (Kunpeng 920)..................................... 3 2.1 Introduction............................................................................................................................................................................... 3 2.2 Environment Requirements................................................................................................................................................. 4 2.3 Configuring the Compilation Environment.................................................................................................................... 4 2.3.1 Configuring the System..................................................................................................................................................... 5 2.3.2 Installing Dependency Libraries and Basic Components........................................................................................6 2.3.3 Replacing the Docker Storage Driver............................................................................................................................6 2.3.4 Installing a Remote Desktop............................................................................................................................................7 2.4 Compiling the Kernel Source Code on the Server That Uses Huawei Kunpeng 920 Processors................. 7 2.5 Starting the Android System in Robox Containers.................................................................................................... 14 2.6 Building the strace Binary File..........................................................................................................................................15 2.7 Enabling Multiple GPUs......................................................................................................................................................17 3 Android Image Compilation Guide (x86-based Environment)...................................19 3.1 Introduction............................................................................................................................................................................ 19 3.2 Environment Requirements............................................................................................................................................... 19 3.3 Preparing the x86 Basic Compilation Environment.................................................................................................. 20 3.4 Downloading the Source Code and Applying Patches.............................................................................................21 3.5 Compiling the Android Source Code.............................................................................................................................. 22 A Change History...................................................................................................................... 23 Issue 11 (2021-07-05) Copyright © Huawei Technologies Co., Ltd. ii Kunpeng BoostKit for ARM Native Compilation and Installation Guide (Robox Container) 1 Robox Android Container Security Description 1 Robox Android Container Security Description 1.1 Overview 1.2 Security Description 1.1 Overview The Robox container solution is a virtualization solution that enables the Android OS using the Docker container. This document describes the security specifications of the robox container solution. Read this document carefully. 1.2 Security Description In the Robox container solution, Huawei provides self-developed binary files, targeted open-source patch files, and script files. The targeted open-source patch files and script files are for reference only, and no commercial commitments are made. In addition, customers or independent software vendors (ISVs) are responsible for the development and maintenance of other components involved in the solution, such as the OS on the host side, Docker, and Android OS. To ensure the trusted and secure running of the ARM native solution in commercial scenarios, it is strongly recommended that customers or ISVs install and use the latest security patches and security hardening measures for the open- source software involved in the solution, including but not limited to the following suggestions. 1.2.1 Ubuntu Security Update When using Ubuntu, ensure that the latest security updates are used in a timely manner. Using the latest security updates to repair the system in a timely manner can prevent the OS from being affected by vulnerabilities and attacked by malicious software, and ensure the proper running of the Robox Android container on the system. Issue 11 (2021-07-05) Copyright © Huawei Technologies Co., Ltd. 1 Kunpeng BoostKit for ARM Native Compilation and Installation Guide (Robox Container) 1 Robox Android Container Security Description You can periodically run the apt-get command in Ubuntu to check whether security updates are available in the OS. If yes, install the updates in a timely manner. For details, see the description on the official website of Ubuntu. In addition to installing the latest security patches in a timely manner, you also need to perform security hardening on the OS of the server, for example, configuring strong passwords and disabling unnecessary service ports. For details, see the description on the official website of Ubuntu. 1.2.2 Docker Security Hardening Docker security hardening measures include but not limited to: hardening the OS of the host, configuring strict access control policies, controlling the Docker container resource quota, prohibiting untrusted images, periodically performing security scanning, and updating patches. Periodically perform security check and hardening for Docker containers to ensure proper running. For details, see the description on the official website of Docker containers. 1.2.3 Android Security Update The Android ecosystem is supported by Google, which not only provides system updates with improved functionality and stability, but also provides users with security updates that ensure device security. Security update patches are mainly provided by the Android Open Source Project (AOSP) and the upstream Linux kernel and system on a chip (SOC) manufacturers to ensure that Android devices are not affected by the latest security vulnerabilities of hardware and software. Google periodically pushes security updates to devices and releases security update notices. Use the source code provided by the AOSP and the patch link provided in the security update notice to perform security update in a timely manner based on the site requirements to ensure the proper running of the ARM native solution. Periodically update and harden the open-source software involved in the solution. For details, see the official documents of the open-source software. Issue 11 (2021-07-05) Copyright © Huawei Technologies Co., Ltd. 2 Kunpeng BoostKit for ARM Native Compilation and Installation Guide (Robox 2 Robox Android Container Compilation