<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/disk/part.c, branch v2016.03</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>mmc: emmc and hw partitions partition table id bugfix.</title>
<updated>2016-01-20T15:19:19+00:00</updated>
<author>
<name>Erik Tideman</name>
<email>erik.tideman@faltcom.se</email>
</author>
<published>2016-01-11T13:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=99e7fc8a2659ff1b2887c8b11b01ef423e00ee1c'/>
<id>99e7fc8a2659ff1b2887c8b11b01ef423e00ee1c</id>
<content type='text'>
On bootup the emmc's hw partition is always set to 0 and the partition
table is read from it. When switching to another hw partition the
partition table's id is not updated but instead the old one from
hw partition 0 is used. If there is no partition table on hw partition 0
then the code will terminate and return error even if the desired hw
partition contains a perfectly fine partition table. This fix updates
the partition table struct to correspond to the specified hw partition
before testing if the partition table is valid or not.

Signed-off-by: Erik Tideman &lt;erik.tideman@faltcom.se&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
[trini: Squash the patch that corrected whitespace in the original into
this one, wrap with HAVE_BLOCK_DEVICE test]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On bootup the emmc's hw partition is always set to 0 and the partition
table is read from it. When switching to another hw partition the
partition table's id is not updated but instead the old one from
hw partition 0 is used. If there is no partition table on hw partition 0
then the code will terminate and return error even if the desired hw
partition contains a perfectly fine partition table. This fix updates
the partition table struct to correspond to the specified hw partition
before testing if the partition table is valid or not.

Signed-off-by: Erik Tideman &lt;erik.tideman@faltcom.se&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
[trini: Squash the patch that corrected whitespace in the original into
this one, wrap with HAVE_BLOCK_DEVICE test]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpt: add optional parameter type in gpt command</title>
<updated>2015-11-12T20:58:58+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay73@gmail.com</email>
</author>
<published>2015-10-27T10:00:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7561b258a1bdda25daee78824a400d48921f4802'/>
<id>7561b258a1bdda25daee78824a400d48921f4802</id>
<content type='text'>
code under flag CONFIG_PARTITION_TYPE_GUID
add parameter "type" to select partition type guid

example of use with gpt command :

  partitions = uuid_disk=${uuid_gpt_disk}; \
      name=boot,size=0x6bc00,uuid=${uuid_gpt_boot}; \
      name=root,size=0x7538ba00,uuid=${uuid_gpt_root}, \
         type=0fc63daf-8483-4772-8e79-3d69d8477de4;

  gpt write mmc 0 $partitions

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay73@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
code under flag CONFIG_PARTITION_TYPE_GUID
add parameter "type" to select partition type guid

example of use with gpt command :

  partitions = uuid_disk=${uuid_gpt_disk}; \
      name=boot,size=0x6bc00,uuid=${uuid_gpt_boot}; \
      name=root,size=0x7538ba00,uuid=${uuid_gpt_root}, \
         type=0fc63daf-8483-4772-8e79-3d69d8477de4;

  gpt write mmc 0 $partitions

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay73@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ubifs: Add generic fs support</title>
<updated>2015-10-24T17:50:32+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2015-09-17T22:46:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=251cee0db23f1e2294ce28a102afde6a20e5673c'/>
<id>251cee0db23f1e2294ce28a102afde6a20e5673c</id>
<content type='text'>
Add generic fs support, so that commands like ls, load and test -e can be
used on ubifs.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add generic fs support, so that commands like ls, load and test -e can be
used on ubifs.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk/part: Only build hostfs special handling when CONFIG_SANDBOX is set</title>
<updated>2015-10-24T17:50:31+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2015-09-17T22:46:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=afc1744ec87d26965fc9a311554e0d50962555bd'/>
<id>afc1744ec87d26965fc9a311554e0d50962555bd</id>
<content type='text'>
This is not necessary / useful when not building with CONFIG_SANDBOX and
with the addition of ubifs support to the generic fs commands it actually
gets in the way, since both operate on a fake / NULL blkdev.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is not necessary / useful when not building with CONFIG_SANDBOX and
with the addition of ubifs support to the generic fs commands it actually
gets in the way, since both operate on a fake / NULL blkdev.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk/part.c: make local function static</title>
<updated>2014-10-25T11:02:00+00:00</updated>
<author>
<name>Jeroen Hofstee</name>
<email>jeroen@myspectrum.nl</email>
</author>
<published>2014-10-08T20:57:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=76ee65bde2ea3cf89be7cddacf2c1893d49e20fc'/>
<id>76ee65bde2ea3cf89be7cddacf2c1893d49e20fc</id>
<content type='text'>
Signed-off-by: Jeroen Hofstee &lt;jeroen@myspectrum.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeroen Hofstee &lt;jeroen@myspectrum.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cleanup disk/part.c whitespace</title>
<updated>2014-09-24T22:30:28+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@denx.de</email>
</author>
<published>2014-09-09T13:19:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=214b3f311f0c1ac4c8f68e45133fc3547c76d8d1'/>
<id>214b3f311f0c1ac4c8f68e45133fc3547c76d8d1</id>
<content type='text'>
Cleanup disk/part.c

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup disk/part.c

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>whitespace cleanups</title>
<updated>2014-07-22T11:44:27+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@denx.de</email>
</author>
<published>2014-07-19T21:50:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3f9eb6e1095b791867975c236bd7ab8b0a51acf4'/>
<id>3f9eb6e1095b791867975c236bd7ab8b0a51acf4</id>
<content type='text'>
Whitespace cleanups.

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Whitespace cleanups.

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: restore ability to access host fs through standard commands</title>
<updated>2014-06-23T21:37:23+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2014-06-12T16:28:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4d907025d6a530c0f3d2e869331e863c3e3cc3c2'/>
<id>4d907025d6a530c0f3d2e869331e863c3e3cc3c2</id>
<content type='text'>
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to handle the "host"
device type, and redirect accesses to it to the host filesystem. This
broke some unit tests that use this feature. So, revert that change. The
code added back by this patch is slightly different to pacify checkpatch.

