// Profile specific data string profile.version = "IPR_v1.9.5"; string profile.storage_partition_version = "IPR_v1.9.5"; string profile.icf_partition_version = "ICF_v1.0"; string profile.epg_partition_version = "EPG_v1.0"; string profile.partition_1_URL = "http://boot.pronto.philips.com:8080/images/TSi6400/IPR_v1.9.5/zImage"; string profile.partition_2_URL = "http://boot.pronto.philips.com:8080/images/TSi6400/IPR_v1.9.5/fs_image.bin"; string profile.partition_3_URL = "http://boot.pronto.philips.com:8080/images/TSi6400/IPR_v1.9.5/fs_intent.bin"; string profile.partition_4_URL = "http://boot.pronto.philips.com:8080/images/TSi6400/IPR_v1.9.5/fs_storage.bin"; string profile.partition_5_URL = "http://boot.pronto.philips.com:8080/images/TSi6400/IPR_v1.9.5/fs_epg.bin"; string profile.partition_6_URL = "http://boot.pronto.philips.com:8080/images/TSi6400/IPR_v1.9.5/fs_icf.bin"; string temp_storage_partition_version = ""; string temp_icf_partition_version = ""; string temp_epg_partition_version = ""; fatal_error = false; // This will be set to true if any of the partitions could not be created. partitions_configured = false; // set to true if the partitions are configured and ready for downloading. create_partitions = true; // set to false if the partitions are already up to date. no_update_required = 0; // If the version of partition 0 (the boot partition) is the same as the version of this profile, then we // do not need to configure the partitions. if (table.count > 0) { select 0; if (partition.version == profile.version) create_partitions = false; } lcd clear; lcd image _splashimage; lcd println(""); lcd println(" Welcome. "); lcd println(" iPronto successfully connected to the Philips update server. "); lcd println(""); lcd println(" The latest software will now be downloaded. "); lcd println(" The update process may take up to 20 minutes. "); lcd println(" Do not interrupt the download process, leave the AC adapter "); lcd println(" connected and remain within range of your wireless access "); lcd println(" point."); lcd println(""); lcd println(""); lcd println(""); lcd println(" Press any key below the screen to continue.. "); lcd println(" (iPronto will automatically proceed in 15 seconds.) "); inputkey 15; lcd clear; lcd image _splashimage; if (create_partitions) { println("Configuring partitions."); lcd println("Configuring partitions."); lcd println(""); // if the storage partition exists, then save a copy of its version so we can determine if // we need to download it. if (table.count == 7) // 6 user partitions plus the bootloader partition. { select 4; temp_storage_partition_version = partition.version; select 5; temp_epg_partition_version = partition.version; select 6; temp_icf_partition_version = partition.version; } // clear out the old partition information to make sure everything is clean table.clear(); // 1. Boot Partition //------------------ if (fatal_error == false) { Start = 0; Length = table.first; create Start Length; // create the partition if (_status == 0) { // additional partition meta data partition.type = bootloader; partition.permission = rw; partition.version = ""; // blank out until it has been updated. println("Boot partition configured."); lcd println(" - Boot partition configured."); } else { fatal_error = true; lcd clear; lcd image _splashimage; println("Failed to create Linux partition."); lcd println("Failed to create Linux partition."); lcd println("Please contact technical support."); } } // 2. Linux partition. //-------------------- if (fatal_error == false) { Start = Start + Length; Length = 0x100000 / flash.size; create Start Length; if (_status == 0) { partition.type = linux; partition.permission = rw; partition.relocate = yes; partition.loadaddress = 0xA0200000; partition.parameters = "root=/dev/mtdblock3 rw console= "; partition.name = profile.partition_1_URL; partition.version = ""; // blank out until it has been updated. table.active = 1; println("Linux partition configured."); lcd println(" - Linux partition configured."); } else { lcd clear; lcd image _splashimage; fatal_error = true; println("Failed to create Linux partition."); lcd println("Failed to create Linux partition."); lcd println("Please contact technical support."); } } // 3. Linux FS partition. //----------------------- if (fatal_error == false) { Start = Start + Length; Length = 0x600000 / flash.size; create Start Length; if (_status == 0) { partition.type = jffs; partition.permission = rw; partition.name = profile.partition_2_URL; partition.version = ""; // blank out until it has been updated. println("Linux FS partition configured."); lcd println(" - Linux FS partition configured."); // update partition 1 to chain it to this partition. select 1; partition.chain = 2; } else { lcd clear; lcd image _splashimage; fatal_error = true; println("Failed to create Linux FS partition."); lcd println("Failed to create Linux FS partition."); lcd println("Please contact technical support."); } } // 4. Intent partition. //--------------------- if (fatal_error == false) { Start = Start + Length; Length = 0x1000000 / flash.size; create Start Length; if (_status == 0) { partition.type = romdisk; partition.permission = rw; partition.name = profile.partition_3_URL; partition.version = ""; // blank out until it has been updated. println ("Intent partition configured."); lcd println(" - Intent partition configured."); // update partition 2 to chain it to this partition. select 2; partition.chain = 3; } else { lcd clear; lcd image _splashimage; fatal_error = true; println("Failed to create Intent partition."); lcd println("Failed to create Intent partition."); lcd println("Please contact technical support."); } } // 5. Storage partition. //---------------------- if (fatal_error == false) { Start = Start + Length; // Length = table.last-(Start-1); Length = 0x900000 / flash.size; create Start Length; if (_status == 0) { partition.type = jffs; partition.permission = rw; partition.name = profile.partition_4_URL; partition.version = temp_storage_partition_version; println ("Storage partition configured."); lcd println(" - Storage partition configured."); // update partition 3 to chain it to this partition. select 3; partition.chain = 4; } else { lcd clear; lcd image _splashimage; fatal_error = true; println("Failed to create Storage partition."); lcd println("Failed to create Storage partition."); lcd println("Please contact technical support."); } } // 6. EPG partition. //------------------ if (fatal_error == false) { Start = Start + Length; // Length = table.last-(Start-1); Length = 0xC00000 / flash.size; create Start Length; if (_status == 0) { partition.type = jffs; partition.permission = rw; partition.name = profile.partition_5_URL; partition.version = temp_epg_partition_version; println ("EPG partition configured."); lcd println(" - EPG partition configured."); // update partition 4 to chain it to this partition. select 4; partition.chain = 5; } else { lcd clear; lcd image _splashimage; fatal_error = true; println("Failed to create EPG partition."); lcd println("Failed to create EPG partition."); lcd println("Please contact technical support."); } } // 7. ICF partition. //------------------ if (fatal_error == false) { Start = Start + Length; Length = table.last-(Start-1); //Length = 0xA00000 / flash.size; create Start Length; if (_status == 0) { partition.type = jffs; partition.permission = rw; partition.name = profile.partition_6_URL; partition.version = temp_icf_partition_version; println ("ICF partition configured."); lcd println(" - ICF partition configured."); // update partition 5 to chain it to this partition. select 5; partition.chain = 6; } else { lcd clear; lcd image _splashimage; fatal_error = true; println("Failed to create ICF partition."); lcd println("Failed to create ICF partition."); lcd println("Please contact technical support."); } } if (fatal_error == false) { // All done, so set the flags so it doesn't happen again select 0; partition.version = profile.version; lcd println ""; println "Saving the partition configuration."; lcd println "Saving the partition configuration."; table.save(); partitions_configured = true; } } //end if create partitions else { partitions_configured = true; println "Partition configuration is up to date."; lcd println "Partition configuration is up to date."; lcd println ""; inputkey 2; } //PART TWO //Now that all partitions are configured; let's check for downlaods if (partitions_configured == true) { lcd clear; lcd image _splashimage; i = 1; while (i