CN116661888A - Loadable starting method and system for VxWorks image file - Google Patents

Loadable starting method and system for VxWorks image file Download PDF

Info

Publication number
CN116661888A
CN116661888A CN202310511705.9A CN202310511705A CN116661888A CN 116661888 A CN116661888 A CN 116661888A CN 202310511705 A CN202310511705 A CN 202310511705A CN 116661888 A CN116661888 A CN 116661888A
Authority
CN
China
Prior art keywords
vxworks
image file
flash
address
ram
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.)
Pending
Application number
CN202310511705.9A
Other languages
Chinese (zh)
Inventor
刘梦花
周吉召
洪帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 32 Research Institute
Original Assignee
CETC 32 Research Institute
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 CETC 32 Research Institute filed Critical CETC 32 Research Institute
Priority to CN202310511705.9A priority Critical patent/CN116661888A/en
Publication of CN116661888A publication Critical patent/CN116661888A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • 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/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • 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)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method and a system for starting a loadable VxWorks image file, wherein the method comprises the following steps: step S1: loading the VxWorks image file to a 0x100000 address in the RAM; step S2: erasing a preset segment address of the flash; step S3: writing the size of the VxWorks image file and the content starting from the 0x100000 address of the RAM into the flash; step S4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting. According to the application, only the VxWorks system mirror image is loaded into the RAM through the network for the first time and then is solidified into the flash, and then the VxWorks system mirror image is directly unloaded from the flash without the network; when the power supply is unstable or fails, the VxWorks system does not need to be loaded again through the network, and the VxWorks system can be loaded automatically.

Description