However, we're then left with "host" being both:
- A pseudo device that accesses the hosts real filesystem.
- An emulated block device, which accesses "sectors" inside a file stored
  on the host.

In order to resolve this discrepancy, rename the pseudo device from host
to hostfs, and adjust the unit-tests for this change.

The "help sb" output is modified to reflect this rename, and state where
the host and hostfs devices should be used.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Josh Wu &lt;josh.wu@atmel.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to handle the "host"
device type, and redirect accesses to it to the host filesystem. This
broke some unit tests that use this feature. So, revert that change. The
code added back by this patch is slightly different to pacify checkpatch.

However, we're then left with "host" being both:
- A pseudo device that accesses the hosts real filesystem.
- An emulated block device, which accesses "sectors" inside a file stored
  on the host.

In order to resolve this discrepancy, rename the pseudo device from host
to hostfs, and adjust the unit-tests for this change.

The "help sb" output is modified to reflect this rename, and state where
the host and hostfs devices should be used.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Josh Wu &lt;josh.wu@atmel.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: default to HW partition 0 if not specified</title>
<updated>2014-06-12T12:21:12+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2014-05-23T18:48:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ecdd57e27467593a864ca5437db45266e36e3a7b'/>
<id>ecdd57e27467593a864ca5437db45266e36e3a7b</id>
<content type='text'>
Currently, get_device()/get_dev_hwpart() for MMC devices does not select
an explicit HW partition unless the user explicitly requests one, i.e. by
requesting device "mmc 0.0" rather than just "mmc 0". I think it makes
more sense if the default is to select HW partition 0 (main data area)
if the user didn't request a specific partition. Otherwise, the following
happens, which feels wrong:

Select HW partition 1 (boot0):
mmc dev 0 1

Attempts to access SW partition 1 on HW partition 1 (boot0), rather than
SW partition 1 on HW partition 0 (main data area):
ls mmc 0:1 /

With this patch, the second command above re-selects the main data area.

Many device types don't support HW partitions at all, so if HW partition
0 is selected (either explicitly or as the default) and there's no
select_hwpart function, we simply skip attempting to select a HW
partition.

Some MMC devices (i.e. SD cards) don't support HW partitions. However,
this patch still works, since mmc_start_init() sets the current
partition number to 0, and mmc_select_hwpart() succeeds if the requested
partition is already selected.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Pantelis Antoniou &lt;panto@antoniou-consulting.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, get_device()/get_dev_hwpart() for MMC devices does not select
an explicit HW partition unless the user explicitly requests one, i.e. by
requesting device "mmc 0.0" rather than just "mmc 0". I think it makes
more sense if the default is to select HW partition 0 (main data area)
if the user didn't request a specific partition. Otherwise, the following
happens, which feels wrong:

Select HW partition 1 (boot0):
mmc dev 0 1

Attempts to access SW partition 1 on HW partition 1 (boot0), rather than
SW partition 1 on HW partition 0 (main data area):
ls mmc 0:1 /

With this patch, the second command above re-selects the main data area.

Many device types don't support HW partitions at all, so if HW partition
0 is selected (either explicitly or as the default) and there's no
select_hwpart function, we simply skip attempting to select a HW
partition.

Some MMC devices (i.e. SD cards) don't support HW partitions. However,
this patch still works, since mmc_start_init() sets the current
partition number to 0, and mmc_select_hwpart() succeeds if the requested
partition is already selected.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Pantelis Antoniou &lt;panto@antoniou-consulting.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: provide a select_hwpart implementation for get_device()</title>
<updated>2014-05-23T09:11:44+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2014-05-07T18:19:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d235628434657cf1eba58821445cb5ad88e10763'/>
<id>d235628434657cf1eba58821445cb5ad88e10763</id>
<content type='text'>
This enables specifying which eMMC HW partition to target for any U-Boot
command that uses the generic get_partition() function to parse its
command-line arguments.

Acked-by: Pantelis Antoniou &lt;panto@antoniou-consulting.com&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables specifying which eMMC HW partition to target for any U-Boot
command that uses the generic get_partition() function to parse its
command-line arguments.

Acked-by: Pantelis Antoniou &lt;panto@antoniou-consulting.com&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
