WO2018157588A1 - 固件烧录方法、***、计算机设备和存储介质 - Google Patents

固件烧录方法、***、计算机设备和存储介质 Download PDF

Info

Publication number
WO2018157588A1
WO2018157588A1 PCT/CN2017/102979 CN2017102979W WO2018157588A1 WO 2018157588 A1 WO2018157588 A1 WO 2018157588A1 CN 2017102979 W CN2017102979 W CN 2017102979W WO 2018157588 A1 WO2018157588 A1 WO 2018157588A1
Authority
WO
WIPO (PCT)
Prior art keywords
control board
burned
burning
file
work instruction
Prior art date
Application number
PCT/CN2017/102979
Other languages
English (en)
French (fr)
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 WO2018157588A1 publication Critical patent/WO2018157588A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to a firmware burning method, system, computer device, and storage medium.
  • firmware burning is often required.
  • Firmware refers to the program code that is solidified inside the integrated circuit. It is responsible for controlling and coordinating the functions of the integrated circuit of the electronic device.
  • the electrically erasable read-only memory EEPROM Electrically Erasable Programmable ROM
  • Programmable read-only memory or FLASH chip.
  • a programming system of a terminal such as a POS (point of sale) machine usually includes a PC (personal computer) host computer, a PCI (Peripheral Component Interconnect), a USB expansion card,
  • the burning software is composed of a terminal to be burned.
  • an ADB (Android Debug Bridge) client is installed on the PC, and an ADB server is installed in each POS terminal. Due to the requirements of industrialization, it is often necessary to simultaneously burn multiple POS terminals on the production line. When directly burning multiple terminals through the USB interface on the PC for burning, the PC needs to call the ADB client and the ADB service in the POS terminal.
  • a firmware programming system In accordance with various embodiments of the present application, a firmware programming system, method, computer device, and storage medium are provided.
  • a firmware burning method comprising:
  • Each control board obtains a corresponding network protocol IP address, and the number of the control boards is at least two, and each of the control boards includes a corresponding communication interface;
  • the control board acquires a work instruction sent by the host computer according to the corresponding IP address
  • the control board acquires a corresponding file to be burned according to the corresponding work instruction
  • the control board invokes the corresponding Android debugging bridge ADB to write the to-be-burned file to the corresponding to-be-burned terminal through the corresponding communication interface.
  • a firmware burning system comprising: a first communication module and a first main control module, wherein the first main control module is connected to the first communication module, and the first main control module comprises at least two Each of the control boards is connected to the first communication module, and each of the control boards includes a corresponding communication interface, and each of the control boards can pass through a corresponding one.
  • the communication interface is connected to the terminal to be burned;
  • the first communication module is configured to communicate with the upper computer by the first main control module, and allocate a corresponding network protocol IP to each of the control boards of the upper computer and the first main control module. Address;
  • the control board is configured to receive, according to the corresponding IP address, a corresponding work instruction sent by the host computer by using the first communication module, and obtain a corresponding file to be burned according to the work instruction, and pass the corresponding
  • the communication interface calls the burning tool and the Android debugging bridge ADB to burn the to-be-burned file into the corresponding to-be-burned terminal.
  • a computer device comprising a memory and a processor, the memory storing computer readable instructions, the instructions being executed by the processor, causing the processor to perform the following steps:
  • Each control board obtains a corresponding network protocol IP address, and the number of the control boards. At least two, each of the control boards includes a corresponding communication interface;
  • the control board obtains a work instruction sent by the host computer according to the corresponding IP address
  • control board invokes the corresponding burning tool and the Android debugging bridge ADB to write the to-be-burned file into the corresponding to-be-burned terminal.
  • One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
  • Each control board obtains a corresponding network protocol IP address, and the number of the control boards is at least two, and each of the control boards includes a corresponding communication interface;
  • the control board obtains a work instruction sent by the host computer according to the corresponding IP address
  • control board invokes the corresponding burning tool and the Android debugging bridge ADB to write the to-be-burned file into the corresponding to-be-burned terminal.
  • 1 is a hardware environment diagram of a firmware burning method in an embodiment
  • FIG. 2 is a flow chart of a firmware burning method in an embodiment
  • FIG. 3 is a flow chart of a firmware burning method in another embodiment
  • FIG. 5 is a structural block diagram of assigning an IP address to each control board in an embodiment
  • FIG. 6 is a structural block diagram of a firmware burning system in another embodiment
  • FIG. 7 is a schematic diagram of an interface for assigning an IP address to each control board in another embodiment
  • FIG. 8 is a schematic diagram of a log interface of a control board burning process in an embodiment
  • FIG. 9 is a block diagram showing the internal structure of a control board in an embodiment.
  • the hardware environment of the firmware burning method is as shown in FIG. 1 , and includes a host computer 110 , a control board module 120 , and a to-be-programmed terminal module 130 , wherein the control board module 120 includes at least two
  • the control board includes a plurality of terminals to be burned, and each of the terminals to be burned can communicate with each control board, and the communication manner includes not limited to a universal serial bus interface (USB) (Universal Serial Bus,
  • USB Universal Serial Bus
  • the host computer 110 can communicate with each of the control boards of the control board module 120, including but not limited to, at least one of a wireless network communication WiFi, a serial communication interface, and an Ethernet communication interface. Wired Ethernet communication method and wireless network communication method WiFi.
  • control board is as follows:
  • a firmware burning method is provided, which is applied to the above hardware environment, as shown in FIG. 2, and includes the following steps:
  • each control board obtains a corresponding network protocol IP address, and the number of control boards is at least two, and each control board includes a corresponding communication interface.
  • the upper computer and the control board module can perform network communication through the network communication device, and each control board in the upper computer and the control board module is in the same local area network, and the corresponding network communication device can be used.
  • the corresponding network protocol IP address is assigned to each control board.
  • the upper computer can communicate with each of the control boards.
  • the number of control boards in the control board module can be set as required, but many In two.
  • the number of control board modules can also be multiple.
  • the newly added control board module can be connected to the upper-level control board module through the network communication interface, so as to realize network communication with the upper computer, or directly
  • the upper computer is connected to the network through the network interface.
  • each control board and the upper computer in the newly added control board are in the same local area network.
  • the upper computer can communicate with each of the control boards. .
  • each control board has a corresponding communication interface, including but not limited to a USB interface, a WiFi interface, a serial communication interface, and an Ethernet communication interface, through which each control board can be treated The programming terminal communicates.
  • the upper computer is a PC
  • the number of the control board modules is one
  • each control board module includes four control boards
  • the network communication device is an Ethernet switch
  • each control board is The Ethernet switch is connected, and the IP address is assigned to the host computer and each control board through the Ethernet switch.
  • the IP address of the host computer is set to 192.168.100.10, and the IP address is assigned to the control board in the order of the control board. That is, 192.168.100.20, 192.168.100.21, 192.168.100.22, and 192.168.100.23.
  • each control board and the upper computer are in the same local area network, and the upper computer can communicate independently with each control board.
  • each control board can be accessed independently after each control board system is started. If you add an identical control board module and connect to the switch or the upper-level control board module through the Ethernet interface, the corresponding IP address is assigned to the Ethernet switch, which is 192.168.100.24 and 192.168.100.25. 192.168.100.26 and 192.168.100.27, and so on, the rest are the same.
  • Step S220 The control board acquires a work instruction sent by the host computer according to the corresponding IP address.
  • the IP address of the host computer can be set by the network communication device according to the requirement, so that the upper computer and each control board are in the same local area network, so that after each control board is started, Each control board communicates with the host computer as a server.
  • the host computer can send corresponding work instructions to the control board.
  • the work command is determined by the host computer according to the acquired input parameters.
  • Step S230 The control board acquires a corresponding file to be burned according to the corresponding work instruction.
  • the work instruction includes a corresponding to-be-installed file, a check code, and a burning sequence corresponding to the file, wherein the check code may adopt an MD5 check code, and the control board receives the corresponding work instruction, and receives the corresponding machine to send the corresponding The file to be burned is stored and stored.
  • the to-be-burned file includes: an initial boot software bootloader, a configuration file, a boot logo file, an operating system kernel OS (OS), and a terminal application.
  • an initial boot software bootloader a configuration file
  • a boot logo file a boot logo file
  • an operating system kernel OS OS
  • step S240 the control board invokes the corresponding burning tool and the Android debugging bridge ADB to write the to-be-burned file to the corresponding to-be-burned terminal through the corresponding communication interface.
  • each control board has a corresponding communication interface connected to the terminal to be burned, and obtains After the corresponding file to be burned, the control board completes the burning of the basic file of the terminal to be burned by first calling the corresponding burning tool. Since the control board is installed with the ADB client, the ADB server is installed on the terminal to be burned. The control board communicates with the terminal to be burned by calling the ADB client, and can further write the corresponding application to the terminal to be burned.
  • control board is connected to the terminal to be burned by USB, and the file to be burned includes basic files such as an initial running software bootloader, a configuration file, a boot logo file, and an operating system kernel OS, wherein the bootloader refers to embedding.
  • the first software running during system startup is used to initialize the hardware and load the operating system kernel.
  • the control board completes the burning of the above basic files by first calling the corresponding burning tool such as Flashwrite tool. Further, by calling the ADB client.
  • the terminal communicates with the terminal to be burned, and writes the corresponding application software in the file to be burned to the terminal to be burned.
  • the above-mentioned programming method obtains the corresponding network protocol IP address by each control board, and the number of the control boards is at least two.
  • Each control board includes a corresponding communication interface, and the control board is controlled according to the corresponding IP address.
  • the programming is written to the corresponding terminal to be burned, so that each control board can separately call the ADB client to perform file burning, and the number of control boards can be arbitrarily added and configured as needed, so that the same can be simultaneously burned.
  • a plurality of terminals overcome the shortcomings of inefficiency in the burning process caused by resource competition of multiple terminals in a pair of multiple terminal application scenarios in the ADB client end face, improve the burning efficiency, and meet the requirements of industrial production.
  • the method further includes: at a first preset time, the control board feeds back the corresponding current work instruction to the upper computer, so that the upper computer determines whether the corresponding current work instruction needs to be updated and obtains a corresponding As a result of the first determination, the control board receives the corresponding first determination result returned by the upper computer, and according to the corresponding first determination result, if the work instruction needs to be updated, the process proceeds to step S220, otherwise, the control is performed every first preset time. The board returns the corresponding current work command to the upper computer.
  • the upper computer reads and controls every preset time interval.
  • the current command corresponding to the board the control board feeds the corresponding current work command to the host computer, so that the host computer checks whether the current work command needs to be updated, and obtains the corresponding first judgment result, and the control board receives the corresponding return of the host computer.
  • the first determination result is based on the first determination result, and if yes, the process proceeds to step S220 to acquire the latest work instruction, and if not, the process proceeds to step S250.
  • each control board module includes four control boards, and the IP address of the host computer is set to 192.168.100.10, and the IP address is assigned to the control board in the order of priority. #:192.168.100.20, 2#: 192.168.100.21, 3#: 192.168.100.22 and 4#: 192.168.100.23, so that the host computer runs through the console software named "controller.exe” and accesses it by using CURL. Control the RESTFUL API communication interface corresponding to the board to read the work instruction. The format of the control command corresponding to "controller.exe" is:
  • the ID is the number of the board in each system and corresponds to the IP address of the board.
  • File_n indicates the number is n.
  • the file path to be installed or burned is required to be uploaded to the control board.
  • n is a positive integer.
  • File_n_type indicates the type of the nth file to be burned.
  • CURL is an open source file transfer tool that works in the command line mode by using the URL syntax.
  • the access command of the upper computer to read the control board 1# work instruction is:
  • the board returns data as follows.
  • app_name indicates the name of the currently burning application software file
  • app_md5_value indicates the consistency verification code of the currently burned file name (using the MD5 algorithm)
  • configuration_file_name indicates the configuration file in the current burning file
  • configuration_md5_value Indicates the corresponding consistency check code (using the MD5 algorithm)
  • OS_file_name indicates the operating system kernel of the currently burned file
  • os_md5_value indicates the consistency check code corresponding to the operating system of the currently burned file (using the MD5 algorithm)
  • logo_file_name indicates the name of the boot logo file.
  • the current work order contains the file name and MD5 code value that need to be burned configuration file, boot logo image, operating system and application software. Since the initial boot software bootloader and pubso (application software depends on the dynamic library) do not need to be installed, the values are all no.
  • command to access the 2# control board is: CURL http://192.168.100.30/api/instruction, and so on, that is, the host computer can query the current status of the control board according to the IP address of each control board. Work instructions.
  • the method before step S240, the method further includes:
  • step S250 the control board detects whether the corresponding terminal to be burned is accessed. If yes, the process proceeds to step 240. If no, the process proceeds to step S250.
  • control board includes a distributed cache module and an agent component
  • step S220 includes: according to the corresponding IP address, the agent component receives the corresponding work instruction, and sends the work instruction to the distributed cache module for storage.
  • control board adopts a distributed cache module and an agent component, and according to the corresponding IP address, the control board processor first sends a work instruction request to the agent component after receiving the work instruction request sent by the host computer, and then The work order request is updated to the distributed cache module for storage by the agent component.
  • agent component reduces the coupling between the software modules of the control board, and the distributed cache module improves the response speed and operation efficiency of the entire system of the control board.
  • the agent component employs a broker component and the distributed cache module employs a distributed caching system.
  • the agent component in the control board adopts the broke mode component.
  • the communication protocol between the control board and the host computer adopts the HTTP protocol.
  • the processor in the control board serves as the HTTP server to provide access services for the upper computer and control the board.
  • the HTTP server passes the data request to the broke mode component, and the broke mode component updates the work instruction to the distributed cache module according to the content of the request, and controls the board according to the work instruction.
  • the obtained file to be burned is copied to the specified file path.
  • the method further includes: controlling the burning status of the corresponding file to be burned to the upper computer every second preset time, so that the upper computer judges the burning state and obtains Corresponding second determination result, the control board receives the corresponding second determination result returned by the upper computer, and determines whether the burning process of the to-be-burned file is normal according to the corresponding second determination result, and if abnormal, ends the burning; Normally, determining whether the burning progress of the to-be-burned file is completed according to the corresponding second determination result, and if not, disconnecting the communication connection with the terminal to be burned; if not, entering every second The preset time is used to control the board to feed back the burning status of the corresponding file to be burned to the upper computer.
  • the upper computer reads the burning state of the file to be burned corresponding to the control board, and performs judgment and obtains a corresponding second determination result, and sends the result to the control board, where the burning is performed.
  • the recording status includes information such as whether the burning process of the file to be burned is normal and the progress of burning. According to the second determination result, if abnormal, the programming is ended; if the burning process is normal, it is further determined whether the corresponding burning progress is completed, and if completed, disconnecting the communication connection with the terminal to be burned, if not, Then, the burning status of the file to be burned corresponding to the control board is continuously obtained, and the judgment is made.
  • each control board module includes four control boards, and the IP address of the host computer is set to 192.168.100.10, and the IP address is assigned to the control board in the order of priority. #:192.168.100.20, 2#: 192.168.100.21, 3#: 192.168.100.22 and 4#: 192.168.100.23, so that the host computer runs through the console software named "controller.exe", through the host computer here.
  • Use the RESTFUL API communication interface corresponding to the CURL access control board to read the burning status of the control board. For example, the process of reading the burning status of the control board labeled 1#-4# is as follows:
  • the data returned by the 1# control board is as follows:
  • action indicates the current burning status
  • the runtime is "start”
  • stop indicates that it is in the stopped state.
  • a firmware burning system including: a first communication module 310 and a first main control module 320.
  • the first main control module 320 is connected to the first communication module 310.
  • the main control module 320 includes at least two independent control boards, each of which is connected to the first communication module 310.
  • Each control board includes a corresponding communication interface, and each control board can respectively pass corresponding communication.
  • the interface is connected to the terminal to be burned;
  • the first communication module 310 is configured to communicate with the upper computer by the first main control module 320, and allocate a corresponding network protocol IP address to each control board of the upper computer 330 and the first main control module 320;
  • the control board is configured to receive, according to the corresponding IP address, the corresponding work instruction sent by the host computer through the first communication module 310, obtain a corresponding file to be burned according to the work instruction, and invoke the burning tool through the corresponding communication interface.
  • the Android debugging bridge ADB writes the to-be-burned file to the corresponding to-be-burned terminal.
  • the first main control module 320 includes four corresponding control boards, namely, control boards 322, 324, 326, and 328.
  • the first communication module 310 is an Ethernet switch, and is controlled.
  • the boards 322, 324, 326, and 328 are respectively connected to the first communication module 310.
  • the first main control module 320 is connected to the upper computer 330 through the first communication module 310, and the IP address is allocated to the upper computer through the first communication module 310.
  • the IP addresses are assigned to the control boards in the order of 192.168.100.20, 192.168.100.21, 192.168.100.22, and 192.168.100.23.
  • Each control board and host computer 330 are in the same state. In a local area network, the host computer 330 can communicate independently with each of the control boards described above.
  • the control boards 322, 324, 326, and 328 are connected to the to-be-recorded terminals 322a, 324a, 326a, and 328a, and the board 322a is controlled as an example for receiving the upper unit through the first communication module 310 according to the corresponding IP address.
  • Corresponding work instruction sent by the machine 330 acquires a corresponding file to be burned, and calls the burning tool and the Android debugging bridge ADB through the corresponding communication interface 322a1 to write the to-be-burned file into the corresponding burned file.
  • the terminal 322a is recorded.
  • the above firmware burning system configures a separate control board for each terminal to be burned, and sets a plurality of control boards and the upper computer through the first communication module in the same local area network communication, so that each control The board can independently invoke the ADB client to perform terminal programming, and the number of control boards can be arbitrarily added and configured as needed, so that multiple terminals can be simultaneously burned, and the ADB client end-to-face pair is overcome.
  • each device to be burned has exclusive control board resources, and multiple terminals have the disadvantages of resource competition resulting in inefficient programming, which improves the burning efficiency and meets the requirements of industrial production.
  • the firmware burning system further includes a second main control module. 420 and the second communication module 430, the second main control module 420 is connected to the second communication module 430, the second main control module 420 includes at least two control boards, and the second communication module 430 can be connected to the upper computer 330 or the A communication module 310 is connected, and the second communication module 410 is used for the second main control module 420 to communicate with the upper computer 330, and allocates a corresponding network protocol IP address for each control board in the second main control module 420.
  • the first communication module 410 is an Ethernet switch
  • the number of control boards in the second control module is four
  • the second main control module 420 includes four.
  • the control boards 422, 424, 426, and 428 are respectively connected to the second communication module 410
  • the second main control module 420 is connected to the first communication module 310 through the second communication module 310.
  • the IP address of the host computer is 192.168.100.10
  • the IP addresses corresponding to the control boards 422, 424, 426, and 428 are 192.168.100.24, 192.168.100.25, 192.168.100.26, and 192.168.100.27, respectively, so that each control board in the second main control module can be independent.
  • the control boards 422, 424, 426, and 428 are connected to the terminals 422a, 424a, 426a, and 428a, and the board 422 is used as an example to pass the corresponding IP address.
  • the second communication module 410 receives the corresponding work instruction sent by the host computer 330, acquires a corresponding file to be burned according to the work instruction, and invokes the burning tool and the Android debugging bridge ADB to record the file to be burned through the corresponding communication interface 422a1. The programming is written to the corresponding to-be-recorded terminal 422a.
  • the above firmware burning system can be expanded according to the same mode according to the needs, which can double the efficiency of the firmware burning system, further adapt to the needs of industrial large-scale production, reduce economic costs, and improve the economy. benefit.
  • 800 POS terminals can be burned in one shift (12 hours), and if an existing burning system is used, Use PC to connect USB for POS programming.
  • an existing burning system is used, Use PC to connect USB for POS programming.
  • two upper computers such as one PC to connect 4 (optimally achieved)
  • one shift (12 hours) can only complete 500.
  • the burning of the station therefore, using the firmware burning system shown in Figure 7, the efficiency of a single process is increased by more than 50%.
  • the single control board burning includes the following files, as shown in Table 2:
  • Firmware installation sequence size Configuration file 1000 bytes Boot picture 230,740 bytes operating system 10509145 bytes Key 550 bytes APP 137,709 bytes
  • control board 322 is taken as an example, and includes a processor 322b, a memory 322c, and a distributed cache module 322d and an agent component 322e.
  • the agent component 322e is configured to receive the first The work instruction sent by the communication module is sent to the distributed cache module 322d for storage.
  • the communication interface includes at least one of a universal serial bus USB interface, a serial communication interface, and an Ethernet interface.
  • the distributed cache module 322d employs Memcache.
  • a computer apparatus comprising: a memory and a processor, the memory storing computer readable instructions, wherein when the computer readable instructions are executed by the processor, the processor performs the step of: causing each control board to separately Obtain the corresponding network protocol IP address, and the number of the control boards is at least two.
  • Each control board includes a corresponding communication interface.
  • the control board obtains the work command sent by the host computer according to the corresponding IP address.
  • the work instruction is used to enable the control board to obtain the corresponding file to be burned; and the corresponding control interface is used to enable the control board to call the corresponding burning tool and the Android debugging bridge ADB to write the to-be-burned file into the corresponding file. Waiting for the terminal to be burned.
  • the processor when the computer readable instructions are executed by the processor, the processor further causes the processor to perform the following steps: every second preset time, causing the control board to feed back the corresponding current work instruction to the upper computer to enable the upper position Determine whether the corresponding current work instruction needs to be updated and obtain the corresponding first
  • the result of the determination is that the control board receives the corresponding first judgment result returned by the upper computer, and according to the corresponding first determination result, if the work instruction needs to be updated, the control board enters the corresponding IP address, so that the control board acquires the sending by the upper computer.
  • the steps of the work order when the computer readable instructions are executed by the processor, the processor further causes the processor to perform the following steps: every second preset time, causing the control board to feed back the corresponding current work instruction to the upper computer to enable the upper position Determine whether the corresponding current work instruction needs to be updated and obtain the corresponding first
  • the result of the determination is that the control board receives the corresponding first judgment result returned by the upper computer, and according to the
  • the processor when the computer readable instructions are executed by the processor, the processor further performs the steps of: causing the control board to detect whether the corresponding terminal to be burned is accessed; if yes, entering the corresponding communication interface, so that The control board calls the corresponding burning tool and the Android debugging bridge ADB to write the to-be-burned file to the corresponding terminal to be burned; and if not, enter the control board to check whether the corresponding terminal to be burned corresponds to The steps to access.
  • control board includes a distributed cache module and an agent component; when the computer readable instructions are executed by the processor, the processor further causes the processor to perform the following steps: the agent component receives the corresponding job according to the corresponding IP address The instructions are sent to the distributed cache module for storage.
  • the processor when the computer readable instructions are executed by the processor, the processor further causes the processor to perform the following steps: the control board returns the burning status of the corresponding file to be burned to the upper position every second preset time.
  • the machine is configured to determine the burning status of the host computer and obtain a corresponding second determination result; the control board receives the corresponding second determination result returned by the upper computer, and determines the file to be burned according to the corresponding second determination result.
  • the burning process is normal, if abnormal, the burning is ended; if it is normal, it is further determined according to the corresponding second determination result whether the burning progress of the to-be-burned file is completed, and if completed, disconnecting the terminal to be burned If the communication is not completed, the control board returns to the second predetermined time, so that the control board feeds back the burning status of the corresponding to be burned file to the upper computer.
  • one or more computer readable non-volatile storage media storing computer readable instructions are executable by one or more processors, such that one or more processors execute The following steps are performed: each control board obtains the corresponding network protocol IP address, and the number of the control boards is at least two. Each control board includes a corresponding communication interface. The control board obtains the corresponding board according to the corresponding IP address. The working instruction sent by the upper computer; according to the corresponding working instruction, the control board acquires the corresponding file to be burned; and the corresponding communication interface enables the control board to call the corresponding burning tool and the Android debugging bridge ADB Burning file to be written to correspond to The terminal to be burned.
  • the processor when the computer readable instructions are executed by one or more processors, the processor further causes the processor to perform the following steps: causing the control board to feed back the corresponding current work instruction to the upper computer every first preset time In order for the host computer to determine whether the corresponding current work instruction needs to be updated and obtain a corresponding first determination result; the control board receives the corresponding first determination result returned by the upper computer, according to the corresponding first determination result, if the work instruction If the update is required, the control board obtains the work instruction sent by the host computer according to the corresponding IP address.
  • the processor when the computer readable instructions are executed by one or more processors, the processor further causes the processor to perform the steps of: causing the control board to detect whether the corresponding terminal to be burned is accessed; if yes, entering the corresponding
  • the communication interface is configured to enable the control board to call the corresponding burning tool and the Android debugging bridge ADB to write the to-be-burned file to the corresponding terminal to be burned; and if not, enter the control board corresponding to the corresponding processing The step of burning the terminal is connected.
  • control board includes a distributed cache module and an agent component; when the computer readable instructions are executed by one or more processors, the processor further causes the processor to perform the following steps: the agent component according to the corresponding IP address The corresponding work instruction is received, and the work instruction is sent to the distributed cache module for storage.
  • the processor when the computer readable instructions are executed by one or more processors, the processor further causes the processor to perform the following steps: causing the control board to burn the corresponding file to be burned every second preset time
  • the state feedback is sent to the upper computer, so that the upper computer judges the burning state and obtains the corresponding second determination result; the control board receives the corresponding second determination result returned by the upper computer, and determines the waiting according to the corresponding second determination result.
  • the burning process of the burning file is normal, if abnormal, the burning is ended; if it is normal, it is further determined according to the corresponding second judgment result whether the burning progress of the to-be-burned file is completed, and if it is completed, disconnected and waiting
  • the communication connection between the terminals is programmed; if not, the process proceeds to the second preset time, so that the control board feeds back the burning status of the corresponding to be burned file to the upper computer.
  • the program can be executed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium.
  • the program can be stored in a storage medium of the computer system, and Executed by at least one processor in the computer system to implement a process comprising an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请涉及一种固件烧录方法,包括:每个控制单板分别获取对应的网络协议IP地址,控制单板的数量至少为两个,每个控制单板包括对应的通讯接口,根据对应的IP地址,控制单板获取上位机发送的工作指令,根据对应的工作指令,控制单板获取对应的待烧录文件,通过对应的通讯接口,控制单板调用对应的安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。

Description

固件烧录方法、***、计算机设备和存储介质
本申请要求于2017年02月28日提交中国专利局,申请号为201710114474.2,发明名称为“固件烧录方法和***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,特别是涉及一种固件烧录方法、***、计算机设备和存储介质。
背景技术
在电子技术领域,特别是嵌入式技术领域,常常需要进行固件的烧录。固件(firmware)是指固化在集成电路内部的程序代码,负责控制和协调电子设备的集成电路的功能,一般存储于设备中的电可擦除只读存储器EEPROM(Electrically Erasable Programmable ROM,电可擦可编程只读存储器)或FLASH芯片中。
一般地,终端如POS(point of sale,销售终端)机的烧录***通常包括PC(personal computer,个人计算机)上位机、PCI(Peripheral Component Interconnect,外设部件互连标准)转USB扩展卡、烧录软件和待烧录终端组成,通常PC上安装有ADB(Android Debug Bridge,安卓调试桥)客户端,每个POS终端中均安装有ADB服务端。由于工业化的要求,往往在生产线上需要同时烧录多个POS终端,当直接通过PC上的USB接口连接多个终端烧录进行烧录时,PC需要调用ADB客户端与POS端中的ADB服务端进行连接,由于ADB客户端面对一对多个终端应用场景时,POS终端烧录资源时存在明显的资源竞争,即PC成功连接多台POS烧录时,每一台POS烧录时间明显大于单独一台POS的烧录时间,最终导致整个POS烧录过程效率低下。
发明内容
根据本申请的各种实施例,提供一种固件烧录***、方法、计算机设备和存储介质。
一种固件烧录方法,所述方法包括:
每个控制单板分别获取对应的网络协议IP地址,所述控制单板的数量至少为两个,每个所述控制单板包括对应的通讯接口;
根据对应的IP地址,所述控制单板获取上位机发送的工作指令;
根据对应的工作指令,所述控制单板获取对应的待烧录文件;及
通过对应的通讯接口,所述控制单板调用对应的安卓调试桥ADB将所述待烧录文件烧录写入对应的待烧录终端。
一种固件烧录***,所述***包括:第一通信模块以及第一主控模块,所述第一主控模块同所述第一通信模块相连接,所述第一主控模块包括至少两个独立的控制单板,每个所述控制单板分别同所述第一通信模块连接,每个所述控制单板包括对应的通讯接口,每个所述控制单板分别能够通过对应的所述通讯接口与待烧录终端连接;
所述第一通信模块用于所述第一主控模块与上位机进行通信,并为所述上位机以及所述第一主控模块中的每个所述控制单板分配对应的网络协议IP地址;及
所述控制单板用于根据对应的IP地址,通过所述第一通信模块接收所述上位机发送的对应的工作指令,根据所述工作指令,获取对应的待烧录文件,并通过对应的通讯接口调用烧录工具和安卓调试桥ADB将所述待烧录文件烧录写入对应的待烧录终端。
一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行以下步骤:
使每个控制单板分别获取对应的网络协议IP地址,所述控制单板的数量 至少为两个,每个所述控制单板包括对应的通讯接口;
根据对应的IP地址,使所述控制单板获取上位机发送的工作指令;
根据对应的工作指令,使所述控制单板获取对应的待烧录文件;及
通过对应的通讯接口,使所述控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
使每个控制单板分别获取对应的网络协议IP地址,所述控制单板的数量至少为两个,每个所述控制单板包括对应的通讯接口;
根据对应的IP地址,使所述控制单板获取上位机发送的工作指令;
根据对应的工作指令,使所述控制单板获取对应的待烧录文件;及
通过对应的通讯接口,使所述控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为一个实施例中固件烧录方法的硬件环境图;
图2为一个实施例中固件烧录方法的流程图;
图3为另一个实施例中固件烧录方法的流程图;
图4为另一个实施例中固件烧录方法的流程图;
图5为一个实施例中为每个控制单板分配IP地址结构框图;
图6为另一个实施例中固件烧录***的结构框图;
图7为另一个实施例中为每个控制单板分配IP地址的界面示意图;
图8为一个实施例中控制单板烧录过程日志界面示意图;
图9为一个实施例中控制单板的内部结构框图。
具体实施方式
在一个具体地实施例中,上述固件烧录方法的硬件环境如图1所示,包括上位机110、控制单板模块120以及待烧录终端模块130,其中控制单板模块120包括至少两个控制单板,待烧录终端模块包括多个待烧录终端,每个待烧录终端分别能够与每个控制单板进行通信,通信方式包括不限于通用串行总线接口USB(Universal Serial Bus,USB)、无线网络通信WiFi、串行通信接口以及以太网通信接口中的至少一种,上位机110能够与控制单板模块120中每个控制单板分别进行通信,通信方式包括但不限于以有线太网通信方式以及无线网络通信方式WiFi等。
其中,在一个具体地实施例中,控制单板的硬件配置如下:
Figure PCTCN2017102979-appb-000001
Figure PCTCN2017102979-appb-000002
表1
在一个实施例中,提供了一种固件烧录方法,应用于上述硬件环境,如图2所示,包括以下步骤:
步骤S210,每个控制单板分别获取对应的网络协议IP地址,控制单板的数量至少为两个,每个控制单板包括对应的通讯接口。
具体地,上位机与控制单板模块通过网络通信设备可以进行网络通信,且上位机与控制单板模块中的每个控制单板均处于同一个局域网络中,通过对应的网络通信设备,可以为每个控制单板分配对应的网络协议IP地址,这样以来,上位机与其中的每个控制单板能够进行通信,控制单板模块中的控制单板数量可以根据需要进行设置,但不少于两个。此外,控制单板模块的数量也可以为多个,新增的控制单板模块可以通过网络通信接口与上一级控制单板模块相连接,以实现同上位机进行网络通信,也可以直接同上位机通过网络接口连接以实现网络通信,同样地,新增的控制单板模块中每个控制单板以及上位机均处于同一个局域网中,上位机与其中的每个控制单板能够进行通信。
另外,每个控制单板均有对应的通信接口,该通信接口包括但不限于USB接口、WiFi接口、串行通信接口以及以太网通信接口,通过该通信接口,每个控制单板可以与待烧录终端进行通信。
在一个具体的实施例中,上位机为PC,控制单板模块的数量为一个,每个控制单板模块包括4个控制单板,网络通信设备为以太网交换机,每个控制单板均与以太网交换机相连接,通过以太网交换机为上位机以及每个控制单板分配IP地址,这里将上位机的IP地址设置为192.168.100.10,按照控制单板的先后顺序依次为其分配IP地址,即为192.168.100.20、192.168.100.21、192.168.100.22以及192.168.100.23,这样以来,每个控制单板和上位机均处于同一个局域网中,上位机可以与每个控制单板独立的进行通信,即当每个控制单板***启动后,可独立的访问每个控制单板。若新增一个相同的控制单板模块,通过以太网接口同交换机或者上一级控制单板模块相连接,则通过以太网交换机为其分配对应的IP地址,即为192.168.100.24、192.168.100.25、192.168.100.26以及192.168.100.27,以此类推,余皆相同。
步骤S220,根据对应的IP地址,控制单板获取上位机发送的工作指令。
具体地,可以根据需要,通过网络通信设备对上位机的IP地址进行设置,使得上位机与每个控制单板均处于同一个局域网之中,这样以来,当每个控制单板启动完成之后,每个控制单板作为服务端与上位机进行通信,上位机可以将对应的工作指令发送到控制单板,该工作指令由上位机根据获取的输入参数所确定的。
步骤S230,根据对应的工作指令,控制单板获取对应的待烧录文件。
具体地,工作指令包括对应的待安装文件、校验码以及文件对应的烧录顺序,其中校验码可采用MD5校验码,控制单板通过解析对应的工作指令,接收上位机发送对应的待烧录文件并进行存储。
在一个实施例中,待烧录文件包括:待烧录终端初始运行软件bootloader、配置文件、开机logo文件、操作***内核OS(Operation system,OS)以及终端应用程序。
步骤S240,通过对应的通讯接口,控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
具体地,每个控制单板均有对应的通信接口与待烧录终端相连接,获取 对应的待烧录文件之后,控制单板通过首先调用对应的烧录工具完成待烧录终端基础文件的烧录,由于控制单板安装有ADB客户端,待烧录终端安装有ADB服务端,控制单板通过调用ADB客户端,与待烧录终端进行通信,能够进一步将对应的应用程序写入待烧录终端。
在一个实施例中,控制单板与待烧录终端通过USB方式相连接,待烧录文件包括基础文件如初始运行软件bootloader、配置文件、开机logo文件、操作***内核OS,其中bootloader是指嵌入式***启动过程中最先运行的软件,用于初始化硬件和加载操作***内核,控制单板通过首先调用对应的烧录工具如Flashwrite工具完成上述基础文件的烧录,进一步的,通过调用ADB客户端与待烧录终端进行通信,将待烧录文件中对应的应用软件进行写入待烧录终端。
上述烧录方法,通过每个控制单板分别获取对应的网络协议IP地址,控制单板的数量至少为两个,每个控制单板包括对应的通讯接口,根据对应的IP地址,控制单板获取上位机发送的工作指令,根据对应的工作指令,控制单板获取对应的待烧录文件,通过对应的通讯接口,控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端,使得每个控制单板能够单独的调用ADB客户端进行文件的烧录,且控制单板的数量可以根据需要进行任意添加和配置,从而能够同时烧录多个终端,克服了在ADB客户端面对一对多个终端应用场景中多个终端存在资源竞争所导致烧录过程效率低下的缺点,提高了烧录效率,满足了工业化生产的需求。
在一个实施例中,上述方法还包括:每隔第一预设时间,控制单板将对应的当前工作指令反馈至上位机,以使上位机判断对应的当前工作指令是否需要更新并得到对应的第一判断结果,控制单板接收上位机返回的对应的第一判断结果,根据对应的第一判断结果,若工作指令需要更新,则进入步骤S220,否则进入每隔第一预设时间,控制单板将对应的当前工作指令反馈至上位机的步骤。
具体地,控制单板***启动之后,上位机每隔预设时间间隔,读取控制 单板对应的当前指令,控制单板即将对应的当前工作指令反馈至上位机,以使上位机检查当前工作指令是否需要更新,得到对应的第一判断结果,控制单板接收上位机返回的对应的第一判断结果,根据第一判断结果,如果是,则进入步骤S220,以获取最新工作指令,如果不是,则进入步骤S250。
在一个具体的实施例中,每个控制单板模块包括4个控制单板,将上位机的IP地址设置为192.168.100.10,按照控制单板的先后顺序依次为其分配IP地址,即为1#:192.168.100.20、2#:192.168.100.21、3#:192.168.100.22以及4#:192.168.100.23,这样以来,上位机通过运行为名为“controller.exe”控制台软件,通过使用CURL访问控制单板对应的RESTFUL API通信接口读取工作指令,“controller.exe”对应的控制命令格式为:
Controller.exe ID=1,File_n=filename_n,File_n_type=type_1等。
其中,ID表示单板编号每个***中的单板编号,与单板的IP地址一一对应。ID=1的单板对应IP地址为192.168.100.20,ID=2的单板对应IP地址为192.168.100.21由此类推到ID=6的单板IP地址为192.168.100.27;File_n表示编号为n,且需要上传到控制单板中待安装或烧录的文件路径,n为正整数;File_n_type表示第n个待烧录文件的类型。
如读取标号为1#的控制单板工作指令的过程如下,其中CURL是利用URL语法在命令行方式下工作的开源文件传输工具。
上位机读取控制单板1#工作指令的访问命令为:
CURL http://192.168.100.20/api/instruction。
单板返回数据如下。
Figure PCTCN2017102979-appb-000003
Figure PCTCN2017102979-appb-000004
其中,“app_name”表示当前烧录应用软件文件名,“app_md5_value”表示当前烧录文件名的一致性验证码(采用MD5算法),“configuration_file_name”表示当前烧录文件中的配置文件,“configuration_md5_value”表示对应的一致性校验码(采用MD5算法),“OS_file_name”表示当前烧录文件的操作***内核,“os_md5_value”表示当前烧录文件的操作***对应的一致性校验码(采用MD5算法),“logo_file_name”表示开机logo文件名,
即当前工作指令包含需要烧录配置文件、开机logo图片、操作***和应用软件的文件名称和MD5码值。由于初始运行软件bootloader和pubso(应用软件依赖动态库)不需要安装,值全为no。
同理,访问2#控制单板的命令为:CURL http://192.168.100.30/api/instruction,以此类推,即上位机可根据每个控制单板的IP地址查询控制单板的当前的工作指令。
在一个实施例中,如图3所示,步骤S240之前还包括:
步骤S250,控制单板检测对应的待烧录终端是否接入,若是,则进入步骤240,若否,则进入步骤S250。
在一个实施例中,控制单板包括分布式缓存模块以及代理程序组件,步骤S220包括:根据对应的IP地址,代理程序组件接收对应的工作指令,并将工作指令发送到分布式缓存模块进行存储。
具体地,控制单板采用分布式缓存模块以及代理程序组件,根据对应的IP地址,控制单板处理器接收到上位机发送的工作指令请求后们首先将工作指令请求发送至代理程序组件,然后通过代理程序组件将工作指令请求更新到分布式缓存模块中进行存储。
其中,采用代理程序组件减少了控制单板各个软件模块之间的耦合,采用分布式缓存模块则提高了控制单板整个***的响应速度和运行效率。
在一个具体地实施例中,代理程序组件采用broker组件,分布式缓存模块采用分布式高速缓存***。控制单板中的代理程序组件采用broke模式组件,控制单板和上位机之间通信协议采用HTTP协议,其中控制单板中的处理器作为HTTP服务器为上位机提供访问接入服务,控制单板通过HTTP服务器收到上位机发送的请求后,将该数据请求传递给broke模式组件,broke模式组件根据请求的内容分别将其中的工作指令更新到分布式缓存模块中,将控制单板根据工作指令所获得的待烧录文件复制到指定的文件路径。
在一个实施例中,上述方法还包括:每隔第二预设时间,控制单板将对应的待烧录文件的烧录状态反馈至上位机,以使上位机对烧录状态进行判断并得到对应的第二判断结果,控制单板接收上位机返回的对应的第二判断结果,根据对应的第二判断结果确定待烧录文件的烧录过程是否正常,若异常,则结束烧录;若正常,则进一步根据对应的第二判断结果确定待烧录文件的烧录进度是否完成,若完成,则断开与待烧录终端之间的通信连接;若未完成,则进入每隔第二预设时间,控制单板将对应的待烧录文件的烧录状态反馈至上位机的步骤。
具体地,每隔第二预设时间,上位机即读取控制单板对应的待烧录文件的烧录状态,并进行判断并得到对应的第二判断结果,发送至控制单板,其中烧录状态包括了待烧录文件的烧录过程是否正常以及烧录的进度等信息, 根据第二判断结果,若异常,则结束烧录;若烧录过程正常,则进一步判断对应的烧录进度是否完成,如果完成,则断开与待烧录终端的通信连接,如果未完成,则继续获取控制单板对应的待烧录文件的烧录状态,并进行判断。
在一个具体地实施例中,每个控制单板模块包括4个控制单板,将上位机的IP地址设置为192.168.100.10,按照控制单板的先后顺序依次为其分配IP地址,即为1#:192.168.100.20、2#:192.168.100.21、3#:192.168.100.22以及4#:192.168.100.23,这样以来,上位机通过运行为名为“controller.exe”控制台软件,通过上位机这里使用CURL访问控制单板对应的RESTFUL API通信接口读取控制单板对应的烧录状态,如读取标号为1#一4#的控制单板烧录状态的过程如下:
CURL http://192.168.100.20/api/status;
CURL http://192.168.100.21/api/status;
CURL http://192.168.100.22/api/status;
CURL http://192.168.100.23/api/status。
参照1#控制单板为例,1#控制单板返回的数据如下:
Figure PCTCN2017102979-appb-000005
其中,action表示当前烧录的状态,运行时为“start”,“stop”表示处于停止状态。
此外,还提供了一种固件烧录***,如图4所示,包括:第一通信模块310以及第一主控模块320,第一主控模块320与第一通信模块310相连接,第一主控模块320包括至少两个独立的控制单板,每个控制单板分别同第一通信模块310连接,每个控制单板包括对应的通讯接口,每个控制单板分别能够通过对应的通讯接口与待烧录终端连接;
第一通信模块310用于第一主控模块320与上位机进行通信,并为上位机330以及第一主控模块320中的每个控制单板分配对应的网络协议IP地址;
控制单板用于根据对应的IP地址,通过第一通信模块310接收上位机发送的对应的工作指令,根据工作指令,获取对应的待烧录文件,并通过对应的通讯接口调用烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
在一个实施例中,如图5所示,第一主控模块320包括四个对应的控制单板,即控制单板322、324、326以及328,第一通信模块310为以太网交换机,控制单板322、324、326以及328分别同第一通信模块310相连接,第一主控模块320通过第一通信模块310与上位机330相连接,通过第一通信模块310为上位机分配IP地址为192.168.100.10,按照上述控制单板的先后顺序依次为其分配IP地址,即为192.168.100.20、192.168.100.21、192.168.100.22以及192.168.100.23,每个控制单板和上位机330均处于同一个局域网中,上位机330可以与上述每个控制单板独立的进行通信。上述控制单板322、324、326以及328同待烧录终端322a、324a、326a以及328a进行连接,以控制单板322a为例,用于根据对应的IP地址,通过第一通信模块310接收上位机330发送的对应的工作指令,根据工作指令,获取对应的待烧录文件,并通过对应的通讯接口322a1调用烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端322a。
上述固件烧录***,通过为每个待烧录终端配置一个单独的控制单板,并将多个控制单板与上位机通过第一通信模块设置在同一个局域网络通信中,使得每个控制单板能够单独的调用ADB客户端进行终端的烧录,且控制单板的数量可以根据需要进行任意添加和配置,从而能够同时烧录多个终端,克服了ADB客户端面对一对多个终端应用场景时,每个待烧录终端独享对应的控制单板资源,多个终端存在资源竞争导致烧录过程效率低下的缺点,提高了烧录效率,满足了工业化生产的需求。
在一个实施例中,如图6所示,上述固件烧录***还包括第二主控模块 420以及第二通信模块430,,第二主控模块420同第二通讯模块430相连接,第二主控模块420包括至少两个控制单板,第二通讯模块430能够与上位机330或第一通信模块310相连接,第二通讯模块410用于第二主控模块420与上位机330进行通信,并为第二主控模块420中的每个控制单板分配对应的网络协议IP地址。
具体地,在一个实施例中,如图7所示,第一通信模块410为以太网交换机,第二控制模块中的控制单板数目为4个,则第二主控模块420中包括4个控制单板422、424、426以及428,分别第二通信模块410相连接,第二主控模块420通过第二通信模块310与第一通信模块310相连接,若上位机IP地址为192.168.100.10,控制单板422、424、426以及428对应的IP地址分别为192.168.100.24、192.168.100.25、192.168.100.26以及192.168.100.27,这样当第二主控模块中的每个控制单板均可独立的与上位机进行通信,上述控制单板422、424、426以及428同待烧录终端422a、424a、426a以及428a进行连接,以控制单板422为例,用于根据对应的IP地址,通过第二通信模块410接收上位机330发送的对应的工作指令,根据工作指令,获取对应的待烧录文件,并通过对应的通讯接口422a1调用烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端422a。
以此类推,上述固件烧录***可根据需要,按照同样的模式进行扩充,可成倍的提高固件烧录***的效率,进一步的适应了工业化大生产的需要,降低了经济成本,提高了经济效益。
在一个实施例中,采用图7所示的固件烧录***,经过实际生产线的批量测试,一个班次(12个小时)可以完成800台POS端的烧录,若采用现有的烧录***,即使用PC连接USB进行POS端的烧录,在采用成本基本相同的情况下,采用两台上位机,如一台PC连接4个(最优情况下达到),一个班次(12个小时)只能完成500台的烧录,因此,采用图7所示的固件烧录***,单个工序的效率提升50%以上。
其中,单个控制单板烧录包括以下文件,如表2所示:
固件安装顺序 大小
配置文件 1000字节
开机图片 230740字节
操作*** 10509145字节
密钥 550字节
APP 137709字节
表2
以单个控制单板322为例,整个过程中,需要首先烧录操作***内核OS,整个烧录过程日志如图8所示,显然从实际的工作日志中可以看到,从1:45:57开始烧录到1:47:24到烧录结束,整个持续时间为87秒(包括中间约20秒的重启过程),若多台同时进行,单机的烧录时间并不受影响,从而成倍的提高烧录的效率。
在一个实施例中,如图9所示,以控制单板322为例,包括处理器322b、存储器322c,还包括分布式缓存模块322d以及代理程序组件322e,代理程序组件322e用于接收第一通信模块发送的工作指令,并发送到分布式缓存模块322d进行存储。
在一个实施例中,通信接口包括通用串行总线USB接口、串行通信接口以及以太网接口的至少一种。
在一个实施例中,分布式缓存模块322d采用Memcache。
在一个实施例中,提供一种计算机设备包括存储器和处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行以下步骤:使每个控制单板分别获取对应的网络协议IP地址,控制单板的数量至少为两个,每个控制单板包括对应的通讯接口;根据对应的IP地址,使控制单板获取上位机发送的工作指令;根据对应的工作指令,使控制单板获取对应的待烧录文件;及通过对应的通讯接口,使所述控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
在一个实施例中,计算机可读指令被处理器执行时,还使得处理器执行以下步骤:每隔第一预设时间,使控制单板将对应的当前工作指令反馈至上位机,以使上位机判断对应的当前工作指令是否需要更新并得到对应的第一 判断结果;使控制单板接收上位机返回的对应的第一判断结果,根据对应的第一判断结果,若工作指令需要更新,则进入根据对应的IP地址,使控制单板获取上位机发送的工作指令的步骤。
在一个实施例中,计算机可读指令被处理器执行时,还使得处理器执行以下步骤:使控制单板检测对应的待烧录终端是否接入;若是,则进入通过对应的通讯接口,使控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端的步骤;及若否,则进入使控制单板检测对应的待烧录终端是否接入的步骤。
在一个实施例中,控制单板包括分布式缓存模块以及代理程序组件;计算机可读指令被处理器执行时,还使得处理器执行以下步骤:根据对应的IP地址,代理程序组件接收对应的工作指令,并将工作指令发送到分布式缓存模块进行存储。
在一个实施例中,计算机可读指令被处理器执行时,还使得处理器执行以下步骤:每隔第二预设时间,使控制单板将对应的待烧录文件的烧录状态反馈至上位机,以使上位机对烧录状态进行判断并得到对应的第二判断结果;使控制单板接收上位机返回的对应的第二判断结果,根据对应的第二判断结果确定待烧录文件的烧录过程是否正常,若异常,则结束烧录;若正常,则进一步根据对应的第二判断结果确定待烧录文件的烧录进度是否完成,若完成,则断开与待烧录终端之间的通信连接;若未完成,则进入每隔第二预设时间,使控制单板将对应的待烧录文件的烧录状态反馈至上位机的步骤。
在一个实施例中,提供一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:使每个控制单板分别获取对应的网络协议IP地址,控制单板的数量至少为两个,每个控制单板包括对应的通讯接口;根据对应的IP地址,使控制单板获取上位机发送的工作指令;根据对应的工作指令,使控制单板获取对应的待烧录文件;及通过对应的通讯接口,使所述控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应 的待烧录终端。
在一个实施例中,计算机可读指令被一个或多个处理器执行时,还使得处理器执行以下步骤:每隔第一预设时间,使控制单板将对应的当前工作指令反馈至上位机,以使上位机判断对应的当前工作指令是否需要更新并得到对应的第一判断结果;使控制单板接收上位机返回的对应的第一判断结果,根据对应的第一判断结果,若工作指令需要更新,则进入根据对应的IP地址,使控制单板获取上位机发送的工作指令的步骤。
在一个实施例中,计算机可读指令被一个或多个处理器执行时,还使得处理器执行以下步骤:使控制单板检测对应的待烧录终端是否接入;若是,则进入通过对应的通讯接口,使控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端的步骤;及若否,则进入使控制单板检测对应的待烧录终端是否接入的步骤。
在一个实施例中,控制单板包括分布式缓存模块以及代理程序组件;计算机可读指令被一个或多个处理器执行时,还使得处理器执行以下步骤:根据对应的IP地址,代理程序组件接收对应的工作指令,并将工作指令发送到分布式缓存模块进行存储。
在一个实施例中,计算机可读指令被一个或多个处理器执行时,还使得处理器执行以下步骤:每隔第二预设时间,使控制单板将对应的待烧录文件的烧录状态反馈至上位机,以使上位机对烧录状态进行判断并得到对应的第二判断结果;使控制单板接收上位机返回的对应的第二判断结果,根据对应的第二判断结果确定待烧录文件的烧录过程是否正常,若异常,则结束烧录;若正常,则进一步根据对应的第二判断结果确定待烧录文件的烧录进度是否完成,若完成,则断开与待烧录终端之间的通信连接;若未完成,则进入每隔第二预设时间,使控制单板将对应的待烧录文件的烧录状态反馈至上位机的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流 程,是可以通过计算机程序来指令相关的硬件来完成,所述程序可存储于一计算机可读取存储介质中,如本申请实施例中,该程序可存储于计算机***的存储介质中,并被该计算机***中的至少一个处理器执行,以实现包括如上述各方法的实施例的流程。其中,所述存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种固件烧录方法,所述方法包括:
    每个控制单板分别获取对应的网络协议IP地址,所述控制单板的数量至少为两个,每个所述控制单板包括对应的通讯接口;
    根据对应的IP地址,所述控制单板获取上位机发送的工作指令;
    根据对应的工作指令,所述控制单板获取对应的待烧录文件;及
    通过对应的通讯接口,所述控制单板调用对应的烧录工具和安卓调试桥ADB将所述待烧录文件烧录写入对应的待烧录终端。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    每隔第一预设时间,所述控制单板将对应的当前工作指令反馈至所述上位机,以使所述上位机判断对应的所述当前工作指令是否需要更新并得到对应的第一判断结果;及
    所述控制单板接收所述上位机返回的对应的第一判断结果,根据对应的第一判断结果,若所述工作指令需要更新,则进入所述根据对应的IP地址,所述控制单板获取上位机发送的工作指令。
  3. 根据权利要求1所述的方法,其特征在于,所述通过对应的通讯接口,所述控制单板调用对应的烧录工具和安卓调试桥ADB将所述待烧录文件烧录写入对应的待烧录终端之前还包括:
    所述控制单板检测对应的待烧录终端是否接入;
    若是,则进入所述通过对应的通讯接口,所述控制单板调用对应的烧录工具和安卓调试桥ADB将所述待烧录文件烧录写入对应的待烧录终端;及
    若否,则进入所述控制单板检测对应的待烧录终端是否接入。
  4. 根据权利要求1所述的方法,其特征在于,所述控制单板包括分布式缓存模块以及代理程序组件,所述根据对应的IP地址,所述控制单板获取上位机发送的工作指令包括:
    根据对应的IP地址,所述代理程序组件接收对应的工作指令,并将所述工作指令发送到所述分布式缓存模块进行存储。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    每隔第二预设时间,所述控制单板将对应的待烧录文件的烧录状态反馈至所述上位机,以使所述上位机对所述烧录状态进行判断并得到对应的第二判断结果;
    所述控制单板接收所述上位机返回的对应的第二判断结果,根据对应的第二判断结果确定所述待烧录文件的烧录过程是否正常;
    若异常,则结束烧录;
    若正常,则进一步根据对应的第二判断结果确定所述待烧录文件的烧录进度是否完成;
    若完成,则断开与所述待烧录终端之间的通信连接;及
    若未完成,则进入所述每隔第二预设时间,所述控制单板将对应的待烧录文件的烧录状态反馈至所述上位机。
  6. 一种固件烧录***,其特征在于,所述***包括:第一通信模块以及第一主控模块,所述第一主控模块同所述第一通信模块相连接,所述第一主控模块包括至少两个独立的控制单板,每个所述控制单板分别同所述第一通信模块连接,每个所述控制单板包括对应的通讯接口,每个所述控制单板分别能够通过对应的所述通讯接口与待烧录终端连接;
    所述第一通信模块用于所述第一主控模块与上位机进行通信,并为所述上位机以及所述第一主控模块中的每个所述控制单板分配对应的网络协议IP地址;
    所述控制单板用于根据对应的IP地址,通过所述第一通信模块接收所述上位机发送的对应的工作指令;及
    根据所述工作指令,获取对应的待烧录文件,并通过对应的通讯接口调用烧录工具和安卓调试桥ADB将所述待烧录文件烧录写入对应的待烧录终端。
  7. 根据权利要求6所述的***,其特征在于,所述***还包括第二主控 模块以及第二通讯模块,所述第二主控模块同所述第二通讯模块相连接,所述第二主控模块包括至少两个控制单板,所述第二通讯模块能够与所述上位机或所述第一通信模块相连接,所述第二通讯模块用于所述第二主控模块与所述上位机进行通信,并为所述第二主控模块中的每个所述控制单板分配对应的网络协议IP地址。
  8. 根据权利要求6所述的***,其特征在于,所述控制单板还包括分布式缓存模块以及代理程序组件,所述代理程序组件用于接收所述第一通信模块发送的工作指令,并发送到所述分布式缓存模块进行存储。
  9. 根据权利要求6所述的***,其特征在于,所述通信接口包括通用串行总线USB接口、串行通信接口以及以太网接口的至少一种。
  10. 根据权利要求8所述的***,其特征在于,所述分布式缓存模块采用Memcache。
  11. 一种计算机设备,其特征在于,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    使每个控制单板分别获取对应的网络协议IP地址,所述控制单板的数量至少为两个,每个所述控制单板包括对应的通讯接口;
    根据对应的IP地址,使所述控制单板获取上位机发送的工作指令;
    根据对应的工作指令,使所述控制单板获取对应的待烧录文件;及
    通过对应的通讯接口,使所述控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
  12. 根据权利11所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    每隔第一预设时间,使所述控制单板将对应的当前工作指令反馈至上位机,以使所述上位机判断对应的当前工作指令是否需要更新并得到对应的第一判断结果;及
    使所述控制单板接收上位机返回的对应的第一判断结果,根据对应的第 一判断结果,若所述工作指令需要更新,则进入所述根据对应的IP地址,使控制单板获取上位机发送的工作指令。
  13. 根据权利11所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    使所述控制单板检测对应的待烧录终端是否接入;
    若是,则进入所述通过对应的通讯接口,使控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端的步骤;及
    若否,则进入所述使控制单板检测对应的待烧录终端是否接入的步骤。
  14. 根据权利11所述的计算机设备,其特征在于,所述控制单板包括分布式缓存模块以及代理程序组件;所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    根据对应的IP地址,所述代理程序组件接收对应的工作指令,并将所述工作指令发送到分布式缓存模块进行存储。
  15. 根据权利11所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    每隔第二预设时间,使所述控制单板将对应的待烧录文件的烧录状态反馈至上位机,以使所述上位机对烧录状态进行判断并得到对应的第二判断结果;
    使所述控制单板接收所述上位机返回的对应的第二判断结果,根据对应的第二判断结果确定所述待烧录文件的烧录过程是否正常;
    若异常,则结束烧录;
    若正常,则进一步根据对应的第二判断结果确定所述待烧录文件的烧录进度是否完成;
    若完成,则断开与待烧录终端之间的通信连接;及
    若未完成,则进入所述每隔第二预设时间,使控制单板将对应的待烧录文件的烧录状态反馈至上位机的步骤。
  16. 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质, 所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    使每个控制单板分别获取对应的网络协议IP地址,所述控制单板的数量至少为两个,每个所述控制单板包括对应的通讯接口;
    根据对应的IP地址,使所述控制单板获取上位机发送的工作指令;
    根据对应的工作指令,使所述控制单板获取对应的待烧录文件;及
    通过对应的通讯接口,使所述控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端。
  17. 根据权利16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    每隔第一预设时间,使所述控制单板将对应的当前工作指令反馈至上位机,以使所述上位机判断对应的当前工作指令是否需要更新并得到对应的第一判断结果;及
    使所述控制单板接收上位机返回的对应的第一判断结果,根据对应的第一判断结果,若所述工作指令需要更新,则进入所述根据对应的IP地址,使控制单板获取上位机发送的工作指令。
  18. 根据权利16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    使所述控制单板检测对应的待烧录终端是否接入;
    若是,则进入所述通过对应的通讯接口,使控制单板调用对应的烧录工具和安卓调试桥ADB将待烧录文件烧录写入对应的待烧录终端的步骤;及
    若否,则进入所述使控制单板检测对应的待烧录终端是否接入的步骤。
  19. 根据权利16所述的存储介质,其特征在于,所述控制单板包括分布式缓存模块以及代理程序组件;所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    根据对应的IP地址,所述代理程序组件接收对应的工作指令,并将所述工作指令发送到分布式缓存模块进行存储。
  20. 根据权利16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    每隔第二预设时间,使所述控制单板将对应的待烧录文件的烧录状态反馈至上位机,以使所述上位机对烧录状态进行判断并得到对应的第二判断结果;
    使所述控制单板接收所述上位机返回的对应的第二判断结果,根据对应的第二判断结果确定所述待烧录文件的烧录过程是否正常;
    若异常,则结束烧录;
    若正常,则进一步根据对应的第二判断结果确定所述待烧录文件的烧录进度是否完成;
    若完成,则断开与待烧录终端之间的通信连接;及
    若未完成,则进入所述每隔第二预设时间,使控制单板将对应的待烧录文件的烧录状态反馈至上位机的步骤。
PCT/CN2017/102979 2017-02-28 2017-09-22 固件烧录方法、***、计算机设备和存储介质 WO2018157588A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710114474.2A CN106970810B (zh) 2017-02-28 2017-02-28 固件烧录方法和***
CN201710114474.2 2017-02-28

Publications (1)

Publication Number Publication Date
WO2018157588A1 true WO2018157588A1 (zh) 2018-09-07

Family

ID=59329025

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102979 WO2018157588A1 (zh) 2017-02-28 2017-09-22 固件烧录方法、***、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN106970810B (zh)
WO (1) WO2018157588A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11113226B2 (en) * 2019-08-30 2021-09-07 Shenzhen GOODIX Technology Co., Ltd. Firmware burning apparatus and system
TWI776676B (zh) * 2021-09-15 2022-09-01 英業達股份有限公司 伺服器系統之韌體燒錄檢核方法及其系統

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106970810B (zh) * 2017-02-28 2020-04-03 百富计算机技术(深圳)有限公司 固件烧录方法和***
CN108170463B (zh) * 2017-12-26 2021-08-20 深圳市奇虎智能科技有限公司 一种安卓设备的出厂设置方法和装置
CN108491212A (zh) * 2018-03-19 2018-09-04 广东美的暖通设备有限公司 文件烧录方法、设备及计算机可读存储介质
CN108710494B (zh) * 2018-03-21 2022-07-01 昆山龙腾光电股份有限公司 一种更新测试设备数据的装置、***及控制方法
CN108829403B (zh) * 2018-05-28 2022-02-18 郑州云海信息技术有限公司 一种固态硬盘烧写的方法、装置、设备以及存储介质
CN109901848B (zh) * 2019-01-22 2022-09-16 深圳市元征科技股份有限公司 一种设备参数烧录方法以及装置
CN111813421A (zh) * 2020-07-10 2020-10-23 卡斯柯信号(北京)有限公司 一种计算机联锁板卡芯片烧录方法和装置
CN112764769B (zh) * 2021-01-19 2024-03-29 北京华辉智惠科技合伙企业(有限合伙) 一种阵列式密钥烧录装置、***以及方法
CN115495373A (zh) * 2022-10-08 2022-12-20 深圳市华曦达科技股份有限公司 基于Android***的自动化升级测试方法及装置
CN117762438A (zh) * 2024-01-12 2024-03-26 荣耀终端有限公司 一种无线烧录印制电路板的***、方法及相关装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281477A (zh) * 2008-05-14 2008-10-08 北京泰得思达科技发展有限公司 一种采用多路复用技术进行并行烧录的***
CN104425001A (zh) * 2013-08-22 2015-03-18 北京卓越信通电子股份有限公司 一种同时对多台交换机烧录的***、方法及相应交换机
CN106970810A (zh) * 2017-02-28 2017-07-21 百富计算机技术(深圳)有限公司 固件烧录方法和***

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630495A (zh) * 2015-12-23 2016-06-01 深圳市科陆电子科技股份有限公司 烧录芯片方法及***

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281477A (zh) * 2008-05-14 2008-10-08 北京泰得思达科技发展有限公司 一种采用多路复用技术进行并行烧录的***
CN104425001A (zh) * 2013-08-22 2015-03-18 北京卓越信通电子股份有限公司 一种同时对多台交换机烧录的***、方法及相应交换机
CN106970810A (zh) * 2017-02-28 2017-07-21 百富计算机技术(深圳)有限公司 固件烧录方法和***

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11113226B2 (en) * 2019-08-30 2021-09-07 Shenzhen GOODIX Technology Co., Ltd. Firmware burning apparatus and system
TWI776676B (zh) * 2021-09-15 2022-09-01 英業達股份有限公司 伺服器系統之韌體燒錄檢核方法及其系統

Also Published As

Publication number Publication date
CN106970810B (zh) 2020-04-03
CN106970810A (zh) 2017-07-21

Similar Documents

Publication Publication Date Title
WO2018157588A1 (zh) 固件烧录方法、***、计算机设备和存储介质
US10282192B1 (en) Updating device code through a bus
CN102053869B (zh) 一种多操作***的资源分配方法和装置
CN109324991B (zh) 一种pcie设备的热插拔装置、方法、介质及***
WO2020108271A1 (zh) 应用程序更新方法、设备和装置及存储介质
WO2022134855A1 (zh) PCIe外插卡的带宽分配方法、装置、设备及存储介质
WO2021115177A1 (zh) 应用安装方法、装置、终端设备、服务器及存储介质
CN115061734A (zh) 一种***启动方法以及相关设备
US20220253252A1 (en) Data processing method and apparatus
CN114817105A (zh) 设备枚举的方法、装置、计算机设备以及存储介质
CN116028455A (zh) 一种数据处理方法、装置、存储介质及电子设备
CN112052230A (zh) 多机房数据同步方法、计算设备及存储介质
CN114020340B (zh) 一种服务器***及其数据处理方法
WO2018119662A1 (zh) 内核更新方法和装置、计算机设备
CN104714792A (zh) 多进程共享数据处理方法和装置
KR102116096B1 (ko) 다중시스템 및 이의 부팅 방법
WO2020177567A1 (zh) 一种迁移数据的方法、装置及***
CN107547593B (zh) 一种实现日志同步的方法、装置及分布式***
CN107688479B (zh) Android***网络集群及其搭建的方法、Android***网络集群数据处理的方法和***
WO2023287407A1 (en) Hardware component initialization
US20240211246A1 (en) Method and Apparatus for Upgrading Client Software
CN117687703B (zh) 服务器的启动方法、装置、***、存储介质和电子设备
CN114185650B (zh) Linux***下识别SCSI设备的方法、***、设备及存储介质
WO2018040924A1 (zh) 一种用于nandflash生产阶段的烧写方法及其烧写***
CN107066277B (zh) 一种基于串口更新通用唯一识别码的方法

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: 17898934

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17898934

Country of ref document: EP

Kind code of ref document: A1