[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115291946A - Hongmong system transplanting method, device, electronic equipment and readable medium - Google Patents

Hongmong system transplanting method, device, electronic equipment and readable medium Download PDF

Info

Publication number
CN115291946A
CN115291946A CN202210960465.6A CN202210960465A CN115291946A CN 115291946 A CN115291946 A CN 115291946A CN 202210960465 A CN202210960465 A CN 202210960465A CN 115291946 A CN115291946 A CN 115291946A
Authority
CN
China
Prior art keywords
source code
hongmon
system source
compiling
linux kernel
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.)
Withdrawn
Application number
CN202210960465.6A
Other languages
Chinese (zh)
Inventor
袁博文
叶晓宾
王国伟
崔玚
陈甲印
郭佳
张黎椿
曾沥锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honghu Wanlian Jiangsu Technology Development Co ltd
Original Assignee
Honghu Wanlian Jiangsu Technology Development Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Honghu Wanlian Jiangsu Technology Development Co ltd filed Critical Honghu Wanlian Jiangsu Technology Development Co ltd
Priority to CN202210960465.6A priority Critical patent/CN115291946A/en
Publication of CN115291946A publication Critical patent/CN115291946A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a Hongmon system transplanting method, a Hongmon system transplanting device, electronic equipment and a readable medium. The method comprises the following steps: acquiring a Hongmon system source code; compiling the hong meng system source code according to the difference between the current system source code of the transplanted object and the hong meng system source code; writing the compiled Hongmon system source code into the transplanting object. According to the technical scheme of the embodiment of the invention, the Hongmong system source code is compiled according to the difference between the current system source code of a transplanted object and the Hongmong system source code, and the compiled Hongmong system source code is written into the transplanted object, so that the Hongmong system replaces an android system and is transplanted into an intelligent projector ARM hardware platform, the first application of the intelligent projector runs on the Hongmong system, and the intelligent projector formally enters into the Hongmong system ecosphere and continuously adapts to the development trend of the interconnection of everything of the Hongmong system.

Description

