CN110806876B - Lightweight Linux system customization method based on slit, device computer equipment and storage medium - Google Patents

Lightweight Linux system customization method based on slit, device computer equipment and storage medium Download PDF

Info

Publication number
CN110806876B
CN110806876B CN201911052351.6A CN201911052351A CN110806876B CN 110806876 B CN110806876 B CN 110806876B CN 201911052351 A CN201911052351 A CN 201911052351A CN 110806876 B CN110806876 B CN 110806876B
Authority
CN
China
Prior art keywords
file
rootfs
rootfsn
directory
mirror image
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.)
Active
Application number
CN201911052351.6A
Other languages
Chinese (zh)
Other versions
CN110806876A (en
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.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System 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 Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN201911052351.6A priority Critical patent/CN110806876B/en
Publication of CN110806876A publication Critical patent/CN110806876A/en
Application granted granted Critical
Publication of CN110806876B publication Critical patent/CN110806876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application relates to a lightweight Linux system customization method, a device, computer equipment and a storage medium based on slit, wherein the method comprises the following steps: building a development environment, and mounting an ISO mirror image of the slit in the development environment; making a target rootfs.gz file according to the software to be installed and the ISO mirror image; and manufacturing and issuing an ISO mirror image according to the target rootfs.gz file. According to the method, the software to be installed, which is required to be issued, is added into the ISO mirror image of the split release, and then the mirror image file is repackaged, so that the Linux release is not required to be installed, the problem of compatibility of the software in the Linux system is not required to be worried, the working efficiency can be greatly improved, and the maintenance cost is reduced.

Description

Lightweight Linux system customization method based on slit, device computer equipment and storage medium
Technical Field
The application relates to the field of system customization, in particular to a lightweight Linux system customization method, device, computer equipment and storage medium based on slit.
Background
SliTaz is a very small version of the Linux system, and the mirror image is generally only about 40M, and can be loaded from an optical disk or USB equipment, completely run in a memory, and also can be installed in a hard disk. SliTaz is a graphical interface system and also has a relatively sophisticated package manager that can update software packages from the network like Ubuntu, which is not common on small Linux distribution.
For application development engineers, the release mode of the application is always a topic worth discussing. Generally, the application program based on the Windows platform is convenient, and can directly issue the exe file or make a software installation package, because most users are Windows systems. However, when the Linux platform-based application program is distributed, the first Linux distribution board is too many, most of users are not familiar with the Linux system, the Linux system used by the users needs to be known when the Linux platform-based application program is distributed, different users have different requirements, a great deal of time and labor cost are spent in testing and communication links, so that the developer is inconvenient to distribute software, and the later maintenance cost is relatively high.
Disclosure of Invention
The application aims to overcome the defects of the prior art and provides a lightweight Linux system customization method, device, computer equipment and storage medium based on slit.
In order to achieve the above purpose, the present application adopts the following technical scheme: a lightweight Linux system customization method based on slit comprises the following steps:
building a development environment, and mounting an ISO mirror image of the slit in the development environment;
making a target rootfs.gz file according to the software to be installed and the ISO mirror image;
and manufacturing and issuing an ISO mirror image according to the target rootfs.gz file.
Further, the step of building a development environment and mounting an ISO image of slit in the development environment includes:
installing a virtual machine, and mounting an ISO mirror image of the split in the virtual machine to obtain a master machine with the installed ISO mirror image;
configuring a master network so that the master can normally surf the internet;
and updating the master software list and installing a compiling tool chain.
Further, the step of creating the target rootfs.gz file according to the software to be installed and the ISO image includes:
newly creating a rootfsn directory under a master machine;
copying the original rootfs.gz file in the ISO mirror image to a rootfsn directory;
unpacking the original rootfs.gz file to obtain an unpacked file;
deleting original rootfs.gz files to obtain rootfsn directory containing unpacked files
Copying the software to be installed to a rootfsn directory and installing;
and exiting the rootfsn directory, and packaging to form a target rootfs.gz file.
Further, the step of creating the published ISO image according to the target rootfs.gz file includes:
and packaging the target rootfs.gz file with the Linux kernel to generate an ISO mirror image of the target Linux system.
Further, the building of the development environment, before the step of mounting the ISO image of the slit in the development environment, includes:
an ISO image of the slit release was obtained from the official network.
The application also adopts the following technical scheme: a slit-based lightweight Linux system customization device, comprising:
the method comprises the steps of building a mounting unit, wherein the mounting unit is used for building a development environment, and mounting an ISO mirror image of the slit in the development environment;
the file manufacturing unit is used for manufacturing a target rootfs.gz file according to the software to be installed and the ISO mirror image;
and the image making unit is used for making and issuing an ISO image according to the target rootfs.gz file.
Further, the construction and mounting unit comprises an environment construction module, a network configuration module and a list updating module;
the environment building module is used for installing a virtual machine and mounting an ISO mirror image of the slit in the virtual machine to obtain a master machine with the ISO mirror image;
the network configuration module is used for configuring a master machine network so that the master machine can normally surf the internet;
and the list updating module is used for updating the master software list and installing a compiling tool chain.
Further, the file making unit comprises a catalog newly-built module, a file copying module, a file unpacking module, a file deleting module, a software copying module and a file packing module;
the catalog creation module is used for creating a rootfsn catalog under the host;
the file copying module is used for copying the original rootfs.gz file in the ISO mirror image to the rootfsn directory;
the file unpacking module is used for unpacking the original rootfs.gz file to obtain an unpacked file;
the file deleting module is used for deleting the original rootfs.gz file to obtain a rootfsn directory containing unpacked files;
the software copying module is used for copying the software to be installed to the rootfsn directory and installing the software;
and the file packaging module is used for exiting the rootfsn directory and packaging to form a target rootfs.gz file.
The application also adopts the following technical scheme: a computer device comprising a memory and a processor, the memory having stored thereon a computer program, the processor implementing the slit-based lightweight Linux system customization method of any of the above claims when executing the computer program.
The application also adopts the following technical scheme: a storage medium storing a computer program which when executed by a processor implements a slit-based lightweight Linux system customization method according to any of the preceding claims.
Compared with the prior art, the application has the beneficial effects that: the software to be released is added into the ISO mirror image of the split release edition and then repackaged into the mirror image file, so that the Linux release edition is not required to be installed, the problem of compatibility of the software in the Linux system is not required to be worried, the working efficiency can be greatly improved, and the maintenance cost is reduced.
The application is further described below with reference to the drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scene schematic diagram of a lightweight Linux system customization method based on slit provided by the embodiment of the application;
FIG. 2 is a composition profile of an ISO image file;
FIG. 3 is a schematic flow chart of a lightweight Linux system customization method based on slit according to an embodiment of the present application;
FIG. 4 is a schematic sub-flowchart of a lightweight Linux system customization method based on slit according to an embodiment of the present application;
FIG. 5 is a schematic sub-flowchart of a lightweight Linux system customization method based on slit according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of a lightweight Linux system customization device based on Sliaz according to another embodiment of the present application;
FIG. 7 is a schematic block diagram of a construction and mounting unit of a lightweight Linux system customization device based on slit according to an embodiment of the present application;
FIG. 8 is a schematic block diagram of a file making unit of a lightweight Linux system customization device based on slit according to an embodiment of the present application;
FIG. 9 is a schematic block diagram of a mirror image making unit of a lightweight Linux system customization device based on slit according to an embodiment of the present application;
fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1 and fig. 3, fig. 1 is an application scenario schematic diagram of a lightweight Linux system customization method based on slit according to an embodiment of the present application. Fig. 3 is a schematic flow chart of a lightweight Linux system customization method based on slit provided by an embodiment of the application. The lightweight Linux system customization method based on the slit is applied to a server, the server performs data interaction with a terminal, the terminal uploads an ISO image of the slit to the server, a development environment is built at a server end, the ISO image of the slit is mounted in the development environment, a target rootfs.gz file is manufactured according to software to be installed and the ISO image, and an ISO image is manufactured and issued according to the target rootfs.gz file.
Linux is a freely used and freely spread Unix-like operating system, and is a multi-user, multi-tasking, multi-thread and multi-CPU-supporting operating system based on POSIX and Unix.
Fig. 3 is a flow chart of a lightweight Linux system customization method based on slit according to an embodiment of the present application. As shown in fig. 3, the method includes the following steps S10 to S30.
S10, building a development environment, and mounting an ISO mirror image of the slit in the development environment.
In this embodiment, sliTaz is a microminiature Linux release, the mirror image is generally only about 40M, and can be loaded from an optical disc or a USB (Universal Serial Bus ) device, and can be completely run in a memory, or can be installed in a hard disc, referring to fig. 2, which is a profile of an ISO mirror image file of SliTaz, and the ISO mirror image of SliTaz includes a Linux file system (rootfs) formed by rootfs.gz files, and a Linux kernel (BzImage) that can be obtained by unpacking ISO.
Specifically, prior to step S10, an ISO image of the slit release is also acquired from the official network. The slit web may be downloaded directly to the ISO image of the slit release.
According to the scheme, when a required lightweight Linux system is customized according to the ISO mirror image of the slit release, a development environment is required to be built for further operation of the ISO. In the scheme, by installing the virtual machine, further operations such as network configuration, software list updating and the like are performed on the ISO mirror image in the virtual machine, and the operations such as data backup, simulation test and the like are facilitated by operating the ISO mirror image through the virtual machine.
In one embodiment, referring to FIG. 4, step S10 includes steps S11-S13.
S11, installing the virtual machine, and mounting an ISO mirror image of the Sltaz in the virtual machine to obtain a master machine with the installed ISO mirror image.
In this embodiment, a virtual box is installed as an operation virtual machine, and an ISO image of the downloaded slit is installed in the virtual box to obtain a master with the installed ISO image, and further operations are performed based on the master.
S12, configuring a master network so that the master can normally surf the Internet.
In this embodiment, the host network is configured so as to be able to connect to the internet normally. If the software (such as a network card driver) to be compiled is needed to be added in the mirror image, the method can be finished on a mother machine.
S13, updating the master software list and installing a compiling tool chain.
In this embodiment, the software list of the host is updated by using the command "tazppkg recycle", and then the software can be normally installed on line in the host. Installing a compiling tool chain: tazppkg get-installslitaz-toolchain. And finishing compiling and installing the driver needing to be newly compiled on the mother machine, remembering commands after make install, and copying the processed driver to a place needing to be installed.
S20, manufacturing a target rootfs.gz file according to the software to be installed and the ISO mirror image.
In this embodiment, referring to fig. 2, which is a profile diagram of an ISO image file of SliTaz, the ISO image of SliTaz includes a Linux file system (rootfs) formed by rootfs.gz image files, and a Linux kernel (BzImage), an original rootfs.gz file may be obtained by unpacking the ISO, and software pre-installation is performed based on the original rootfs.gz file.
Referring to FIG. 5, in one embodiment, step S20 includes steps S21-S26.
S21, newly creating a rootfsn directory under the master machine.
S22, copying the original rootfs.gz file in the ISO mirror image to a rootfsn directory.
In this embodiment, a directory is created somewhere under the master using the "mkdir rootfsn" command, copying the original rootfs.gz file of the ISO image therein to the rootfsn directory.
S23, unpacking the original rootfs.gz file to obtain an unpacked file.
In this embodiment, after the original rootfs.gz file is copied to the rootfsn directory, the rootfsn directory is entered, and the instruction "(zcat rootfs.gz 2>/dev/null||lzma d rootfs.gz-so) |cpio-id" is used to unpack the rootfs.gz, to obtain the unpacked file.
S24, deleting the original rootfs.gz file to obtain a rootfsn directory containing the unpacked file.
In this embodiment, after obtaining the unpacked file of the original rootfs.gz file, the original rootfs.gz file is deleted, and then we obtain a rootfsn directory containing the unpacked file, and use the command to switch the root directory, and the root directory seen after this is the previous rootfsn directory. The command "udhcpc-I eth0" is used to re-acquire the ip address, so that the master is normally connected to the network.
S25, copying the software to be installed to the rootfsn directory and installing.
In this embodiment, the software to be installed may be Locale-zh_CN, qt4, qt-Locale-zh_CN or Mysql-client. Copying the compiled software package of the software to be installed to a rootfsn directory, and clicking to install the corresponding software after executing the makeinstal output command recorded above.
S26, exiting the rootfsn directory, and packaging to form a target rootfs.gz file.
In this embodiment, the "exit" command is used to exit the rootfsn directory, with the latter operational root directory being the root directory of the parent. And packing the unpacked file and the installed software package under the rootfsn directory to form a target rootfs.gz file, installing the target rootfs.gz file and the corresponding software program, and obtaining the target rootfs.gz file in the upper directory of the rootfsn directory.
S30, manufacturing and issuing an ISO mirror image according to the target rootfs.gz file.
In this embodiment, an bootable ISO image using isolinux is built by packaging the obtained target rootfs.gz file with a Linux kernel (bzImage), and a light-weight customized Linux system based on slit is obtained by packaging the bootable ISO image using an mkisofs command, and by adding software to be issued and a corresponding dependency package in the slit release system and then repackaging the software into an ISO image file, the Linux release is not required to be installed, and the problem of software compatibility caused by unadaptation of the Linux system is not required to be worried, so that the working efficiency is greatly improved, and the maintenance cost is reduced.
In one embodiment, step S30 includes step S31.
S31, packaging the target rootfs.gz file with a Linux kernel to generate an ISO mirror image of the target Linux system.
In the implementation, the Linux application program is conveniently issued by customizing the Linux system, and finally issued ISO mirror images are generally within 100M and can be loaded and operated through the USB flash disk, so that the method is convenient and quick, and good in compatibility.
According to the method, the software to be installed, which is required to be issued, is added into the ISO mirror image of the split release, and then the mirror image file is repackaged, so that the Linux release is not required to be installed, the problem of compatibility of the software in the Linux system is not required to be worried, the working efficiency can be greatly improved, and the maintenance cost is reduced.
Fig. 6 is a schematic block diagram of a lightweight Linux system customization device based on slit provided by an embodiment of the application. As shown in FIG. 6, the application further provides a lightweight Linux system customization device based on the slit, which corresponds to the lightweight Linux system customization method based on the slit. The lightweight Linux system customization device based on the slit comprises a unit for executing the lightweight Linux system customization method based on the slit, and the device can be configured in a desktop computer, a tablet computer, a portable computer, and other terminals. Specifically, referring to fig. 6, the lightweight Linux system customization device based on slit includes a set-up mounting unit 10, a file making unit 20 and a mirror image making unit 30.
The mounting unit 10 is used for building a development environment in which the ISO image of slit is mounted.
In this embodiment, sliTaz is a microminiature Linux release, the mirror image is generally only about 40M, and can be loaded from an optical disc or a USB device, and run in a memory entirely, or be installed in a hard disc, referring to fig. 2, the SliTaz is a profile of an ISO mirror image file, and the ISO mirror image of the SliTaz includes a Linux file system (rootfs) formed by rootfs.gz files, and a Linux kernel (BzImage) that can be obtained by unpacking the ISO.
It is also necessary to obtain an ISO image of the slit release from the official network before the environment is set up. The slit web may be downloaded directly to the ISO image of the slit release.
According to the scheme, when a required lightweight Linux system is customized according to the ISO mirror image of the slit release, a development environment is required to be built for further operation of the ISO. In the scheme, by installing the virtual machine, further operations such as network configuration, software list updating and the like are performed on the ISO mirror image in the virtual machine, and the operations such as data backup, simulation test and the like are facilitated by operating the ISO mirror image through the virtual machine.
In an embodiment, as shown in fig. 7, the building and mounting unit 10 includes an environment building module 11, a network configuration module 12, and a list updating module 13.
The environment setting up module 11 is used for installing a virtual machine and mounting an ISO image of the slit in the virtual machine to obtain a master machine with the ISO image installed.
In this embodiment, a virtual box is installed as an operation virtual machine, and an ISO image of the downloaded slit is installed in the virtual box to obtain a master with the installed ISO image, and further operations are performed based on the master.
The network configuration module 12 is configured to configure the host network so that the host can normally surf the internet.
In this embodiment, the host network is configured so as to be able to connect to the internet normally. If the software (such as a network card driver) to be compiled is needed to be added in the mirror image, the method can be finished on a mother machine.
The list updating module 13 is configured to update the parent software list and install the compiling tool chain.
In this embodiment, the software list of the host is updated by using the command "tazppkg recycle", and then the software can be normally installed on line in the host. Installing a compiling tool chain: tazppkg get-installslitaz-toolchain. And finishing compiling and installing the driver needing to be newly compiled on the mother machine, remembering commands after make install, and copying the processed driver to a place needing to be installed.
And the file making unit 20 is used for making a target rootfs.gz file according to the software to be installed and the ISO image.
In this embodiment, referring to fig. 2, which is a profile diagram of an ISO image file of SliTaz, the ISO image of SliTaz includes a Linux file system (rootfs) formed by rootfs.gz image files, and a Linux kernel (BzImage), an original rootfs.gz file may be obtained by unpacking the ISO, and software pre-installation is performed based on the original rootfs.gz file.
In one embodiment, referring to fig. 8, the file creating unit 20 includes a directory creation module 21, a file copy module 22, a file unpacking module 23, a file deletion module 24, a software copy module 25, and a file packing module 26.
And the catalog creation module 21 is used for creating a rootfsn catalog under the master.
The file copying module 22 is used for copying the original rootfs.gz file in the ISO image to the rootfsn directory.
In this embodiment, a directory is created somewhere under the master using the "mkdir rootfsn" command, copying the original rootfs.gz file of the ISO image therein to the rootfsn directory.
The file unpacking module 23 is configured to unpack the original rootfs.gz file to obtain an unpacked file.
In this embodiment, after the original rootfs.gz file is copied to the rootfsn directory, the rootfsn directory is entered, and the instruction "(zcat rootfs.gz 2>/dev/null||lzma d rootfs.gz-so) |cpio-id" is used to unpack the rootfs.gz, to obtain the unpacked file.
The file deleting module 24 is configured to delete the original rootfs.gz file to obtain a rootfsn directory containing the unpacked file.
In this embodiment, after obtaining the unpacked file of the original rootfs.gz file, the original rootfs.gz file is deleted, and then we obtain a rootfsn directory containing the unpacked file, and use the command to switch the root directory, and the root directory seen after this is the previous rootfsn directory. The command "udhcpc-I eth0" is used to re-acquire the ip address, so that the master is normally connected to the network.
A software copying module 25 for copying and installing the software to be installed to the rootfsn directory.
In this embodiment, the software to be installed may be Locale-zh_CN, qt4, qt-Locale-zh_CN or Mysql-client. Copying the compiled software package of the software to be installed to the rootfsn directory, and clicking to install the corresponding software after executing the makeinstal output command recorded before.
The file packaging module 26 is configured to exit the rootfsn directory and package the rootfsn directory to form a target rootfs.gz file.
In this embodiment, the "exit" command is used to exit the rootfsn directory, with the latter operational root directory being the root directory of the parent. And packing the unpacked file and the installed software package under the rootfsn directory to form a target rootfs.gz file, installing the target rootfs.gz file and the corresponding software program, and obtaining the target rootfs.gz file in the upper directory of the rootfsn directory.
And the image making unit 30 is used for making and issuing an ISO image according to the target rootfs.gz file.
In this embodiment, an bootable ISO image using isolinux is built by packaging the obtained target rootfs.gz file with a Linux kernel (bzImage), and a light-weight customized Linux system based on slit is obtained by packaging the bootable ISO image using an mkisofs command, and by adding software to be issued and a corresponding dependency package in the slit release system and then repackaging the software into an ISO image file, the Linux release is not required to be installed, and the problem of software compatibility caused by unadaptation of the Linux system is not required to be worried, so that the working efficiency is greatly improved, and the maintenance cost is reduced.
In one embodiment, as shown in fig. 9, the mirror image creation unit 30 includes a mirror image creation module 31.
In the implementation, the Linux application program is conveniently issued by customizing the Linux system, and finally issued ISO mirror images are generally within 100M and can be loaded and operated through the USB flash disk, so that the method is convenient and quick, and good in compatibility.
According to the method, the software to be installed, which is required to be issued, is added into the ISO mirror image of the split release, and then the mirror image file is repackaged, so that the Linux release is not required to be installed, the problem of compatibility of the software in the Linux system is not required to be worried, the working efficiency can be greatly improved, and the maintenance cost is reduced.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the lightweight Linux system customization device and each unit based on the slit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted here.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster formed by a plurality of servers.
With reference to FIG. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a slit-based lightweight Linux system customization method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a lightweight Linux system customization method based on slit.
The network interface 505 is used for network communication with other devices. It will be appreciated by those skilled in the art that the structure shown in FIG. 10 is merely a block diagram of some of the structures associated with the present inventive arrangements and does not constitute a limitation of the computer device 500 to which the present inventive arrangements may be applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
Wherein the processor 502 is adapted to run a computer program 5032 stored in a memory.
It should be appreciated that in an embodiment of the application, the processor 502 may be a central processing unit (CentralProcessing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (DigitalSignal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a storage medium. The storage medium may be a computer readable storage medium.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (5)

1. A lightweight Linux system customization method based on slit is characterized by comprising the following steps:
building a development environment, and mounting an ISO mirror image of the slit in the development environment;
making a target rootfs.gz file according to the software to be installed and the ISO mirror image;
manufacturing and issuing an ISO mirror image according to the target rootfs.gz file;
the step of constructing a development environment and mounting the ISO mirror image of the slit in the development environment comprises the following steps:
installing a virtual machine, and mounting an ISO mirror image of the split in the virtual machine to obtain a master machine with the installed ISO mirror image;
configuring a master network so that the master can normally surf the internet;
updating a master software list and installing a compiling tool chain;
the step of manufacturing the target rootfs.gz file according to the software to be installed and the ISO mirror image comprises the following steps:
newly creating a rootfsn directory under a master machine;
copying the original rootfs.gz file in the ISO mirror image to a rootfsn directory;
unpacking the original rootfs.gz file to obtain an unpacked file;
deleting the original rootfs.gz file to obtain a rootfsn directory containing unpacked files;
copying the software to be installed to a rootfsn directory and installing;
exiting the rootfsn directory, and packaging to form a target rootfs.gz file;
the step of issuing the ISO mirror image according to the target rootfs.gz file comprises the following steps:
packaging the target rootfs.gz file with a Linux kernel to generate an ISO mirror image of a target Linux system;
wherein, the command 'tazppkg recycle' is used for updating the software list of the mother machine, and a compiling tool chain is installed: tazppkg get-installslitaz-toolchain; the driver program needing to be newly compiled is compiled and installed on a host machine, and commands after make install are memorized;
the ISO image of the slit comprises a Linux file system and a Linux kernel, wherein the Linux file system is composed of rootfs.gz image files;
creating a catalog by using an 'mkdir rootfsn' command under a master machine, and copying an original rootfs.gz file of an ISO mirror image to the rootfsn catalog;
after the original rootfs.gz file is copied to the rootfsn directory, entering the rootfsn directory, and unpacking the rootfs.gz by using a command of (zcat rootfs.gz 2>/dev/null I lzma d rootfs.gz-so) I cpio-id to obtain an unpacked file;
after the unpacking file of the original file is obtained, deleting the original rootfs.gz file to obtain a rootfsn directory containing the unpacking file, switching the root directory by using a command, wherein the root directory seen after the process is the previous rootfsn directory; the command "udhcpc-I eth0" is used for re-acquiring the ip address, so that the master is normally connected with the network;
copying the compiled software package of the software to be installed to a rootfsn directory, and clicking to install the corresponding software after executing the previously recorded make install output command;
the 'exit' command is used for exiting the rootfsn directory, and the latter operation root directory is the root directory of the master; packaging unpacked files and installed software packages under a rootfsn directory to form target rootfsn files, installing the target rootfsn files and corresponding software programs, obtaining target rootfs.gz files in an upper directory of the rootfsn directory, and regenerating usable ISO image files according to the target rootfs.gz files and Linux kernels;
and packaging the obtained target rootfs.gz file with a Linux kernel, establishing an activatable ISO mirror image using isolinux, and packaging the bootable ISO mirror image into a final ISO mirror image by using an mkisofs command to obtain the lightweight customized Linux system based on the slit.
2. The method for customizing a lightweight Linux system based on slit according to claim 1, wherein the step of constructing a development environment and mounting an ISO image of slit in the development environment is preceded by the steps of:
an ISO image of the slit release was obtained from the official network.
3. Lightweight Linux system customization device based on slit, characterized by comprising:
the method comprises the steps of building a mounting unit, wherein the mounting unit is used for building a development environment, and mounting an ISO mirror image of the slit in the development environment;
the file manufacturing unit is used for manufacturing a target rootfs.gz file according to the software to be installed and the ISO mirror image;
the mirror image making unit is used for making and issuing an ISO mirror image according to the target rootfs.gz file;
the construction and mounting unit comprises an environment construction module, a network configuration module and a list updating module;
the environment building module is used for installing a virtual machine and mounting an ISO mirror image of the slit in the virtual machine to obtain a master machine with the ISO mirror image;
the network configuration module is used for configuring a master machine network so that the master machine can normally surf the internet;
the list updating module is used for updating the master software list and installing a compiling tool chain;
the file making unit comprises a catalog new module, a file copying module, a file unpacking module, a file deleting module, a software copying module and a file packing module,
the catalog creation module is used for creating a rootfsn catalog under the host;
the file copying module is used for copying the original rootfs.gz file in the ISO mirror image to the rootfsn directory;
the file unpacking module is used for unpacking the original rootfs.gz file to obtain an unpacked file; the file deleting module is used for deleting the original rootfs.gz file to obtain a rootfsn directory containing unpacked files;
the software copying module is used for copying the software to be installed to the rootfsn directory and installing the software;
the file packaging module is used for exiting the rootfsn directory and packaging to form a target rootfs.gz file;
in the mirror image making unit, the target rootfs.gz file and the Linux kernel are packaged to generate an ISO mirror image of the target Linux system;
wherein, the command 'tazppkg recycle' is used for updating the software list of the mother machine, and a compiling tool chain is installed: tazppkg get-installslitaz-toolchain; the driver program needing to be newly compiled is compiled and installed on a host machine, and commands after make install are memorized;
the ISO image of the slit comprises a Linux file system and a Linux kernel, wherein the Linux file system is composed of rootfs.gz image files;
creating a catalog by using an 'mkdir rootfsn' command under a master machine, and copying an original rootfs.gz file of an ISO mirror image to the rootfsn catalog;
after the original rootfs.gz file is copied to the rootfsn directory, entering the rootfsn directory, and unpacking the rootfs.gz by using a command of (zcat rootfs.gz 2>/dev/null I lzma d rootfs.gz-so) I cpio-id to obtain an unpacked file;
after the unpacking file of the original file is obtained, deleting the original rootfs.gz file to obtain a rootfsn directory containing the unpacking file, switching the root directory by using a command, wherein the root directory seen after the process is the previous rootfsn directory; the command "udhcpc-I eth0" is used for re-acquiring the ip address, so that the master is normally connected with the network;
copying the compiled software package of the software to be installed to a rootfsn directory, and clicking to install the corresponding software after executing the previously recorded make install output command;
the 'exit' command is used for exiting the rootfsn directory, and the latter operation root directory is the root directory of the master; packaging unpacked files and installed software packages under a rootfsn directory to form target rootfsn files, installing the target rootfsn files and corresponding software programs, obtaining target rootfs.gz files in an upper directory of the rootfsn directory, and regenerating usable ISO image files according to the target rootfs.gz files and Linux kernels;
and packaging the obtained target rootfs.gz file with a Linux kernel, establishing an activatable ISO mirror image using isolinux, and packaging the bootable ISO mirror image into a final ISO mirror image by using an mkisofs command to obtain the lightweight customized Linux system based on the slit.
4. A computer device, characterized in that the computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the lightweight Linux system customization method based on slit according to any of claims 1-2 when executing the computer program.
5. A storage medium storing a computer program which, when executed by a processor, implements a slit-based lightweight Linux system customization method according to any of claims 1 to 2.
CN201911052351.6A 2019-10-31 2019-10-31 Lightweight Linux system customization method based on slit, device computer equipment and storage medium Active CN110806876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911052351.6A CN110806876B (en) 2019-10-31 2019-10-31 Lightweight Linux system customization method based on slit, device computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911052351.6A CN110806876B (en) 2019-10-31 2019-10-31 Lightweight Linux system customization method based on slit, device computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110806876A CN110806876A (en) 2020-02-18
CN110806876B true CN110806876B (en) 2023-12-05

Family

ID=69489792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911052351.6A Active CN110806876B (en) 2019-10-31 2019-10-31 Lightweight Linux system customization method based on slit, device computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110806876B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857729A (en) * 2020-07-23 2020-10-30 深圳忆联信息系统有限公司 Network card drive compiling method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375867A (en) * 2014-11-25 2015-02-25 浪潮电子信息产业股份有限公司 Method for manufacturing ISO mirror image by customizing Linux system
WO2019153829A1 (en) * 2018-02-12 2019-08-15 人和未来生物科技(长沙)有限公司 Method and system for rapid generation of container dockerfile and container mirror image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375867A (en) * 2014-11-25 2015-02-25 浪潮电子信息产业股份有限公司 Method for manufacturing ISO mirror image by customizing Linux system
WO2019153829A1 (en) * 2018-02-12 2019-08-15 人和未来生物科技(长沙)有限公司 Method and system for rapid generation of container dockerfile and container mirror image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
用SD卡定制嵌入式Linux系统的最小系统;茅胜荣等;《单片机与嵌入式系统应用》;第17卷(第10期);22-26 *

Also Published As

Publication number Publication date
CN110806876A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
US5842024A (en) Method of software installation
US20210240489A1 (en) Firmware update patch
US8839221B2 (en) Automatic acquisition and installation of software upgrades for collections of virtual machines
US7774762B2 (en) System including run-time software to enable a software application to execute on an incompatible computer platform
WO2017071494A1 (en) Application deployment method and apparatus
US8914785B2 (en) Providing virtual appliance system firmware images
US20030233644A1 (en) System and method for manipulating offline software
CN107733985B (en) Method and device for deploying functional components of cloud computing system
CN111580926A (en) Model publishing method, model deploying method, model publishing device, model deploying device, model publishing equipment and storage medium
US9141400B2 (en) Technique for deploying operating systems in a virtualized environment
JP6198229B2 (en) Installation engine and package format for parallelizable and reliable installation
CN110806876B (en) Lightweight Linux system customization method based on slit, device computer equipment and storage medium
CN112860251A (en) Method and system for constructing website front end
CN106293790B (en) application program upgrading method and device based on Firefox operating system
US11385923B2 (en) Container-based virtualization system extending kernel functionality using kernel modules compiled by a compiling container and loaded by an application container
CN113821220A (en) Installation method and device of linux operating system
US11256519B2 (en) Using a single process to install a UEFI-supported OS or a non-UEFI supported OS on a hardware platform
CN113407257A (en) Mysql cluster deployment method and device, electronic equipment and storage medium
Srivastava et al. An open-source SWUpdate and Hawkbit framework for OTA Updates of RISC-V based resource constrained devices
CN114490103A (en) Operating system interface calling method and device and electronic equipment
US11573782B2 (en) Self updating agent
US20230018586A1 (en) Systems and methods for distributing and executing loadable embedded software extensions in industrial controllers
CN104424000A (en) Method and system for upgrading operating system
CN112416886A (en) Linux system starting method and device
CN116166283A (en) Container arrangement deployment method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant