Unified package for embedded systems

Through unified package and flashing tools, the redundancy problem of image processing of different partition types in embedded systems is solved, seamless installation and update are achieved, and efficiency and storage costs are improved.

CN119013655APending Publication Date: 2024-11-22SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380029278.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Prior art When processing system images of embedded systems, multiple separate system images and boot loaders are needed for different partition types, resulting in redundant work and developers burdens, and multiple systems need to be downloaded when partition type changes. Image copy is difficult to achieve unified processing.

Method used

Using a unified method to include partition information and image files suitable for different partition types through a unified package (system image package), provides a flash tool and user interface for selecting partition types, loading the corresponding system image according to the selected partition type, reducing redundant copies and storage requirements.

Benefits of technology

Seamless installation and updates on different partition types are achieved, reducing the size of system images and the workload of developers, and improving the efficiency and storage costs of the update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119013655A_ABST
    Figure CN119013655A_ABST
Patent Text Reader

Abstract

Methods, apparatuses, and systems are provided relating to a unified method for packing, installing / updating, and loading system images onto an embedded system irrespective of different partition types. In one example aspect, a method for installing or updating at least one of firmware or an operating system on an embedded system includes accessing a package including information of the at least one of firmware or operating system. The structure of the package remains the same among a plurality of partition types for installing or updating at least one of the firmware or the operating system. The method includes receiving an indication of a partition type selected from a plurality of partition types; and installing at least part of the information in the packet into a non-transitory memory of the embedded system according to the selected partition type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent document relates to packaging, installing / updating, and loading of system images on embedded systems. Background Art

[0002] An embedded system is a computer system with a dedicated function within a larger system, which has a combination of a computer processor, computer memory, and input / output peripherals. Embedded systems are commonly found in consumer, industrial, automotive, appliance, medical, telecommunications, commercial, aerospace, and military fields. Summary of the invention

[0003] In particular, this patent document describes technologies related to a unified approach for packaging, installing / updating, and loading system images (eg, firmware and / or operating systems) suitable for different partition types onto an embedded system.

[0004] In one example aspect, a method for installing or updating at least one of firmware or an operating system on an embedded system is disclosed. The method includes: accessing a package including information of at least one of the firmware or the operating system. The structure of the package remains the same between multiple partition types used to install or update at least one of the firmware or the operating system. The method includes: receiving an indication of a partition type selected from the multiple partition types; and installing at least a portion of the information in the package into a non-transitory memory of the embedded system according to the selected partition type.

[0005] In yet another example aspect, a non-transitory computer-readable storage medium is disclosed as a package for installing or updating at least one of firmware or an operating system on an embedded system. The package includes partition information corresponding to a plurality of partition types for installing or updating at least one of the firmware or the operating system. The non-transitory computer-readable storage medium also includes one or more image files corresponding to at least one of the firmware or the operating system. The structure of the package remains the same between the plurality of partition types.

[0006] In another example aspect, a device is disclosed. The device includes one or more processors and a non-transitory memory, the non-transitory memory including instructions recorded thereon. When executed by the one or more processors, the instructions cause the one or more processors to: determine a partition structure of one or more images based on a partition table stored in the non-transitory memory; determine a partition type based on the partition structure of the one or more images; and load firmware or an operating system based on the partition type. The one or more images correspond to firmware or an operating system installed on the device.

[0007] These and other aspects are described in this document. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a block diagram of an example architecture of a microprocessor.

[0009] Figure 2A An example non-A / B partition type is shown where there is a single copy of each partition in the system.

[0010] Figure 2B An example A / B partition type is shown where there are two copies of each partition in the system.

[0011] Figure 3 An example over-the-air (OTA) update using an A / B partition type is shown.

[0012] Figure 4 Example partitioning of a system image using a virtual A / B partitioning mechanism is shown.

[0013] Figure 5A An example structure of a system image package according to one or more embodiments of the present technology is shown.