Loadable starting method and system for VxWorks image file
Technical Field
The application relates to the technical field of computers, in particular to a method and a system for starting a loadable VxWorks image file.
Background
VxWorks is an operating system kernel developed specifically for real-time embedded system design, introduced by WRS corporation in the united states, providing a unified programming interface and consistent operating characteristics on various CPU platforms, enabling application programmers to put energy on the application without having to pay much attention to the management of system resources. The high-performance kernel and the excellent reliability and good real-time performance are widely applied to the high-tip technical fields of military, aerospace and the like.
The common VxWorks loading type starting mode is to load a VxWorks image file into a RAM through a network based on bootrom so as to realize the starting of a system, the mode causes file system damage when a power supply is unstable and power is lost and an application program is debugged, the phenomenon of dead halt or white screen and the like can occur in the VxWorks, the normal operation of the system is influenced, and the system can be recovered only through the network loading again, so that the operation is complicated, time-consuming and labor-consuming. For this reason, a new VxWorks loading type starting method is a problem to be studied urgently.
Patent document CN110221870a discloses a rapid start method of VxWorks, which relates to the field of software development. Comprising the following steps: partitioning the hard disk, and setting a main partition as an active partition; installing GRUB4DOS in the main partition; modifying a configuration file of the VxWorks to enable the VxWorks to be started by the GRUB4DOS, and storing the modified VxWorks in the main partition; the BIOS is started and then VxWorks is started through GRUB4 DOS. However, the patent needs to install GRUB4DOS, occupies large storage space, and is not easy to operate in VxWorks update; vxWorks is started from the hard disk, is subject to modification, and cannot be started if the hard disk is damaged.
Patent document CN106933606a discloses a method and a device for updating a VxWorks system image file, where the method includes: compressing the image file of the VxWorks system to be updated into a binary file; determining which area of the memory chip the original image file is stored in according to the start mark in the boot code; and writing the binary file into other areas except for the area storing the original image file, and updating the starting mark to a preset value for calling the other areas after the writing is successful. However, in this patent, vxWorks system image files are stored in two areas, which occupy a large storage space and are complicated to operate. And, the patent does not explicitly specify how to write the VxWorks system image file into the memory chip.
Disclosure of Invention
Aiming at the defects in the prior art, the application aims to provide a method and a system for starting a VxWorks image file in a loadable mode.
The application provides a method for starting a loadable VxWorks image file, which is characterized by comprising the following steps:
step S1: loading the VxWorks image file to a first address in the RAM;
step S2: erasing a preset segment address of the flash;
step S3: writing the size of the VxWorks image file and the content from the first address of the RAM into the flash;
step S4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting.
Preferably, in said step S1:
adding programs for reading, writing and erasing related commands to the flash into source codes of VxWorks, and operating the flash through the commands under bootrom;
loading the VxWorks image file to a first address in the RAM through a network, opening a tftp tool, and selecting a catalog for placing the VxWorks image file; the environment variable boot device is changed to motetsec under bootrom.
Preferably, in said step S2:
and erasing the preset address of the flash by using an erasing command, wherein the preset address is unused, and the length of the address is greater than or equal to the size of the VxWorks image file and the occupied address segment of the bootrom are not repeated.
Preferably, in said step S3:
and writing the size of the VxWorks image file and the content starting from the first address of the RAM into the flash by using a write command.
Preferably, in said step S4:
adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting; changing an environment variable boot device into a norflash under bootrom, and automatically entering a VxWorks system.
The application provides a VxWorks image file loadable starting system, which comprises the following components:
module M1: loading the VxWorks image file to a first address in the RAM;
module M2: erasing a preset segment address of the flash;
module M3: writing the size of the VxWorks image file and the content from the first address of the RAM into the flash;
module M4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting.
Preferably, in said module M1:
adding programs for reading, writing and erasing related commands to the flash into source codes of VxWorks, and operating the flash through the commands under bootrom;
loading the VxWorks image file to a first address in the RAM through a network, opening a tftp tool, and selecting a catalog for placing the VxWorks image file; the environment variable boot device is changed to motetsec under bootrom.
Preferably, in said module M2:
and erasing the preset address of the flash by using an erasing command, wherein the preset address is unused, and the length of the address is greater than or equal to the size of the VxWorks image file and the occupied address segment of the bootrom are not repeated.
Preferably, in said module M3:
and writing the size of the VxWorks image file and the content starting from the first address of the RAM into the flash by using a write command.
Preferably, in said module M4:
adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting; changing an environment variable boot device into a norflash under bootrom, and automatically entering a VxWorks system.
Compared with the prior art, the application has the following beneficial effects:
1. according to the application, only the VxWorks system mirror image is loaded into the RAM through the network for the first time and then is solidified into the flash, and then the VxWorks system mirror image is directly unloaded from the flash without the network; when the power supply is unstable or fails, the VxWorks system does not need to be loaded again through the network, and the VxWorks system can be loaded automatically;
2. the bootrom, vxWorks system mirror image and the application can be placed in different storage positions, and the mirror image, the application and the storage positions are separated and cannot be mutually influenced; the application is generally placed under a file system, the file system can be placed on a hard disk, a flash and the like, and if the file system is on the flash, the file system is in a different storage position with bootrom and a system mirror image; the application puts the application program and the VxWorks system in different storage positions, even if the application program causes system abnormality, the operation of the system is not influenced after restarting;
3. the method is simple to operate and easy to operate, and can be used as a VxWorks mirror image file backup to avoid the problem that a system cannot be started when the system file is damaged.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a schematic diagram of a VxWorks image file being loaded into RAM;
FIG. 2 is a diagram of erasing a certain segment of addresses of a flash;
FIG. 3 is a schematic diagram of VxWorks image file size
FIG. 4 is a schematic diagram of writing a VxWorks image file into a flash;
FIG. 5 is a schematic view of an automatic start of a VxWorks image file;
FIG. 6 is a flow chart of the present application.
Detailed Description
The present application will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present application, but are not intended to limit the application in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present application.
Example 1:
the method for starting the loadable VxWorks image file is characterized by comprising the following steps as shown in figures 1-6:
step S1: loading the VxWorks image file to a first address in the RAM;
preferably, in said step S1:
adding programs for reading, writing and erasing related commands to the flash into source codes of VxWorks, and operating the flash through the commands under bootrom;
loading the VxWorks image file to a first address in the RAM through a network, opening a tftp tool, and selecting a catalog for placing the VxWorks image file; the environment variable boot device is changed to motetsec under bootrom.
Step S2: erasing a preset segment address of the flash;
preferably, in said step S2:
and erasing the preset address of the flash by using an erasing command, wherein the preset address is unused, and the length of the address is greater than or equal to the size of the VxWorks image file and the occupied address segment of the bootrom are not repeated.
Step S3: writing the size of the VxWorks image file and the content from the first address of the RAM into the flash;
preferably, in said step S3:
and writing the size of the VxWorks image file and the content starting from the first address of the RAM into the flash by using a write command.
Step S4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting.
Preferably, in said step S4:
adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting; changing an environment variable boot device into a norflash under bootrom, and automatically entering a VxWorks system.
Example 2:
example 2 is a preferable example of example 1 to more specifically explain the present application.
The application also provides a VxWorks image file loadable starting system, which can be realized by executing the flow steps of the VxWorks image file loadable starting method, namely, a person skilled in the art can understand the VxWorks image file loadable starting method as a preferred implementation mode of the VxWorks image file loadable starting system.
The application provides a VxWorks image file loadable starting system, which comprises the following components:
module M1: loading the VxWorks image file to a first address in the RAM;
preferably, in said module M1:
adding programs for reading, writing and erasing related commands to the flash into source codes of VxWorks, and operating the flash through the commands under bootrom;
loading the VxWorks image file to a first address in the RAM through a network, opening a tftp tool, and selecting a catalog for placing the VxWorks image file; the environment variable boot device is changed to motetsec under bootrom.
Module M2: erasing a preset segment address of the flash;
preferably, in said module M2:
and erasing the preset address of the flash by using an erasing command, wherein the preset address is unused, and the length of the address is greater than or equal to the size of the VxWorks image file and the occupied address segment of the bootrom are not repeated.
Module M3: writing the size of the VxWorks image file and the content from the first address of the RAM into the flash;
preferably, in said module M3:
and writing the size of the VxWorks image file and the content starting from the first address of the RAM into the flash by using a write command.
Module M4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting.
Preferably, in said module M4:
adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting; changing an environment variable boot device into a norflash under bootrom, and automatically entering a VxWorks system.
Example 3:
example 3 is a preferable example of example 1 to more specifically explain the present application.
The technical scheme of the application is to provide a VxWorks image file loadable starting method, which comprises the following steps:
step 1: programs for carrying out related commands such as reading, writing and erasing on the flash are added in source codes of VxWorks, so that the flash can be operated through the commands under the bootrom;
step 2: loading the VxWorks image file to a 0x100000 address in the RAM through a network, as shown in figure 1; opening a tftp tool, and selecting a catalog for placing a VxWorks image file; the environment variable boot device is changed to motetsec under bootrom, and a command l is input.
Step 3: an address of a certain segment of the flash is erased by an erase command, the address of the segment is unused and has a length equal to or longer than the size of the VxWorks image file, and the occupied address segment of the bootrom cannot be repeated, such as the erase address 0xff000000, as shown in fig. 2.
Step 4: writing the size of the VxWorks image file and the content starting from the 0x100000 address of the RAM into a flash by using a writing command, for example, the size of the image file is 0x24bb7c, as shown in figure 3, and writing the file size and the content into the flash, as shown in figure 4;
step 5: adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting;
step 6: the environmental variable boot device is changed into a norflash under bootrom, so that the VxWorks system can be automatically accessed, as shown in fig. 5.
Those skilled in the art will appreciate that the systems, apparatus, and their respective modules provided herein may be implemented entirely by logic programming of method steps such that the systems, apparatus, and their respective modules are implemented as logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc., in addition to the systems, apparatus, and their respective modules being implemented as pure computer readable program code. Therefore, the system, the apparatus, and the respective modules thereof provided by the present application may be regarded as one hardware component, and the modules included therein for implementing various programs may also be regarded as structures within the hardware component; modules for implementing various functions may also be regarded as being either software programs for implementing the methods or structures within hardware components.
The foregoing describes specific embodiments of the present application. It is to be understood that the application is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the application. The embodiments of the application and the features of the embodiments may be combined with each other arbitrarily without conflict.

Claims (10)

1. A VxWorks image file loadable starting method is characterized by comprising the following steps:
step S1: loading the VxWorks image file to a first address in the RAM;
step S2: erasing a preset segment address of the flash;
step S3: writing the size of the VxWorks image file and the content from the first address of the RAM into the flash;
step S4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting.
2. The VxWorks image file loadable starting method of claim 1, wherein in the step S1:
adding programs for reading, writing and erasing related commands to the flash into source codes of VxWorks, and operating the flash through the commands under bootrom;
loading the VxWorks image file to a first address in the RAM through a network, opening a tftp tool, and selecting a catalog for placing the VxWorks image file; the environment variable boot device is changed to motetsec under bootrom.
3. The VxWorks image file loadable starting method of claim 1, wherein in the step S2:
and erasing the preset address of the flash by using an erasing command, wherein the preset address is unused, and the length of the address is greater than or equal to the size of the VxWorks image file and the occupied address segment of the bootrom are not repeated.
4. The VxWorks image file loadable starting method of claim 1, wherein in the step S3:
and writing the size of the VxWorks image file and the content starting from the first address of the RAM into the flash by using a write command.
5. The VxWorks image file loadable starting method of claim 1, wherein in the step S4:
adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting; changing an environment variable boot device into a norflash under bootrom, and automatically entering a VxWorks system.
6. A VxWorks image file loadable boot system comprising:
module M1: loading the VxWorks image file to a first address in the RAM;
module M2: erasing a preset segment address of the flash;
module M3: writing the size of the VxWorks image file and the content from the first address of the RAM into the flash;
module M4: adding a norflash in the source code, copying a VxWorks image file in the flash into the RAM, and starting.
7. The VxWorks image loadable boot system of claim 6, wherein in the module M1:
adding programs for reading, writing and erasing related commands to the flash into source codes of VxWorks, and operating the flash through the commands under bootrom;
loading the VxWorks image file to a first address in the RAM through a network, opening a tftp tool, and selecting a catalog for placing the VxWorks image file; the environment variable boot device is changed to motetsec under bootrom.
8. The VxWorks image loadable boot system of claim 6, wherein in the module M2:
and erasing the preset address of the flash by using an erasing command, wherein the preset address is unused, and the length of the address is greater than or equal to the size of the VxWorks image file and the occupied address segment of the bootrom are not repeated.
9. The VxWorks image loadable boot system of claim 6, wherein in the module M3:
and writing the size of the VxWorks image file and the content starting from the first address of the RAM into the flash by using a write command.
10. The VxWorks image loadable boot system of claim 6, wherein in the module M4:
adding a norflash in a source code in a mode of adding an environment variable boot device, copying a VxWorks image file in the flash to a RAM, and starting; changing an environment variable boot device into a norflash under bootrom, and automatically entering a VxWorks system.
CN202310511705.9A 2023-05-08 2023-05-08 Loadable starting method and system for VxWorks image file Pending CN116661888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310511705.9A CN116661888A (en) 2023-05-08 2023-05-08 Loadable starting method and system for VxWorks image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310511705.9A CN116661888A (en) 2023-05-08 2023-05-08 Loadable starting method and system for VxWorks image file

