[PATCH v1 0/1] Adjust Tegra boot order

This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Svyatoslav Ryhel (1): include: configs: tegra-common-post: make usb first boot target
include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com --- include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index fc74980f7c..2f08dfed02 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -7,7 +7,7 @@ #ifndef __TEGRA_COMMON_POST_H #define __TEGRA_COMMON_POST_H
-#define BOOT_TARGETS "mmc1 mmc0 usb pxe dhcp" +#define BOOT_TARGETS "usb mmc1 mmc0 pxe dhcp"
#ifdef CONFIG_TEGRA_KEYBOARD #define STDIN_KBD_KBC ",tegra-kbc"

On Tue Jun 18, 2024 at 2:00 PM CEST, Svyatoslav Ryhel wrote:
This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com
include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
What's the implication of this if no USB mass storage device is found? How does this behave when USB cannot be read or booting from it doesn't work?
I vaguely recall that boot order doesn't always proceed, though admittedly I haven't tested all of these edge-cases in a long time.
Thierry

18 червня 2024 р. 15:23:09 GMT+03:00, Thierry Reding treding@nvidia.com написав(-ла):
On Tue Jun 18, 2024 at 2:00 PM CEST, Svyatoslav Ryhel wrote:
This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com
include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
What's the implication of this if no USB mass storage device is found? How does this behave when USB cannot be read or booting from it doesn't work?
I vaguely recall that boot order doesn't always proceed, though admittedly I haven't tested all of these edge-cases in a long time.
Thierry
If no USB mass storage is found bootflow will continue with the next device in the list (mmc1) with co-responding info that booting from usb failed. I have tested this on lg p895 which has only mmc0 and with asus transformers which have usb, mmc0 and mmc1 in all possible configurations. I did not have booting issues whatsoever. ATM, transformers use boot order which I have proposed in this commit.
Best regards, Svyatoslav R.

вт, 18 черв. 2024 р. о 17:16 Svyatoslav clamor95@gmail.com пише:
18 червня 2024 р. 15:23:09 GMT+03:00, Thierry Reding treding@nvidia.com написав(-ла):
On Tue Jun 18, 2024 at 2:00 PM CEST, Svyatoslav Ryhel wrote:
This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com
include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
What's the implication of this if no USB mass storage device is found? How does this behave when USB cannot be read or booting from it doesn't work?
I vaguely recall that boot order doesn't always proceed, though admittedly I haven't tested all of these edge-cases in a long time.
Thierry
If no USB mass storage is found bootflow will continue with the next device in the list (mmc1) with co-responding info that booting from usb failed. I have tested this on lg p895 which has only mmc0 and with asus transformers which have usb, mmc0 and mmc1 in all possible configurations. I did not have booting issues whatsoever. ATM, transformers use boot order which I have proposed in this commit.
Best regards, Svyatoslav R.
Thierry,
Since you have not responded to my statement above I assume that you are fine with applying this change. In case you have any objections please answer as soon as you can since I am planning to include it into merge request for the next merge window.
Best regards, Svyatoslav R.

On Thu Jun 27, 2024 at 12:27 PM CEST, Svyatoslav Ryhel wrote:
вт, 18 черв. 2024 р. о 17:16 Svyatoslav clamor95@gmail.com пише:
18 червня 2024 р. 15:23:09 GMT+03:00, Thierry Reding treding@nvidia.com написав(-ла):
On Tue Jun 18, 2024 at 2:00 PM CEST, Svyatoslav Ryhel wrote:
This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com
include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
What's the implication of this if no USB mass storage device is found? How does this behave when USB cannot be read or booting from it doesn't work?
I vaguely recall that boot order doesn't always proceed, though admittedly I haven't tested all of these edge-cases in a long time.
Thierry
If no USB mass storage is found bootflow will continue with the next device in the list (mmc1) with co-responding info that booting from usb failed. I have tested this on lg p895 which has only mmc0 and with asus transformers which have usb, mmc0 and mmc1 in all possible configurations. I did not have booting issues whatsoever. ATM, transformers use boot order which I have proposed in this commit.
Best regards, Svyatoslav R.
Thierry,
Since you have not responded to my statement above I assume that you are fine with applying this change. In case you have any objections please answer as soon as you can since I am planning to include it into merge request for the next merge window.
Sorry, I had meant to reply to this. I have no objections if this was properly tested and there's a reasonable fallback that works.
Thierry

чт, 27 черв. 2024 р. о 14:36 Thierry Reding treding@nvidia.com пише:
On Thu Jun 27, 2024 at 12:27 PM CEST, Svyatoslav Ryhel wrote:
вт, 18 черв. 2024 р. о 17:16 Svyatoslav clamor95@gmail.com пише:
18 червня 2024 р. 15:23:09 GMT+03:00, Thierry Reding treding@nvidia.com написав(-ла):
On Tue Jun 18, 2024 at 2:00 PM CEST, Svyatoslav Ryhel wrote:
This ensures that the device can boot from a USB device prior to MMC. Useful cases are when installing a new OS from USB while MMC still has a working OS configuration or if the OS configuration is broken in late boot stages (kernel boots but the system does not start).
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com
include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
What's the implication of this if no USB mass storage device is found? How does this behave when USB cannot be read or booting from it doesn't work?
I vaguely recall that boot order doesn't always proceed, though admittedly I haven't tested all of these edge-cases in a long time.
Thierry
If no USB mass storage is found bootflow will continue with the next device in the list (mmc1) with co-responding info that booting from usb failed. I have tested this on lg p895 which has only mmc0 and with asus transformers which have usb, mmc0 and mmc1 in all possible configurations. I did not have booting issues whatsoever. ATM, transformers use boot order which I have proposed in this commit.
Best regards, Svyatoslav R.
Thierry,
Since you have not responded to my statement above I assume that you are fine with applying this change. In case you have any objections please answer as soon as you can since I am planning to include it into merge request for the next merge window.
Sorry, I had meant to reply to this. I have no objections if this was properly tested and there's a reasonable fallback that works.
Np. Thanks for feedback!
Thierry
participants (3)
-
Svyatoslav
-
Svyatoslav Ryhel
-
Thierry Reding