[0014] Figure 5B Another example structure of a system image package in accordance with one or more embodiments of the present technology is shown.

[0015] Fig. 6A An example user interface is shown in accordance with one or more embodiments of the present technology.

[0016] Figure 6B Another example user interface in accordance with one or more embodiments of the present technology is shown.

[0017] Fig. 7A An example installation process in accordance with one or more embodiments of the present technology is shown.

[0018] Figure 7B Another example installation process in accordance with one or more embodiments of the present technology is shown.

[0019] Figure 8 is a flowchart representation of a method for installing or updating at least one of firmware or an operating system on an embedded system in accordance with one or more embodiments of the present technology. DETAILED DESCRIPTION

[0020] For ease of understanding, the following will be described in detail in conjunction with the Android system. The technology can be implemented in different embedded systems using various types of microprocessors, including microcontrollers and application processors.

[0021] The origins of embedded systems can be traced back to integrated circuits, which are integrated circuit chips made of metal oxide semiconductor field effect transistors (MOSFETs). Modern embedded systems are often based on microprocessors (e.g., application processors and / or microcontrollers) with integrated memory and peripheral interfaces. Figure 1 1 is a block diagram of an example architecture 100 of a microprocessor. The microprocessor includes a processor core 101 having computational logic units such as an arithmetic logic unit (ALU), internal memory subcomponents such as read-only memory (ROM) 103 and random access memory (RAM) 105, and an input / output (I / O) subcomponent 107. The microprocessor may also include a memory management unit (MMU) 109 that handles memory and cache operations. For example, application processors typically include MMU(s) to provide required support for a complete operating system (OS).

[0022] In order to meet various application requirements, a large number of microcontrollers and application processors have been developed for embedded systems. Just like other computer systems, embedded system designers also need tools to help developers develop embedded system software, especially when developers need to design custom software programs and deploy them on the system. Take mobile devices running on the Android platform as an example. Android is a mobile operating system based on a modified version of the Linux kernel and other open source software. The tools provided by Android (such as Android Flash Tool, Fastboot, etc.) allow developers to install and boot a specific system image to the device for development and testing. The system image can include at least one of the firmware and / or operating system of the device.

[0023] To support seamless updates of the Android system, Android also uses the A / B system update architecture (or A / B partition) to ensure that a working boot system remains on disk during over-the-air (OTA) updates. Figure 2A An example non-A / B partition type is shown where there is a single copy of each partition (eg, boot, etc.) in the system. Figure 2B An example A / B partition type is shown where there are two copies (referred to as slot A and slot B) of each partition (eg, boot_a, boot_b) in the system. Figure 3 An example OTA update using the A / B partition type is shown. Figure 3 As shown, partition A is active before the update. The update is applied to the mirror copy of the system, partition B, so the system can run seamlessly after the update by switching the active partition to partition B.

[0024] A / B partitions bring benefits to ordinary users, but they make custom modifications to the system image more difficult to deploy and load. In addition, the storage usage of A / B partitions is also a concern. In order to reduce code complexity and enhance the update process, Android also uses virtual A / B partition types to allow seamless updates to devices at a lower storage cost. However, devices using virtual A / B must be configured as A / B devices and must use super partitions to carry dynamic partitions. Figure 4 An example partitioning of a system image using a virtual A / B partitioning mechanism is shown. Figure 4 As shown, some partitions (such as system_a / b, vendor_a / b) can be dynamically allocated in a partition called super (super data partition). Android has shown that using virtual A / B partitions can reduce the factory image from 9GB super data to 4.5GB super data (an additional 3.8GB used during OTA).

[0025] Considering the rapid development of Android development, the coexistence of virtual A / B partitions, A / B partitions, and non-A / B partition mechanisms will soon disappear as newer Android devices (such as Android 11 or higher) are forced to support A / B partitions. However, for other embedded systems with custom changes (either using custom microprocessors at the hardware level or custom firmware changes at the software level), various partition types will continue to coexist due to the benefits of A / B partitions (for example, facilitating OTA for users) and the difficulty of backward compatibility. In addition, other partition types may appear in the future for different types of application scenarios.