Publications (1)

Publication Number Publication Date
CN116661888A true CN116661888A (en) 2023-08-29

Family

ID=87718102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310511705.9A Pending CN116661888A (en) 2023-05-08 2023-05-08 Loadable starting method and system for VxWorks image file

Country Status (1)

Country Link
CN (1) CN116661888A (en)

Similar Documents

Publication Publication Date Title
US5269022A (en) Method and apparatus for booting a computer system by restoring the main memory from a backup memory
JP6258940B2 (en) Layout and execution of software applications using BPRAM
US7412565B2 (en) Memory optimization for a computer system having a hibernation mode
US6434696B1 (en) Method for quickly booting a computer system
US7512777B2 (en) Method and system for maintaining system management BIOS
KR101583002B1 (en) Computing system booting method and code/data pinning method thereof
TW201931111A (en) Memory device and associated boot code loading method of electronic device
KR20110098567A (en) Method and apparatus for generating minimal boot image
US10579300B2 (en) Information handling system firmware persistent memory runtime reclaim
US20010047472A1 (en) System and method for altering an operating system start-up sequence prior to operating system loading
KR20150052107A (en) Layout and execution of operating systems using bpram
CN106201636B (en) A kind of outer code dynamic loading method of DSP piece and device
JP2008533574A (en) Method and apparatus for rewriting semiconductor memory means erasable in sector units into first sector
CN117033268A (en) SSD controller, data processing method, device and storage medium
CN117093247A (en) Firmware upgrading method and device of embedded device, chip and computing device
CN109815055B (en) Satellite program management system and satellite program management method
CN116661888A (en) Loadable starting method and system for VxWorks image file
US6883078B2 (en) Microcomputer with reduced memory usage and associated method
JP7355876B2 (en) Program startup method, equipment, and storage medium
CN112148377B (en) Method and device for preventing SSD from abnormal power failure in EFI Shell environment
CN114047952A (en) Processor and method for single chip microcomputer, single chip microcomputer and storage medium
JPH09146774A (en) Personal computer system
CN112631663B (en) Integrated image boot starting method based on ARMv7 SoC
KR100970933B1 (en) Apparatus and method for high speed booting an operating system
CN116755798A (en) Efficient operation method of Java virtual machine class loader

Legal Events

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