<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/disk/part_dos.c, branch v2014.10</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>disk: part_dos.c: Add a PBR check when MBR checking fails</title>
<updated>2014-06-11T20:27:05+00:00</updated>
<author>
<name>Darwin Dingel</name>
<email>darwin.dingel@alliedtelesis.co.nz</email>
</author>
<published>2014-06-06T03:48:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4a36be9bdb42157401618681c9ac28e3824c120e'/>
<id>4a36be9bdb42157401618681c9ac28e3824c120e</id>
<content type='text'>
Bug: SDCard with a messed up partition but still has a FAT signature
intact is readable in Linux but unreadable in uboot with 'fatls'.

Fix: When partition info checking fails, there is no checking for a
FAT signature (DOS_PBR) which will fail 'fatls'. FAT signature checking
is done when no valid partition is found in partition table. If FAT
signature is found, the disk will be read as PBR and continue
processing.

Signed-off-by: Darwin Dingel &lt;darwin.dingel@alliedtelesis.co.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: SDCard with a messed up partition but still has a FAT signature
intact is readable in Linux but unreadable in uboot with 'fatls'.

Fix: When partition info checking fails, there is no checking for a
FAT signature (DOS_PBR) which will fail 'fatls'. FAT signature checking
is done when no valid partition is found in partition table. If FAT
signature is found, the disk will be read as PBR and continue
processing.

Signed-off-by: Darwin Dingel &lt;darwin.dingel@alliedtelesis.co.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part_efi: clarify lbaint_t usage</title>
<updated>2014-06-05T18:44:56+00:00</updated>
<author>
<name>Steve Rae</name>
<email>srae@broadcom.com</email>
</author>
<published>2014-05-26T18:52:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e04350d2991ed628587e94b5b6d89c24f439e172'/>
<id>e04350d2991ed628587e94b5b6d89c24f439e172</id>
<content type='text'>
- update the comments regarding lbaint_t usage
- cleanup casting of values related to the lbaint_t type
- cleanup of a type that requires a u64

Tested on little endian ARMv7 and ARMv8 configurations

Signed-off-by: Steve Rae &lt;srae@broadcom.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- update the comments regarding lbaint_t usage
- cleanup casting of values related to the lbaint_t type
- cleanup of a type that requires a u64

Tested on little endian ARMv7 and ARMv8 configurations

Signed-off-by: Steve Rae &lt;srae@broadcom.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add GPL-2.0+ SPDX-License-Identifier to source files</title>
<updated>2013-07-24T13:44:38+00:00</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2013-07-08T07:37:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a4596601fd395f3afb8f82f3f840c5e00bdd57a'/>
<id>1a4596601fd395f3afb8f82f3f840c5e00bdd57a</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk/part_dos: check harder for partition table</title>
<updated>2013-05-01T20:24:01+00:00</updated>
<author>
<name>Egbert Eich</name>
<email>eich@suse.com</email>
</author>
<published>2013-04-09T05:46:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9d956e0fefa39ba49250f61e3c7aa3dadafdb7fd'/>
<id>9d956e0fefa39ba49250f61e3c7aa3dadafdb7fd</id>
<content type='text'>
Devices that used to have a whole disk FAT filesystem but got then
partitioned will most likely still have a FAT or FAT32 signature
in the first sector as this sector does not get overwritten by
a partitioning tool (otherwise the tool would risk to kill the mbr).

The current partition search algorithm will erronously detects such
a device as a raw FAT device.

Instead of looking for the FAT or FAT32 signatures immediately we
use the same algorithm as used by the Linux kernel and first check
for a valid boot indicator flag on each of the 4 partitions.
If the value of this flag is invalid for the first entry we then
do the raw partition check.
If the flag for any higher partition is wrong we assume the device
is neiter a MBR nor PBR device.

Signed-off-by: Egbert Eich &lt;eich@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Devices that used to have a whole disk FAT filesystem but got then
partitioned will most likely still have a FAT or FAT32 signature
in the first sector as this sector does not get overwritten by
a partitioning tool (otherwise the tool would risk to kill the mbr).

The current partition search algorithm will erronously detects such
a device as a raw FAT device.

Instead of looking for the FAT or FAT32 signatures immediately we
use the same algorithm as used by the Linux kernel and first check
for a valid boot indicator flag on each of the 4 partitions.
If the value of this flag is invalid for the first entry we then
do the raw partition check.
If the flag for any higher partition is wrong we assume the device
is neiter a MBR nor PBR device.