[0026] Currently, before compiling a system image, it is determined whether the system image is generated, installed, and loaded as an A / B partition, a non-A / B partition, or a virtual A / B partition. For each step of the compilation, generation, and loading process, the partition type is predetermined and "hard-coded". In addition, separate loaders suitable for various partition types are required as different boot loaders. For system images that need to be loaded on both the A / B type and the non-A / B type of the system, two separate system images are created, and two separate boot loaders are compiled using their respective logic. Since various versions of the same system image need to be provided to developers, this traditional process brings redundancy and unnecessary work to embedded system vendors. In addition, in the event of a partition type change or in the case of supporting multiple partition types, developers need to download multiple copies of the same system image, so this traditional process also brings additional burdens to developers. Therefore, especially for custom embedded systems, a unified method is needed to handle different partition types of system images.

[0027] This patent document discloses techniques that can be implemented in various embodiments to provide a unified method for packaging, installing / updating, and loading system images (e.g., firmware and / or operating systems) of different partition types. It should be noted that in this document, the installation and / or update of the system image is also referred to as flashing.

[0028] In order to provide a unified method for handling different partition types of system images, a unified package (or package or system image package) can be provided to developers and / or technically savvy users to flash to devices, and the unified package includes partition information and image files (e.g., images of firmware and / or operating systems) suitable for different partition types. For example, developers can download the system image package from a website operated by an embedded system vendor. The package corresponds to a specific system image version (e.g., a specific version of an operating system) and can be flashed to different new / old devices based on different partition types. Figure 5A An example structure of a system image package according to one or more embodiments of the present technology is shown. The example system image package includes several partition files, each of which includes a partition structure corresponding to each partition type. Each partition file may also be referred to as a partition table. For example, a partition file may be implemented in the format of a globally unique identifier (GUID) partition table (GPT). The system image package also includes one or more image files required for flashing the system. For example, an image file may include boot.img, dtbo.img, system.img, etc. required for flashing the system. Figure 5A In the example, the partition file is located at the beginning of the package. In other embodiments, the partition file may also be located at other predetermined locations in the system image package (for example, at the end of the system image package). Figure 5A As shown, the system image package also includes a custom boot loader that is capable of loading the flashed system image on devices configured with different partition types.

[0029] Figure 5B Another example structure of a system image package according to one or more embodiments of the present technology is shown. In this example, the partition information includes different partition structures corresponding to different partition types. Different partition structures are organized into partition information in the same file or the same data block according to the partition type. The partition information can be located at the beginning of the system image package, such as Figure 5B Alternatively, it may be located at other predetermined locations in the system image package. In some embodiments, Figure 5B As shown, the system image package also includes a custom boot loader that is capable of loading the flashed system image on devices configured with different partition types.

[0030] After the developer obtains the unified package from the embedded system vendor, the required image files included in the package can be flashed onto the system using a specific flashing tool. In some embodiments, the flashing tool can be a command line tool. For example, a tool similar to fastboot and / or debug bridge (adb) on Android can be provided to the user to allow the user to turn the device to a "ready-to-flash" state. A command line option can be provided to allow the user to select the appropriate partition type to flash the system. Table 1 shows an example of a command line option.

[0031] Table 1: Example command line options

[0032] >custom-flash–partition-type=non-AB flash unified-system-image-package.pac

[0033] In some embodiments, command line options may not be specified, but a configuration file may be provided as input to the flash tool. The configuration file may include information about the partition type. The configuration file may also include additional configuration information suitable for each package. Table 2 shows an example of a command line configuration. In this example, the configuration file partition.cfg may include a configuration field specifying that the partition type is an A / B partition.

[0034] Table 2: Example command line configuration

[0035]

[0036] In some embodiments, the flash tool may include a user interface (UI). For example, when a compatible version of the flash tool already exists on an embedded device, a user may see a simple user interface on the device to select a suitable partition type to flash the system image. Fig. 6A An example user interface according to one or more embodiments of the present technology is shown. The interface displays menu options for the user to select an appropriate partition type (eg, A / B, non-A / B, or virtual A / B).

[0037] In some embodiments, the flash tool is installed on a separate device and communicates with the embedded device that needs to be flashed. In these cases, a more complex graphical user interface (GUI) can be provided to easily select the partition type. Figure 6B Another example user interface in accordance with one or more embodiments of the present technology is shown. In some embodiments, the GUI may include a UI control that allows a user to specify a configuration file.

[0038] During the system flashing process, the flashing tool inspects the packages and identifies the correct partition structure to be used to flash the image. Fig. 7AAn example flashing process according to one or more embodiments of the present technology is shown. In this particular example, the partition type is set to an A / B partition. The information included in the partition file can be organized and stored as a GPT at logical block address (LBA) 1, and a protective master boot record (MBR) is stored at LBA 0. A redundant backup copy of the GPT is stored at the final LBA. Based on the A / B partition type, each partition content included in the package needs to be flashed (e.g., decompressed and / or copied) into two copies: an A copy (slot A) and a B copy (slot B).

[0039] It should be noted that since the initial mirror copies (A / B slots) of each partition are the same, a small system image package is required to use the disclosed technology. Fig. 7A As shown in the figure, during the system flash process, boot_a is the same as boot_b, dtbo_a is the same as dtbo_b, and system_a is the same as system_b. Therefore, the package only needs to include a single copy of each partition to still create a system that supports A / B partitions. Therefore, the package is much smaller than a traditional A / B partition system factory image. In addition, because the boot partition, dtbo partition, recovery partition, etc. do not need redundant copies (for example, return to see Figure 4 ), so the package can also be smaller than the traditional virtual A / B partition system factory image.

[0040] Figure 7B Another example flashing process according to one or more embodiments of the present technology is shown. In this particular example, the partition type is set to a non-A / B partition. The information included in the partition file can be organized and stored as a GPT at LBA 1, with a protective MBR stored at LBA 0. A redundant backup copy of the GPT is stored at the final LBA. Based on the non-A / B partition type, each partition content included in the package needs to be flashed (e.g., decompressed and / or copied) into a single copy.

[0041] During the system flashing process, a custom boot loader capable of loading a flashed system image of different partition types is stored in a special system partition, which is called the Extensible Firmware Interface (EFI) System Partition (ESP) based on the Unified Extensible Firmware Interface (UEFI). After the system is flashed, as a first-stage boot loader (or second-stage program loader (SPL)), the custom boot loader can check the GPT information to determine the partition type of the system - without storing additional information on the disk to determine the partition type. For example, the boot loader can check whether there is a recovery partition. In some systems such as Android, a recovery partition only exists if the partition type is not an A / B partition, allowing the boot loader to determine the partition type when the recovery partition is found. For another example, the boot loader can check whether slot A and slot B exist for one or more partitions. If at least one partition has both slot A and slot B, the boot loader can determine that the partition type is an A / B partition or a virtual A / B partition. The boot loader then further checks which partition(s) have a single slot to ultimately determine whether an A / B partition or a virtual A / B partition is applicable. In some embodiments, the boot loader can determine whether the partition type is virtual A / B by checking whether there is a super partition. For other partition types, the boot loader can determine the corresponding partition type by checking the characteristics in the GPT. Once the partition type is determined, the boot loader can call the corresponding startup logic to load and start flashing the specified image on the system. The same boot loader can be used on different systems that support different partition types.

[0042] Figure 8 is a flowchart representation of a method for installing or updating at least one of firmware or an operating system on an embedded system according to one or more embodiments of the present technology. In some embodiments, the method can be implemented as a custom flash tool. Method 800 includes: operation 810, accessing a package including information of at least one of firmware or an operating system. The structure of the package remains the same between multiple partition types used to install or update at least one of firmware or an operating system. The method 800 includes: operation 820, receiving an indication of a partition type selected from multiple partition types. The method 800 includes: operation 830, installing at least a portion of the information in the package into a non-transitory memory of the embedded system based on the selected partition type.

[0043] According to the disclosed technology, some preferred embodiments adopt the following schemes.

[0044] 1. A method for installing or updating at least one of firmware or an operating system on an embedded system, comprising: accessing a package including information of at least one of the firmware or the operating system, wherein a structure of the package remains the same between a plurality of partition types used to install or update at least one of the firmware or the operating system; receiving an indication of a partition type selected from the plurality of partition types; and copying at least a portion of the information in the package to a non-transitory memory of the embedded system according to the selected partition type.

[0045] 2. The method according to solution 1, wherein the package includes partition information corresponding to the multiple partition types and one or more image files corresponding to at least one of the firmware or the operating system.

[0046] 3. The method according to scheme 2, wherein the partition information includes multiple partition tables, each partition table corresponds to a partition type among the multiple partition types.

[0047] 4. The method according to any one of schemes 1 to 3, wherein the multiple partition types include at least one of an A / B partition type, a non-A / B partition type, or a virtual A / B partition type.

[0048] 5. A method according to any one of schemes 1 to 4, wherein the indication of the partition type is received via a command line option.

[0049] 6. The method of any one of schemes 1 to 5, wherein the indication of the partition type is received via a user interface.

[0050] 7. A method according to any one of Schemes 1 to 6, wherein the package further includes a boot loader, and the method comprises: copying the boot loader to the non-volatile memory of the embedded system so that the boot loader can load at least one of the firmware or the operating system according to the selected partition type.

[0051] 8. A non-transitory computer-readable storage medium implemented as a package for installing or updating at least one of firmware or an operating system on an embedded system, comprising: partition information corresponding to a plurality of partition types for installing or updating at least one of the firmware or the operating system; and one or more image files corresponding to at least one of the firmware or the operating system, wherein the structure of the package remains the same between the plurality of partition types.

[0052] 9. The non-transitory computer-readable storage medium according to Option 8, wherein the partition information comprises a plurality of partition tables, each partition table corresponding to one of the plurality of partition types.

[0053] 10. The non-transitory computer-readable storage medium of scheme 8 or 9, wherein the plurality of partition types include at least one of an A / B partition type, a non-A / B partition type, or a virtual A / B partition type.

[0054] 11. The non-transitory computer-readable storage medium according to any one of Schemes 8 to 10 further includes: instructions recorded thereon, which, when executed by at least one processor of the embedded system, cause the embedded system to load the firmware or the operating system based on the partition type.

[0055] 12. A non-volatile computer-readable storage medium according to scheme 11, wherein, when executed by at least one processor of the embedded system, the instructions cause the embedded system to: determine the partition structure of the one or more image files based on a partition table stored in the non-volatile memory of the embedded system; and determine the partition type based on the partition structure.

[0056] 13. A device, comprising: one or more processors; and a non-volatile memory, wherein the non-volatile memory includes instructions recorded thereon, and when executed by the one or more processors, the instructions cause the one or more processors to: determine a partition structure of one or more images based on a partition table stored in the non-volatile memory, wherein the one or more images correspond to firmware or an operating system installed on the device; determine a partition type from a plurality of partition types based on the partition structure of the one or more images; and load the firmware or the operating system based on the partition type.

[0057] 14. The device according to claim 13, wherein the partition table comprises a GPT.

[0058] 15. The device according to scheme 13 or 14, wherein the partition table is stored at LBA 1 of the non-transitory memory.

[0059] 16. The apparatus of any one of schemes 13 to 15, wherein the instructions are part of a second stage program loader.

