Skip to contentSkip to conversation

ARM: OMAP5+: configs: Fix default boot command

PATCH In review Lokesh Vutla 3 participants 8 messages Aug 13, 2015 – Aug 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +1 -0
index fe04692..1c1f8c0 100644
@@ -79,6 +79,7 @@
 	"vram=16M\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"optargs=\0" \
+	"dofastboot=0\0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
 	"mmcrootfstype=ext4 rootwait\0" \
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

Quoted 19 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +0 -0
index fe04692..1c1f8c0 100644

include/configs/ti_omap5_common.h line 85

Quoted 7 lines
include/configs/ti_omap5_common.h +1 -0
@@ -79,6 +79,7 @@
 	"vram=16M\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"optargs=\0" \
+	"dofastboot=0\0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
 	"mmcrootfstype=ext4 rootwait\0" \

arch/arm/cpu/armv7/omap-common/boot-common.c sets it to one. so what is the point of this? dra7_evm defines CONFIG_USB_FUNCTION_FASTBOOT -> so it is setting up dofastboot blindly.

Is'nt fixing the source of the issue a better thing to do than depending on env default -a hoping to save us (which btw will only help opentest farm).

Looks like the code blindly assumes fastboot mode - which is weird!

Signature · 2 lines
Regards,
Nishanth Menon
#2 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

Quoted 31 lines · Nishanth Menon
Quoted 19 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +0 -0
index fe04692..1c1f8c0 100644

include/configs/ti_omap5_common.h line 85

Quoted 7 lines
include/configs/ti_omap5_common.h +1 -0
@@ -79,6 +79,7 @@
 	"vram=16M\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"optargs=\0" \
+	"dofastboot=0\0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
 	"mmcrootfstype=ext4 rootwait\0" \

arch/arm/cpu/armv7/omap-common/boot-common.c sets it to one. so what is the point of this? dra7_evm defines CONFIG_USB_FUNCTION_FASTBOOT -> so it is setting up dofastboot blindly.

Quoted 5 lines

Is'nt fixing the source of the issue a better thing to do than depending on env default -a hoping to save us (which btw will only help opentest farm).

Looks like the code blindly assumes fastboot mode - which is weird!

As I read things the problem is the env code which checks for dofastboot but due to HUSH annoyances evalues to true rather than false when we don't have dofastboot set.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150813/f8dd5ca7/attachment.sig>
#3 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

Quoted 36 lines · Tom Rini
Quoted 35 lines · Nishanth Menon
Quoted 19 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +0 -0
index fe04692..1c1f8c0 100644

include/configs/ti_omap5_common.h line 85

Quoted 7 lines
include/configs/ti_omap5_common.h +1 -0
@@ -79,6 +79,7 @@
    "vram=16M\0" \
    "partitions=" PARTS_DEFAULT "\0" \
    "optargs=\0" \
+   "dofastboot=0\0" \
    "mmcdev=0\0" \
    "mmcroot=/dev/mmcblk0p2 rw\0" \
    "mmcrootfstype=ext4 rootwait\0" \

arch/arm/cpu/armv7/omap-common/boot-common.c sets it to one. so what is the point of this? dra7_evm defines CONFIG_USB_FUNCTION_FASTBOOT -> so it is setting up dofastboot blindly.

Is'nt fixing the source of the issue a better thing to do than depending on env default -a hoping to save us (which btw will only help opentest farm).

Quoted 5 lines
Quoted 1 line

Looks like the code blindly assumes fastboot mode - which is weird!

As I read things the problem is the env code which checks for dofastboot but due to HUSH annoyances evalues to true rather than false when we don't have dofastboot set.

Then, this belongs to armv7_common? fastboot is not custom to just dra7/omap5, right? omap3_beagle has the same problem etc.. even better might have been a hush fix... but then.. anyways..

Signature · 3 lines
---
Regards,
Nishanth Menon
#4 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

Quoted 39 lines · Nishanth Menon
Quoted 38 lines · Tom Rini
Quoted 36 lines · Nishanth Menon
Quoted 19 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +0 -0
index fe04692..1c1f8c0 100644

include/configs/ti_omap5_common.h line 85

