Method capable of switching UBOOT startup and UEFI startup
By setting trigger conditions and exchanging FLASH chip data in the tablet computer, automatic switching between UBOOT and UEFI startup is realized, solving the problems of complex and time-consuming operation in the prior art, and achieving simple and fast startup mode switching is achieved.
Patent Information
- Application Number
- CN202410981739.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, tablet computers cannot support both UBOOT and UEFI startup modes at the same time, resulting in the FLASH chip being removed and re-burned every time the startup is started. The operation is complicated and time-consuming and labor-intensive, making it difficult for non-professional personnel to switch.
Set the trigger conditions to switch UBOOT and UEFI startup in the tablet computer. By monitoring the trigger conditions, apply for temporary memory, read and exchange the startup data of the FLASH chip, and automatically modify the data in the FLASH chip to achieve the switching of the startup mode without removing the chip .
It realizes that the tablet computer automatically switches UBOOT and UEFI startup according to user operations when it is powered on and started. It does not require professionals, is simple to operate, and takes only 3 minutes, solving the problems of complex and time-consuming operation in the existing technology.
Smart Images

Figure CN118939329A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of booting, and in particular to a method capable of switching between UBOOT booting and UEFI booting. Background Art
[0002] UBOOT, the full name of which is Universal Boot Loader, is used to boot the system. UEFI, the full name of which is Unified Extensible Firmware Interface, is a standard that describes a type of interface in detail. This interface is used for the operating system to automatically load from the pre-boot operating environment to an operating system. FLASH chip, the BIOS on the motherboard is mostly made of Flash Memory, which is translated into Chinese as "flashing memory", and is usually called flash memory, or flash memory for short.
[0003] Conventional tablet computers usually only support one boot mode + operating system, such as UBOOT + Android operating system, or UEFI + Linux operating system. The above two boot modes UEFI and UBOOT are independent and incompatible boot modes. Therefore, each time the tablet computer is powered on, only one of UBOOT and UEFI can be selected for startup, and each time it is powered on, the code is read from a fixed address of the storage chip (usually a FLASH chip), and there is no simultaneous startup function. When a tablet computer needs to be able to support these two boot modes at the same time, it is more complicated to switch between the two boot modes. Usually, the tablet computer needs to be disassembled, and then the storage chip used to load the boot function is removed, and re-burned with a FLASH burner. After the burning is completed, it is installed back into the tablet computer for startup. This switching method is time-consuming and labor-intensive, and the operation is complicated. It cannot be completed by non-professionals, and it is difficult for ordinary users to achieve. Summary of the invention
[0004] In order to solve the problems in the prior art, the present invention provides a method capable of switching between UBOOT startup and UEFI startup, which can realize automatic switching between UBOOT startup and UEFI startup according to the operation of the user when the tablet computer is started up, without removing the FLASH chip of the tablet computer for re-burning, and the operation is simple, time-saving and labor-saving, and can be realized without the need for professionals, thus solving the problem in the prior art that the switching between UBOOT startup and UEFI startup when the tablet computer is started up requires the removal of the FLASH chip for re-burning, which is complicated, time-consuming and labor-intensive, and cannot be realized by non-professionals.
[0005] A method for switching between UBOOT startup and UEFI startup of the present invention comprises the following steps:
[0006] Step 1: Switch the system to monitor the trigger conditions, set the trigger conditions for switching between UBOOT startup and UEFI startup in the tablet computer, and switch the system to monitor in real time whether the trigger conditions are triggered;
[0007] Step 2: When the switching system detects that the triggering condition for switching between UBOOT boot and UEFI boot is triggered, the switching system applies for a temporary memory in the tablet computer;
[0008] Step 3: Switch the system to read the boot data of the FLASH chip in the tablet computer and store it in temporary memory;
[0009] Step 4: The switch system exchanges the address storing the UBOOT startup data in the temporary memory with the address storing the UEFI startup data to form new startup data;
[0010] Step 5: Switch the system to write the new boot data into the FLASH chip to overwrite the original boot data in the FLASH chip;
[0011] Step 6: Restart the tablet to complete the UBOOT boot and UEFI boot switching operations.
[0012] The present invention is further improved. In step 1, when the switching system does not detect that the triggering condition for switching between UBOOT startup and UEFI startup is triggered, the tablet computer is started normally when the tablet computer is turned on.
[0013] The present invention is further improved. In step 1, the trigger condition for switching between UBOOT startup and UEFI startup is that the power button of the tablet computer is pressed for a period of ≥ 4 seconds.
[0014] The present invention is further improved. In step 1, an embedded controller is used to monitor the long press time of the tablet computer power button. When the tablet computer power button is long pressed for ≥ 4 seconds, the embedded controller triggers a data flag to feed back to the switching system.
[0015] The present invention is further improved, in step 2, the size of the temporary memory is the same as the memory size of the FLASH chip.
[0016] The present invention is further improved, in step 3, the memory size of the FLASH chip is greater than the sum of the memory occupied by the UBOOT startup data and the UEFI startup data.
[0017] The present invention is further improved. In step 4, the model of the FLASH chip is GigaDevice's GD25Q128 chip, the memory size is 16MB, the storage address is 0x00,0000 to 0xFF,FFFF, which is divided into the upper part 0x00,0000 to 0x7F,FFFF and the lower part 0x80,0000 to 0xFF,FFFF.
[0018] The present invention is further improved. In step 4, there are two storage methods for UBOOT startup data and UEFI startup data, namely, UBOOT startup data is stored in the upper storage address of the FLASH chip and UEFI startup data is stored in the lower storage address of the FLASH chip, and UEFI startup data is stored in the upper storage address of the FLASH chip and UBOOT startup data is stored in the lower storage address of the FLASH chip.
[0019] The beneficial effects of the present invention are as follows: the present invention provides a method capable of switching between UBOOT startup and UEFI startup, by setting a trigger condition for switching between UBOOT startup and UEFI startup in a tablet computer, when the trigger condition is triggered, the switching system automatically modifies the data in the FLASH chip, and can realize automatic switching between UBOOT startup and UEFI startup according to the user's operation when the tablet computer is powered on, without the need to remove the FLASH chip of the tablet computer for re-burning, the operation is simple, only takes about 3 minutes, time and labor are saved, and it can be implemented without professional personnel, thus solving the problem in the prior art that the FLASH chip needs to be removed and re-burned when the tablet computer is powered on to switch between UBOOT startup and UEFI startup, which is complicated, time-consuming and labor-intensive, and cannot be implemented by non-professional personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a method capable of switching between UBOOT startup and UEFI startup of the present invention;
[0021] Figure 2 This is a storage address distribution diagram of the FLASH chip in the tablet computer of the present invention. DETAILED DESCRIPTION
[0022] The present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0023] See also Figure 1-2 A method for switching between UBOOT startup and UEFI startup of the present invention comprises the following steps:
[0024] Step 1: The switching system monitors the triggering conditions, and sets the triggering conditions for switching UBOOT startup and UEFI startup in the tablet computer. The switching system monitors in real time whether the triggering conditions are triggered. When the switching system does not detect that the triggering conditions for switching UBOOT startup and UEFI startup are triggered, the tablet computer is started normally when the tablet computer is turned on. The triggering condition for switching UBOOT startup and UEFI startup is to press and hold the tablet computer power button for ≥4 seconds. The embedded controller is used to monitor the long pressing time of the tablet computer power button. When the tablet computer power button is pressed and held for ≥4 seconds, the embedded controller triggers a data flag to feed back to the switching system.
[0025] Step 2: When the switching system detects that the triggering condition for switching between UBOOT startup and UEFI startup is triggered, the switching system applies for a temporary memory in the tablet computer; the size of the temporary memory is the same as the memory size of the FLASH chip.
[0026] Step 3: The switching system reads the boot data of the FLASH chip in the tablet computer and stores it in temporary memory; the memory size of the FLASH chip is greater than the sum of the memory occupied by the UBOOT boot data and the UEFI boot data. In this embodiment, the size of the UEFI boot data is 4.608MB, and the size of the UBOOT boot data is 2.32MB. The sum of the memory occupied by the UBOOT boot data and the UEFI boot data is much smaller than the memory size of the FLASH chip.
[0027] Step 4: Switch the system to exchange the address storing the UBOOT startup data in the temporary memory with the address storing the UEFI startup data to form new boot data; the FLASH chip model is GigaDevice's GD25Q128 chip, the memory size is 16MB, the storage address is 0x00,0000 to 0xFF,FFFF, divided into the upper part 0x00,0000 to 0x7F,FFFF and the lower part 0x80,0000 to 0xFF,FFFF; there are two ways to store UBOOT startup data and UEFI startup data, namely, the UBOOT startup data is stored in the upper storage address of the FLASH chip while the UEFI startup data is stored in the lower storage address of the FLASH chip, and the UEFI startup data is stored in the upper storage address of the FLASH chip while the UBOOT startup data is stored in the lower storage address of the FLASH chip. In this embodiment, please refer to Figure 2, when UBOOT is started, the UBOOT startup data is stored in the upper part of the FLASH chip, the storage address of the upper part of the FLASH chip is (0x00,0000 to 0x7F,FFFF), the UBOOT startup data storage address is from 0x00,0000 to 0x24,3EEF, the total size is 2.32MB; UEFI startup data is stored in the lower part of the FLASH chip, the storage address of the lower part of the FLASH chip is (0x80,0000 to 0xFF,FFFF), the UEFI startup data storage address is from 0x80,0000 to 0xC7,FFFF, the total size is 4.608MB. When UEFI is started, the UEFI startup data is stored in the upper part of the FLASH chip, the address is from 0x00,0000 to 0xC7,FFFF; UBOOT startup data is stored in the lower part of the FLASH chip, the address is from 0x80,0000 to 0xA3,3EEF.
[0028] Step 5: The switching system writes the new boot data into the FLASH chip to overwrite the original boot data in the FLASH chip; in this embodiment, when the tablet computer is turned on, it will read the code from the 0x00,0000 address of the FLASH chip and enter the boot program. Therefore, the boot data at the 0x00,0000 position of the FLASH chip is the boot item of the tablet computer, that is, when switching UBOOT boot and UEFI boot, the UBOOT boot data or UEFI boot data is moved to the 0x00,0000 address of the FLASH chip.
[0029] Step 6: Restart the tablet computer to complete the UBOOT startup and UEFI startup switching operation. In this embodiment, when the FLASH chip contains both UBOOT startup data and UEFI startup data, the normal FLASH chip content is no longer a single firmware; when one of the firmware files of the UBOOT startup data or the UEFI startup data is upgraded, it is necessary to repackage the new upgraded firmware and the other non-upgraded firmware into a complete firmware upgrade file for upgrading according to the storage address distribution method of the FLASH chip. During the switching process between UBOOT startup and UEFI startup, a firmware upgrade program can be added to upgrade the firmware. In the startup process, it is determined whether there is a firmware upgrade file in the U disk file. If the file exists, the U disk firmware upgrade file is read and rewritten into the FLASH chip.
[0030] As can be seen from the above, the beneficial effects of the present invention are as follows: the present invention provides a method capable of switching between UBOOT startup and UEFI startup, by setting a trigger condition for switching between UBOOT startup and UEFI startup in a tablet computer, when the trigger condition is triggered, the switching system automatically modifies the data in the FLASH chip, and can automatically switch between UBOOT startup and UEFI startup according to the user's operation when the tablet computer is turned on, without the need to remove the FLASH chip of the tablet computer and re-burn it, the operation is simple, only takes about 3 minutes, saves time and effort, and can be implemented without the need for professionals, thus solving the problem in the prior art that the tablet computer needs to remove the FLASH chip and re-burn it when switching between UBOOT startup and UEFI startup, which is complicated, time-consuming and labor-intensive, and cannot be implemented by non-professionals.
[0031] The specific implementation modes described above are preferred implementation modes of the present invention, and are not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to the specific implementation modes, and all equivalent changes made according to the present invention are within the protection scope of the present invention.
Claims
1. A method capable of switching between UBOOT boot and UEFI boot, characterized in that: The following steps are included: Step 1: Switch the system to monitor the trigger conditions, set the trigger conditions for switching between UBOOT startup and UEFI startup in the tablet computer, and switch the system to monitor in real time whether the trigger conditions are triggered; Step 2: When the switching system detects that the triggering condition for switching between UBOOT boot and UEFI boot is triggered, the switching system applies for a temporary memory in the tablet computer; Step 3: Switch the system to read the boot data of the FLASH chip in the tablet computer and store it in temporary memory; Step 4: The switch system exchanges the address storing the UBOOT startup data in the temporary memory with the address storing the UEFI startup data to form new startup data; Step 5: Switch the system to write the new boot data into the FLASH chip to overwrite the original boot data in the FLASH chip; Step 6: Restart the tablet to complete the UBOOT boot and UEFI boot switching operations.
2. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 1, characterized in that: In step 1, when the switching system does not detect that the triggering condition for switching between UBOOT startup and UEFI startup is triggered, the tablet computer is started normally when the tablet computer is turned on.
3. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 2, characterized in that: In step 1, the trigger condition for switching between UBOOT boot and UEFI boot is that the power button of the tablet computer is pressed for ≥ 4 seconds.
4. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 3, characterized in that: In step 1, an embedded controller is used to monitor the long-pressing time of the tablet computer power button. When the long-pressing time of the tablet computer power button is ≥ 4 seconds, the embedded controller triggers a data flag to feed back to the switching system.
5. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 4, characterized in that: In step 2, the size of the temporary memory is the same as the memory size of the FLASH chip.
6. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 5, characterized in that: In step 3, the memory size of the FLASH chip is greater than the sum of the memory occupied by the UBOOT startup data and the UEFI startup data.
7. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 6, characterized in that: In step 4, the model of the FLASH chip is GigaDevice's GD25Q128 chip, the memory size is 16MB, the storage address is 0x00,0000 to 0xFF,FFFF, which is divided into the upper part 0x00,0000 to 0x7F,FFFF and the lower part 0x80,0000 to 0xFF,FFFF.
8. The method capable of switching between UBOOT boot and UEFI boot as claimed in claim 7, characterized in that: In step 4, there are two ways to store UBOOT startup data and UEFI startup data, namely, UBOOT startup data is stored in the upper storage address of the FLASH chip and UEFI startup data is stored in the lower storage address of the FLASH chip, and UEFI startup data is stored in the upper storage address of the FLASH chip and UBOOT startup data is stored in the lower storage address of the FLASH chip.