[0060] 17. The device according to any one of schemes 13 to 16, wherein the multiple partition types include at least one of an A / B partition type, a non-A / B partition type, or a virtual A / B partition type.

[0061] 18. A device according to scheme 17, wherein, when executed by the one or more processors, the instructions recorded on the device enable the one or more processors to: when a recovery image is detected, determine that the partition type is the non-A / B partition type based on the partition structure of the one or more images.

[0062] 19. A device according to scheme 17, wherein, when executed by the one or more processors, the instructions recorded on the device enable the one or more processors to: when a super partition is detected, determine that the partition type is the virtual A / B partition type based on the partition structure of the one or more images.

[0063] 20. A device according to scheme 17, wherein, when executed by the one or more processors, the instructions recorded on the device enable the one or more processors to: when detecting a mirror of at least one of the one or more images, determine that the partition type is the A / B partition type or the virtual A / B partition type.

[0064] Other embodiments, modules and functional operations disclosed and described in this document may be implemented by digital electronic circuits, or by computer software, firmware or hardware (including the structures disclosed in this document and their equivalents), or by a combination of one or more thereof. The disclosed embodiments and other embodiments may be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer-readable medium, which are executed by a data processing device or used to control the operation of a data processing device. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of objects that affect a machine-readable propagation signal, or a combination of one or more thereof. The term "data processing device" encompasses all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. In addition to hardware, the device may include code (e.g., code constituting processor firmware), a protocol stack, a database management system, an operating system, or a combination of one or more thereof, to create an execution environment for the computer program in question. A propagation signal is an artificially generated signal, such as a machine-generated electrical signal, optical signal, or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device.

[0065] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a partial file containing other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple collaborative files (e.g., files storing one or more modules, subroutines, or partial codes). A computer program may be deployed for execution on a single computer or on multiple computers, which may be located at one site or distributed across multiple sites and interconnected by a communication network.

[0066] The process and logic flow described in this document can be performed by one or more programmable processors, which execute one or more computer programs to perform functions by operating on input data and generating output results. The process and logic flow can also be performed by a dedicated logic circuit, and the device can also be implemented as a dedicated logic circuit, for example, a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). For example, a processor suitable for executing a computer program includes a general-purpose microprocessor and a dedicated microprocessor, and any one or more processors of any digital computer. The processor usually receives instructions and data from a read-only memory, a random access memory, or a read-only memory and a random access memory. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. The computer usually also includes or is operably coupled to one or more mass storage devices (such as disks, magneto-optical disks, or optical disks) for storing data, to receive data from the mass storage device, send data to the mass storage device, or receive data from the mass storage device and send data to the mass storage device. However, the computer does not need to have such a device. Computer-readable media suitable for storing computer program instructions and data include various forms of nonvolatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and portable compact disk read-only memory (CD-ROM) and digital video disk (DVDROM). The processor and memory may be supplemented by or incorporated in special purpose logic circuitry.

[0067] Although this patent document contains many details, these details should not be interpreted as limitations on the scope of any invention or claim, but rather as descriptions of features that may be specific to embodiments of particular inventions. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately in multiple embodiments or in any suitable subcombination. In addition, although the above-mentioned features may be described as working in certain combinations and even initially claimed as such, in some cases, one or more features from the claimed combination may be deleted from the combination, and the claimed combination may refer to a subcombination or a variation of a subcombination.

[0068] Similarly, although operations are described in a particular order in the drawings, this should not be understood as requiring the operations to be performed in the particular order or sequential order shown in order to obtain the desired results, or requiring the execution of all the operations shown. In addition, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[0069] Only a few implementations and examples are described, and other implementations, improvements, and variations can be made based on the descriptions and illustrations in this patent document.

Claims

1. A method for installing or updating at least one of firmware or an operating system on an embedded system, comprising: accessing a package including information of at least one of the firmware or the operating system, wherein a structure of the package remains the same between a plurality of partition types used to install or update at least one of the firmware or the operating system; receiving an indication of a partition type selected from the plurality of partition types; and At least a portion of the information in the package is installed into a non-transitory memory of the embedded system according to the selected partition type.