Quoted 7 lines
include/configs/ti_omap5_common.h +1 -0
@@ -79,6 +79,7 @@
    "vram=16M\0" \
    "partitions=" PARTS_DEFAULT "\0" \
    "optargs=\0" \
+   "dofastboot=0\0" \
    "mmcdev=0\0" \
    "mmcroot=/dev/mmcblk0p2 rw\0" \
    "mmcrootfstype=ext4 rootwait\0" \

arch/arm/cpu/armv7/omap-common/boot-common.c sets it to one. so what is the point of this? dra7_evm defines CONFIG_USB_FUNCTION_FASTBOOT -> so it is setting up dofastboot blindly.

Is'nt fixing the source of the issue a better thing to do than depending on env default -a hoping to save us (which btw will only help opentest farm).

Looks like the code blindly assumes fastboot mode - which is weird!

Quoted 7 lines
Quoted 3 lines

As I read things the problem is the env code which checks for dofastboot but due to HUSH annoyances evalues to true rather than false when we don't have dofastboot set.

Then, this belongs to armv7_common? fastboot is not custom to just dra7/omap5, right? omap3_beagle has the same problem etc.. even better might have been a hush fix... but then.. anyways..

I'm sorry, I think you're misreading the code a bit. "dofastboot" is only fiddled around with in ti_omap5_common.h _and_ arch/arm/cpu/armv7/omap-common/boot-common.c::fb_set_reboot_flag() which in turn is only called in fastboot gadget code. This isn't a generic fastboot feature, this is a special case opt-in thing.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150813/42c7742b/attachment.sig>
#5 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

Quoted 48 lines · Tom Rini
Quoted 39 lines · Nishanth Menon
Quoted 38 lines · Tom Rini
Quoted 36 lines · Nishanth Menon
Quoted 19 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +0 -0
index fe04692..1c1f8c0 100644

include/configs/ti_omap5_common.h line 85

Quoted 7 lines
include/configs/ti_omap5_common.h +1 -0
@@ -79,6 +79,7 @@
    "vram=16M\0" \
    "partitions=" PARTS_DEFAULT "\0" \
    "optargs=\0" \
+   "dofastboot=0\0" \
    "mmcdev=0\0" \
    "mmcroot=/dev/mmcblk0p2 rw\0" \
    "mmcrootfstype=ext4 rootwait\0" \

arch/arm/cpu/armv7/omap-common/boot-common.c sets it to one. so what is the point of this? dra7_evm defines CONFIG_USB_FUNCTION_FASTBOOT -> so it is setting up dofastboot blindly.

Is'nt fixing the source of the issue a better thing to do than depending on env default -a hoping to save us (which btw will only help opentest farm).

Looks like the code blindly assumes fastboot mode - which is weird!

Quoted 7 lines
Quoted 3 lines

As I read things the problem is the env code which checks for dofastboot but due to HUSH annoyances evalues to true rather than false when we don't have dofastboot set.

Then, this belongs to armv7_common? fastboot is not custom to just dra7/omap5, right? omap3_beagle has the same problem etc.. even better might have been a hush fix... but then.. anyways..

Quoted 5 lines

I'm sorry, I think you're misreading the code a bit. "dofastboot" is only fiddled around with in ti_omap5_common.h _and_ arch/arm/cpu/armv7/omap-common/boot-common.c::fb_set_reboot_flag() which in turn is only called in fastboot gadget code. This isn't a generic fastboot feature, this is a special case opt-in thing.

Aaah. ok. thanks for clarifying.

Signature · 3 lines
---
Regards,
Nishanth Menon
#6 lore raw

PATCH 1/1 ARM: OMAP5+: configs: Fix default boot command

In reply to Lokesh Vutla
Quoted 9 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150813/ee6f5923/attachment.sig>
#7 lore raw
In reply to Lokesh Vutla
Quoted 10 lines · Lokesh Vutla

The default boot command searches for dofastboot varaiable and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always returns true if dofastboot is not defined and breaking mmc boot. So make dofastboot as 0 by default and let the runtime environment set it if fastboot is required.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150814/3fa97007/attachment.sig>