CN113656143A - Method and system for realizing direct display card of android container - Google Patents
Method and system for realizing direct display card of android container Download PDFInfo
- Publication number
- CN113656143A CN113656143A CN202110938194.XA CN202110938194A CN113656143A CN 113656143 A CN113656143 A CN 113656143A CN 202110938194 A CN202110938194 A CN 202110938194A CN 113656143 A CN113656143 A CN 113656143A
- Authority
- CN
- China
- Prior art keywords
- container
- display card
- android
- card
- physical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a method and a system for realizing a direct display card of an android container, which comprise the following steps: a physical hardware system, a host system, a container, and an android system; the physical hardware system comprises a display card and provides a hardware platform for the whole system; the host system provides an underlying system; the container runs in the host system and provides a virtualization engine; the android system runs in the container; and the container directly loads an application layer driver of the display card and directly calls the display card of the physical hardware system. By modifying the application layer driver loaded in the container; mapping the display card equipment of the physical hardware system to a container; and compiling the display card kernel driver into the kernel of the host system. According to the invention, the host physical display card mali equipment is directly communicated to the docker container for use, so that IO paths of interface rendering of the docker container are reduced, response delay is reduced, an APP in the container can call the hardware display card in a mode of original performance, and the interface rendering performance of the container is improved.
Description
Technical Field
The invention relates to the technical field of virtual machines, in particular to a method and a system for realizing a direct display card of an android container.
Background
The container technology is one of virtualization technologies, and means that a user can create a plurality of simulation environments or dedicated resources on the basis of a single physical hardware system, so that one system can be divided into a plurality of different, independent and safe environments, and the utilization rate of hardware can be provided through a virtualization mode to achieve the purpose of hardware reuse. Compared with a heavy simulation mode of kvm, the virtual machine running in the container mode can share the system kernel and part of peripheral equipment, so that the calculation amount of the simulation kernel and the peripheral equipment is reduced, and the performance is improved.
Device pass-through, generally speaking, hardware devices in a virtual machine are simulated through hypervisor, which means that all IO operations need to be subjected to conversion processing, which lengthens IO paths of the devices and thus generates larger delay, and on the other hand, hardware performance is simulated in a software manner far inferior to that of real hardware. One solution is to pass the hardware devices in the physical machine directly to the virtual machine, so that the virtual machine can access the physical devices in the same manner as accessing the hardware devices.
Android container, with complete android system operation in the container, the virtualized engine of use is docker, through the mode of container, can make originally can only operate the ARM integrated circuit board of single system and can operate three, more android system even simultaneously.
In the prior art, in a virtual machine, an android framework layer dynamically unloads EGLs and GLES dynamic link libraries, so as to provide the EGLs and GLES dynamic link libraries for APP use, the dynamic link libraries are modified libraries, functions in the libraries do not directly call a video card device and a display device on a bottom layer, but send an operation instruction to a Qemu PIPE, a service is run at a host end to receive a request from the android virtual machine, then the request is converted into a real hardware call, and then a calculation result is returned to the virtual machine through the PIPE.
Disadvantages of the prior art
1) The processing mode lengthens IO paths, and multiple data conversion and data transmission are needed from the front-end request to the real physical processing, so that the delay is high;
2) in practical applications, page rendering often requires image resources with large occupied space, and the resources are transmitted between a physical machine and a virtual machine, which results in a large amount of memory copies.
Therefore, the prior art has drawbacks and needs further improvement.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for realizing a direct display card of an android container.
In order to achieve the purpose, the invention adopts the following specific scheme:
the invention provides a system for realizing a direct display card of an android container, which comprises: a physical hardware system, a host system, a container, and an android system; the physical hardware system comprises a display card and provides a hardware platform for the whole system; the host system provides an underlying system; the container runs in the host system and provides a virtualization engine;
the android system runs in the container; and the container directly loads an application layer driver of the display card and directly calls the display card of the physical hardware system.
Preferably, the display card is a mali display card.
Preferably, after the container loads the application layer driver of the graphics card, the hardware resource of the graphics card is directly called through an IO port.
Preferably, the container is docker.
Preferably, the physical hardware system is an ARM board card.
Based on the system, the invention also provides a method for realizing the android container direct display card, which comprises the following steps,
s1, modifying the application layer driver loaded in the container;
s2, compiling the display card kernel driver into the host system kernel;
and S3, mapping the graphics card of the physical hardware system to the container so that the container directly calls the hardware resource of the graphics card.
Preferably, the step S1 specifically includes the following steps:
s11, modifying the EGL and GLES codes loaded in the container, and changing the original drive simulated by the loading software into the application layer drive program provided by the mali display card manufacturer;
s12, the Gralloc library and the Composer library on which the application layer driver depends also need to be synchronously replaced with the library file provided by the vendor and matching with the driver.
Preferably, the step S2 specifically includes the following steps:
s21, acquiring a mali display card drive source code, and acquiring a drive source code consistent with the version of the physical display card through a mali official website; and S22, installing a kernel calling interface according to the hardware version of the display card of the current physical hardware system, and compiling the display card kernel driver into the kernel of the host system, so that the physical display card can be normally called in the kernel.
Preferably, the step S3 specifically includes the following steps:
the file/dev/mali 0 of the physical hardware system graphics card is directly mapped to the container through the parameter configuration of the container (docker), so that the container can access the hardware device like a real physical environment.
By adopting the technical scheme of the invention, the invention has the following beneficial effects:
the invention provides a method and a system for realizing a direct display card of an android container, which comprise the following steps: a physical hardware system, a host system, a container, and an android system; the physical hardware system comprises a display card and provides a hardware platform for the whole system; the host system provides an underlying system; the container runs in the host system and provides a virtualization engine; the android system runs in the container; and the container directly loads an application layer driver of the display card and directly calls the display card of the physical hardware system. By modifying the application layer driver loaded in the container; mapping a graphics card of the physical hardware system to a container; and compiling the display card kernel driver into the kernel of the host system. According to the invention, the host physical display card mali equipment is directly communicated to the docker container for use, so that IO paths of interface rendering of the docker container are reduced, response delay is reduced, an APP in the container can call the hardware display card in a mode of original performance, and the interface rendering performance of the container is improved.
Drawings
FIG. 1 is a system architecture diagram of an embodiment of the present invention;
FIG. 2 is an overall flow diagram of an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the following figures and specific examples.
The invention is explained in detail in connection with figures 1-2,
the invention provides a system for realizing a direct display card of an android container, which comprises: a physical hardware system, a host system, a container, and an android system; the physical hardware system comprises a display card and provides a hardware platform for the whole system; the host system provides an underlying system; the container runs in the host system and provides a virtualization engine; the android system runs in the container; and the container directly loads an application layer driver of the display card and directly calls the display card of the physical hardware system.
The display card is a mali display card. And after the container loads the display card application layer driver, the display card hardware resource is directly called through an IO port. The container is docker. The physical hardware system is an ARM board card.
Based on the system, the invention also provides a method for realizing the android container direct display card, which comprises the following steps,
s1, modifying the application layer driver loaded in the container;
s2, mapping the graphics card of the physical hardware system to a container;
and S3, compiling the display card kernel driver into the host system kernel so that the container can directly call the hardware resource of the display card.
The step S1 specifically includes the following steps:
s11, modifying the EGL and GLES codes loaded in the container, and changing the original drive simulated by the loading software into the application layer drive program provided by the mali display card manufacturer;
s12, the Gralloc library and the Composer library on which the application layer driver depends also need to be synchronously replaced with the library file provided by the vendor and matching with the driver.
The step S2 specifically includes the following steps:
s21, acquiring a mali display card drive source code, and acquiring a drive source code consistent with the version of the physical display card through a mali official website; and S22, installing a kernel calling interface according to the hardware version of the display card of the current physical hardware system, and compiling the display card kernel driver into the kernel of the host system, so that the physical display card can be normally called in the kernel.
The step S3 specifically includes the following steps:
the file/dev/mali 0 of the physical hardware system graphics card is directly mapped to the container through the parameter configuration of the container (docker), so that the container can access the hardware device like a real physical environment.
The drivers such as EGL, GLES and the like in the native android container are realized through software, so that the container can access hardware equipment of a physical machine (a physical hardware system), the drivers such as EGL, GLES and the like are required to be replaced by versions of actual physical hardware at first, although a host machine physical display card is divided into a kernel driver and an application layer driver, the kernel is shared by the container and the physical machine, the kernel part only needs to be provided with a display card equipment kernel calling interface, and the whole IO flow can be normally carried out.
In addition, the physical machine-related device needs to be mapped to a container, such as a/dev/mali 0 device, through which the container needs to interact with the kernel interface.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (9)
1. The utility model provides a system for realize tall and erect container direct display card which characterized in that includes:
a physical hardware system, a host system, a container, and an android system;
the physical hardware system comprises a display card and provides a hardware platform for the whole system;
the host system provides an underlying system;
the container runs in the host system and provides a virtualization engine;
the android system runs in the container;
and the container directly loads an application layer driver of the display card and directly calls the display card of the physical hardware system.
2. The system for implementing the android container pass-through display card of claim 1,
the display card is a mali display card.
3. The system for implementing the android container pass-through display card of claim 1,
and after the container loads the display card application layer driver, the display card hardware resource is directly called through an IO port.
4. The system for implementing the android container pass-through display card of claim 1,
the container is docker.
5. The system for implementing the android container pass-through display card of claim 1,
the physical hardware system is an ARM board card.
6. A method for realizing a direct display card of an android container is characterized by comprising the following steps,
s1, modifying the application layer driver loaded in the container;
s2, compiling the display card kernel driver into the host system kernel;
and S3, mapping the graphics card of the physical hardware system to the container so that the container directly calls the hardware resource of the graphics card.
7. The method of claim 6, wherein the android container pass-through graphics card,
the step S1 specifically includes the following steps:
s11, modifying the EGL and GLES codes loaded in the container, and changing the original drive simulated by the loading software into the application layer drive program provided by the mali display card manufacturer;
s12, the Gralloc library and the Composer library on which the application layer driver depends also need to be synchronously replaced with the library file provided by the vendor and matching with the driver.
8. The method of claim 6, wherein the android container pass-through graphics card,
the step S2 specifically includes the following steps:
s21, acquiring a mali display card drive source code, and acquiring a drive source code consistent with the version of the physical display card through a mali official website;
and S22, installing a kernel calling interface according to the hardware version of the display card of the current physical hardware system, and compiling the display card kernel driver into the kernel of the host system, so that the physical display card can be normally called in the kernel.
9. The method of claim 6, wherein the android container pass-through graphics card,
the step S3 specifically includes the following steps:
through the parameter configuration of the container, the physical hardware system video card/dev/mali 0 is directly mapped to the container, so that the container can access the hardware device like a real physical environment.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110938194.XA CN113656143B (en) | 2021-08-16 | 2021-08-16 | Method and system for realizing secure Zhuo Rongqi direct-through display card |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110938194.XA CN113656143B (en) | 2021-08-16 | 2021-08-16 | Method and system for realizing secure Zhuo Rongqi direct-through display card |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113656143A true CN113656143A (en) | 2021-11-16 |
| CN113656143B CN113656143B (en) | 2024-05-31 |
Family
ID=78479294
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110938194.XA Active CN113656143B (en) | 2021-08-16 | 2021-08-16 | Method and system for realizing secure Zhuo Rongqi direct-through display card |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113656143B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114237826A (en) * | 2021-12-21 | 2022-03-25 | 北京蔚领时代科技有限公司 | High-speed rendering method and device for Android container |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107741863A (en) * | 2017-10-08 | 2018-02-27 | 深圳市星策网络科技有限公司 | The driving method and device of a kind of video card |
| CN109814932A (en) * | 2019-01-03 | 2019-05-28 | 武汉深之度科技有限公司 | Video driver installation method calculates equipment |
| US20190363905A1 (en) * | 2017-02-05 | 2019-11-28 | Intel Corporation | Adaptive deployment of applications |
| WO2020001564A1 (en) * | 2018-06-29 | 2020-01-02 | 杭州海康威视数字技术股份有限公司 | Method, apparatus, and system for processing tasks |
| CN111047505A (en) * | 2019-12-20 | 2020-04-21 | 北京浪潮数据技术有限公司 | GPU multiplexing method, device, equipment and readable storage medium |
| CN111736850A (en) * | 2020-07-21 | 2020-10-02 | 腾讯科技(深圳)有限公司 | Image processing method, apparatus, server and medium |
| CN112099923A (en) * | 2020-11-17 | 2020-12-18 | 江苏北弓智能科技有限公司 | Android virtualization system running on Linux operating system |
| CN112269603A (en) * | 2020-10-16 | 2021-01-26 | 北京技德系统技术有限公司 | Graphic display method and device for compatibly running Android application on Linux |
| CN112486609A (en) * | 2020-11-25 | 2021-03-12 | 湖南麒麟信安科技股份有限公司 | Virtual display card implementation method and device based on cloud desktop |
| CN112860364A (en) * | 2021-02-07 | 2021-05-28 | 麒麟软件有限公司 | Android graph display method based on Linux kernel |
| US20210162299A1 (en) * | 2018-11-11 | 2021-06-03 | Changsha Mic Tech Co., Ltd. | Distributed multi-terminal and multi-network supporting system for android online game |
| US20210208951A1 (en) * | 2020-08-04 | 2021-07-08 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method and apparatus for sharing gpu, electronic device and readable storage medium |
-
2021
- 2021-08-16 CN CN202110938194.XA patent/CN113656143B/en active Active
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190363905A1 (en) * | 2017-02-05 | 2019-11-28 | Intel Corporation | Adaptive deployment of applications |
| CN107741863A (en) * | 2017-10-08 | 2018-02-27 | 深圳市星策网络科技有限公司 | The driving method and device of a kind of video card |
| WO2020001564A1 (en) * | 2018-06-29 | 2020-01-02 | 杭州海康威视数字技术股份有限公司 | Method, apparatus, and system for processing tasks |
| US20210162299A1 (en) * | 2018-11-11 | 2021-06-03 | Changsha Mic Tech Co., Ltd. | Distributed multi-terminal and multi-network supporting system for android online game |
| CN109814932A (en) * | 2019-01-03 | 2019-05-28 | 武汉深之度科技有限公司 | Video driver installation method calculates equipment |
| CN111047505A (en) * | 2019-12-20 | 2020-04-21 | 北京浪潮数据技术有限公司 | GPU multiplexing method, device, equipment and readable storage medium |
| CN111736850A (en) * | 2020-07-21 | 2020-10-02 | 腾讯科技(深圳)有限公司 | Image processing method, apparatus, server and medium |
| US20210208951A1 (en) * | 2020-08-04 | 2021-07-08 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method and apparatus for sharing gpu, electronic device and readable storage medium |
| CN112269603A (en) * | 2020-10-16 | 2021-01-26 | 北京技德系统技术有限公司 | Graphic display method and device for compatibly running Android application on Linux |
| CN112099923A (en) * | 2020-11-17 | 2020-12-18 | 江苏北弓智能科技有限公司 | Android virtualization system running on Linux operating system |
| CN112486609A (en) * | 2020-11-25 | 2021-03-12 | 湖南麒麟信安科技股份有限公司 | Virtual display card implementation method and device based on cloud desktop |
| CN112860364A (en) * | 2021-02-07 | 2021-05-28 | 麒麟软件有限公司 | Android graph display method based on Linux kernel |
Non-Patent Citations (3)
| Title |
|---|
| MARTIN, A.: "A new tool for static and dynamic Android malware analysis", DATA SCIENCE AND KNOWLEDGE ENGINEERING FOR SENSING DECISION SUPPORT, 4 June 2019 (2019-06-04) * |
| 林鹏;: "5G云游戏平台组网关键技术探讨", 互联网天地, no. 01 * |
| 陈文志: "支持PDE存储的安全增强型Android系统的设计与实现", 中国优秀硕士学位论文全文数据库(信息科技辑), no. 05, 15 May 2021 (2021-05-15) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114237826A (en) * | 2021-12-21 | 2022-03-25 | 北京蔚领时代科技有限公司 | High-speed rendering method and device for Android container |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113656143B (en) | 2024-05-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10303491B2 (en) | Method and device of running application program across systems | |
| JP6458959B2 (en) | Co-designed dynamic language accelerator for processors | |
| US12299471B2 (en) | Virtualizing hardware components that implement AI applications | |
| CN111522670A (en) | GPU virtualization method, system and medium for Android system | |
| KR20170094136A (en) | System and method for execution of application code compiled according to two instruction set architectures | |
| US20110219373A1 (en) | Virtual machine management apparatus and virtualization method for virtualization-supporting terminal platform | |
| CN112579254B (en) | Simulation method and device of graphic processor, electronic equipment and storage medium | |
| CN113826076A (en) | Expandable and secure container | |
| CN112015522B (en) | System function expansion method, device and computer readable storage medium | |
| US12340207B2 (en) | Virtual machine update while keeping devices attached to the virtual machine | |
| CN106844008A (en) | A kind of method of data manipulation, equipment and system | |
| CN117193942A (en) | Lightweight virtual machine creation method and device, electronic equipment and storage medium | |
| CN113326105B (en) | Hardware equipment configuration method, device and equipment based on host migration | |
| US20160246629A1 (en) | Gpu based virtual system device identification | |
| CN120277021B (en) | Method for enabling serial port equipment to pass through client based on ARM64 framework | |
| CN113656143A (en) | Method and system for realizing direct display card of android container | |
| CN115904628A (en) | IO virtualization data processing method and application based on vhost protocol | |
| CN112559336B (en) | Method, device and system for self-adaptively debugging heterogeneous computing chip and main board chip | |
| CN116185905A (en) | Video memory access method, device, system, storage medium and program product | |
| US20060224904A1 (en) | Programmatic binding of power management events | |
| CN113886007B (en) | Configuration method, management method, system and medium for KVM virtualization system | |
| CN109408193B (en) | Virtual machine implementation method and device and computer equipment | |
| CN117472805B (en) | Virtual IO device memory management system based on virtio | |
| Tijms | Binary translation: Classification of emulators | |
| CN119847677A (en) | Virtio-based FPGA virtualization method and virtio-based FPGA virtualization device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |