-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[console speed] Inherit console speed from install environment #1987
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also set the CONSOLE_PORT here if CONSOLE_PORT is not set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan there is a default CONSOLE_PORT definition in line 68, are you suggesting to remove it and apply the same procedure to it with CONSOLE_SPEED?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question, do you know if line 83 will always be successful? will the /proc/cmdline always match and get you the CONSOLE_SPEED? if line 83 fails to match, what should be our CONSOLE_SPEED? Can you add a fall-back, say if CONSOLE_SPEED is null, then we set to the default value 9600?
I had thought twice. We can use same approach for CONSOLE_PORT as this one won't change and each platform vendor can hard-code it. we can probably derive this in ONIE environment as well, but it needs more testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you use stty approach in the initial commit, why change to read from /proc/cmdline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guohan I have tested to install from the different version of ONIE as well as SONiC. Line 83 works well and always can get the speed and port, anyway I added fallback for both port and speed in case not able to get them from cmdline, they will be set to 9600 and ttyS0.
I switch to use cmdline just because of it much easier to get the current ttyS and speed of the installing enviroment. If use stty need to find out which ttyS it is using first.
please chek my latest commit.