Lines Matching full:partition
14 * Added support for reading flash partition table from environment.
30 * 'partition' - keeps current partition identifier
32 * partition := <part-id>
46 * 'mtdparts' - partition list
54 * <offset> := partition start offset within the device
56 * <ro-flag> := when set to 'ro' makes partition read-only (not used, passed to kernel)
64 * 1 NOR Flash, with 1 single writable partition:
95 /* special size referring to all the remaining space in a partition */
104 /* minimum partition size */
132 /* copies of last seen 'mtdids', 'mtdparts' and 'partition' env variables */
146 /* device/partition list, parse_cmdline() parses into here */
149 /* current active device and partition number */
227 * current partition is saved in 'mtddevnum'. Current partition name in
271 * Save current device and partition in environment variable 'partition'.
283 env_set("partition", buf); in current_save()
286 debug("=> partition %s\n", buf); in current_save()
288 env_set("partition", NULL); in current_save()
291 debug("=> partition NULL\n"); in current_save()
321 * Performs sanity check for supplied flash partition.
322 * Table of existing MTD flash devices is searched and partition device
326 * @param part partition to validate
327 * @return 0 if partition is valid, 1 otherwise
348 printf("%s%d: partition (%s) start offset" in part_validate_eraseblock()
356 printf("%s%d: partition (%s) size alignment incorrect\n", in part_validate_eraseblock()
376 printf("%s%d: partition (%s) start offset alignment incorrect\n", in part_validate_eraseblock()
395 printf("%s%d: partition (%s) size alignment incorrect\n", in part_validate_eraseblock()
408 * Performs sanity check for supplied partition. Offset and size are
409 * verified to be within valid range. Partition type is checked and
413 * @param part partition to validate
414 * @return 0 if partition is valid, 1 otherwise
428 printf("%s%d: partition (%s) size too big\n", in part_validate()
439 * Now we need to check if the partition starts and ends on in part_validate()
446 * Delete selected partition from the partition list of the specified device.
448 * @param dev device to delete partition from
449 * @param part partition to delete
456 /* if there is only one partition, remove whole device */ in part_del()
460 /* otherwise just delete this partition */ in part_del()
470 printf("current partition deleted, resetting current to 0\n"); in part_del()
511 * Add new partition to the supplied partition list. Make sure partitions are
514 * @param head list this partition is to be added to
515 * @param new partition to be added
522 /* link partition to parrent dev */ in part_sort_add()
535 /* get current partition info if we are updating current device */ in part_sort_add()
545 /* be compliant with kernel cmdline, allow only one partition at offset zero */ in part_sort_add()
547 printf("cannot add second partition at offset 0\n"); in part_sort_add()
574 * Add provided partition to the partition list of a given device.
576 * @param dev device to which partition is added
577 * @param part partition to be added
586 /* partition is ok, add it to the list */ in part_add()
594 * Parse one partition definition, allocate memory and return pointer to this
597 * @param partdef pointer to the partition definition string i.e. <part-def>
599 * @param retpart pointer to the allocated partition (output)
616 /* fetch the partition size */ in part_parse()
618 /* assign all remaining space to this partition */ in part_parse()
625 printf("partition size too small (%llx)\n", size); in part_parse()
641 printf("no closing ) found in partition name\n"); in part_parse()
646 printf("empty partition name\n"); in part_parse()
663 /* check for next partition definition */ in part_parse()
667 printf("no partitions allowed after a fill-up partition\n"); in part_parse()
674 printf("unexpected character '%c' at the end of partition\n", *p); in part_parse()
704 debug("+ partition: name %-22s size 0x%08llx offset 0x%08llx mask flags %d\n", in part_parse()
773 /* reset first partition from first dev from the in device_del()
890 /* if device already exists start at the end of the last partition */ in device_parse()
912 /* partition is ok, add it to the list */ in device_parse()
1127 /* partition size */ in generate_mtdparts()
1229 * Get the net size (w/o bad blocks) of the given partition.
1232 * @param part the partition
1233 * @return the calculated net size of this partition
1305 * Format and print out a partition list for each device from global device
1319 printf("\nactive partition: %s%d,%d - (%s) 0x%08llx @ 0x%08llx\n",
1324 printf("could not get current partition info\n\n");
1342 * Given partition identifier in form of <dev_type><dev_num>,<part_num> find
1343 * corresponding device and verify partition number.
1345 * @param id string describing device and partition or partition name
1347 * @param part_num verified partition number (output)
1348 * @param part pointer to requested partition (output)
1380 printf("no partition number specified\n");
1395 printf("no such partition\n");
1406 * Find and delete partition. For partition id format see find_dev_and_part().
1408 * @param id string describing device and partition
1419 debug("delete_partition: device = %s%d, partition %d = (%s) 0x%08llx@0x%08llx\n",
1433 printf("partition %s not found\n", id);
1439 * Increase the size of the given partition so that it's net size is at least
1440 * as large as the size member and such that the next partition would start on a
1441 * good block if it were adjacent to this partition.
1444 * @param part the partition
1445 * @param next_offset pointer to the offset of the next partition after this
1446 * partition's size has been modified (output)
1459 * partition also into the partition, such that
1460 * the next partition starts with a good block.
1472 printf("truncated partition %s to %lld bytes\n", part->name,
1481 * Adjust all of the partition sizes, such that all partitions are at least
1507 debug("spread_partitions: device = %s%d, partition %d ="
1722 * device/partition list.
1752 current_partition = env_get("partition");
1754 /* save it for later parsing, cannot rely on current partition pointer
1755 * as 'partition' variable may be updated during init */
1829 /* reset first partition from first dev from the list as current */
1843 /* do not process current partition if mtdparts variable is null */
1847 /* is current partition set in environment? if so, use it */
1853 debug("--- getting current partition: %s\n", tmp_ep);
1860 } else if (env_get("partition") == NULL) {
1861 debug("no partition variable set, setting...\n");
1869 * Return pointer to the partition of a requested number from a requested
1872 * @param dev device that is to be searched for a partition
1873 * @param part_num requested partition number
1885 debug("\n--- mtd_part_info: partition number %d for device %s%d (%s)\n",
1890 printf("invalid partition number %d for device %s%d (%s)\n",
1896 /* locate partition number, return it */
1914 * Routine implementing u-boot chpart command. Sets new current partition based
1915 * on the user supplied partition id. For partition id format see find_dev_and_part().
1934 printf("no partition id specified\n");
1945 printf("partition changed to %s%d,%d\n",
1953 * partition list and process user partition request (list, add, del).
1968 env_set("partition", NULL);
2022 printf("too long partition description\n");
2051 /* merge new partition with existing ones*/
2082 "change active partition",
2084 " - change active partition (e.g. part-id = nand0,1)"
2090 " - list partition table\n"
2094 " - delete partition (e.g. part-id = nand0,1)\n"
2096 " - add partition\n"
2099 " - add partition, padding size by skipping bad blocks\n"
2102 " - reset partition table to defaults\n"
2113 "'partition' - keeps current partition identifier\n\n"
2114 "partition := <part-id>\n"
2122 "'mtdparts' - partition list\n\n"
2128 "<offset> := partition start offset within the device\n"
2130 "<ro-flag> := when set to 'ro' makes partition read-only (not used, passed to kernel)";