2. The method according to claim 1, wherein: The package includes partition information corresponding to the plurality of partition types and one or more image files corresponding to at least one of the firmware or the operating system.

3. The method according to claim 2, wherein: The partition information includes a plurality of partition tables, each partition table corresponding to one of the plurality of partition types.

4. The method according to any one of claims 1 to 3, wherein: The plurality of partition types include at least one of an A / B partition type, a non-A / B partition type, or a virtual A / B partition type.

5. The method according to any one of claims 1 to 4, wherein: The indication of the partition type is received via a command line option.

6. The method according to any one of claims 1 to 5, wherein: The indication of the partition type is received via a user interface.

7. The method according to any one of claims 1 to 6, wherein: The package also includes a boot loader, and the method includes: The boot loader is installed into the non-transitory memory of the embedded system so that the boot loader can load at least one of the firmware or the operating system according to the selected partition type.

8. A non-transitory computer-readable storage medium as a package for installing or updating at least one of firmware or an operating system on an embedded system, comprising: partition information corresponding to a plurality of partition types for installing or updating at least one of the firmware or the operating system; as well as One or more image files corresponding to at least one of the firmware or the operating system, wherein the structure of the package remains the same between the plurality of partition types.

9. The non-transitory computer-readable storage medium of claim 8, wherein: The partition information includes a plurality of partition tables, each partition table corresponding to one of the plurality of partition types.

10. The non-transitory computer-readable storage medium according to claim 8 or 9, wherein: The plurality of partition types include at least one of an A / B partition type, a non-A / B partition type, or a virtual A / B partition type.

11. The non-transitory computer-readable storage medium according to any one of claims 8 to 10, further comprising: The instructions recorded thereon, when executed by at least one processor of the embedded system, cause the embedded system to load the firmware or the operating system based on the partition type.

12. The non-transitory computer-readable storage medium of claim 11, wherein: When executed by at least one processor of the embedded system, the instructions cause the embedded system to: Determining a partition structure of the one or more image files based on a partition table stored in a non-transitory memory of the embedded system; and The partition type is determined based on the partition structure.

13. A device comprising: one or more processors; as well as a non-transitory memory including instructions recorded thereon that, when executed by the one or more processors, cause the one or more processors to: determining a partition structure of one or more images stored in the device based on a partition table stored in the non-transitory memory, wherein the one or more images correspond to firmware or an operating system installed on the device; determining a partition type from a plurality of partition types based on the partition structure of the one or more images; and The firmware or the operating system is loaded based on the partition type.

14. The device according to claim 13, wherein: The partition table includes a globally unique identifier (GUID) partition table (GPT).

15. The apparatus according to claim 13 or 14, wherein: The partition table is stored at logical block address (LBA) 1 of the non-transitory memory.

16. The apparatus according to any one of claims 13 to 15, wherein: The instructions are part of the second stage program loader.

17. Apparatus according to any one of claims 13 to 16, wherein: The plurality of partition types include at least one of an A / B partition type, a non-A / B partition type, or a virtual A / B partition type.

18. The apparatus according to claim 17, wherein: When executed by the one or more processors, the instructions recorded on the device cause the one or more processors to: When a recovery image is detected, the partition type is determined to be the non-A / B partition type based on the partition structure of the one or more images.

19. The apparatus according to claim 17, wherein: When executed by the one or more processors, the instructions recorded on the device cause the one or more processors to: When a super partition is detected, the partition type is determined to be the virtual A / B partition type based on the partition structure of the one or more images.

20. The apparatus of claim 17, wherein: When executed by the one or more processors, the instructions recorded on the device cause the one or more processors to: When a mirror of at least one of the one or more images is detected, the partition type is determined to be the A / B partition type or the virtual A / B partition type.