技术领域technical field
本发明涉及计算机技术领域,具体地说是一种实用性强、针对定制化系统生成通用RPM格式RAID卡驱动的方法。The invention relates to the technical field of computers, in particular to a method for generating a universal RPM format RAID card drive for a customized system with strong practicability.
背景技术Background technique
Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的操作系统。由于Linux系统是开源的系统,很多客户在标准版的系统下做出了很多针对各种应用的OS,这类OS就是定制化系统。定制化的系统基本无法安装厂商提供的标准驱动,需要安装gcc、make等工具,编译安装源码驱动,操作比较复杂。针对上述问题,本发明设计了一种操作简单、易于实现的针对定制化系统生成通用RPM格式RAID卡驱动的方法。Linux is a set of Unix-like operating systems that are free to use and spread freely. It is a POSIX and UNIX-based multi-user, multi-tasking, multi-threading and multi-CPU operating system. Because the Linux system is an open source system, many customers have made many OSs for various applications under the standard version of the system. This type of OS is a customized system. The customized system basically cannot install the standard driver provided by the manufacturer. It needs to install tools such as gcc and make, compile and install the source code driver, and the operation is more complicated. Aiming at the above problems, the present invention designs a method for generating a universal RPM format RAID card driver for a customized system, which is simple in operation and easy to implement.
发明内容Contents of the invention
本发明的技术任务是针对以上不足之处,提供一种实用性强、针对定制化系统生成通用RPM格式RAID卡驱动的方法。The technical task of the present invention is to provide a practical method for generating a general-purpose RPM format RAID card driver for a customized system aiming at the above deficiencies.
一种针对定制化系统生成通用RPM格式RAID卡驱动的方法,其实现过程为:在定制化系统下编译安装RAID卡的源码驱动,然后通过自动脚本生成一个适用于该定制化系统的RPM格式的RAID卡驱动,生成完成后,通过其他机器直接安装RPM格式的驱动进行验证即可。A method for generating a general-purpose RPM format RAID card driver for a customized system. The implementation process is: compile and install the source code driver of the RAID card under the customized system, and then generate an RPM format driver suitable for the customized system through an automatic script. After the RAID card driver is generated, you can directly install the driver in RPM format through other machines for verification.
更为具体的,本发明的实现过程为:More specifically, the realization process of the present invention is:
首先,设置一台安装有定制化系统的服务器,并在系统下安装软件包,该软件包包括gcc、make软件包;First, set up a server with a customized system installed, and install software packages under the system, which include gcc and make software packages;
其次,拷贝RAID卡的源码驱动和自动生成脚本到系统下的特定文件夹下;通过make命令编译并安装源码驱动,安装成功后重启机器,并查询驱动版本是否正确;Secondly, copy the source code driver and the automatically generated script of the RAID card to a specific folder under the system; compile and install the source code driver through the make command, restart the machine after the installation is successful, and check whether the driver version is correct;
最后,通过自动生成RPM的脚本文件生成定制化系统的RPM格式的RAID卡驱动,生成完成后,通过其他机器进行验证。Finally, the RAID card driver in RPM format of the customized system is generated by automatically generating the RPM script file. After the generation is completed, it is verified by other machines.
上述安装有定制化系统的服务器是指装有定制化Linux系统的的测试平台服务器,该测试平台包括测试服务器主机平台、硬盘,并在测试主机上安装主流定制化Linux系统。The server with the customized system installed above refers to the test platform server equipped with the customized Linux system. The test platform includes the test server host platform and hard disk, and the mainstream customized Linux system is installed on the test host.
基于上述定制化系统,生成通用RPM格式RAID卡驱动的具体过程为:Based on the above customized system, the specific process of generating the universal RPM format RAID card driver is as follows:
将测试主机上电开机,进入操作系统,使用root用户登录;Power on the test host, enter the operating system, and log in as the root user;
将包括gcc、make的编译工具包、RAID卡源码驱动和生成RPM脚本工具拷贝到系统特定的目录下;Copy the compilation toolkit including gcc and make, the source driver of the RAID card and the script tool for generating RPM to the system-specific directory;
安装包括gcc、make的编译工具,使用编译命令安装RAID卡源码驱动;Install the compilation tools including gcc and make, and use the compilation command to install the source code driver of the RAID card;
重启机器,再次以ROOT权限进入系统,使用生成RPM脚本生成定制化系统的RPM格式的驱动;Restart the machine, enter the system again with ROOT authority, and use the generate RPM script to generate the RPM format driver of the customized system;
换另一台没有安装过驱动的定制化Linux系统的机器,使用生成的RPM格式的驱动安装驱动,重启之后查看驱动版本是否升级成功。Change to another machine with a customized Linux system that has not installed the driver, use the generated RPM format driver to install the driver, and restart to check whether the driver version is upgraded successfully.
本发明的一种针对定制化系统生成通用RPM格式RAID卡驱动的方法,具有以下优点:A kind of method that the present invention generates universal RPM format RAID card driver for customized system has the following advantages:
本发明的一种针对定制化系统生成通用RPM格式RAID卡驱动的方法,可以实现在主流Linux系统版本下定制化的RPM格式驱动生成,方便定制化系统的快速安装驱动,不需要再多次安装编译工具并编译源码驱动,完全符合目前客户进行RAID卡维护的需要,简洁、省时、易操作,实现快速的RAID卡驱动更新,实用性强,适用范围广泛,易于推广。A method for generating a universal RPM format RAID card driver for a customized system according to the present invention can realize the generation of a customized RPM format driver under the mainstream Linux system version, which is convenient for quick installation of the driver for the customized system, and does not need to be installed multiple times Compile the tool and compile the source code driver, which fully meets the current needs of customers for RAID card maintenance. It is simple, time-saving, and easy to operate, and realizes fast RAID card driver updates. It has strong practicability, a wide range of applications, and is easy to promote.
附图说明Description of drawings
附图1为本发明的实现流程图。Accompanying drawing 1 is the realization flowchart of the present invention.
具体实施方式detailed description
下面结合附图及具体实施例对本发明作进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
如附图1所示,本发明提出本发明提出一种针对定制化系统生成通用RPM格式RAID卡驱动的方法,通过自动脚本生成一个适用于这个定制化系统的RPM格式的RAID卡驱动,其他机器可以直接安装RPM格式的驱动,而不需要再进行编译,可以方便服务器的RAID卡管理,大大降低维护时间以及人力资源的成本。As shown in accompanying drawing 1, the present invention proposes a method for generating a general-purpose RPM format RAID card driver for a customized system, and generates an RPM format RAID card driver suitable for this customized system through an automatic script, and other machines The driver in RPM format can be installed directly without recompilation, which can facilitate the management of the server's RAID card and greatly reduce maintenance time and human resource costs.
包括以下步骤:Include the following steps:
在定制化系统下编译安装RAID卡的源码驱动,然后通过自动脚本生成一个适用于该定制化系统的RPM格式的RAID卡驱动,生成完成后,通过其他机器直接安装RPM格式的驱动进行验证即可。Compile and install the source code driver of the RAID card under the customized system, and then generate a RAID card driver in RPM format suitable for the customized system through an automatic script. After the generation is completed, directly install the driver in RPM format on other machines for verification. .
首先,需要一台安装有定制化系统的服务器,并在系统下安装gcc、make等软件包。First, a server with a customized system is required, and software packages such as gcc and make are installed under the system.
其次,拷贝RAID卡的源码驱动和自动生成脚本到系统下的特定文件夹下。通过make命令编译并安装源码驱动,安装成功后重启机器,并查询驱动版本是否正确。Secondly, copy the source code driver and automatic generation script of the RAID card to a specific folder under the system. Compile and install the source code driver through the make command, restart the machine after the installation is successful, and check whether the driver version is correct.
最后,就可以通过自动生成RPM的脚本文件生成定制化系统的RPM格式的RAID卡驱动,生成完成后,可以找其他机器进行验证。Finally, the RAID card driver in the RPM format of the customized system can be generated by automatically generating the RPM script file. After the generation is completed, you can find other machines for verification.
针对定制化系统生成通用RPM格式RAID卡驱动的实现过程具体为:The implementation process of generating a universal RPM format RAID card driver for a customized system is as follows:
准备好装有定制化Linux系统的的测试平台(包括测试主机平台、硬盘在PMC RAD卡下组RAID,在测试主机上安装主流定制化Linux系统);Prepare a test platform with a customized Linux system (including the test host platform, the hard disk is grouped in RAID under the PMC RAD card, and the mainstream customized Linux system is installed on the test host);
将测试主机上电开机,进入操作系统,使用root用户登录;Power on the test host, enter the operating system, and log in as the root user;
将编译工具包(包括gcc、make等)、RAID卡源码驱动和生成RPM脚本工具拷贝到系统特定的目录下;Copy the compilation toolkit (including gcc, make, etc.), RAID card source code driver and RPM script generation tool to the system-specific directory;
该自动生成RPM格式驱动脚本主体部分如下:The main part of the automatically generated RPM format driver script is as follows:
#!/bin/bash#!/bin/bash
rm -rf /root/rpmbuild/BUILD/*rm -rf /root/rpmbuild/BUILD/*
rm -rf /root/rpmbuild/BUILDROOT/*rm -rf /root/rpmbuild/BUILDROOT/*
rm -rf /root/rpmbuild/RPMS/*rm -rf /root/rpmbuild/RPMS/*
rm -rf /usr/src/redhat/BUILD/rm -rf /usr/src/redhat/BUILD/
rm -rf /usr/src/redhat/BUILDROOT/rm -rf /usr/src/redhat/BUILDROOT/
rm -rf /usr/src/redhat/RPMS/rm -rf /usr/src/redhat/RPMS/
rm -rf /usr/src/redhat/SOURCES/rm -rf /usr/src/redhat/SOURCES/
rm -rf /usr/src/redhat/SPECS/rm -rf /usr/src/redhat/SPECS/
rm -rf /usr/src/redhat/SRPMS/rm -rf /usr/src/redhat/SRPMS/
rpm -ivh aacraid-1.2.1-50667.src.rpmrpm -ivh aacraid-1.2.1-50667.src.rpm
mkdir -p /usr/src/redhat/BUILD/mkdir -p /usr/src/redhat/BUILD/
mkdir -p /usr/src/redhat/BUILDROOT/mkdir -p /usr/src/redhat/BUILDROOT/
mkdir -p /usr/src/redhat/RPMS/mkdir -p /usr/src/redhat/RPMS/
mkdir -p /usr/src/redhat/SOURCES/mkdir -p /usr/src/redhat/SOURCES/
mkdir -p /usr/src/redhat/SPECS/mkdir -p /usr/src/redhat/SPECS/
mkdir -p /usr/src/redhat/SRPMS/mkdir -p /usr/src/redhat/SRPMS/
cp/root/rpmbuild/SOURCES/aacraid_source.tgz/usr/src/redhat/SOURCES/cp/root/rpmbuild/SOURCES/aacraid_source.tgz/usr/src/redhat/SOURCES/
cp./aacraid.src.spec /usr/src/redhat/SPECS/cp./aacraid.src.spec /usr/src/redhat/SPECS/
cd /usr/src/redhat/SPECS/cd /usr/src/redhat/SPECS/
chmod +x aacraid.src.specchmod +x aacraid.src.spec
rpmbuild -bb aacraid.src.specrpmbuild -bb aacraid.src.spec
cd –cd –
rm -rf ./outputrm -rf ./output
mkdir ./outputmkdir ./output
cp /root/rpmbuild/RPMS/x86_64/*aacraid* ./outputcp /root/rpmbuild/RPMS/x86_64/*aacraid* ./output
rm -rf /root/rpmbuild/BUILD/*rm -rf /root/rpmbuild/BUILD/*
rm -rf /root/rpmbuild/BUILDROOT/*rm -rf /root/rpmbuild/BUILDROOT/*
rm -rf /usr/src/redhat/BUILD/rm -rf /usr/src/redhat/BUILD/
rm -rf /usr/src/redhat/BUILDROOT/rm -rf /usr/src/redhat/BUILDROOT/
rm -rf /usr/src/redhat/RPMS/rm -rf /usr/src/redhat/RPMS/
rm -rf /usr/src/redhat/SOURCES/rm -rf /usr/src/redhat/SOURCES/
rm -rf /usr/src/redhat/SPECS/rm -rf /usr/src/redhat/SPECS/
rm -rf /usr/src/redhat/SRPMS/rm -rf /usr/src/redhat/SRPMS/
安装gcc、make等编译工具,使用编译命令安装RAID卡源码驱动。命令如下:Install gcc, make and other compilation tools, and use the compilation command to install the source code driver of the RAID card. The command is as follows:
make -C /lib/modules/`uname -r`/build M=`pwd` modules;make -C /lib/modules/`uname -r`/build M=`pwd` modules;
重启机器,再次以ROOT权限进入系统,使用生成RPM脚本生成定制化系统的RPM格式的驱动。Restart the machine, enter the system again with ROOT authority, and use the generate RPM script to generate the RPM format driver of the customized system.
换另一台没有安装过驱动的定制化Linux系统的机器,使用生成的RPM格式的驱动安装驱动,重启之后查看驱动版本是否升级成功。Change to another machine with a customized Linux system that has not installed the driver, use the generated RPM format driver to install the driver, and restart to check whether the driver version is upgraded successfully.
本方法实现了各处理器平台的针对定制化系统生成通用RPM格式RAID卡驱动,打破了传统定制化OS安装RAID卡驱动麻烦的局限性。其次定制化OS下RAID卡维护的方法,将复杂简化,改善为半自动化甚至是自动化的RAID卡驱动更新,非常适合各类定制化系统的客户使用。The method realizes the generation of common RPM format RAID card drivers for customized systems for each processor platform, and breaks the limitation of troublesome installation of RAID card drivers in traditional customized OSs. Secondly, the RAID card maintenance method under the customized OS simplifies the complexity and improves it into a semi-automatic or even automatic RAID card driver update, which is very suitable for customers of various customized systems.
上述具体实施方式仅是本发明的具体个案,本发明的专利保护范围包括但不限于上述具体实施方式,任何符合本发明的一种针对定制化系统生成通用RPM格式RAID卡驱动的方法的权利要求书的且任何所述技术领域的普通技术人员对其所做的适当变化或替换,皆应落入本发明的专利保护范围。The specific implementation described above is only a specific case of the present invention, and the scope of patent protection of the present invention includes but is not limited to the specific implementation described above, any claim in accordance with the present invention for a method of generating a universal RPM format RAID card driver for a customized system The appropriate changes or replacements made by those skilled in the art and those in the book shall fall within the scope of patent protection of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610837988.6ACN106528077A (en) | 2016-09-21 | 2016-09-21 | Method for generating universal RPM-format RAID card driver for customization system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610837988.6ACN106528077A (en) | 2016-09-21 | 2016-09-21 | Method for generating universal RPM-format RAID card driver for customization system |
| Publication Number | Publication Date |
|---|---|
| CN106528077Atrue CN106528077A (en) | 2017-03-22 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610837988.6APendingCN106528077A (en) | 2016-09-21 | 2016-09-21 | Method for generating universal RPM-format RAID card driver for customization system |
| Country | Link |
|---|---|
| CN (1) | CN106528077A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107766056A (en)* | 2017-10-17 | 2018-03-06 | 郑州云海信息技术有限公司 | One kind is used for Windows mirror images customization method and system |
| CN109471665A (en)* | 2018-10-31 | 2019-03-15 | 湖南国科微电子股份有限公司 | A kind of method of automatic installation Windows operating system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101819535A (en)* | 2010-04-16 | 2010-09-01 | 浪潮电子信息产业股份有限公司 | Method for compiling raid card driver in tobo linux 7.01 system |
| CN103514022A (en)* | 2013-10-22 | 2014-01-15 | 浪潮电子信息产业股份有限公司 | RAID card drive integration method under LINUX |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101819535A (en)* | 2010-04-16 | 2010-09-01 | 浪潮电子信息产业股份有限公司 | Method for compiling raid card driver in tobo linux 7.01 system |
| CN103514022A (en)* | 2013-10-22 | 2014-01-15 | 浪潮电子信息产业股份有限公司 | RAID card drive integration method under LINUX |
| Title |
|---|
| SPRINTFWATER: ""rpm打包原理学习"", 《HTTPS://BLOG.CSDN.NET/SPRINTFWATER/ARTICLE/DETAILS/43953201》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107766056A (en)* | 2017-10-17 | 2018-03-06 | 郑州云海信息技术有限公司 | One kind is used for Windows mirror images customization method and system |
| CN109471665A (en)* | 2018-10-31 | 2019-03-15 | 湖南国科微电子股份有限公司 | A kind of method of automatic installation Windows operating system |
| CN109471665B (en)* | 2018-10-31 | 2022-01-11 | 湖南国科微电子股份有限公司 | Method for automatically installing Windows operating system |
| Publication | Publication Date | Title |
|---|---|---|
| EP3518098B1 (en) | Cross platform content management and distribution system | |
| CN107577475B (en) | Software package management method and system of data center cluster system | |
| US8185889B2 (en) | Methods and systems for porting software packages from one format to another | |
| CN103793259B (en) | Virtual device generating and deploying method | |
| CN108255737A (en) | Based on multi version operating system testing method, system and equipment and storage medium | |
| CN103324474B (en) | Based on (SuSE) Linux OS across the method for System structure ISO and module | |
| CN106648724B (en) | Application hot repair method and terminal | |
| CN117170803B (en) | Method for generating signal-creation operating system pipeline, electronic equipment and storage medium | |
| CN105607903A (en) | A method of deploying openstack components | |
| CN105224358A (en) | Under a kind of cloud computing software automatically pack dispose system and method | |
| CN113342323A (en) | Method and device for software online development | |
| CN103678007A (en) | Method and system for deploying software in batches | |
| CN103136007A (en) | A method for generating an installation package of a cloud computing system | |
| CN106528077A (en) | Method for generating universal RPM-format RAID card driver for customization system | |
| CN103051711A (en) | Method for constructing embedded cloud terminal system based on SPICE protocol | |
| Xu et al. | Design and Operation of Shared Machine Learning Clusters on Campus | |
| US20200159522A1 (en) | Constructing build environments for software | |
| CN103677845A (en) | Website application deployment method | |
| CN105549965A (en) | Method for integrating driver into different Linux kernel versions | |
| CN112631897A (en) | Method for quickly debugging linux kernel | |
| CN118760447A (en) | A database cluster deployment method, device, equipment and readable storage medium | |
| CN112379934B (en) | Deployment method and device of cloud computing platform and storage medium | |
| CN111880808A (en) | Linux operating system construction and package management method | |
| CN103077063B (en) | Microcode Compilation Method and device | |
| CN105975313A (en) | Spec CPU installation method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20170322 | |
| RJ01 | Rejection of invention patent application after publication |