Hongmong system transplanting method, device, electronic equipment and readable medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a hongmeng system migration method, apparatus, electronic device, and readable medium.
Background
At present, the industry has an open board based on the hongmeng system, but the open board does not support in intelligent projecting apparatus, so intelligent projecting apparatus is based on the operation of tall and erect system, and intelligent projecting apparatus can't be based on the operation of the hongmeng system. If a Hongmon system is to be operated on the intelligent projector, system transplantation is required.
The existing main operating system transplanting method is Linux transplanting of different kernel versions of the same operating system, but methods for cross-operating system different versions of Linux kernels are few, even though a U-Boot adaptation method and a Linux kernel adaptation method are adopted, the method is limited to be transplanted in the same operating system, and is not suitable for cross-Linux kernel cross-operating system transplanting.
Therefore, a method is needed to implement the hongmeng system migration for smart projectors.
Disclosure of Invention
The invention provides a Hongmon system transplanting method, a Hongmon system transplanting device, electronic equipment and a readable medium, so as to realize Hongmon system transplanting of an intelligent projector.
According to an aspect of the present invention, there is provided a hongmeng system migration method, including:
acquiring a Hongmon system source code;
compiling the hong meng system source code according to the difference between the current system source code of the transplanted object and the hong meng system source code;
writing the compiled Hongmon system source code into the transplanting object.
Optionally, the compiling the hongmeng system source code according to the difference between the current system source code of the transplant object and the hongmeng system source code includes:
performing adaptive compiling on the U-Boot of the Hongmon system source code;
performing adaptive compiling on the Linux kernel version of the Hongming system source code;
according to the hardware drive required by the transplanting object, transplanting and compiling a ko module corresponding to the hardware drive to the Hongmon system source code;
and configuring and compiling the init process of the Hongmon system source code.
Optionally, the adapting and compiling the U-Boot of the hongmeng system source code includes:
initializing parameters of the U-Boot of the Hongmon system source code;
carrying out board-level initialization on the U-Boot of the Hongmon system source code;
setting U-Boot configuration information and entering a U-Boot command;
and acquiring the mirror image file parameters of the mirror image file of the Hongmon system source code through a U-Boot command.
Optionally, the adapting and compiling the Linux kernel version of the hongmeng system source code includes:
determining the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
determining difference codes of the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
and compiling the difference codes into a Linux kernel of the Hongmon system source codes.
Optionally, the migrating and compiling the ko module corresponding to the hardware drive to the hongmeng system source code according to the hardware drive required by the migrated object includes:
determining an original code of a ko module corresponding to the hardware drive in a current system source code;
generating a ko module source code packet according to the original code;
transplanting the ko module source code packet into a preset folder in a Hongmon system;
and analyzing the ko module source code packet in the preset folder, and compiling the ko module in the Hongmon system source code according to an analysis result.
Optionally, the configuring and compiling the init process of the hong meng system source code includes:
configuring a starting guide array of init, wherein the starting guide array comprises codes corresponding to guide services of at least one stage included in system starting;
and configuring a starting service array of the transplanted object, wherein the starting service array comprises codes corresponding to all system services which need to be started after the transplanted object is started.
Optionally, the writing the compiled hongmeng system source code into the migration object includes:
generating a system image file according to the compiled Hongmon system source code;
burning the system image file into an ARM hardware platform of a transplanted object so as to transplant the Hongmon system into the transplanted object.
According to another aspect of the present invention, there is provided a hongmeng system migration apparatus, comprising:
the source code acquisition unit is used for acquiring the Hongmon system source code;
the source code compiling unit is used for compiling the Hongmon system source code according to the difference between the current system source code of the transplanted object and the Hongmon system source code;
and the source code writing unit is used for writing the compiled Hongmon system source code into the transplanting object.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of hong meng system migration of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the hong meng system migration method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme, the Hongmong system source code is obtained, the Hongmong system source code is compiled according to the difference between the current system source code of a transplanted object and the Hongmong system source code, the compiled Hongmong system source code is written into the transplanted object, so that the Hongmong system replaces an android system and is moved into an intelligent projector ARM hardware platform, the first application of the intelligent projector runs on the Hongmong system, the intelligent projector formally enters the Hongmong system ecological circle, and the development trend of the Hongmong system object interconnection is continuously adapted.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a hongmeng system migration method according to an embodiment of the present invention;
fig. 2 is a flowchart of a second embodiment of the present invention, illustrating a method for compiling a hongmeng system source code;
FIG. 3 is a schematic diagram of a U-Boot applied to the second embodiment of the present invention;
fig. 4 is a schematic diagram of a cross-Linux kernel migration of a hongmeng system to an intelligent projector based on an android system, to which a second embodiment of the present invention is applied;
fig. 5 is a schematic diagram of an application of the intelligent projector started by the hongmeng system according to the second embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a hongmeng system transplantation device according to a third embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an electronic device implementing the hong meng system migration method according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a hong meng system migration method according to an embodiment of the present invention, where the embodiment is applicable to a case where a hong meng system is migrated to an ARM hardware platform of an intelligent projector instead of an android system, and the method may be executed by a hong meng system migration apparatus, where the hong meng system migration apparatus may be implemented in a form of hardware and/or software, and the hong meng system migration apparatus may be configured in a computer. As shown in fig. 1, the method includes:
and S110, acquiring a Hongmon system source code.
The Hongmon system is a brand-new distributed operating system facing to the whole scene, creates a world with super virtual terminals interconnected, organically connects people, equipment and scenes together, realizes extremely fast discovery, extremely fast connection, hardware mutual assistance and resource sharing of various intelligent terminals contacted by consumers in the life of the whole scene, and provides scene experience by using proper equipment.
The transplantation object is intelligent projecting apparatus, and the former android operating system of intelligent projecting apparatus and hong meng system are owing to there is the difference of Linux kernel version, consequently will let hong meng system can get up to operate on intelligent projecting apparatus ARM hardware platform and need carry out the adaptation, transplant the ARM hardware platform of intelligent projecting apparatus after the adaptation is accomplished. Before the Hongmon system is transplanted, a Hongmon system development environment needs to be built, a virtual machine and a Linux system are installed, a compiling tool is installed, then a Hongmon system source code is downloaded, and compiling is carried out on the basis of the Hongmon system source code to generate a system mirror image.
And S120, compiling the Hongmon system source code according to the difference between the current system source code of the transplanted object and the Hongmon system source code.
And S130, writing the compiled Hongmon system source code into the transplanting object.
The android system is usually operated by the intelligent projector, and partial code difference exists between the android system and the hong meng system, so that the hong meng system cannot be directly operated by the intelligent projector, and the difference part needs to be compiled in a source code of the hong meng system, so that the hong meng system is adapted to an ARM hardware platform of the intelligent projector. For example, at present, an ARM hardware platform supported by a Linux kernel provided by an intelligent projector manufacturer does not include a code supporting the hongmeng system, so that the Linux kernel of the android system and the Linux kernel of the hongmeng system can be compared to extract a different part of codes, the different part of codes are analyzed and designed, and the different part of codes is input into the Linux kernel of the hongmeng system in the form of patch.
After the Hongmon system source code is compiled, the Hongmon system is written into the intelligent projector so as to realize the operation of the Hongmon system on the intelligent projector.
According to the technical scheme, the Hongmong system source code is obtained, the Hongmong system source code is compiled according to the difference between the current system source code of a transplanted object and the Hongmong system source code, the compiled Hongmong system source code is written into the transplanted object, so that the Hongmong system replaces an android system and is moved into an intelligent projector ARM hardware platform, the first application of the intelligent projector runs on the Hongmong system, the intelligent projector formally enters the Hongmong system ecological circle, and the development trend of the Hongmong system object interconnection is continuously adapted.
Example two
Fig. 2 is a flowchart of a hongmeng system source code compiling method according to a second embodiment of the present invention, which is further explained based on the above embodiments. As shown in fig. 2, the method includes:
s210, conducting adaptive compiling on the U-Boot of the Hongmon system source code.
Before the method for transplanting the Hongmon system to the intelligent projector ARM hardware platform, the U-Boot adaptation of the Hongmon system needs to be carried out, so that the U-Boot of the Hongmon system supports the intelligent projector ARM hardware development platform.
S220, conducting adaptive compiling on the Linux kernel version of the Hongmon system source code.
The Hongmon system Linux kernel adaptation method in the method for transplanting the Hongmon system into the intelligent projector ARM hardware platform mainly shows that a Hongmon system Linux kernel code is modified, so that the Linux kernel supports the intelligent projector ARM hardware platform, a Linux kernel provided by a manufacturer supports a target ARM hardware platform and does not contain a code supporting the Hongmon system, the Linux kernel 4.9 of the intelligent projector android system is compared with the Linux kernel 4.19 of the Hongmon system, a different part of code is extracted, demand analysis and functional module design are carried out on the different code, and the different part of code is printed into the Linux kernel 4.19 of the Hongmon system in the form of patch.
And S230, transplanting and compiling a ko module corresponding to the hardware drive to the Hongmon system source code according to the hardware drive required by the transplanting object.
The ARM hardware driver of the intelligent projector is supported by the ko module, so that the hardware driver source code needs to be transplanted into the Hongmong system source code, the ko module can be compiled, and meanwhile, the ko module can be loaded normally after the intelligent projector operates the Hongmong system, and the ARM hardware platform operates safely and stably.
S240, configuring and compiling the init process of the Hongmon system source code.
Wherein, the hongmeng system is transplanted to the init process configuration of the method of the ARM hardware platform of the intelligent projector. The configuration file format of an original android system of the intelligent projector is rc, the configuration file format of a Hongmon system is cfg, and comparison analysis needs to be carried out on the rc file format and the cfg file format when the original android system service is started in the Hongmon system.
Through the comparison analysis of the rc file and the cfg file, the file composition formats of the rc file and the cfg file are different, but the contained configuration information is similar, so that the rc file can be converted into the cfg configuration file by using a script in the migration process.
The process corresponding to the init starting guide component is an init process which is a first user mode process started after the kernel completes initialization. And after the init process is started, reading the init.cfg configuration file, executing a corresponding command according to an analysis result, sequentially starting each key system service process, and setting corresponding authority while starting the system service process. The Hongmon system has completely received control from the bootstrap program, starts the service framework of the driver program, and starts the first init process of the user space, and the first application ProjectorSystemApp of the intelligent projector is hatched through the init process.
In the second embodiment of the present invention, the performing adaptive compilation on the U-Boot of the hongmeng system source code includes:
initializing parameters of the U-Boot of the Hongmon system source code;
carrying out board-level initialization on the U-Boot of the Hongmon system source code;
setting U-Boot configuration information and entering a U-Boot command;
and acquiring the mirror image file parameters of the mirror image file of the Hongmon system source code through a U-Boot command.
Wherein, hongmeng system U-Boot adaptation is a keystone supporting the whole system to run, fig. 3 is a U-Boot schematic diagram applicable to the second embodiment of the present invention, compared with the conventional method, the cross-Linux kernel cross-operating system transplanting method gives the whole adaptation flow, i.e. the Boot flow, and the key adaptation operation is described as follows:
1) Initializing init _ sequence _ f by the U-Boot parameter: initializing an environment variable, initializing a baud rate, initializing a serial port, initializing a DRAM (dynamic random access memory), and setting the size of a bank _ size block;
2) Initializing init _ sequence _ r at the U-Boot board level: initializing a cache, initializing an IO port, initializing EMMC, operating environment variables, printing messages, operating related equipment trees, operating a network and calling a kernel;
3) Setting a U-Boot version number, initializing variables used by the hush shell, including a pre-Boot command, taking out configuration values of bootdelay and bootcmd from environment variables, assigning the configuration values to a global variable stored bootdelay, and finally returning the configuration values of bootcmd to enter the U-Boot command;
4) The kernel is scheduled mainly by a bootm command, which gets some information from the header of the image file, including: the method comprises the following steps of a CPU architecture based on the mirror image file, the type of an operating system of the mirror image file, the type of an image, a compression mode, a loading address of the mirror image file in a memory, an entry address of the mirror image file, a name of the mirror image file and the like. And next, loading the image to the specified address by bootm, decompressing the image, transmitting necessary parameters to the kernel, finally jumping to the entry address to enter the kernel, and ending the U-Boot adaptation method.
In the second embodiment of the present invention, the adaptively compiling the Linux kernel version of the hong meng system source code includes:
determining the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
determining difference codes of the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
and compiling the difference codes into a Linux kernel of the Hongmon system source codes.
The Hongmon system Linux kernel adaptation method of the method of transplanting the Hongmon system to the intelligent projector ARM hardware platform mainly comprises the steps of modifying a Hongmon system Linux kernel code, enabling the Linux kernel to support the intelligent projector ARM hardware platform, enabling a Linux kernel provided by a manufacturer to support a target ARM hardware platform, not containing a code supporting the Hongmon system, comparing a Linux4.9 kernel of an intelligent projector android system with a Hongmon system Linux4.19 kernel, extracting a part of different codes, carrying out demand analysis and functional module design on the different codes, and printing the part of the different codes into the Hongmon system Linux4.19 kernel in a patch mode.
The second embodiment of the invention provides an adaptation process of an intelligent projector ARM hardware platform across Linux kernel versions across an operating system, and the key adaptation operation is described as follows:
1. compiling the link script to generate configuration information, a configuration kernel and a compilation generation ui image file of the corresponding platform;
2. configuring a Linux kernel menuconfig, wherein the Linux kernel can open a graphical configuration interface by inputting 'make menuconfig', and two files are used for menuconfig emphasis: config and Kconfig. Selecting a compiling option needing to be opened through a graphical interface, wherein CONFIG _ AMLOGIC _ PROJECTOR = y;
3. ARM hardware platform and compiler configuration files;
4. driving transplantation: cpu, uart, iomap, mmc, pinctrl, memory, media, video, etc.;
5. and starting a user state init process.
In a second embodiment of the present invention, the migrating and compiling a ko module corresponding to a hardware drive to the hong meng system source code according to the hardware drive required by the migrated object includes:
determining an original code of a ko module corresponding to the hardware drive in a current system source code;
generating a ko module source code packet according to the original code;
transplanting the ko module source code packet into a preset folder in a Hongmon system;
and analyzing the ko module source code packet in the preset folder, and compiling the ko module in the Hongmon system source code according to an analysis result.
The method for transplanting the hongmeng system to the ARM hardware platform of the intelligent projector comprises ko module transplantation. The ko module mainly supports an ARM hardware driver of the intelligent projector, so that a hardware driving source code needs to be transplanted into a Hongmon system source code, the ko module can be compiled, and meanwhile, the ko module can be loaded normally after the intelligent projector runs a Hongmon system, and an ARM hardware platform runs safely and stably.
In this embodiment, a Linux kernel-crossing operating system-crossing intelligent projector ARM hardware platform ko module migration process, and a key migration method is described as follows:
1. identifying a necessary ko module, mainly searching an original code of the ko module by using a method of comparison analysis, compiling script analysis and functional module identification in an original android system source code of the intelligent projector, and finding a dependent file source code of relevant compiling in a matched manner to form a ko module source code packet;
2. transplanting the ko module source code packet into a corresponding project folder customized by the Hongmon system, and performing related configuration of the Kconfig and makefile;
3. analyzing the ko module source code, and after the analysis is finished, performing related compiling and debugging in the Hongmon system source code to ensure that the ko module can normally compile a ko module file;
4. packing the ko module into modules in the vendor.
5. Packaging the image file, and burning the image file into an ARM hardware platform of the intelligent projector;
6. starting the equipment, entering into the vendor/modules, loading (insmod) the ko module, after the successful mounting, performing function verification, and ending the ko module transplanting method.
In the second embodiment of the present invention, the configuring and compiling the init process of the hong meng system source code includes:
configuring a starting guide array of init, wherein the starting guide array comprises codes corresponding to guide services of at least one stage included in system starting;
and configuring a starting service array of the transplanted object, wherein the starting service array comprises codes corresponding to all system services which need to be started after the transplanted object is started.
The method for transplanting the hongmeng system to the ARM hardware platform of the intelligent projector comprises init process configuration. The configuration file format of an original android system of the intelligent projector is rc, the configuration file format of a Hongmon system is cfg, and comparison analysis needs to be carried out on the rc file format and the cfg file format when the original android system service is started in the Hongmon system.
Extracting important common information of rc and cfg files mainly comprises the following steps: import configuration file information, jobs information and services information.
Through the comparative analysis of the rc file and the cfg file, the file composition formats are different, but the contained configuration information is similar, so the rc file can be converted into the cfg configuration file by using a script in the migration process.
The process corresponding to the init starting guide component is an init process, and is a first user mode process started after the kernel completes initialization. And after the init process is started, reading the init.cfg configuration file, executing a corresponding command according to an analysis result, sequentially starting each key system service process, and setting corresponding authority while starting the system service process. The hong meng system has completely received control from the bootstrap program, starts a service framework of a driver program, and starts a first init process of a user space, and a first application project system app of the intelligent projector is hatched through the init process.
The intelligent projector ARM hardware platform starts an init process to configure an incubation application App, and the method is executed in the following mode: an intelligent projector jobs array is configured, and the init starting guide component divides the system starting into three stages, namely a pre-init stage, an init stage and a post-init stage. Wherein, pre-init: the first executed job creates a xxx/project folder and sets the permissions for the folder. init, job of intermediate execution, starts the Projector SystemApp service. post-init-the last executed job that the process needs to have some processing after the start-up is complete (e.g., drive initialization followed by device mount), and this type of operation can be put into the job execution.
2. Configuring an intelligent projector service array, wherein a service set (array form) comprises all system services which need to be started by an init process.
After the hong Meng system writes into the hardware of the intelligent projector ARM, a ps command is used for checking whether a service process of a projector SystemApp system is started or not after the hong Meng system is started, a kill command is used for killing the newly-added projector SystemApp process, the hardware of the intelligent projector ARM is not restarted, meanwhile, the projector SystemApp is pulled up again, and the init starting bootstrap configuration method is finished under the condition that the projector SystemApp intelligent projector process runs normally.
In the second embodiment of the present invention, the writing the compiled hongmeng system source code into the migration object includes:
generating a system image file according to the compiled Hongmon system source code;
burning the system image file into an ARM hardware platform of a transplanted object so as to transplant the Hongmon system into the transplanted object.
In summary, in the migration method of the present invention, the android system operated by the ARM hardware platform of the intelligent projector needs to be replaced by the hong meng system, and meanwhile, the hong meng system needs to be ensured to operate normally on the ARM hardware platform of the intelligent projector, so that a method for migrating the hong meng system to the intelligent projector based on the android system across the Linux kernel is provided. Fig. 4 is a schematic diagram of transplanting a damming system to an intelligent projector based on an android system across Linux kernels, where the second embodiment of the present invention is applied, and as shown in fig. 4, the system transplanting includes the following specific operations:
1 is cross-operating system U-Boot adaptation.
And 2, adapting the cross-Linux kernel version of the cross-operating system.
And 3, performing module transplantation across the operating system ko.
4 Cross operating System Profile. Rc and. Cfg Difference studies.
And 5, configuring the init process.
Fig. 5 is a schematic diagram of an intelligent projector application started by a hongmeng system according to the second embodiment of the present invention, in which the hongmeng system is migrated to an intelligent projector based on an android system across Linux kernels, the hongmeng system runs on an ARM hardware platform of the intelligent projector, and the Linux kernel runs and starts a first init process in a user mode of the hongmeng system.
After the init process is started, a basic dev device node is established, and the most basic root file system is provided. And after the init process mounts each partition of the equipment, scanning the init start script of each system service and pulling up the foundation service. The foundation provides a user program management framework and basic services, and the process is responsible for the life cycle management of the application. The appsake is used as an incubator of the application, and is responsible for receiving a command of a user program frame to incubate an application process, setting the authority of a new process and calling an entry function of the application program frame when receiving an application starting request in the foundation, so as to incubate the project System App of the first hong Kong system of the intelligent projector.
In conclusion, by adopting the method for transplanting the hongmeng system to the intelligent projector based on the android system across the Linux kernel, the hongmeng system replaces the android system and is moved to the ARM hardware platform of the intelligent projector, the first application of the intelligent projector runs on the hongmeng system, and the intelligent projector formally enters the ecological circle of the hongmeng system and continuously adapts to the development trend of the interconnection of everything of the hongmeng system.
EXAMPLE III
Fig. 6 is a schematic structural diagram of a hongmeng system transplantation device according to a third embodiment of the present invention.
As shown in fig. 6, the apparatus includes:
a source code acquiring unit 610, configured to acquire a hong meng system source code;
a source code compiling unit 620, configured to compile the hong meng system source code according to a difference between a current system source code of a migration object and the hong meng system source code;
a source code writing unit 630, configured to write the compiled hongmeng system source code into the migration object.
In the third embodiment of the present invention, the source code compiling unit 620 is configured to perform:
performing adaptive compiling on the U-Boot of the Hongmon system source code;
performing adaptive compiling on the Linux kernel version of the Hongming system source code;
according to the hardware drive required by the transplanting object, transplanting and compiling a ko module corresponding to the hardware drive to the Hongmon system source code;
and configuring and compiling the init process of the Hongmon system source code.
In the third embodiment of the present invention, when performing adaptive compiling on the U-Boot of the hong meng system source code, the source code compiling unit 620 performs:
initializing parameters of the U-Boot of the Hongmon system source code;
carrying out board-level initialization on the U-Boot of the Hongmon system source code;
setting U-Boot configuration information and entering a U-Boot command;
and acquiring the mirror image file parameters of the mirror image file of the Hongmon system source code through a U-Boot command.
In the third embodiment of the present invention, when performing adaptive compilation on the Linux kernel version of the hongmeng system source code, the source code compiling unit 620 performs:
determining the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
determining difference codes of the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
and compiling the difference codes into a Linux kernel of the Hongmon system source codes.
In the third embodiment of the present invention, when executing the hardware driver required by the migration object and migrating and compiling the ko module corresponding to the hardware driver to the hongmeng system source code, the source code compiling unit 620 executes:
determining an original code of a ko module corresponding to the hardware drive in a current system source code;
generating a ko module source code packet according to the original code;
transplanting the ko module source code packet into a preset folder in a Hongmon system;
and analyzing the ko module source code packet in the preset folder, and compiling the ko module in the Hongmon system source code according to an analysis result.
In the third embodiment of the present invention, when performing configuration compilation on the init process of the hongmeng system source code, the source code compiling unit 620 performs:
configuring a starting guide array of init, wherein the starting guide array comprises codes corresponding to guide services of at least one stage included in system starting;
and configuring a starting-up service array of the transplanted object, wherein the starting-up service array comprises codes corresponding to all system services which need to be started up after the transplanted object is started up.
In the third embodiment of the present invention, the source code writing unit 630 is configured to:
generating a system image file according to the compiled Hongmon system source code;
burning the system image file into an ARM hardware platform of a transplanted object so as to transplant the Hongmon system into the transplanted object.
The Hongmon system migration device provided by the embodiment of the invention can execute the Hongmon system migration method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 7 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. Processor 11 performs the various methods and processes described above, such as the hong meng system migration method.
In some embodiments, the Hongmon system migration method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the hongmeng system migration method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the hong meng system migration method by any other suitable means (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The hongmeng system transplanting method is characterized by comprising the following steps:
acquiring a Hongmon system source code;
compiling the hong meng system source code according to the difference between the current system source code of the transplanted object and the hong meng system source code;
and writing the compiled Hongmon system source code into the migration object.
2. The method of claim 1, wherein compiling the hong meng system source code according to the difference between the current system source code of the transplanted object and the hong meng system source code comprises:
performing adaptive compiling on the U-Boot of the Hongmon system source code;
performing adaptive compiling on the Linux kernel version of the Hongming system source code;
according to the hardware drive required by the transplanting object, transplanting and compiling a ko module corresponding to the hardware drive to the Hongmon system source code;
and configuring and compiling the init process of the Hongmon system source code.
3. The method of claim 2, wherein the adaptively compiling the U-Boot of the hong meng system source code comprises:
initializing parameters of the U-Boot of the Hongmon system source code;
carrying out board-level initialization on the U-Boot of the Hongmon system source code;
setting U-Boot configuration information and entering a U-Boot command;
and acquiring the mirror image file parameters of the mirror image file of the Hongmon system source code through a U-Boot command.
4. The method according to any of the claim 2, wherein the adapting compiling the Linux kernel version of the hong meng system source code comprises:
determining the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
determining difference codes of the Linux kernel version of the Hongmon system source code and the Linux kernel version of the current system source code;
and compiling the difference codes into a Linux kernel of the Hongmon system source codes.
5. The method according to claim 2, wherein the step of compiling a ko module migration corresponding to the hardware driver to the hong meng system source code according to the hardware driver required by the migration object comprises:
determining an original code of a ko module corresponding to the hardware drive in a current system source code;
generating a ko module source code packet according to the original code;
transplanting the ko module source code packet into a preset folder in a Hongmon system;
and analyzing the ko module source code packet in the preset folder, and compiling the ko module in the Hongmon system source code according to an analysis result.
6. The method of claim 2, wherein the configuration compiling of the init process of the hong meng system source code comprises:
configuring a starting guide array of init, wherein the starting guide array comprises codes corresponding to guide services of at least one stage included in system starting;
and configuring a starting service array of the transplanted object, wherein the starting service array comprises codes corresponding to all system services which need to be started after the transplanted object is started.
7. The method of claim 1, wherein writing compiled Hongmon System Source code to the migration object comprises:
generating a system image file according to the compiled Hongmon system source code;
burning the system image file into an ARM hardware platform of a transplanted object so as to transplant the Hongmon system into the transplanted object.
8. A hongmeng system migration apparatus, comprising:
the source code acquisition unit is used for acquiring the Hongmon system source code;
a source code compiling unit, configured to compile the hong meng system source code according to a difference between a current system source code of a migration object and the hong meng system source code;
and the source code writing unit is used for writing the compiled Hongmon system source code into the transplanting object.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the hong meng system migration method of any one of claims 1-7.
10. A computer readable storage medium having stored thereon computer instructions for causing a processor, when executed, to implement the hong meng system migration method of any one of claims 1-7.
CN202210960465.6A 2022-08-11 2022-08-11 Hongmong system transplanting method, device, electronic equipment and readable medium Withdrawn CN115291946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210960465.6A CN115291946A (en) 2022-08-11 2022-08-11 Hongmong system transplanting method, device, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210960465.6A CN115291946A (en) 2022-08-11 2022-08-11 Hongmong system transplanting method, device, electronic equipment and readable medium

Publications (1)

Publication Number Publication Date
CN115291946A true CN115291946A (en) 2022-11-04

Family

ID=83828946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210960465.6A Withdrawn CN115291946A (en) 2022-08-11 2022-08-11 Hongmong system transplanting method, device, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN115291946A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116483328A (en) * 2023-06-19 2023-07-25 广州信位通讯科技有限公司 System and method for running HongMong APP on ThreadX embedded software platform
CN116541085A (en) * 2023-07-05 2023-08-04 成都阿加犀智能科技有限公司 Android/Linux fusion method, device, equipment and storage medium
CN118535212A (en) * 2024-05-23 2024-08-23 淮南万泰电子股份有限公司 Control method based on ore-grade configuration system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116483328A (en) * 2023-06-19 2023-07-25 广州信位通讯科技有限公司 System and method for running HongMong APP on ThreadX embedded software platform
CN116483328B (en) * 2023-06-19 2023-09-12 广州信位通讯科技有限公司 System and method for running HongMong APP on ThreadX embedded software platform
CN116541085A (en) * 2023-07-05 2023-08-04 成都阿加犀智能科技有限公司 Android/Linux fusion method, device, equipment and storage medium
CN116541085B (en) * 2023-07-05 2023-09-12 成都阿加犀智能科技有限公司 Android/Linux fusion method, device, equipment and storage medium
CN118535212A (en) * 2024-05-23 2024-08-23 淮南万泰电子股份有限公司 Control method based on ore-grade configuration system

Similar Documents

Publication Publication Date Title
CN107491329B (en) Docker mirror image construction method, device, storage medium and electronic device
JP7090657B2 (en) Methods, devices, devices and storage media for upgrading applications
CN113312037B (en) Data processing method, device, equipment and storage medium applied to micro-service
CN115291946A (en) Hongmong system transplanting method, device, electronic equipment and readable medium
CN108089888B (en) It is a kind of that operation method and system are applied based on file system
CN107077379B (en) A kind of virtual machine creation method and device
CN112181588A (en) Application containerization method and device, electronic equipment and storage medium
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN114072765B (en) Method for container-based virtualization system
CN113268275B (en) Hardware equipment driving system based on microkernel and driving method thereof
CN111782335A (en) Extended application mechanism through in-process operating system
US11526363B2 (en) Electronic apparatus and control method thereof
CN113626095A (en) Switching method and switching system of configuration center, electronic equipment and storage medium
CN111913753A (en) Method and system for changing starting mode in cloud migration of windows system
CN110806891A (en) Method and device for generating software version of embedded equipment
CN116775061A (en) Deployment method, device, equipment and storage medium of micro-service application
CN116679912A (en) Code generation method, apparatus, device, storage medium, and computer program
US20220197633A1 (en) Software defined build infrastructure for hybrid, virtualized and native build environments
TWI777636B (en) Method, device, and computer program product for composing modular firmware
CN112241141B (en) Hardware configuration method, system, device and medium of PLC control system
CN112379867B (en) Embedded operating system, method and storage medium based on modular development
CN113986385A (en) Item font library loading method and device, electronic equipment and storage medium
CN114816475A (en) Method, device, equipment and medium for updating embedded operating system
CN115237458A (en) Method for calling inference hardware to execute AI application and related product
US8281294B1 (en) System and method for representing and managing a multi-architecture co-processor application program

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20221104

WW01 Invention patent application withdrawn after publication