<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/part.c, branch v2024.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>part: Allow setting the partition-table type</title>
<updated>2023-07-17T09:12:06+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-07-16T03:38:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=125194e6a136f2a3ef49d443f139b44a04e1bb9e'/>
<id>125194e6a136f2a3ef49d443f139b44a04e1bb9e</id>
<content type='text'>
Some devices have multiple partition types available on the same media.
It is sometimes useful to see these to check that everything is working
correctly.

Provide a way to manually set the partition-table type, avoiding the
auto-detection process.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some devices have multiple partition types available on the same media.
It is sometimes useful to see these to check that everything is working
correctly.

Provide a way to manually set the partition-table type, avoiding the
auto-detection process.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: part: Add partition-related type command</title>
<updated>2023-01-18T18:10:41+00:00</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>eballetb@redhat.com</email>
</author>
<published>2023-01-10T16:19:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=22e7f1d108410cc81a0ec5a6481338e4d6e9586e'/>
<id>22e7f1d108410cc81a0ec5a6481338e4d6e9586e</id>
<content type='text'>
This implements the following command:

    part type mmc 0:1
      -&gt; print partition type UUID
    part type mmc 0:1 uuid
      -&gt; set environment variable to partition type UUID

"part type" can be useful when writing a bootcmd which searches for a
specific partition type to enable automatic discovery of partitions and
their intended usage or mount point.

Signed-off-by: Enric Balletbo i Serra &lt;eballetbo@redhat.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
[trini: Fix when CONFIG_PARTITION_TYPE_GUID is disabled and have the
command check for "types" before "type"]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements the following command:

    part type mmc 0:1
      -&gt; print partition type UUID
    part type mmc 0:1 uuid
      -&gt; set environment variable to partition type UUID

"part type" can be useful when writing a bootcmd which searches for a
specific partition type to enable automatic discovery of partitions and
their intended usage or mount point.

Signed-off-by: Enric Balletbo i Serra &lt;eballetbo@redhat.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
[trini: Fix when CONFIG_PARTITION_TYPE_GUID is disabled and have the
command check for "types" before "type"]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: part: list all 128 GPT partitions</title>
<updated>2022-01-15T09:57:22+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-11T15:03:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bc314f8e5f9b646e5ed09ccee2a2ddb012519305'/>
<id>bc314f8e5f9b646e5ed09ccee2a2ddb012519305</id>
<content type='text'>
A GPT partition table typically has 128 entries. If a partition table
contains a partition 128 'part list' should be able to list it.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A GPT partition table typically has 128 entries. If a partition table
contains a partition 128 'part list' should be able to list it.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: part: Correct error handling</title>
<updated>2021-07-23T11:13:25+00:00</updated>
<author>
<name>Anders Dellien</name>
<email>anders.dellien@arm.com</email>
</author>
<published>2021-06-22T09:40:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7cb31e399e46a74d1d46e8b64598d86018fa4e0b'/>
<id>7cb31e399e46a74d1d46e8b64598d86018fa4e0b</id>
<content type='text'>
As 'part_get_info_by_name' now returns more status codes than just
-1 to indicate failure, we need to update the return value check.

Signed-off-by: Anders Dellien &lt;anders.dellien@arm.com&gt;
Reviewed-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As 'part_get_info_by_name' now returns more status codes than just
-1 to indicate failure, we need to update the return value check.

Signed-off-by: Anders Dellien &lt;anders.dellien@arm.com&gt;
Reviewed-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: part: Add subcommand to list supported partition tables</title>
<updated>2020-07-07T19:22:42+00:00</updated>
<author>
<name>Niel Fourie</name>
<email>lusus@denx.de</email>
</author>
<published>2020-03-24T15:17:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0ffdfbd1d0eca769878913d15f232c9219cf2aa1'/>
<id>0ffdfbd1d0eca769878913d15f232c9219cf2aa1</id>
<content type='text'>
Add a subcommand "types" to the part command, which lists the supported
partition table types.

Signed-off-by: Niel Fourie &lt;lusus@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a subcommand "types" to the part command, which lists the supported
partition table types.

