first_stage_init: increase serial console tries to 50

tl,dr;
Increase the attempts to 50 to reduce the chances of failing
to load the serial console. This will only happen if the cmdline
parameter "androidboot.first_stage_console=1" is enabled.

Details:
10 attempts only amounts to about 1 second of trying to open the serial
console. I tested booting an ACK GKI image 5x with 20 vendor modules and
found the serial console loaded on attempt 17 for all five boot
tests.

Bug: 153354917
Test: boot ACK image 5x and verify serial console comes up
Change-Id: I161a4176b2c6cf7b0bc1eefe072ff38b894add5d
This commit is contained in:
Will McVicker 2020-04-06 10:29:36 -07:00 committed by Will Mcvicker
parent a05e2b1a92
commit 283128f26a

View file

@ -107,7 +107,7 @@ void StartConsole() {
return;
}
int fd = -1;
int tries = 10;
int tries = 50; // should timeout after 5s
// The device driver for console may not be ready yet so retry for a while in case of failure.
while (tries--) {
fd = open("/dev/console", O_RDWR);