The invention relates to a boot loader designed to access boot information via the Internet, allowing for automatic provisioning, upgrades and recovery of corrupted device images based on a unique device ID.
Most desktop computers and similar devices have a boot loader. The function of the boot loader is to load an operating system into the computer's main memory or random access memory (RAM). Once the operating system is loaded (for example, on a PC, when you see the initial Windows or Mac desktop screen), it is ready for users to run applications.
The boot loader is a small program that loads the operating system into the computer. Furthermore, a boot loader can give the user the choice to load an operating system from a list of available operating systems. This would be done by creating partitions in the Flash memory, hard disk or Read Only Memory (ROM). Each partition would include a single operating system or user data. During the booting process the user would be prompted to select from the list of available operating systems. Once the choice is made, the boot loader proceeds to load the desired operating system into RAM and then hand control to the operating system.
Embedded devices such as Personal Digital Assistants (PDAs) and mobile phones are being widely adopted in everyday life. Embedded computers are also built into appliances such as microwave ovens and used extensively in industrial control. The manufacturers of these devices have to sell devices where a wide variety of hardware and software is available on the device. The consumers of these devices can be largely non-technical people with no knowledge of how to fix or modify these devices if need be. There might be thousands of these devices that need the same software or upgrades.
In the past, when a device is corrupted or the software needs to be replaced, the customer is expected to send it back to the manufacturer for repair. Repair might take weeks or months. There is a need for a system that will allow the user to get immediate repair of a corrupted device or updates to an outdated device with very little effort or knowledge.
It is an object of this invention to provide a boot loader with standard Internet protocols (HTTP, TFTP, FTP) to allow the disassociation of the software and hardware at the manufacturing time. The boot loader should maintain all the functionality of a traditional boot loader as described above, such as partition of the device's memory in order to facilitate the loading of multiple operating systems. Additionally, the boot loader should allow for the device image (partition) to be loaded using Internet protocols.
It is a further object of this invention to provide a boot loader that allows a device to have disaster recovery features. Whenever a virus, or any other factor corrupts the device, it will automatically attempt to restore itself to a working state via the boot loader.
It is a still further object of this invention to provide a boot loader that allows a device to automatically update software running on, or data required by the device whenever an update is available.
It is a still further object of this invention to provide a boot loader that is operated by a simple scripting language that instructs a device to check for an update of data on a periodic basis. The scripting language may also include instructions to download further scripts off the Internet that augment the execution of the script.
The invention consists of a boot loader for a device, comprising an IP stack supporting Internet protocols, and a scripting engine to run a default script. The IP stack includes address discovery service (for example, BOOTP and DHCP), a URL to IP address translator (for example, DNS), and a protocol for file transfer over the Internet (for example, HTTP, FTP and/or TFTP). On start-up of the device, the boot loader runs the default script to initialize the device and verify the integrity of any data and operating systems in memory on the device.
Preferably, the default script generates and verifies a primary partition table and a secondary partition table in memory on the device, the partition tables being identical in content. The content of the partition tables is partition metadata describing one or more partitions in memory on the device. The initialization further includes generating and verifying the partitions in memory on the device using the partition metadata.
On start-up of the device, the boot loader will attempt to go through the redundant partition tables and check if they are valid. If no partition tables exist or the update flag is set, the boot loader will retrieve the unique ID of the device and use the recovery script to create the partition tables. The script might instruct the boot loader to download scripts and/or data from a server on the Internet.
If one of the partition tables is invalid then the boot loader will attempt to recover the partition table contents using the redundant copy of the partition tables.
This process may be streamlined by the use of prepared device profiles and scripts located on the remote web server.
After validating the partition tables, the boot loader loads and runs a start-up script.
The start-up script may instruct the boot loader to check for updated versions of software present on the server, either at start-up, or at set intervals. The boot loader may further use the same mechanism to repair or replace corrupted software on the device.
Additionally, the boot loader can support memory partition, to allow for multiple operating systems on a single device.
The invention also comprises the method of using the above boot loader for loading a device image into an Internet-connected device.
The invention itself both as to organization and method of operation, as well as additional objects and advantages thereof, will become readily apparent from the following detailed description when read in connection with the accompanying drawings:
In the following description, a “device image” means an executable operating system and/or data required for proper operation of a device. A device image may contain file systems or plain data, as required.
A “device unique ID” is a serial number or string that unique identifies a device from any other device. The device unique ID must be stored in a non-volatile manner and allow for easy retrieval at any time. Frequently, the MAC address is used as a device unique ID, however, any number or string that meets the requirements will suffice. A MAC (Media Access Control) address is a computer's unique hardware number. Ethernet MAC addresses are unique and are administered and distributed by the IEEE.
The Operating System 12 supports a wide variety of potential peripheral device drivers 14 including Ethernet, 802.11 WiFi, USB and Serial.
The Operating System 12 can also include a User Interface (UI) designed to be accessible through serial or network interfaces, LCD touch screens, or any other input method as required. The UI contains an extensible lexical analyzer for parsing regular expressions in the input stream. The lexical analyzer should be extensible to allow for understanding of complex UI commands as needed.
The IP stack 16 provides the essential support for high-level protocols and services 18 to allow successful communication over the Internet. These may include BOOTP and DHCP for address discovery, a DNS resolver to translate URLs to IP addresses and HTTP, FTP and TFTP for downloading images over the Internet.
The IP stack 16 also supports a scripting engine 20, which runs scripts written in a scripting language 22. The scripts contain the logic used by the boot loader 10 upon start-up of the hardware 11.
The scripting language 22 provides the functionality for implementing the different desired recovery and update scenarios. The scripting language should be extensible via scripts on a server that contains various device profiles. The device profiles are selected on the server based on the unique ID of the device. This allows changes to the device image to be made according to data stored on a server, without user interaction or modification of the boot loader 10 on the device.
An example of the typical constructs in the scripting language 22 is set forth below. Obviously, commands and syntax can be freely modified to achieve the same effect or to create additional effects.
Variables
The scripting language 22 can be extended to support other needs of the boot loader 10. For example, the script language 22 can include support for security protocols to allow for authentication of servers when downloading scripts and device images.
The server supports predetermined device profiles. A device profile is a collection of device images that define the behavior of a device. For example, device profile A might contain a StrongArm Linux kernel image and a file system image. Device profile B might contain a PXA250 kernel image and the same file system image. The server selects the device profile based on the unique device ID. This allows the boot loader 10 to synchronize the local device with its device profile on the web server for a robust and reliable connection.
Memory Partitioning
Memory (flash memory in most devices) is a single resource like an unformatted computer disk drive in a PC. Management is problematic since many users try to allocate sections for use in their applications. To manage the flash memory block in a consistent familial way, the same partitioning scheme used in a PC Disk Drives can be used with enhancements to accommodate flash memory. A partition table keeps track of all the allocated blocks in the flash memory. Only one active partition gets control when the system boots. The active partition can be set to any valid bootable partition.
Flash memory is very slow to update. It can take several seconds to write a block of data to Flash Memory. Therefore, during the write operation, there is a risk of events occurring that can put the Flash Block in an inconsistent state. To address this problem, the boot loader uses two partition tables: a Primary Partition Table (PPT) and a Secondary Partition Table (SPT). Both Partition Tables have a CRC field to check the validity of the Partition Table. The algorithm is shown in
The following rules are used to make sure the flash memory stays consistent:
To accommodate everything that a boot loader can do with a partition, there needs to be some metadata information associated to it. This information will be stored in the Partition Table entry associated with the Partition. The structure of the header for the Partition Table entry is shown in
An operating system might consist of more than one type of Image. For example a typical Linux OS will need the following images:
To boot Linux, the Kernel Image and Root Ram disk Image must be moved into the system's RAM before the Kernel gets control. This is accomplished with Partition Table links originating from the Kernel's Partition Entry as shown in
Definition of Metadata Terms Used in
Where the boot loader differs from the conventional start-up process is at the boot record retrieval phase. Instead of searching for the boot programs on a diskette or hard drive, the boot loader searches the partitions in memory (shown in
The boot loader proceeds through the steps out in
For a multiple partition device using a partition chain, each partition must be validated (or updated, as required) according to the steps in
If partitions in remain, then the next partition header in the chain is loaded (step 72). The partition is checked to determine if the partition update flag is set or if the partition is invalid. If the partition is valid and the update flag is not set, the partition is processed (step 76) and the list in the partition table is checked for any remaining partitions (step 70). Otherwise the script for the partition entry must be downloaded (step 78) according to the URL inthe partition entry. After a successful download (step 80) the script is run (step 82) and the partition processed (step 76). If the download fails, the system will either (step 84) pass control to the user interface (
The end result is that, either the first bootable partition is booted (
Definitions of Terms in
In effect, on start-up, the boot loader uniquely identifies the device to the web server, over the Internet, processes the script commands from the web server according to the scripting language, and synchronizes the local device with the data (e.g. device profile) provided by the web server. The boot process then continues in the same fashion as a conventional boot loader, transparent to the user.
Accordingly, while this invention has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications of the illustrative embodiments, as well as other embodiments of the invention, will be apparent to persons skilled in the art upon reference to this description. It is therefore contemplated that the appended claims will cover any such modifications or embodiments as fall within the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2380762 | Apr 2002 | CA | national |
Number | Name | Date | Kind |
---|---|---|---|
5940627 | Luciani et al. | Aug 1999 | A |
6079016 | Park | Jun 2000 | A |
6151674 | Takatani | Nov 2000 | A |
6178503 | Madden et al. | Jan 2001 | B1 |
6295603 | Mischo | Sep 2001 | B1 |
6463535 | Drews | Oct 2002 | B1 |
6591376 | VanRooven et al. | Jul 2003 | B1 |
6598159 | McAlister et al. | Jul 2003 | B1 |
6732159 | Levine et al. | May 2004 | B1 |
6763457 | Aguilar et al. | Jul 2004 | B1 |
6957328 | Goodman et al. | Oct 2005 | B2 |
20010016879 | Sekiguchi et al. | Aug 2001 | A1 |
20010036109 | Jha et al. | Nov 2001 | A1 |
20030028800 | Dayan et al. | Feb 2003 | A1 |
Number | Date | Country | |
---|---|---|---|
20030191930 A1 | Oct 2003 | US |