Signed-off-by: Egbert Eich &lt;eich@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: define HAVE_BLOCK_DEVICE in a common place</title>
<updated>2013-03-14T18:06:44+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2013-02-28T15:03:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c1af9dcdcf4ede8d153c0918beca9067ec0eb36'/>
<id>2c1af9dcdcf4ede8d153c0918beca9067ec0eb36</id>
<content type='text'>
This set of ifdefs is used in a number of places. Move its definition
somewhere common so it doesn't have to be repeated.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Tom Rini &lt;trini@ti.com&gt;
Signed-off-by: Tom Warren &lt;twarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This set of ifdefs is used in a number of places. Move its definition
somewhere common so it doesn't have to be repeated.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Tom Rini &lt;trini@ti.com&gt;
Signed-off-by: Tom Warren &lt;twarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part_dos: print partition UUID in partition list</title>
<updated>2012-10-17T14:59:11+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-10-08T08:14:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e2e9b37898c4d9f7330ce256d95a37da5064e0cf'/>
<id>e2e9b37898c4d9f7330ce256d95a37da5064e0cf</id>
<content type='text'>
This information may be useful to compare against command "part uuid",
or if you want to manually paste the information into the kernel
command-line.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
[trini: print_one_part / print_part_dos output strings didn't quite
match before the changes]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This information may be useful to compare against command "part uuid",
or if you want to manually paste the information into the kernel
command-line.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
[trini: print_one_part / print_part_dos output strings didn't quite
match before the changes]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part_dos: checkpatch cleanups</title>
<updated>2012-10-17T14:59:11+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-10-08T08:14:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=304b57113041bdbef00ef79b963a569abbc787f9'/>
<id>304b57113041bdbef00ef79b963a569abbc787f9</id>
<content type='text'>
Minor cleanups required so later patches don't trigger checkpatch.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Minor cleanups required so later patches don't trigger checkpatch.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part_dos: don't claim whole-disk FAT filesystems</title>
<updated>2012-10-08T18:15:04+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-10-05T13:17:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d1efb6442a0a0eec1933fce500f69008e2df70fd'/>
<id>d1efb6442a0a0eec1933fce500f69008e2df70fd</id>
<content type='text'>
Logically, a disk that contains a raw FAT filesystem does not in fact
have a partition table. However, test_part_dos() was claiming that such
disks did in fact have a DOS-style partition table. This caused
get_device_and_partition() not to return a whole-disk disk_partition_t,
since part_type != PART_TYPE_UNKNOWN.

part_dos.c's print_partition_extended() detected the raw FAT filesystem
condition and printed a fake partition table that encompassed the whole
disk.

However, part_dos.c's get_partition_info_extended() did not return any
valid partitions in this case. This combination caused
get_device_and_partition() not to find any valid partitions, and hence
to return an error.

Fix test_part_dos() not to claim that raw FAT filesystems are DOS
partition tables. In turn, this causes get_device_and_partition() to
return a whole-disk disk_partition_t, and hence the following commands
work:

fatls mmc 0 /
fatls mmc 0:auto /

An alternative would be to modify print_partition_extended() to detect
raw FAT filesystems, just like print_partition_extended() does, and to
return a fake partition in this case. However, this seems logically
incorrect, and also duplicates code, since get_device_and_partition()
falls back to returning a whole-disk partition when there is no partition
table on the device.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Logically, a disk that contains a raw FAT filesystem does not in fact
have a partition table. However, test_part_dos() was claiming that such
disks did in fact have a DOS-style partition table. This caused
get_device_and_partition() not to return a whole-disk disk_partition_t,
since part_type != PART_TYPE_UNKNOWN.

part_dos.c's print_partition_extended() detected the raw FAT filesystem
condition and printed a fake partition table that encompassed the whole
disk.

However, part_dos.c's get_partition_info_extended() did not return any
valid partitions in this case. This combination caused
get_device_and_partition() not to find any valid partitions, and hence
to return an error.

Fix test_part_dos() not to claim that raw FAT filesystems are DOS
partition tables. In turn, this causes get_device_and_partition() to
return a whole-disk disk_partition_t, and hence the following commands
work:

fatls mmc 0 /
fatls mmc 0:auto /

An alternative would be to modify print_partition_extended() to detect
raw FAT filesystems, just like print_partition_extended() does, and to
return a fake partition in this case. However, this seems logically
incorrect, and also duplicates code, since get_device_and_partition()
falls back to returning a whole-disk partition when there is no partition
table on the device.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part_msdos: parse and store partition UUID</title>
<updated>2012-09-25T22:05:45+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-09-21T09:51:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d27b5f9398aba377ff2185fb4b8170eeca7c3b65'/>
<id>d27b5f9398aba377ff2185fb4b8170eeca7c3b65</id>
<content type='text'>
The MSDOS/MBR partition table includes a 32-bit unique ID, often referred
to as the NT disk signature. When combined with a partition number within
the table, this can form a unique ID similar in concept to EFI/GPT's
partition UUID.

This patch generates UUIDs in the format 0002dd75-01, which matches the
format expected by the Linux kernel.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MSDOS/MBR partition table includes a 32-bit unique ID, often referred
to as the NT disk signature. When combined with a partition number within
the table, this can form a unique ID similar in concept to EFI/GPT's
partition UUID.

This patch generates UUIDs in the format 0002dd75-01, which matches the
format expected by the Linux kernel.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk/part: check bootable flag for DOS partitions</title>
<updated>2012-09-25T21:43:19+00:00</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2012-08-23T11:31:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=40e0e5686accd2f7ae7fd81297620d0e132624d9'/>
<id>40e0e5686accd2f7ae7fd81297620d0e132624d9</id>
<content type='text'>
Determine which partitions are bootable/active. In the partition listing,
print "Boot" for partitions with the bootable/active flag set.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Determine which partitions are bootable/active. In the partition listing,
print "Boot" for partitions with the bootable/active flag set.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
