WO2024031864A1 - Automatic restoration method and system for vxworks system startup failure, storage medium, and device - Google Patents

Automatic restoration method and system for vxworks system startup failure, storage medium, and device Download PDF

Info

Publication number
WO2024031864A1
WO2024031864A1 PCT/CN2022/132732 CN2022132732W WO2024031864A1 WO 2024031864 A1 WO2024031864 A1 WO 2024031864A1 CN 2022132732 W CN2022132732 W CN 2022132732W WO 2024031864 A1 WO2024031864 A1 WO 2024031864A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
autoexec
bat
vxworks
config
Prior art date
Application number
PCT/CN2022/132732
Other languages
French (fr)
Chinese (zh)
Inventor
周浩尚
Original Assignee
中车大连电力牵引研发中心有限公司
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 中车大连电力牵引研发中心有限公司 filed Critical 中车大连电力牵引研发中心有限公司
Publication of WO2024031864A1 publication Critical patent/WO2024031864A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Definitions

  • the invention relates to the technical field of computer systems, and in particular to an automatic repair method, system, storage medium and equipment for VxWorks system startup failure.
  • the embedded real-time VxWorks operating system is widely used, mainly in fields with strong real-time requirements. Therefore, the requirements for its stability have also been increased, especially if a failure occurs, it will cause particularly serious and catastrophic consequences.
  • the high-speed EMU Central Control Unit (CCU) and Event Recording Unit (ERM) use the VxWorks operating system.
  • the former requires real-time processing of data, while the latter requires real-time recording of data, so the system requirements are higher. .
  • Whenever there is a problem with the CCU or ERM it will usually cause the machine to break down and report it to the safety supervision department of the railway Corporation.
  • the present invention discloses an automatic repair method for VxWorks system startup failure, which specifically includes the following steps:
  • config.sys file used to set selections and load the application menu.
  • the shell command calls the rainbow.exe file.
  • the rainbow.exe file is used to check the bootrom. Whether the bin file, the image file of the VxWorks operating system kernel and the autoexec.bat file can run normally;
  • the rainbow.exe file is used to check the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and start its configuration file.
  • the system After the system is powered on and enters the DOS system, it first loads the config.sys file and then the autoexec.bat file.
  • MENUITEM Configuration block name, menu content
  • An automatic repair system for VxWorks system startup failure including:
  • the configuration module configures the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
  • Format module format the device hard disk into DOS system
  • Setup module configure the config.sys file used to set, select and load the application menu in the DOS system, add a shell command in the config.sys file, the shell command calls the rainbow.exe file and is used to delete and copy the bootrom in the hard disk .bin file, image file, startup configuration file or autoexec.bat file of executable application;
  • Load the module enter the DOS system, first load the config.sys file, set the selection and load the application menu, run the rainbow.exe program, after the user selects the configuration block name, enter the autoexec.bat file processing process;
  • Analysis module in the rainbow.exe program, checks the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and its configuration files to start. When one or several of the above files have problems, delete them. For problematic files, copy the backed up bootrom.bin file, image file, startup configuration file and autoexec.bat file with the correct name to the original directory. After rainbow.exe finishes running, it enters the autoexec.bat file processing process. In the autoexec.bat file processing process, associate the config.sys file with the autoexec.bat file through the goto%config% command, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
  • a computer-readable storage medium stores a computer program.
  • the computer program is executed by a processor, the steps of the above method are implemented.
  • a universal device for starting and loading application programs under VxWorks including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program Steps to implement the above method.
  • the present invention provides an automatic repair method system, storage medium and equipment for VxWorks system startup failure.
  • This method edits config.sys, adds the startup patch rainbow.exe, and adds the startup patch rainbow.exe before booting the VxWorks system.
  • the integrity of the boot file is judged without modifying the VxWorks image, so all system files can be judged for attribute modification and file damage, and key system files can be backed up.
  • Figure 1 is a flow chart of the method of the present invention
  • Figure 2 is a structural block diagram of the system of the present invention.
  • Figure 3 is a schematic diagram of an embodiment of the present invention.
  • Figure 4 is a schematic diagram of an embodiment of the present invention.
  • Figure 5 is a schematic diagram of an embodiment of the present invention.
  • a method for automatic repair of VxWorks system startup failure is applied.
  • the invention is applied to all devices using the embedded VxWorks operating system and various application software running on this system.
  • This invention will automatically fix the problem and allow the VxWorks system to continue booting normally without affecting all other functions.
  • an automatic repair method for VxWorks system startup failure includes:
  • the configuration module configures the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
  • Format module format the device hard disk into DOS system
  • Setup module configure the config.sys file used to set, select and load the application menu in the DOS system, add a shell command in the config.sys file, the shell command calls the rainbow.exe file and is used to delete and copy the bootrom in the hard disk .bin file, image file, startup configuration file or autoexec.bat file of executable application;
  • Load the module enter the DOS system, first load the config.sys file, set the selection and load the application menu, run the rainbow.exe program, after the user selects the configuration block name, enter the autoexec.bat file processing process;
  • Analysis module in the rainbow.exe program, checks the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and its configuration files to start. When one or several of the above files have problems, delete them. For problematic files, copy the backed up bootrom.bin file, image file, startup configuration file and autoexec.bat file with the correct name to the original directory. After rainbow.exe finishes running, it enters the autoexec.bat file processing process. In the autoexec.bat file processing process, associate the config.sys file with the autoexec.bat file through the goto%config% command, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
  • the DOS system When the high-speed EMU central control unit CCU is powered on, the DOS system is started first. After the DOS system is started, the autoexec.bat file will automatically run. Its function is to perform system settings, such as: path (setting path), mouse (mouse startup), DOSkey (keyboard management), set (setting environment variables), etc. autoexec.bat can also be used to configure startup information, load drivers, etc. Damage to autoexec.bat will cause CCU to fail to start.
  • the startup process is shown in Figure 3. According to Figure 3, we can know that the "autoexec.bat” and "bootrom.bin” files need to be run in sequence before the VxWorks system starts. If you check whether the "autoexec.bat” and “bootrom.bin” files are damaged before running them, if they are damaged, then run the backup file or copy the backup file here to continue execution, which may avoid the CCU startup failure problem. .
  • the config.sys file is a professional system startup configuration file. It is mainly used to load memory management programs, set expanded memory and extended memory, load relevant hardware drivers, set relevant environment variables, etc., to create necessary settings for the normal use of the user's computer. user environment.
  • the name of config.sys comes from the configuration system, and its purpose is to make DOS and the computer work more harmoniously.
  • the rainbow patch program the executable file is rainbow.exe, is called in config.sys, so it can be run before running the "autoexec.bat” and "bootrom.bin” files.

Abstract

Disclosed in the present invention are an automatic restoration method and system for a VxWorks system startup failure, a storage medium, and a device. The method comprises: configuring, in a device carrying a VxWorks operating system, a bootrom file used for starting up and loading a VxWorks operating system mirror image file; formatting a device hard disk by using a DOS system; configuring, in a DOS system, a config.sys file used for setting, selecting and loading an application menu, entering the DOS system, firstly loading the config.sys file, setting, selecting and loading the application menu, and entering an autoexec.bat file processing flow after a configuration block name is selected; associating the config.sys file with the autoexec.bat file by means of a goto%config% command; by utilizing a file deletion and file copying command of the DOS system, deleting a faulty bootrom file, mirror image file, startup configuration file and autoexec.bat file; and copying the backed-up bootrom file, mirror image file, startup configuration file and autoexec.bat file into an original directory.

Description

VxWorks系统启动失败的自动修复方法、系统、存储介质及设备Automatic repair method, system, storage media and equipment for VxWorks system startup failure 技术领域Technical field
本发明涉及计算机系统技术领域,尤其涉及一种VxWorks系统启动失败的自动修复方法、系统、存储介质及设备。The invention relates to the technical field of computer systems, and in particular to an automatic repair method, system, storage medium and equipment for VxWorks system startup failure.
背景技术Background technique
目前嵌入式实时VxWorks操作系统应用十分广泛,主要应用在对实时性要求非常强的领域,因此也提高了对其稳定性的要求,特别是一旦出现故障就会造成特别重大的灾难性后果的情况下。高速动车组中央控制单元(Central Control Unit,CCU)和事件记录单元(Event Recording Unit ERM)即采用VxWorks操作系统,前者要求对数据进行即时处理,后者要求即时记录数据,因此对系统要求较高。每当CCU或ERM出现问题一般会造成机破,报铁路总公司安监部门,即使是在库内调车阶段,系统启动失败也要技术人员上车处理,而且处理过程很复杂且耗时较长,很有可能造成动车组晚点,从而影响旅客出行。At present, the embedded real-time VxWorks operating system is widely used, mainly in fields with strong real-time requirements. Therefore, the requirements for its stability have also been increased, especially if a failure occurs, it will cause particularly serious and catastrophic consequences. Down. The high-speed EMU Central Control Unit (CCU) and Event Recording Unit (ERM) use the VxWorks operating system. The former requires real-time processing of data, while the latter requires real-time recording of data, so the system requirements are higher. . Whenever there is a problem with the CCU or ERM, it will usually cause the machine to break down and report it to the safety supervision department of the Railway Corporation. Even during the shunting stage in the warehouse, if the system fails to start, technicians will have to get on the train to deal with it, and the processing process is very complicated and time-consuming. If the train is too long, it is very likely to cause the EMU to be delayed, thus affecting the travel of passengers.
发明内容Contents of the invention
根据现有技术存在的问题,本发明公开了一种VxWorks系统启动失败的自动修复方法,具体包括如下步骤:According to the problems existing in the prior art, the present invention discloses an automatic repair method for VxWorks system startup failure, which specifically includes the following steps:
在搭载VxWorks操作系统的设备中配置用于启动并加载VxWorks操作系统镜像文件的bootrom.bin文件;Configure the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
采用DOS系统对设备硬盘进行格式化;Use DOS system to format the device hard disk;
在DOS系统中配置用于设置选择并加载应用程序菜单的config.sys文件,在该config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件,该rainbow.exe文件用于检查bootrom.bin文件、VxWorks操作系统内核的镜像文件和autoexec.bat文件是否可以正常运行;In the DOS system, configure the config.sys file used to set selections and load the application menu. Add a shell command to the config.sys file. The shell command calls the rainbow.exe file. The rainbow.exe file is used to check the bootrom. Whether the bin file, the image file of the VxWorks operating system kernel and the autoexec.bat file can run normally;
开机上电后进入DOS系统,先加载config.sys文件,设置自动选择并加载应用程序菜单,选择完配置块名称后,根据该配置块下的shell命令运行rainbow.exe程序。后者检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件,当其中一个或几个上述文件有问题时,则删除有问题的文件,把同名无误的备份的bootrom.bin 文件、镜像文件、启动配置文件和autoexec.bat文件复制到原目录中;After powering on, enter the DOS system, first load the config.sys file, set automatic selection and load the application menu, and after selecting the name of the configuration block, run the rainbow.exe program according to the shell command under the configuration block. The latter checks the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and starts its configuration files. When one or several of the above files have problems, delete the problematic files and replace them with the same name. Copy the correctly backed up bootrom.bin file, image file, startup configuration file and autoexec.bat file to the original directory;
rainbow.exe运行完后则进入autoexec.bat文件处理流程;After rainbow.exe finishes running, it will enter the autoexec.bat file processing process;
通过goto%config%命令将config.sys文件和autoexec.bat文件关联,在autoexec.bat中自动运行vxload.com,加载VxWorks镜像文件。Use the goto%config% command to associate the config.sys file with the autoexec.bat file, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
在config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件。Add a shell command to the config.sys file, which calls the rainbow.exe file.
rainbow.exe文件用于检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件。The rainbow.exe file is used to check the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and start its configuration file.
系统上电进入DOS系统后,首先加载config.sys文件再加载autoexec.bat文件。After the system is powered on and enters the DOS system, it first loads the config.sys file and then the autoexec.bat file.
所述在config.sys文件中,设置加载应用程序可选菜单,格式如下:As mentioned in the config.sys file, set the optional menu for loading applications in the following format:
[MENU][MENU]
MENUITEM=配置块名称,菜单内容MENUITEM=Configuration block name, menu content
[配置块名称][configuration block name]
DEVICE=C:\HIMEM.SYS/TESTMEM:OFFDEVICE=C:\HIMEM.SYS/TESTMEM:OFF
SHELL=rainbow.exeSHELL=rainbow.exe
自动选择完配置块名称后,则进入autoexec.bat文件处理流程。After the configuration block name is automatically selected, the autoexec.bat file processing flow is entered.
在rainbow.exe文件检查出上述启动文件有问题后完成如下操作:After the rainbow.exe file checks that there is a problem with the above startup file, complete the following operations:
删除当前硬盘下旧的bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序;Delete the old bootrom.bin file, image file, startup configuration file or executable application under the current hard disk;
复制备份文件夹下新的bootrom.bi文件、镜像文件、启动配置文件或可执行应用程序到旧的bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序目录下,并将所有新文件的名称改为旧文件的名称。Copy the new bootrom.bi file, image file, startup configuration file or executable application in the backup folder to the old bootrom.bin file, image file, startup configuration file or executable application directory, and replace all new files The name is changed to the name of the old file.
一种VxWorks系统启动失败的自动修复系统:包括:An automatic repair system for VxWorks system startup failure: including:
配置模块,在搭载VxWorks操作系统的设备中配置用于启动并加载VxWorks操作系统镜像文件的bootrom.bin文件;The configuration module configures the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
格式化模块,将设备硬盘格式化为DOS系统;Format module, format the device hard disk into DOS system;
设置模块,在DOS系统中配置用于设置选择并加载应用程序菜单的config.sys文件,在config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件以及用于删除和拷贝硬盘内bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序的autoexec.bat文件;Setup module, configure the config.sys file used to set, select and load the application menu in the DOS system, add a shell command in the config.sys file, the shell command calls the rainbow.exe file and is used to delete and copy the bootrom in the hard disk .bin file, image file, startup configuration file or autoexec.bat file of executable application;
加载模块,进入DOS系统,先加载config.sys文件,设置选择并加载应用程序菜单,运行rainbow.exe程序,用户在选择完配置块名称后则进入autoexec.bat文件处理流程;Load the module, enter the DOS system, first load the config.sys file, set the selection and load the application menu, run the rainbow.exe program, after the user selects the configuration block name, enter the autoexec.bat file processing process;
分析模块,在rainbow.exe程序中检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件,当其中一个或几个上述文件有问题时,则删除有问题的文件,把同名无误的备份的bootrom.bin文件、镜像文件、启动配置文件和autoexec.bat文件复制到原目录中。rainbow.exe运行完后则进入autoexec.bat文件处理流程。在autoexec.bat文件处理流程中,通过goto%config%命令将config.sys文件和autoexec.bat文件关联,在autoexec.bat中自动运行vxload.com,加载VxWorks镜像文件。Analysis module, in the rainbow.exe program, checks the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and its configuration files to start. When one or several of the above files have problems, delete them. For problematic files, copy the backed up bootrom.bin file, image file, startup configuration file and autoexec.bat file with the correct name to the original directory. After rainbow.exe finishes running, it enters the autoexec.bat file processing process. In the autoexec.bat file processing process, associate the config.sys file with the autoexec.bat file through the goto%config% command, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
一种计算机可读存储介质,所述的计算机可读存储介质存储有计算机程序,所述的计算机程序被处理器执行时实现上述方法的步骤。A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the above method are implemented.
一种通用的VxWorks下启动并加载应用程序设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述的处理器执行所述的计算机程序时实现上述方法的步骤。A universal device for starting and loading application programs under VxWorks, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program Steps to implement the above method.
由于采用了上述技术方案,本发明提供的一种VxWorks系统启动失败的自动修复方法系统、存储介质及设备,该方法通过编辑config.sys,添加启动补丁rainbow.exe,在引导VxWorks系统启动之前增加对引导文件完整性判断,而不用修改VxWorks镜像,因此可以对所有系统文件进行属性修改和文件损坏的判断,并且可以对关键系统文件进行备份。Due to the adoption of the above technical solution, the present invention provides an automatic repair method system, storage medium and equipment for VxWorks system startup failure. This method edits config.sys, adds the startup patch rainbow.exe, and adds the startup patch rainbow.exe before booting the VxWorks system. The integrity of the boot file is judged without modifying the VxWorks image, so all system files can be judged for attribute modification and file damage, and key system files can be backed up.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present application or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments recorded in this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1为本发明方法的流程图;Figure 1 is a flow chart of the method of the present invention;
图2为本发明系统的结构框图;Figure 2 is a structural block diagram of the system of the present invention;
图3为本发明中实施例的示意图;Figure 3 is a schematic diagram of an embodiment of the present invention;
图4为本发明中实施例的示意图;Figure 4 is a schematic diagram of an embodiment of the present invention;
图5为本发明中实施例的示意图。Figure 5 is a schematic diagram of an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的技术方案和优点更加清楚,下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚完整的描述:In order to make the technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the drawings in the embodiments of the present invention:
如图1所示的一种VxWorks系统启动失败自动修复的方法,本发明应用于所有采用嵌入式VxWorks操作系统的设备及在此系统上运行的各种应用软件,遇到由于某种原因导致系统不能正常启动的问题。该发明将自动修复该问题,并使VxWorks系统继续正常启动,而不影响其他所有功能。As shown in Figure 1, a method for automatic repair of VxWorks system startup failure is applied. The invention is applied to all devices using the embedded VxWorks operating system and various application software running on this system. When the system fails due to some reason, The problem of not starting normally. This invention will automatically fix the problem and allow the VxWorks system to continue booting normally without affecting all other functions.
如图2所示的一种VxWorks系统启动失败的自动修复方法,包括:As shown in Figure 2, an automatic repair method for VxWorks system startup failure includes:
配置模块,在搭载VxWorks操作系统的设备中配置用于启动并加载VxWorks操作系统镜像文件的bootrom.bin文件;The configuration module configures the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
格式化模块,将设备硬盘格式化为DOS系统;Format module, format the device hard disk into DOS system;
设置模块,在DOS系统中配置用于设置选择并加载应用程序菜单的config.sys文件,在config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件以及用于删除和拷贝硬盘内bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序的autoexec.bat文件;Setup module, configure the config.sys file used to set, select and load the application menu in the DOS system, add a shell command in the config.sys file, the shell command calls the rainbow.exe file and is used to delete and copy the bootrom in the hard disk .bin file, image file, startup configuration file or autoexec.bat file of executable application;
加载模块,进入DOS系统,先加载config.sys文件,设置选择并加载应用程序菜单,运行rainbow.exe程序,用户在选择完配置块名称后则进入autoexec.bat文件处理流程;Load the module, enter the DOS system, first load the config.sys file, set the selection and load the application menu, run the rainbow.exe program, after the user selects the configuration block name, enter the autoexec.bat file processing process;
分析模块,在rainbow.exe程序中检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件,当其中一个或几个上述文件有问题时,则删除有问题的文件,把同名无误的备份的bootrom.bin文件、镜像文件、启动配置文件和autoexec.bat文件复制到原目录中。rainbow.exe运行完后则进入autoexec.bat文件处理流程。在autoexec.bat文件处理流程中,通过goto%config%命令将config.sys文件和autoexec.bat文件关联,在autoexec.bat中自动运行vxload.com,加载VxWorks镜像文件。Analysis module, in the rainbow.exe program, checks the autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and its configuration files to start. When one or several of the above files have problems, delete them. For problematic files, copy the backed up bootrom.bin file, image file, startup configuration file and autoexec.bat file with the correct name to the original directory. After rainbow.exe finishes running, it enters the autoexec.bat file processing process. In the autoexec.bat file processing process, associate the config.sys file with the autoexec.bat file through the goto%config% command, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
高速动车组中央控制单元CCU上电工作时,先启动DOS系统,DOS系统启动后会自动运行autoexec.bat文件,其功能是进行系统设置,如:path(设置路径)、mouse(鼠标启动)、DOSkey(键盘管理)、set(设置环境变量)等,autoexec.bat还可用来配置启动信息,加载驱动程序等,autoexec.bat损坏会导致CCU无法启动,启动流程如图3所示。根据图3可以知道,在VxWorks 系统启动之前需要依次运行“autoexec.bat”和“bootrom.bin”文件。如果在运行“autoexec.bat”和“bootrom.bin”文件之前检查这两个文件是否损坏,如果已经损坏,那么采用运行备份文件或把备份文件拷贝到此继续执行,或可避免CCU启动失败问题。When the high-speed EMU central control unit CCU is powered on, the DOS system is started first. After the DOS system is started, the autoexec.bat file will automatically run. Its function is to perform system settings, such as: path (setting path), mouse (mouse startup), DOSkey (keyboard management), set (setting environment variables), etc. autoexec.bat can also be used to configure startup information, load drivers, etc. Damage to autoexec.bat will cause CCU to fail to start. The startup process is shown in Figure 3. According to Figure 3, we can know that the "autoexec.bat" and "bootrom.bin" files need to be run in sequence before the VxWorks system starts. If you check whether the "autoexec.bat" and "bootrom.bin" files are damaged before running them, if they are damaged, then run the backup file or copy the backup file here to continue execution, which may avoid the CCU startup failure problem. .
DOS系统启动时,如图4所示,要先从启动盘中读取两个系统文件IO.SYS、MSDOS.SYS,然后在启动盘的根目录下寻找并执行CONFIG.SYS、COMMAND.COM、autoexec.bat三个文件。其中IO.SYS、MSDOS.SYS和COMMAND.COM这三个文件缺一不可,否则CCU将无法正常启动。When the DOS system starts, as shown in Figure 4, two system files IO.SYS and MSDOS.SYS must be read from the startup disk first, and then CONFIG.SYS, COMMAND.COM, and autoexec.bat three files. Among them, the three files IO.SYS, MSDOS.SYS and COMMAND.COM are indispensable, otherwise CCU will not start normally.
DOS系统启动时只有系统环境变量配置文件congfig.sys可编辑,其他诸如IO.sys、MSDOS.sys、command.com等都是必须且不可编辑的,那么只能分析可编辑的系统环境变量配置文件congfig.sys。When the DOS system starts, only the system environment variable configuration file config.sys can be edited. Others such as IO.sys, MSDOS.sys, command.com, etc. are necessary and cannot be edited. Then only the editable system environment variable configuration file can be analyzed. congfig.sys.
config.sys文件是一个专业的系统启动配置文件,它主要用于加载内存管理程序、设置扩充内存及扩展内存、加载有关硬件驱动程序,设置有关环境变量等,为用户计算机的正常使用创造必要的用户环境。config.sys的名字来源于配置系统,其目的就是使DOS和计算机更加协调的工作打开。The config.sys file is a professional system startup configuration file. It is mainly used to load memory management programs, set expanded memory and extended memory, load relevant hardware drivers, set relevant environment variables, etc., to create necessary settings for the normal use of the user's computer. user environment. The name of config.sys comes from the configuration system, and its purpose is to make DOS and the computer work more harmoniously.
采用记事本或其他文本编辑器打开config.sys,发现它就是Microsoft MS-DOS 7.1Startup Menu,之后是两个选项:DOS和VxWorks。因此需要研究通过在其中增加文件检查软件来提前分析是否有文件损坏,并加以弥补,经过研究,可以通过增加脚本调用软件rainbow.exe补丁程序来检查文件是否损坏。Use Notepad or other text editor to open config.sys and find that it is the Microsoft MS-DOS 7.1 Startup Menu, followed by two options: DOS and VxWorks. Therefore, it is necessary to add file checking software to analyze whether the file is damaged in advance and make up for it. After research, you can add a script to call the rainbow.exe patch program to check whether the file is damaged.
实施例:Example:
rainbow补丁程序,可执行文件为rainbow.exe,在config.sys里调用,从而可在运行“autoexec.bat”和“bootrom.bin”文件之前运行。The rainbow patch program, the executable file is rainbow.exe, is called in config.sys, so it can be run before running the "autoexec.bat" and "bootrom.bin" files.
1、config.sys内调用方法1. Call method in config.sys
用记事本或其他文本编辑工具打开config.sys,在[vxworks]配置块最后一行增加“shell=rainbow.exe vxload.com bootrom.bin”,这样就可以在运行“autoexec.bat”和“bootrom.bin”文件之前调用rainbow.exe了。Open config.sys with Notepad or other text editing tools, and add "shell=rainbow.exe vxload.com bootrom.bin" to the last line of the [vxworks] configuration block, so that you can run "autoexec.bat" and "bootrom. bin" file before calling rainbow.exe.
2、rainbow.exe工作原理2. Working principle of rainbow.exe
程序开始执行时,若为CCU2,则延时2秒,目的是为了避免和CCU1同时运行,也是为了避免因为本软件造成两个CCU同时故障。When the program starts executing, if it is CCU2, there will be a delay of 2 seconds. The purpose is to avoid running at the same time as CCU1 and to avoid the simultaneous failure of two CCUs due to this software.
判断日志文件大小,若文件大于512K,则重命名该日志文件。Determine the size of the log file. If the file is larger than 512K, rename the log file.
再读备份目录内文件,判断文件名是否符合要求。读根目录下同名文件,若文件不存在,则拷贝备份文件到根目录,之后检查备份目录内文件是否全部读完。若根目录下同名文件存在,则检查该文件是否和备份目录下同名文件一致。若一致,则检查是否把备份目录内文件全部读完。若不一致,则删除根目录下该文件,继续拷贝备份文件到根目录,并判断备份目录内文件是否全部读完。当备份目录内文件全部读完时,CCU2延时2秒,结束本程序。流程图如图5所示。Read the files in the backup directory again to determine whether the file name meets the requirements. Read the file with the same name in the root directory. If the file does not exist, copy the backup file to the root directory, and then check whether all files in the backup directory have been read. If a file with the same name exists in the root directory, check whether the file is consistent with the file with the same name in the backup directory. If they are consistent, check whether all files in the backup directory have been read. If they are inconsistent, delete the file in the root directory, continue to copy the backup file to the root directory, and determine whether all files in the backup directory have been read. When all the files in the backup directory have been read, CCU2 delays for 2 seconds to end the program. The flow chart is shown in Figure 5.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,根据本发明的技术方案及其发明构思加以等同替换或改变,都应涵盖在本发明的保护范围之内。The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can, within the technical scope disclosed in the present invention, implement the technical solutions of the present invention. Equivalent substitutions or changes of the inventive concept thereof shall be included in the protection scope of the present invention.

Claims (9)

  1. 一种VxWorks系统启动失败的自动修复方法,其特征在于包括:An automatic repair method for VxWorks system startup failure, which is characterized by including:
    在搭载VxWorks操作系统的设备中配置用于启动并加载VxWorks操作系统镜像文件的bootrom.bin文件;Configure the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
    采用DOS系统对设备硬盘进行格式化;Use DOS system to format the device hard disk;
    在DOS系统中配置用于设置选择并加载应用程序菜单的config.sys文件,在该config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件,该rainbow.exe文件用于检查bootrom.bin文件、VxWorks操作系统内核的镜像文件和autoexec.bat文件是否可以正常运行;In the DOS system, configure the config.sys file used to set selections and load the application menu. Add a shell command to the config.sys file. The shell command calls the rainbow.exe file. The rainbow.exe file is used to check the bootrom. Whether the bin file, the image file of the VxWorks operating system kernel and the autoexec.bat file can run normally;
    开机上电后进入DOS系统,先加载config.sys文件,设置自动选择并加载应用程序菜单,选择完配置块名称后,根据该配置块下的shell命令运行rainbow.exe程序,其中rainbow.exe检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件,当其中一个或几个上述文件有问题时,则删除有问题的文件,把同名无误的备份的bootrom.bin文件、镜像文件、启动配置文件和autoexec.bat文件复制到原目录中;After powering on, enter the DOS system, first load the config.sys file, set automatic selection and load the application menu, after selecting the configuration block name, run the rainbow.exe program according to the shell command under the configuration block, where rainbow.exe checks Autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and start their configuration files. When one or several of the above files have problems, delete the problematic files and back up the correct ones with the same names. Copy the bootrom.bin file, image file, startup configuration file and autoexec.bat file to the original directory;
    当rainbow.exe运行完后则进入autoexec.bat文件处理流程;When rainbow.exe finishes running, it enters the autoexec.bat file processing process;
    通过goto%config%命令将config.sys文件和autoexec.bat文件关联,在autoexec.bat中自动运行vxload.com,加载VxWorks镜像文件。Use the goto%config% command to associate the config.sys file with the autoexec.bat file, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
  2. 根据权利要求1所述的方法,其特征在于:在config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件。The method according to claim 1, characterized in that: a shell command is added to the config.sys file, and the shell command calls the rainbow.exe file.
  3. 根据权利要求1所述的方法,其特征在于:rainbow.exe文件用于检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件。The method according to claim 1, characterized in that: the rainbow.exe file is used to check autoexec.bat, bootrom.bin, vxload.com, VxWorks files necessary to start the VxWorks system and start its configuration files.
  4. 根据权利要求1所述的方法,其特征在于:系统上电进入DOS系统后,首先加载config.sys文件再加载autoexec.bat文件。The method according to claim 1, characterized in that: after the system is powered on and enters the DOS system, the config.sys file is first loaded and then the autoexec.bat file is loaded.
  5. 根据权利要求1所述的方法,其特征在于:所述在config.sys文件中,设置加载应用程序可选菜单,格式如下:The method according to claim 1, characterized in that: in the config.sys file, an optional menu for loading applications is set, and the format is as follows:
    [MENU][MENU]
    MENUITEM=配置块名称,菜单内容MENUITEM=Configuration block name, menu content
    [配置块名称][configuration block name]
    DEVICE=C:\HIMEM.SYS/TESTMEM:OFFDEVICE=C:\HIMEM.SYS/TESTMEM:OFF
    SHELL=rainbow.exeSHELL=rainbow.exe
    自动选择完配置块名称后,则进入autoexec.bat文件处理流程。After the configuration block name is automatically selected, the autoexec.bat file processing flow is entered.
  6. 根据权利要求1所述的方法,其特征在于:在rainbow.exe文件检查出上述启动文件有问题后完成如下操作:The method according to claim 1, characterized in that: after the rainbow.exe file detects that there is a problem with the above-mentioned startup file, the following operations are completed:
    删除当前硬盘下旧的bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序;Delete the old bootrom.bin file, image file, startup configuration file or executable application under the current hard disk;
    复制备份文件夹下新的bootrom.bi文件、镜像文件、启动配置文件或可执行应用程序到旧的bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序目录下,并将所有新文件的名称改为旧文件的名称。Copy the new bootrom.bi file, image file, startup configuration file or executable application in the backup folder to the old bootrom.bin file, image file, startup configuration file or executable application directory, and replace all new files The name is changed to the name of the old file.
  7. 一种VxWorks系统启动失败的自动修复系统,其特征在于:包括:An automatic repair system for VxWorks system startup failure, which is characterized by: including:
    配置模块,在搭载VxWorks操作系统的设备中配置用于启动并加载VxWorks操作系统镜像文件的bootrom.bin文件;The configuration module configures the bootrom.bin file used to start and load the VxWorks operating system image file in the device equipped with the VxWorks operating system;
    格式化模块,将设备硬盘格式化为DOS系统;Format module, format the device hard disk into DOS system;
    设置模块,在DOS系统中配置用于设置选择并加载应用程序菜单的config.sys文件,在config.sys文件中增加shell命令,该shell命令调用rainbow.exe文件以及用于删除和拷贝硬盘内bootrom.bin文件、镜像文件、启动配置文件或可执行应用程序的autoexec.bat文件;Setup module, configure the config.sys file used to set, select and load the application menu in the DOS system, add a shell command in the config.sys file, the shell command calls the rainbow.exe file and is used to delete and copy the bootrom in the hard disk .bin file, image file, startup configuration file or autoexec.bat file of executable application;
    加载模块,进入DOS系统,先加载config.sys文件,设置选择并加载应用程序菜单,运行rainbow.exe程序,用户在选择完配置块名称后则进入autoexec.bat文件处理流程;Load the module, enter the DOS system, first load the config.sys file, set the selection and load the application menu, run the rainbow.exe program, after the user selects the configuration block name, enter the autoexec.bat file processing process;
    分析模块,在rainbow.exe程序中检查启动VxWorks系统所必须的autoexec.bat、bootrom.bin、vxload.com、VxWorks文件及启动其配置文件, 当其中一个或几个上述文件有问题时,则删除有问题的文件,把同名无误的备份的bootrom.bin文件、镜像文件、启动配置文件和autoexec.bat文件复制到原目录中。rainbow.exe运行完后则进入autoexec.bat文件处理流程。在autoexec.bat文件处理流程中,通过goto%config%命令将config.sys文件和autoexec.bat文件关联,在autoexec.bat中自动运行vxload.com,加载VxWorks镜像文件。Analysis module, in the rainbow.exe program, checks the autoexec.bat, bootrom.bin, vxload.com, VxWorks files and startup configuration files necessary to start the VxWorks system. When one or several of the above files have problems, delete them. For problematic files, copy the backed up bootrom.bin file, image file, startup configuration file and autoexec.bat file with the correct name to the original directory. After rainbow.exe finishes running, it enters the autoexec.bat file processing process. In the autoexec.bat file processing process, associate the config.sys file with the autoexec.bat file through the goto%config% command, automatically run vxload.com in autoexec.bat, and load the VxWorks image file.
  8. 一种计算机可读存储介质,所述的计算机可读存储介质存储有计算机程序,其特征在于,所述的计算机程序被处理器执行时实现如权利要求1~权利要求6任一所述方法的步骤。A computer-readable storage medium, the computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the method of any one of claims 1 to 6 is implemented. step.
  9. 一种通用的VxWorks下启动并加载应用程序设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于:所述的处理器执行所述的计算机程序时实现如权利要求1~权利要求6任一所述方法的步骤。A universal device for starting and loading application programs under VxWorks, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: the processor executes the The computer program implements the steps of the method according to any one of claims 1 to 6.
