<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/fastboot, branch v2019.07</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>fastboot: Check if partition really exist in getvar_has_slot()</title>
<updated>2019-06-14T10:39:54+00:00</updated>
<author>
<name>Igor Opaniuk</name>
<email>igor.opaniuk@toradex.com</email>
</author>
<published>2019-06-13T18:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=220f655176de8e6aa4aaea91bb2182260d26c4a4'/>
<id>220f655176de8e6aa4aaea91bb2182260d26c4a4</id>
<content type='text'>
Currently getvar_has_slot() invocation for "boot" and "system"
partitions always returns affirmative response regardless the fact of
existence of these partitions, which leads to impossibility to flash them
on old non-A/B AOSP setups, where _a/_b suffixes aren't used:

$ fastboot flash boot boot.img
Sending 'boot__a' (11301 KB)    OKAY [  0.451s]
Writing 'boot__a'               FAILED (remote: 'cannot find partition')
fastboot: error: Command failed

Although partition layout is:
-&gt; part list mmc 0
Partition Map for MMC device 0  --   Partition Type: EFI

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000800	0x000107ff	"boot"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	guid:	ea2e2470-db4a-d646-b828-10167f736d63
  2	0x00010800	0x000127ff	"environment"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	guid:	10a819d2-6004-3d48-bd87-114e2a796db9
  3	0x00012800	0x0001a7ff	"recovery"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	guid:	9ea116e4-8a34-0c48-8cf5-2fe9480f56cd
  4	0x0001a800	0x0031a7ff	"system"
	attrs:	0x0000000000000000
......

This patch adds checks of existence for requested partitions
on eMMC/NAND.

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently getvar_has_slot() invocation for "boot" and "system"
partitions always returns affirmative response regardless the fact of
existence of these partitions, which leads to impossibility to flash them
on old non-A/B AOSP setups, where _a/_b suffixes aren't used:

$ fastboot flash boot boot.img
Sending 'boot__a' (11301 KB)    OKAY [  0.451s]
Writing 'boot__a'               FAILED (remote: 'cannot find partition')
fastboot: error: Command failed

Although partition layout is:
-&gt; part list mmc 0
Partition Map for MMC device 0  --   Partition Type: EFI

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000800	0x000107ff	"boot"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	guid:	ea2e2470-db4a-d646-b828-10167f736d63
  2	0x00010800	0x000127ff	"environment"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	guid:	10a819d2-6004-3d48-bd87-114e2a796db9
  3	0x00012800	0x0001a7ff	"recovery"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	guid:	9ea116e4-8a34-0c48-8cf5-2fe9480f56cd
  4	0x0001a800	0x0031a7ff	"system"
	attrs:	0x0000000000000000
......

This patch adds checks of existence for requested partitions
on eMMC/NAND.

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: getvar: Refactor fastboot_*_get_part_info() usage</title>
<updated>2019-06-14T10:39:54+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2019-06-13T18:11:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f23a87d5811e38ec88627e0cbace665c22fb7025'/>
<id>f23a87d5811e38ec88627e0cbace665c22fb7025</id>
<content type='text'>
Extract fastboot_*_get_part_info() usage for MMC and NAND into
getvar_get_part_info() function, as it will be needed further in other
functions. This way we can avoid code duplication and mess with
preprocessor directives across all points of usage.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extract fastboot_*_get_part_info() usage for MMC and NAND into
getvar_get_part_info() function, as it will be needed further in other
functions. This way we can avoid code duplication and mess with
preprocessor directives across all points of usage.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: Use const qualifier for char *part_name</title>
<updated>2019-06-14T10:39:54+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2019-06-13T18:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cacb03e490bdf46897f57582c2b31a4783e79aa0'/>
<id>cacb03e490bdf46897f57582c2b31a4783e79aa0</id>
<content type='text'>
In fastboot_*_get_part_info() functions we can use stronger typing by
expecting const strings.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In fastboot_*_get_part_info() functions we can use stronger typing by
expecting const strings.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: Fix slot names reported by getvar</title>
<updated>2019-06-14T10:39:54+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2019-06-12T21:49:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=97a0c6ff577d57f162abc696c4efc962981229b1'/>
<id>97a0c6ff577d57f162abc696c4efc962981229b1</id>
<content type='text'>
In commit [1] fastboot tool was changed w.r.t. new A/B specification [2],
and now we should report slot names in "a" format instead of "_a".
Latter is now considered legacy and we shouldn't rely on that anymore.

Due to this one can observe next error with recent fastboot tool:

    $ fastboot flash boot boot.img
    Sending 'boot__a' (11301 KB)
        OKAY [  0.451s]
    Writing 'boot__a'
        FAILED (remote: 'cannot find partition')
    fastboot: error: Command failed

Let's use new slot format in order to fix double underscores "__" and to
be in sync with AOSP master.

[1] https://android.googlesource.com/platform/system/core/+/8091947847d5e5130b09d2ac0a4bdc900f3b77c5
[2] https://source.android.com/devices/tech/ota/ab/ab_implement#partitions

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit [1] fastboot tool was changed w.r.t. new A/B specification [2],
and now we should report slot names in "a" format instead of "_a".
Latter is now considered legacy and we shouldn't rely on that anymore.

Due to this one can observe next error with recent fastboot tool:

    $ fastboot flash boot boot.img
    Sending 'boot__a' (11301 KB)
        OKAY [  0.451s]
    Writing 'boot__a'
        FAILED (remote: 'cannot find partition')
    fastboot: error: Command failed

Let's use new slot format in order to fix double underscores "__" and to
be in sync with AOSP master.

[1] https://android.googlesource.com/platform/system/core/+/8091947847d5e5130b09d2ac0a4bdc900f3b77c5
[2] https://source.android.com/devices/tech/ota/ab/ab_implement#partitions

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: add support for 'getvar platform'</title>
<updated>2019-04-21T08:26:52+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>erosca@de.adit-jv.com</email>
</author>
<published>2019-04-09T19:11:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d73d9fb7e2384b55a6c1866a5d914a621cf8563a'/>
<id>d73d9fb7e2384b55a6c1866a5d914a621cf8563a</id>
<content type='text'>
Our R-Car3 Android userspace relies on the output of 'fastboot
getvar platform' and U-Boot currently is not able to handle it:

host $&gt; fastboot getvar platform
getvar:platform FAILED (remote: Variable not implemented)
finished. total time: 0.001s

We either have the option of adding 'fastboot.platform' variable
to the default/saved environment as a workaround or add proper
'fastboot getvar platform' support in U-Boot via this patch.
In the latter case, other platforms can benefit from it too.

Note that R-Car3 already exports 'platform' environment variable via
v2019.01 commit 00e4b57e9e71c3 ("ARM: rmobile: Set environment variable
containing CPU type").

Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our R-Car3 Android userspace relies on the output of 'fastboot
getvar platform' and U-Boot currently is not able to handle it:

host $&gt; fastboot getvar platform
getvar:platform FAILED (remote: Variable not implemented)
finished. total time: 0.001s

We either have the option of adding 'fastboot.platform' variable
to the default/saved environment as a workaround or add proper
'fastboot getvar platform' support in U-Boot via this patch.
In the latter case, other platforms can benefit from it too.

Note that R-Car3 already exports 'platform' environment variable via
v2019.01 commit 00e4b57e9e71c3 ("ARM: rmobile: Set environment variable
containing CPU type").

Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: Replace literal 32 with PART_NAME_LEN</title>
<updated>2019-04-21T08:26:52+00:00</updated>
<author>
<name>Alex Kiernan</name>
<email>alex.kiernan@gmail.com</email>
</author>
<published>2019-04-09T05:30:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b762aa126e648fa9bc62fc8997b01a4a73089367'/>
<id>b762aa126e648fa9bc62fc8997b01a4a73089367</id>
<content type='text'>
Where we have to compute partition names, rather than using a hardcoded
32 for the partition name length, replace with PART_NAME_LEN.

Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Reviewed-by: Eugeniu Rosca &lt;rosca.eugeniu@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Where we have to compute partition names, rather than using a hardcoded
32 for the partition name length, replace with PART_NAME_LEN.

Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Reviewed-by: Eugeniu Rosca &lt;rosca.eugeniu@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: Improve error reporting on 'getvar partition-{size, type}'</title>
<updated>2019-04-21T08:26:51+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>erosca@de.adit-jv.com</email>
</author>
<published>2019-03-28T13:31:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a40297d74105b3949dc72375e0fdc54fe0b170ad'/>
<id>a40297d74105b3949dc72375e0fdc54fe0b170ad</id>
<content type='text'>
Currently U-Boot reports the same error message in all below cases:
[A] host&gt; fastboot getvar partition-type
[B] host&gt; fastboot getvar partition-size
[C] host&gt; fastboot getvar partition-type:
[D] host&gt; fastboot getvar partition-size:
[E] host&gt; fastboot getvar partition-type:&lt;invalid-part&gt;
[F] host&gt; fastboot getvar partition-size:&lt;invalid-part&gt;

The message looks like:
host&gt; fastboot getvar partition-size:
getvar:partition-size: FAILED (remote: partition not found)
Finished. Total time: 0.003s

Be more user friendly and output:
 - "partition not given" for [A-D]
 - "partition not found" for [E-F]

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Acked-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently U-Boot reports the same error message in all below cases:
[A] host&gt; fastboot getvar partition-type
[B] host&gt; fastboot getvar partition-size
[C] host&gt; fastboot getvar partition-type:
[D] host&gt; fastboot getvar partition-size:
[E] host&gt; fastboot getvar partition-type:&lt;invalid-part&gt;
[F] host&gt; fastboot getvar partition-size:&lt;invalid-part&gt;

The message looks like:
host&gt; fastboot getvar partition-size:
getvar:partition-size: FAILED (remote: partition not found)
Finished. Total time: 0.003s

Be more user friendly and output:
 - "partition not given" for [A-D]
 - "partition not found" for [E-F]

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Acked-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: getvar: correct/rename "has_slot" to "has-slot"</title>
<updated>2019-04-21T08:26:51+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>erosca@de.adit-jv.com</email>
</author>
<published>2019-03-26T16:46:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4c829466fcc8c0b5303af6bda21366657b959a30'/>
<id>4c829466fcc8c0b5303af6bda21366657b959a30</id>
<content type='text'>
Since its inception in upstream fastboot android-n-preview-1 [1],
"has-slot" option has never taken the form of "has_slot". Amongst the
users of "getvar has-slot:" is the upstream bootloadertest.py [2].

Current U-Boot "has_slot" version must be a typo. Fix it.

[1] https://android.googlesource.com/platform/system/core/+/a797479bd51c
    ("Fix fastboot variable name")
[2] https://android.googlesource.com/platform/system/extras/+/72de393e118e3
    ("Bootloader verification for AndroidThings.")

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Acked-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since its inception in upstream fastboot android-n-preview-1 [1],
"has-slot" option has never taken the form of "has_slot". Amongst the
users of "getvar has-slot:" is the upstream bootloadertest.py [2].

Current U-Boot "has_slot" version must be a typo. Fix it.

[1] https://android.googlesource.com/platform/system/core/+/a797479bd51c
    ("Fix fastboot variable name")
[2] https://android.googlesource.com/platform/system/extras/+/72de393e118e3
    ("Bootloader verification for AndroidThings.")

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Acked-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fastboot: common: fix default fastboot_boot on 64-bit</title>
<updated>2019-03-16T12:29:43+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>narmstrong@baylibre.com</email>
</author>
<published>2019-02-20T10:36:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f402d268e8e17e9d6d1d9bf8a8b1f6e0b07718ef'/>
<id>f402d268e8e17e9d6d1d9bf8a8b1f6e0b07718ef</id>
<content type='text'>
When booting on a 64-bit system, the boot_addr_start buffer is not
large enough to contain a 64-bit number, thus leading to a crash
even if fastboot_buf_addr is valid, only the high part of the address
will be printed to boot_addr_start :

fastboot with fastboot_buf_addr = 0x0000000006000000:
  downloading of 92239872 bytes finished
  Booting kernel at 0x00000000...

  "Synchronous Abort" handler, esr 0x96000004
  elr: 00000000010561f4 lr : 0000000001056fac (reloc)
  &lt;snip&gt;
  x28: 000000007df2d38f x29: 000000007df2d1b0

  Resetting CPU ...

With this fix, boot_addr_start can have the full 64-bit address passed
to bootm.

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Cc: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When booting on a 64-bit system, the boot_addr_start buffer is not
large enough to contain a 64-bit number, thus leading to a crash
even if fastboot_buf_addr is valid, only the high part of the address
will be printed to boot_addr_start :

fastboot with fastboot_buf_addr = 0x0000000006000000:
  downloading of 92239872 bytes finished
  Booting kernel at 0x00000000...

  "Synchronous Abort" handler, esr 0x96000004
  elr: 00000000010561f4 lr : 0000000001056fac (reloc)
  &lt;snip&gt;
  x28: 000000007df2d38f x29: 000000007df2d1b0

  Resetting CPU ...

With this fix, boot_addr_start can have the full 64-bit address passed
to bootm.

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Cc: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: cosmetic: Convert SPDX license tags to Linux Kernel style</title>
<updated>2018-10-28T13:26:39+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2018-10-26T07:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=22929e1266e9a61048bfaef381ad4fb2e2fc3ef5'/>
<id>22929e1266e9a61048bfaef381ad4fb2e2fc3ef5</id>
<content type='text'>
Complete in the drivers directory the work started with
commit 83d290c56fab ("SPDX: Convert all of our single
license tags to Linux Kernel style").

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Complete in the drivers directory the work started with
commit 83d290c56fab ("SPDX: Convert all of our single
license tags to Linux Kernel style").

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
