Loading a multi-segmented software image file into memory using a nested file structure
By leveraging the synergy between the bootloader and the operating system and employing a nested file loading strategy, the number of accesses to non-volatile storage media is reduced, solving the problem of excessively long boot times when loading executable files in existing technologies and achieving faster loading speeds.
Patent Information
- Application Number
- CN202380064837.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-09-23
- Filing Date
- 2023-08-01
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-08-01
AI Technical Summary
Existing technologies require multiple accesses to non-volatile storage media when loading executable files into random access memory (RAM), especially nested ELF files, resulting in excessively long boot times.
By reading the metadata and program header of the external file at once by the bootloader, and combining this with the internal file data in RAM by the operating system, the number of accesses to the non-volatile storage medium is reduced. By adopting a nested file loading strategy, data is quickly loaded from the non-volatile storage medium into RAM.
It achieves a faster boot loading process, reduces the number of accesses to non-volatile storage media, and improves loading speed and efficiency.
Smart Images

Figure CN119907964B_ABST
Abstract
Description
RELATED ART
[0001] DESCRIPTION OF THE RELATED ART
[0002] Booting a computing device can include reading one or more files from a disk, flash memory, or other non-volatile storage medium and loading the files into random access memory ("RAM"). As part of the booting process, a software component known as a bootloader can control this reading and loading of files. A fast boot time can enhance the user experience or provide other advantages. For such reasons, it is generally desirable to minimize the amount of time required to load files into RAM during booting.
[0003] An executable file stored on a non-volatile boot medium can be referred to as an image, an executable image, a software image, a binary image, or the like. The term "image" is sometimes used to refer to binary information, regardless of its structure or format. For example, copying an image from a source to a destination can refer to making a bit-for-bit copy of the information. An executable image can have a standardized format, such as the Executable and Linkable Format ("ELF"). An ELF image includes a number of separate ELF segments, which can include an ELF file header, an ELF program header, and a number of loadable ELF data segments.
[0004] A bootloader can first read the ELF file header stored on the boot medium. Reading the ELF file header provides the bootloader with the location of the ELF program header in the ELF image. The bootloader can then read the ELF program header from that location in the ELF image. The ELF program header provides the bootloader with the locations of various loadable data segments in the ELF image. The bootloader can then read the ELF data segments from those locations in the ELF image. Each access to the boot medium by the bootloader takes an amount of time. The total amount of time is related to the number of accesses to the boot medium. This total amount of time can be substantial when many accesses are needed, such as when the data segments are unaligned or non-contiguous. SUMMARY
[0005] Systems, methods, computer-readable media, and other examples are disclosed for loading data from a non-volatile storage medium in a computing device.
[0006] An example method for loading data from a non-volatile storage medium in a computing device can include reading, by a processor, an external file metadata portion from an external file on a storage medium into random access memory ("RAM"). The external file can include the external file metadata portion and an external file data portion. The method can further include reading, by the processor, the external file data portion from the external file on the storage medium into the RAM based on the external file metadata portion. The external file data portion can include an internal file. The internal file can include an internal file metadata portion and an internal file data portion. The method can also include reading, by the processor, the internal file metadata portion from the internal file in the RAM. The method can still further include reading, by the processor, the internal file data portion from the internal file in the RAM based on the internal file metadata portion.
[0007] An example system for loading data from a non-volatile storage medium in a computing device can include a non-volatile storage medium, a RAM, and a processor. The processor can be configured to read an external file metadata portion from an external file on the storage medium into the RAM. The external file can include the external file metadata portion and an external file data portion. The processor can also be configured to read the external file data portion from the external file on the storage medium into the RAM based on the external file metadata portion. The external file data portion can include an internal file. The internal file can include an internal file metadata portion and an internal file data portion. The processor can also be configured to read the internal file metadata portion from the internal file in the RAM. The processor can still further be configured to read the internal file data portion from the internal file in the RAM based on the internal file metadata portion.
[0008] Another example system for loading data from a non-volatile storage medium in a computing device can include means for reading an external file metadata portion from an external file on a storage medium into a RAM. The external file can include the external file metadata portion and an external file data portion. The system can further include means for reading the external file data portion from the external file on the storage medium into the RAM based on the external file metadata portion. The external file data portion can include an internal file. The internal file can include an internal file metadata portion and an internal file data portion. The system can also include means for reading the internal file metadata portion from the internal file in the RAM. The system can still further include means for reading the internal file data portion from the internal file in the RAM based on the internal file metadata portion.
[0009] An example computer-readable medium for loading data from a non-volatile storage medium in a computing device can include a non-transitory computer-readable medium having instructions stored thereon in computer-executable form. When executed by a processing system of the computing device, the instructions can configure the processing system to read an external file metadata portion from an external file on the storage medium into RAM. The external file can include the external file metadata portion and an external file data portion. When executed by the processing system, the instructions can further configure the processing system to read the external file data portion from the external file on the storage medium into RAM based on the external file metadata portion. The external file data portion can include an internal file. The internal file can include an internal file metadata portion and an internal file data portion. When executed, the instructions can also configure the processing system to read the internal file metadata portion from the internal file in RAM. When executed by the processing system, the instructions can still further configure the processing system to read the internal file data portion from the internal file in RAM based on the internal file metadata portion. BRIEF DESCRIPTION OF DRAWINGS
[0010] In the drawings, like reference numerals refer to like parts throughout the various views unless otherwise indicated. For reference numerals with letter character designations, such as 101 A or 101 B, the letter character designations in each instance are generally used only to distinguish between two similar elements having the same reference numeral. When used, the letter character designation is not generally used to distinguish between two similar elements having the same reference numeral unless the context clearly requires such distinction.
[0011] Figure 1 is a block diagram of a system having a non-volatile storage medium and random access memory ("RAM") according to an example embodiment.
[0012] Figure 2 Similar to Figure 1 is shown is a system after file portions have been transferred from the non-volatile storage medium to the RAM according to an example embodiment.
[0013] Figure 3 Similar to Figure 2 is shown is a system after file portions have been transferred from a first region of the RAM to a second region of the RAM according to an example embodiment.
[0014] Figure 4 is a block diagram of a computing device having a non-volatile storage medium and RAM according to an example embodiment.
[0015] Figure 5 is a flowchart showing a method for loading data from a non-volatile storage medium in a computing device according to an example embodiment.
[0016] Figure 6 This is a block diagram of a portable computing device according to an exemplary embodiment. Detailed Implementation
[0017] The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” The word “illustrative” is used herein synonymously with “exemplary.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or superior to other aspects.
[0018] like Figure 1 As shown, in an exemplary or model implementation, it is used for booting a computing device ( Figure 1 System 100, which loads data during (not shown) or at other times, may include a non-volatile storage medium (“NVM”) 102 and random access memory (“RAM”) 104. The loaded “data” may be of any type, including executable images. NVM 102 may be of any type, such as flash memory, disk storage, etc. RAM 104 may be of any type, such as dynamic RAM, static RAM, etc.
[0019] Data stored on NVM 102 may include external file 106. External file 106 may be of any type, such as an executable file (i.e., a file with one or more executable parts). External file 106 may be of any format, such as a standardized format known to those skilled in the art as Executable Linkable Format (“ELF”). External file 106 may include one or more metadata sections, such as external file ELF file header 108 and external file ELF program header 110. According to the features described below, the metadata sections (such as external file ELF program header 110) may include flag 112. As will be understood by those skilled in the art, in addition to external file ELF file header 108 and external file ELF program header 110 (metadata sections), an ELF file may also include one or more data sections or fragments. In the illustrated example, external file 106 may have only one such data fragment, which may be referred to as internal file 114. Similar to external file 106, internal file 114 may be an ELF file. Therefore, internal file 114 may include internal file ELF file header 116 and internal file ELF program header 118. External file 106 and internal file 114 together may be referred to as a nested ELF file or an ELF within an ELF file.
[0020] In addition to the internal file ELF file header 116 and the internal file ELF program header 118 (metadata section), the internal file 114 may include any number N internal file ELF data segments 120. In some examples, the number of internal file ELF data segments 120 can be large, such as approximately hundreds or thousands, but at least two. It should be noted that in the illustrated example, the external file 106 is an ELF file with only one ELF data segment, which is the internal file 114, while the internal file 114 is an ELF file with at least two (but in some examples, a larger number) ELF data segments 120.
[0021] Various executable software components, such as bootloader 122, operating system 124, storage drive 126, etc., may be stored or reside in RAM 104 (or other memory for executable software). Although these software components are different in the illustrated example for clarity, in other examples, some or portions of these components may be combined with each other or with other software components. Furthermore, in the examples described below, some actions are performed or controlled by bootloader 122, while others are performed or controlled by operating system 124. However, in other examples, different actions may be performed by different combinations of bootloader 122 and operating system 124. In yet another example, bootloader 122 itself may perform or control all described actions, or alternatively, operating system 124 itself may perform or control all described actions. It should be noted that the terms "stored on" and "stored in" are used synonymously herein.
[0022] like Figure 2As shown, bootloader 122 can be configured to read external file ELF file header 108 and external file ELF program header 110 together in a single read operation or access to NVM 102. While reading external file ELF file header 108 and external file ELF program header 110, bootloader 122 can use storage drive 126 to access NVM 102. This access to NVM 102 by the bootloader is conceptually indicated by dashed arrow 128. Alternatively, bootloader 122 can be configured to first read external file ELF file header 108 in the first access to NVM 102, and subsequently read external file ELF program header 110 in the second access to NVM 102. In an example where the external file ELF file header 108 includes information identifying the location of the external file ELF program header 110 within the external file 106, this alternative form may be useful. In such examples, the bootloader 122 may be configured to use this location information to read the external file ELF program header 110.
[0023] The external file ELF program header 110 may include information identifying the location of the external file ELF data segment within the external file 106. In the illustrated example, only one external file ELF data segment exists: the internal file 114. The bootloader 122 may be configured to use this location information to read the internal file 114. While reading the internal file 114, the bootloader 122 may use the storage drive 126 to access the NVM 102. This access to the NVM 102 by the bootloader 122 is conceptually indicated by the dashed arrow 132. The bootloader 122 may be configured to read the internal file 114 from the NVM 102 or transfer it to RAM 104, as indicated by arrow 134.
[0024] like Figure 3 As shown, the operating system 124 can subsequently read the internal file ELF file header 116 in the internal file 114 stored in RAM 104. The internal file ELF file header 116 may include information identifying the location of the internal file ELF program header 118 in the internal file 114 stored in RAM 104. The operating system 124 can be configured to use this location information to read the internal file ELF program header 118.
[0025] The internal file ELF program header 118 can include information identifying locations of the internal file ELF data segments 120 stored in the RAM 104. The operating system 124 can be configured to use this location information to read the internal file ELF data segments 120 stored in the RAM 104 in the internal file 114. In reading the internal file ELF data segments 120, the operating system 124 can be configured to transfer the internal file ELF data segments 120 from the first region of the RAM 104 to a second region of the RAM 104. This transfer of the internal file ELF data segments 120 is conceptually indicated by the arrow 136. The control of the transfer by the operating system 124 is conceptually indicated by the dashed arrow 138. In alternative examples (not shown), the operating system can be configured to transfer the internal file ELF data segments from the RAM to another RAM. The second region of the RAM 104 (or, alternatively, a region of the other RAM) can be a region in which software can be executed. This execution of software can be a further stage or step in a process of booting the computing device, with the loading of the software from the NVM 102 to the first region of the RAM 104 being an earlier stage or step in the booting process. In yet other examples, the transfer of the ELF data segments can be controlled by hardware (e.g., a finite state machine, etc.) rather than the operating system 124.
[0026] It is noted that the bootloader 122 or the combination of the bootloader 122 and the storage driver 126 can access the NVM 102 a small number of times (i.e., typically much less than the number of ELF data segments 120) to load the internal file 114 into the RAM 104. Subsequently, the operating system 124 can transfer all of the ELF data segments 120 from the first region of the RAM 104 to the second region of the RAM 104 (or, alternatively, to a region of another RAM) without further access to the NVM 102. Such RAM-based data transfer can be much faster than the transfer of the same number of ELF data segments 120 from the NVM 102 to the RAM 104, as each access of the NVM 102 by the bootloader 122 can take much more time than each access of the RAM 104 by the operating system 124. In the example system 100, this speed efficiency can enable faster booting than in alternative systems (not shown) in which the bootloader is to access the NVM more times.
[0027] As Figure 4As shown, computing device 400 can include flash memory 402 or other NVM, DRAM subsystem 404 or other main memory subsystem, cache memory subsystem 406, and central processing unit ("CPU") 408 or other processor or processing subsystem. Nested ELF file 410 can be stored in flash memory 402. CPU 408 can be configured to be executed by the operation of various software components, which can include bootloader 412, storage driver 414 (e.g., flash driver), and operating system 416. Flash memory 402, DRAM subsystem 404, cache memory subsystem 406, and CPU 408 can be coupled or interconnected by one or more data buses 418 or other data communication interconnects. Flash memory 402 and DRAM subsystem 404 can be examples of NVM 102 and RAM 104 Figures 1 to 3 ) described above.
[0028] Nested ELF file 410 can be similar to external file 106 and internal file 114 (not shown separately in Figure 4 ) described above. Bootloader 412, storage driver 414, and operating system 416 can be similar to bootloader 122, storage driver 126, and operating system 124, respectively, described above. For the sake of clarity, the foregoing software components are conceptually depicted in Figure 4 as CPU 408 in configuration execution, and in Figures 1 to 3 as stored or resident in RAM 104. Regardless of how they can be depicted, such software components can be stored or resident in any storage medium, and transferred in accordance with well-understood computing principles, e.g., in part, on an as-needed basis, etc., as understood by those of ordinary skill in the art.
[0029] In Figure 5 , a method 500 for loading data from a non-volatile storage medium or "NVM" in a computing device is illustrated in block diagram form. As indicated by block 502, method 500 can include reading an external file metadata portion from an external file stored on the NVM into RAM. The external file metadata portion may, for example, include an ELF file header and an ELF program header, which can be read together in one access of the NVM or in separate accesses, as indicated by blocks 504 and 506, respectively. As noted above, the external file can include an external file metadata portion and an external file data portion.
[0030] The outer file metadata portion can include a flag. As indicated by block 508, a determination can be made as to whether the flag is true or false. A true state can indicate that the outer file is nested, i.e., contains an inner file, while a false state can indicate that the outer file is not nested, i.e., does not contain an inner file. If it is determined that the outer file is not nested, the method 500 can continue at block 510.
[0031] As indicated by block 510, in the case where the outer file is not nested, the method 500 can include reading the outer file data portion from the outer file on the storage medium into the RAM. The outer file metadata portion (e.g., the ELF program header) can be used to determine the location of the outer file data portion in the outer file. In the case where the outer file is not nested, reading the outer file data portion can include reading a plurality of data segments (e.g., ELF data segments).
[0032] As indicated by block 512, in the case where the outer file is nested, the method 500 can include reading the outer file data portion from the outer file on the storage medium into the RAM. While this operation is similar to block 510, in the case where the outer file is nested, the outer file data portion includes an inner file, which can be the only data segment of the outer file. That is, in the case where the outer file is nested, reading the outer file can include reading only one data segment: the inner file.
[0033] A processor configured by executing a bootloader or a combination of a bootloader and other software components, such as a storage driver, can act as a means for performing the functions described above with respect to blocks 502-512.
[0034] As indicated by block 514, the method 500 can include reading the inner file metadata portion from the RAM. The inner file metadata portion may, for example, include an ELF file header and an ELF program header, which can be read together in one access of the RAM or in separate accesses, as indicated by blocks 516 and 518, respectively. As described above, the inner file can include an inner file metadata portion and an inner file data portion.
[0035] As indicated by block 520, the method 500 can include reading the inner file data portion from the RAM. The inner file metadata portion can be used to determine the location of the inner file data portion in the RAM. Reading the inner file data portion can include reading a plurality of data segments (e.g., ELF data segments). Reading the inner file data portion can include transferring the plurality of data segments from a first region of the RAM to a second region of the RAM.
[0036] While Figure 5As not shown, the method can further include executing one or more executable files represented by the data segments in the RAM (e.g., as part of a booting process). The processor, as configured by executing the bootloader or a combination of the bootloader and other software components such as a storage drive, can act as a means for performing the functions described above with respect to blocks 514-520.
[0037] Figure 6 An example of a portable computing device ("PCD") 600 is illustrated in which exemplary embodiments of systems, methods, computer-readable media, and other examples of loading data from a non-volatile storage medium in a computing device can be provided. The PCD 600 can be, for example, a laptop or palm top computer, a cellular telephone or smart phone, a personal digital assistant, a navigation device, a smartbook, a portable game console, a satellite radio, and so on. For the sake of clarity, Figure 6 Some data buses, interconnects, signals, and so on are not shown in the
[0038] The PCD 600 can include a SoC 602. The SoC 602 can include a central processing unit ("CPU") 604, a graphics processing unit ("GPU") 606, a digital signal processor ("DSP") 607, an analog signal processor 608, a modem / modem subsystem 654, or other processors. The CPU 604 can include one or more CPU cores, such as a first CPU core 604A, a second CPU core 604B, and so on up to an NthCPU core 604N.
[0039] A display controller 610 and a touchscreen controller 612 can be coupled to the CPU 604. A touchscreen display 614 external to the SoC 602 can be coupled to the display controller 610 and the touchscreen controller 612. The PCD 600 can also include a video decoder 616 coupled to the CPU 604. A video amplifier 618 can be coupled to the video decoder 616 and the touchscreen display 614. A video port 620 can be coupled to the video amplifier 618. A universal serial bus ("USB") controller 622 can also be coupled to the CPU 604, and a USB port 624 can be coupled to the USB controller 622. A subscriber identity module ("SIM") card 626 can also be coupled to the CPU 604.
[0040] One or more memories can be coupled to the CPU 604. The one or more memories can include both volatile and non-volatile memories or NVM. Examples of volatile memories include static random access memories ("SRAM") 628 and dynamic random access memories ("DRAM") 630 and 631. Such memories can be located internal to the SoC 602, such as DRAM 631, or external to the SoC 602, such as DRAM 630. A DRAM controller 632 coupled to the CPU 604 can control writing data to and reading data from the DRAMs 630 and 631.
[0041] A flash memory 629 can be coupled to the CPU 604 and can be an example of the NVM 102 Figures 1 to 3 described above. Although the flash memory 629 is internal to the SoC 602 in the illustrated example, in other examples such a flash memory can be external to the SoC. The DRAM 630 or 631 or the SRAM 628 can be examples of the RAM 104 Figures 1 to 3 described above. Cache memory similar to the cache memory 406 Figure 4 is not shown in Figure 6 but can be included as well.
[0042] A stereo audio CODEC 634 can be coupled to the analog signal processor 608. Further, an audio amplifier 636 can be coupled to the stereo audio CODEC 634. A first stereo speaker 638 and a second stereo speaker 640 can be coupled to the audio amplifier 636. Also, a microphone amplifier 642 can be coupled to the stereo audio CODEC 634, and a microphone 644 can be coupled to the microphone amplifier 642. A frequency modulation ("FM") radio tuner 646 can be coupled to the stereo audio CODEC 634. An FM antenna 648 can be coupled to the FM radio tuner 646. Further, stereo earphones 650 can be coupled to the stereo audio CODEC 634. Other devices that can be coupled to the CPU 604 include one or more digital (e.g., CCD or CMOS) cameras 652.
[0043] A modem or RF transceiver 654 can be coupled to the analog signal processor 608 and the CPU 604. An RF switch 656 can be coupled to the RF transceiver 654 and an RF antenna 658. Also, a keypad 660, a monaural headset with microphone 662, and a vibrator device 664 can be coupled to the analog signal processor 608.
[0044] SoC 602 can have one or more internal or on-chip thermal sensors 670A and can be coupled to one or more external or off-chip thermal sensors 670B. An analog-to-digital converter controller 672 can convert voltage drops generated by thermal sensors 670A and 670B into digital signals. A power source 674 and a power management integrated circuit (“PMIC”) 676 can supply power to SoC 602.
[0045] Firmware or software can be stored in any of the above-described memory, such as DRAM 630 or 631, SRAM 628, or in local memory that is directly accessible to the processor hardware on which the software or firmware is executed. Execution of such firmware or software can control aspects of any of the above-described methods or configure aspects of any of the above-described systems. Any such memory or other non-transitory storage medium having firmware or software stored in computer-readable form therein for execution by the processor hardware can be an example of a “computer-readable medium,” as that term is understood in the patent lexicon.
[0046] Particular embodiments are described in the following numbered clauses:
[0047] 1. A method for loading data from a non-volatile storage medium in a computing device, the method comprising:
[0048] reading, by a processor, an external file metadata portion from an external file on the storage medium into random access memory (RAM), the external file comprising the external file metadata portion and an external file data portion;
[0049] reading, by the processor, the external file data portion from the external file on the storage medium into the RAM based on the external file metadata portion, the external file data portion comprising an internal file, the internal file comprising an internal file metadata portion and an internal file data portion;
[0050] reading, by the processor, the internal file metadata portion from the internal file in the RAM; and
[0051] reading, by the processor, the internal file data portion from the internal file in the RAM based on the internal file metadata portion.
[0052] 2. The method of clause 1, wherein the method is performed during booting of the computing device.
[0053] 3. The method of clause 1 or 2, wherein reading the external file metadata portion comprises:
[0054] reading an external file first metadata portion that indicates a location of an external file second metadata portion; and
[0055] reading the external file second metadata portion based on the location indicated by the external file first metadata portion, the external file second metadata portion indicating a location of the external file data portion.
[0056] 4. The method of any of clauses 1-3, wherein the file has a format comprising an Executable and Linkable Format (ELF).
[0057] 5. The method of any of clauses 1-4, wherein reading the internal file data portion comprises reading data from a first region of the RAM and storing the data in a second region of the RAM.
[0058] 6. The method of any of clauses 1-5, wherein the external file data portion consists only of the internal file.
[0059] 7. The method of any of clauses 1-6, wherein the internal file data portion comprises a plurality of data segments.
[0060] 8. The method of any of clauses 1-7, further comprising:
[0061] reading a flag in the external file metadata;
[0062] determining whether the flag has a first state indicating a nested file structure or a second state indicating a non-nested file structure;
[0063] when the flag has the first state indicating the nested file structure, reading the external file data portion comprises reading the internal file; and
[0064] when the flag has the second state indicating the non-nested file structure, reading the external file data portion comprises reading a plurality of data segments from the external file data portion on the storage medium into the RAM.
[0065] 9. A system for loading data in a computing device, the system comprising:
[0066] a non-volatile storage medium;
[0067] a random access memory (RAM); and
[0068] a processor configured to load the data into the RAM, including the processor being configured to:
[0069] reading an external file metadata portion from an external file on the storage medium to
[0070] the RAM, the external file comprising the external file metadata portion and an external file data portion;
[0071] reading the external file data portion from the external file on the storage medium to the RAM based on the external file metadata portion, the external file data portion comprising an internal file, the internal file comprising an internal file metadata portion and an internal file data portion;
[0072] reading the internal file metadata portion from the internal file in the RAM; and
[0073] reading the internal file data portion from the internal file in the RAM based on the internal file metadata portion.
[0074] 10. The system of clause 9, wherein the processor is configured to load the data into the RAM during booting of the computing device.
[0075] 11. The system of clause 9 or 10, wherein the processor being configured to load the data into the RAM comprises the processor being configured to:
[0076] read an external file first metadata portion that indicates a location of an external file second metadata portion; and
[0077] read the external file second metadata portion based on the location indicated by the external file first metadata portion, the external file second metadata portion indicating a location of the external file data portion.
[0078] 12. The system of any of clauses 9-11, wherein the file has a format comprising Executable and Linkable Format (ELF).
[0079] 13. The system of any of clauses 9-12, wherein the processor being configured to read the internal file data portion comprises the processor being configured to read data from a first region of the RAM and store the data in a second region of the RAM.
[0080] 14. The system of any of clauses 9-13, wherein the external file data portion consists only of the internal file.
[0081] 15. The system of any of clauses 9-14, wherein the internal file data portion comprises a plurality of data segments.
[0082] 16. The system of any of clauses 9-15, wherein the processor is configured to:
[0083] read a flag in the outer file metadata;
[0084] determine whether the flag has a first state indicating a nested file structure or a second state indicating a non-nested file structure;
[0085] when the flag has the first state indicating the nested file structure, the processor being configured to read the outer file data portion includes the processor being configured to read the inner file; and
[0086] when the flag has the second state indicating the non-nested file structure, the processor being configured to read the outer file data portion includes the processor being configured to read a plurality of data segments from the outer file data portion on the storage medium into the RAM.
[0087] 17. A system for loading data from a non-volatile storage medium in a computing device, the system comprising:
[0088] means for reading an outer file metadata portion from an outer file on the storage medium into a random access memory (RAM), the outer file including the outer file metadata portion and an outer file data portion;
[0089] means for reading the outer file data portion from the outer file on the storage medium into the RAM based on the outer file metadata portion, the outer file data portion including an inner file, the inner file including an inner file metadata portion and an inner file data portion;
[0090] means for reading the inner file metadata portion from the inner file in the RAM; and
[0091] means for reading the inner file data portion from the inner file in the RAM based on the inner file metadata portion.
[0092] 18. The system of clause 17, wherein the means for reading an outer file metadata portion, the means for reading the outer file data portion, the means for reading the inner file metadata portion, and the means for reading the inner file data portion are further for operation during booting of the computing device.
[0093] 19. The system of clause 17 or 18, wherein the means for reading the outer file metadata portion comprises:
[0094] means for reading an external file first metadata portion indicative of a location of an external file second metadata portion; and
[0095] means for reading the external file second metadata portion based on the location indicated by the external file first metadata portion, the external file second metadata portion being indicative of a location of the external file data portion.
[0096] 20. The system of any of clauses 17-19, wherein the file has a format comprising an Executable and Linkable Format (ELF).
[0097] 21. The system of any of clauses 17-20, wherein reading the internal file data portion comprises reading data from a first region of the RAM and storing the data in a second region of the RAM.
[0098] 22. The system of any of clauses 17-21, wherein the external file data portion consists only of the internal file.
[0099] 23. The system of any of clauses 17-22, wherein the internal file data portion comprises a plurality of data segments.
[0100] 24. The system of any of clauses 17-23, further comprising:
[0101] means for reading a flag in the external file metadata;
[0102] means for determining whether the flag has a first state indicative of a nested file structure or a second state indicative of a non-nested file structure;
[0103] wherein the means for reading the external file data portion comprises means for reading the internal file when the flag has the first state indicative of the nested file structure; and
[0104] wherein the means for reading the external file data portion comprises means for reading a plurality of data segments from the external file data portion on the storage medium into the RAM when the flag has the second state indicative of the non-nested file structure.
[0105] 25. A computer-readable medium for loading data from a non-volatile storage medium in a computing device, the computer-readable medium comprising a non-transitory computer-readable medium having stored thereon in computer-executable form instructions that, when executed by a processing system of the computing device, configure the processing system to:
[0106] reading an external file metadata portion from an external file on the storage medium into random access memory (RAM), the external file including the external file metadata portion and an external file data portion;
[0107] reading the external file data portion from the external file on the storage medium into the RAM based on the external file metadata portion, the external file data portion including an internal file, the internal file including an internal file metadata portion and an internal file data portion;
[0108] reading the internal file metadata portion from the internal file in the RAM; and
[0109] reading the internal file data portion from the internal file in the RAM based on the internal file metadata portion.
[0110] 26. The computer-readable medium of clause 25, wherein the processing system is configured to read the external file metadata portion, read the external file data portion, read the internal file metadata portion, and read the internal file data portion during booting of the computing device.
[0111] 27. The computer-readable medium of clause 25 or 26, wherein the file has a format including an Executable and Linkable Format (ELF).
[0112] 28. The computer-readable medium of any of clauses 25 to 27, wherein the processing system being configured to read the internal file data portion includes the processing system being configured to read data from a first region of the RAM and store the data in a second region of the RAM.
[0113] 29. The computer-readable medium of any of clauses 25 to 28, wherein the external file data portion consists only of the internal file.
[0114] 30. The computer-readable medium of any of clauses 25 to 29, wherein the internal file data portion includes a plurality of data segments.
[0115] Alternative embodiments will become apparent to those skilled in the art to which the present aspect pertains. Thus, while a selected aspect has been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the present aspect.
Claims
1. A method for loading data from a non-volatile storage medium into the random access memory (RAM) of a computing device, the method comprising: During the booting of the computing device, a bootloader running on the processor of the computing device reads an external file metadata portion from an external file on the non-volatile storage medium, the external file including the external file metadata portion and the external file data portion; The bootloader running on the processor of the computing device reads the external file data portion from the external file on the non-volatile storage medium based on the external file metadata portion, the external file data portion including an internal file, the internal file including an internal file metadata portion and an internal file data portion; The bootloader running on the processor of the computing device reads the metadata portion of the internal file from the internal file on the non-volatile storage medium; The bootloader running on the processor of the computing device reads the internal file data portion from the internal file on the non-volatile storage medium based on the internal file metadata portion; The bootloader running on the processor of the computing device transfers the internal files from the non-volatile storage medium to a first region in the RAM; The operating system running on the processor of the computing device reads the internal file stored in the first area of the RAM; as well as The operating system running on the processor of the computing device transfers one or more fragments of executable code from the internal file to a second region in the RAM, such that the executable code in the second region of the RAM is later executed by the processor of the computing device. The part that reads the external file metadata includes: Read the first metadata portion of the external file, which indicates the location of the second metadata portion of the external file; as well as The second metadata portion of the external file is read based on the location indicated by the first metadata portion of the external file, the second metadata portion of the external file indicating the location of the data portion of the external file.
2. The method of claim 1, wherein the file has a format including an executable and linkable format (ELF).
3. The method according to claim 1, wherein the external file data portion consists only of the internal file.
4. The method of claim 1, wherein the internal file data portion comprises a plurality of data segments.
5. The method according to claim 1, further comprising: Read the flags from the metadata of the external file; Determine whether the flag has a first state indicating a nested file structure or a second state indicating a non-nested file structure; When the flag has the first state indicating the nested file structure, reading the external file data portion includes reading the internal file; as well as When the flag has the second state indicating the non-nested file structure, reading the external file data portion includes reading multiple data segments from the external file data portion on the storage medium into the RAM.
6. A system for loading data in a computing device, the system comprising: Non-volatile storage media; Random access memory (RAM); as well as A processor running a bootloader, the bootloader being configured to load the data into the RAM, including the bootloader being configured during booting the computing device to: Read the metadata portion of an external file from the external file on the non-volatile storage medium, wherein the external file includes the metadata portion and the data portion of the external file; The external file data portion is read from the external file on the non-volatile storage medium based on the external file metadata portion, wherein the external file data portion includes an internal file, and the internal file includes an internal file metadata portion and an internal file data portion; Read the metadata portion of the internal file from the internal file on the non-volatile storage medium; The internal file data portion is read from the internal file on the non-volatile storage medium based on the internal file metadata portion; The internal file is transferred from the non-volatile storage medium to a first region in the RAM; as well as The processor runs an operating system, wherein the operating system is configured as follows: Read the internal file stored in the first area of the RAM; as well as One or more fragments of executable code are transferred from the internal file to a second region in the RAM, such that the executable code in the second region on the RAM is later executed by the processor of the computing device. The processor configured to load the data into the RAM includes the processor running the bootloader, which is configured to: Read the first metadata portion of the external file, which indicates the location of the second metadata portion of the external file; as well as The second metadata portion of the external file is read based on the location indicated by the first metadata portion of the external file, the second metadata portion of the external file indicating the location of the data portion of the external file.
7. The system of claim 6, wherein the file has a format including an executable and linkable format (ELF).
8. The system of claim 6, wherein the external file data portion consists only of the internal files.
9. The system of claim 6, wherein the internal file data portion comprises a plurality of data segments.
10. The system of claim 6, wherein the processor running the bootloader is configured to: Read the flags from the metadata of the external file; Determine whether the flag has a first state indicating a nested file structure or a second state indicating a non-nested file structure; When the flag has the first state indicating the nested file structure, the processor is configured to read the external file data portion, including the processor being configured to read the internal file; as well as When the flag has the second state indicating the non-nested file structure, the processor is configured to read the external file data portion, including the processor being configured to read multiple data segments from the external file data portion on the storage medium into the RAM.
11. A computer-readable medium for loading data from a non-volatile storage medium into random access memory (RAM) in a computing device, the computer-readable medium comprising a non-transitory computer-readable medium having instructions stored thereon in a computer-executable form, the instructions configuring the processing system, when executed by a processing system of the computing device, to: During the booting of the computing device, the bootloader is caused to read the metadata portion of an external file from an external file on the non-volatile storage medium, the external file including the metadata portion and the data portion of the external file; The part that reads the external file metadata includes: Read the first metadata portion of the external file, which indicates the location of the second metadata portion of the external file; and The second metadata portion of the external file is read based on the location indicated by the first metadata portion of the external file, wherein the second metadata portion of the external file indicates the location of the data portion of the external file; This causes the bootloader to read the external file data portion from the external file on the non-volatile storage medium based on the external file metadata portion, the external file data portion including an internal file, the internal file including an internal file metadata portion and an internal file data portion; This causes the bootloader to read the metadata portion of the internal file from the internal file on the non-volatile storage medium; This causes the bootloader to read the internal file data portion from the internal file on the non-volatile storage medium based on the internal file metadata portion; This causes the bootloader to transfer the internal file from the non-volatile storage medium to a first region in the RAM; This causes the operating system to read the internal file stored in the first region of the RAM; and This causes the operating system to transfer one or more fragments of executable code from the internal file to a second region in the RAM, such that the executable code in the second region on the RAM is later executed by the processor of the computing device.
12. The computer-readable medium of claim 11, wherein the file has a format including an executable and linkable format (ELF).
13. The computer-readable medium of claim 11, wherein the external file data portion consists solely of the internal file.
14. The computer-readable medium of claim 11, wherein the internal file data portion comprises a plurality of data segments.
Citation Information
Patent Citations
Distributed file system storage method and device, equipment and storage medium
CN112306986A
System And Method For Booting Within A Heterogeneous Memory Environment
US20190065752A1