PCT/CN2022/132732 2022-08-09 2022-11-18 Automatic restoration method and system for vxworks system startup failure, storage medium, and device WO2024031864A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210952738.2A CN115437818A (en) 2022-08-09 2022-08-09 Automatic restoration method, system, storage medium and equipment for VxWorks system start failure
CN202210952738.2 2022-08-09

Publications (1)

Publication Number Publication Date
WO2024031864A1 true WO2024031864A1 (en) 2024-02-15

Family

ID=84243353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/132732 WO2024031864A1 (en) 2022-08-09 2022-11-18 Automatic restoration method and system for vxworks system startup failure, storage medium, and device

Country Status (2)

Country Link
CN (1) CN115437818A (en)
WO (1) WO2024031864A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113608795A (en) * 2021-06-21 2021-11-05 天津津航计算技术研究所 Universal method for starting and loading application program under VxWorks

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5745669A (en) * 1993-10-21 1998-04-28 Ast Research, Inc. System and method for recovering PC configurations
US20150363213A1 (en) * 2014-06-17 2015-12-17 Continental Automotive Gmbh Method For Model-Based Generation Of Startup Configurations Of Embedded Systems
CN107145390A (en) * 2017-04-10 2017-09-08 北京智能管家科技有限公司 Android service lifecycle management method, service management object and Android system
CN113608795A (en) * 2021-06-21 2021-11-05 天津津航计算技术研究所 Universal method for starting and loading application program under VxWorks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5745669A (en) * 1993-10-21 1998-04-28 Ast Research, Inc. System and method for recovering PC configurations
US20150363213A1 (en) * 2014-06-17 2015-12-17 Continental Automotive Gmbh Method For Model-Based Generation Of Startup Configurations Of Embedded Systems
CN107145390A (en) * 2017-04-10 2017-09-08 北京智能管家科技有限公司 Android service lifecycle management method, service management object and Android system
CN113608795A (en) * 2021-06-21 2021-11-05 天津津航计算技术研究所 Universal method for starting and loading application program under VxWorks