Signed-off-by: Niel Fourie &lt;lusus@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>command: Remove the cmd_tbl_t typedef</title>
<updated>2020-05-18T22:36:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:40:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=09140113108541b95d340f3c7b6ee597d31ccc73'/>
<id>09140113108541b95d340f3c7b6ee597d31ccc73</id>
<content type='text'>
We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>part: Drop disk_partition_t typedef</title>
<updated>2020-05-18T21:33:33+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:39:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0528979fa7ab7853faaf2ecf34b7721dd4c0b383'/>
<id>0528979fa7ab7853faaf2ecf34b7721dd4c0b383</id>
<content type='text'>
We should not be using typedefs and these make it harder to use
forward declarations (to reduce header file inclusions). Drop the typedef.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should not be using typedefs and these make it harder to use
forward declarations (to reduce header file inclusions). Drop the typedef.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: part: number: return hexadecimal value</title>
<updated>2019-10-04T16:21:23+00:00</updated>
<author>
<name>Roman Stratiienko</name>
<email>roman.stratiienko@globallogic.com</email>
</author>
<published>2019-09-20T13:59:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=400b9554cc3ef6d301940d43a2a6f9c098df5fb9'/>
<id>400b9554cc3ef6d301940d43a2a6f9c098df5fb9</id>
<content type='text'>
At this point we are using part number sub-command to retrieve UUID
of the partition using it's name.

e.g.:
 part number mmc $mmcdev system_a system_a_index
 part uuid mmc $mmcdev:${system_a_index} system_a_uuid

Since 'part uuid' sub-command expects partition index in hex format and
'part number' returns decimal value, 'part uuid' command will provide
wrong UUID or fail.

Fixes: be683756f62034 ("cmd: part: Add 'number' sub-command")
Cc: Dirk Behme &lt;dirk.behme@de.bosch.com&gt;
Reported-by: Pontus Fuchs &lt;pontus.fuchs@se.bosch.com&gt;
Signed-off-by: Roman Stratiienko &lt;roman.stratiienko@globallogic.com&gt;
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At this point we are using part number sub-command to retrieve UUID
of the partition using it's name.

e.g.:
 part number mmc $mmcdev system_a system_a_index
 part uuid mmc $mmcdev:${system_a_index} system_a_uuid

Since 'part uuid' sub-command expects partition index in hex format and
'part number' returns decimal value, 'part uuid' command will provide
wrong UUID or fail.

Fixes: be683756f62034 ("cmd: part: Add 'number' sub-command")
Cc: Dirk Behme &lt;dirk.behme@de.bosch.com&gt;
Reported-by: Pontus Fuchs &lt;pontus.fuchs@se.bosch.com&gt;
Signed-off-by: Roman Stratiienko &lt;roman.stratiienko@globallogic.com&gt;
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Move env_set() to env.h</title>
<updated>2019-08-11T20:43:41+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-08-01T15:46:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9fb625ce05539fe6876a59ce1dcadb76b33c6f6e'/>
<id>9fb625ce05539fe6876a59ce1dcadb76b33c6f6e</id>
<content type='text'>
Move env_set() over to the new header file.

Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move env_set() over to the new header file.

Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: part: Add 'number' sub-command</title>
<updated>2019-07-24T17:16:29+00:00</updated>
<author>
<name>Ruslan Trofymenko</name>
<email>ruslan.trofymenko@linaro.org</email>
</author>
<published>2019-06-14T14:01:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=be683756f620349966e0ebb4a5e02e5ff03c8a8e'/>
<id>be683756f620349966e0ebb4a5e02e5ff03c8a8e</id>
<content type='text'>
This sub-command serves for getting the partition index from
partition name. Also it can be used to test the existence of specified
partition.

Use case:
For example, in most CI environments this U-Boot command for automatic
testing of Linux rootfs is used:

    =&gt; setenv bootpart 1:f

where 0xf is "userdata" partition. But the number of "userdata"
partition can be changed any time, when partition table is changed.

So it would be nice to get rid of that 0xf magic number and use
partition name instead, like this:

    =&gt; part number mmc 1 userdata part_num
    =&gt; setenv bootpart 1:${part_num}

Signed-off-by: Ruslan Trofymenko &lt;ruslan.trofymenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
Reviewed-by: Alistair Strachan &lt;astrachan@google.com&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This sub-command serves for getting the partition index from
partition name. Also it can be used to test the existence of specified
partition.

Use case:
For example, in most CI environments this U-Boot command for automatic
testing of Linux rootfs is used:

    =&gt; setenv bootpart 1:f

where 0xf is "userdata" partition. But the number of "userdata"
partition can be changed any time, when partition table is changed.

So it would be nice to get rid of that 0xf magic number and use
partition name instead, like this:

    =&gt; part number mmc 1 userdata part_num
    =&gt; setenv bootpart 1:${part_num}

Signed-off-by: Ruslan Trofymenko &lt;ruslan.trofymenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
Reviewed-by: Alistair Strachan &lt;astrachan@google.com&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