Also Published As

Publication number Publication date
CN115437818A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
US7461293B2 (en) Apparatus and storage system for controlling acquisition of snapshot
US6131192A (en) Software installation
US6161218A (en) Software patch architecture
US8621452B2 (en) Device driver rollback
JP3270216B2 (en) File name detection method
US6675295B1 (en) Method and computer system for detecting and correcting a failure in a computer application program during startup
US20080109676A1 (en) Processing device and storage medium
WO2024031864A1 (en) Automatic restoration method and system for vxworks system startup failure, storage medium, and device
US6519637B1 (en) Method and apparatus for managing a memory shortage situation in a data processing system
JP5475199B2 (en) File processing apparatus for executing preprocessed file and recording medium for performing the method by computer
US20050262033A1 (en) Data recording apparatus, data recording method, program for implementing the method, and program recording medium
CN113608795A (en) Universal method for starting and loading application program under VxWorks
TW201015296A (en) Method for auto-testing environment variable setting
CN114138563A (en) Method for backing up and restoring Hyper-V virtual machine
JP2002528790A (en) Method and apparatus for capturing image file changes
US20160004607A1 (en) Information processing apparatus and information processing method
JP3314204B2 (en) Computer system
JP3220182B2 (en) File copying machine
JP3147333B2 (en) Application execution environment creation device
TW200422834A (en) Recovery method for master boot record of hard disk drive
JP3178671B2 (en) File system and its file recovery method
CN116400861A (en) File deletion method and device of NAS disk
JPS6191730A (en) Automatic recovery processing system for software trouble
Zhou et al. Research on Boot Problem and Automatic Repair of an Embedded Real-Time Operating System
JP2022021528A (en) Electronic computer, reproduction test method and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22954803

Country of ref document: EP

Kind code of ref document: A1