Skip to content

Improved documentation when using serial#182

Merged
samueldr merged 8 commits intoTow-Boot:releasedfrom
psstoyanov:serial_doc
Jul 2, 2023
Merged

Improved documentation when using serial#182
samueldr merged 8 commits intoTow-Boot:releasedfrom
psstoyanov:serial_doc

Conversation

@psstoyanov
Copy link
Contributor

As discussed in the comments of #180 - #180 (comment) , submitting a PR with additions to the getting-started.md page.

The goal is improve the experience of the end users.

aarch64 SBCs can often rely on serial for their installation, monitoring or debugging.

In the case of RK3399 devices, the currently bundled uboot version with TowBoot has USB devices disabled making it impossible to interact with the installer without serial - RockPro64 is such example.

@psstoyanov
Copy link
Contributor Author

Feedback from @MartijnBraam :

  • Add instructions on how to exit the serial console session

Initial draft:

$ picocom /dev/ttyUSB0 -b 115200
...
Press Ctrl+a and Ctrl+x to exit

Suggested formatting improvement:

  • Use shell-session block

Just trying to check if does like it the comment - will try to experiment with gh pages on the weekend:

$ picocom /dev/ttyUSB0 -b 115200
...
Press Ctrl+a and Ctrl+x to exit

@psstoyanov
Copy link
Contributor Author

Added some styling adjustment.
Using shell-session flag does work at least when locally building the gh-page.

See experimentation with a few combinations to check if shell-session is functioning as expected in the code block:
Screenshot_20220827_160540

@psstoyanov
Copy link
Contributor Author

psstoyanov commented Aug 27, 2022

Later changes with some explanations as of what to do if the baud is different between the OS and TowBoot can be done with another PR.

I believe this is good enough for the moment, @samueldr

@samueldr samueldr added the 4. type: documentation Improvements or additions to documentation label Nov 1, 2022
@samueldr samueldr added this to the 2022.07-006 milestone Nov 3, 2022
@samueldr
Copy link
Contributor

samueldr commented Nov 8, 2022

Hi! 👋

Sorry it took a while to finally review.


About shell-session, with which markdown rendering engine were you testing? How did you end-up deciding to use shell-session?

The Tow-Boot website uses no formatting by default, and AFAICT I'm not sure if it is working for GitHub or not.

I have seen this file linked as supposedly the list of languages known, and I've highlighted a section which seems probably relevant:

Though maybe it's a case where ShellSession is translated to shell-session.

@psstoyanov
Copy link
Contributor Author

Hi, @samueldr , the suggestion for shell-session came from @MartijnBraam and I think it is a great one.

From what I can see, it doesn't render here in GitHub's comments and I'm not sure if it does when used in GitHub Readme's (I believe it doesn't).
Thanks for the link to github's linguist page!

However, it does render on the deployed TowBoot Github Page as can be seen by the screenshot of a locally deployed version as per the docs here:
#182 (comment)
In the screenshot, you can observe the example of both type of blocks - one using shell-session and two without.

I've used Firefox on my system when viewing the local version at the time - I don't expect it would matter if the end user is on Chromium based browsers.

I haven't looked specifically at the website resources/ Jekyll setup to reference which rendering engine is used or if there is flag allowing shell-session to be rendered - I can just see that it does on the deployed webpage.

Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
@psstoyanov
Copy link
Contributor Author

psstoyanov commented Nov 9, 2022

So, the renderer allowing shell-session should be defined somewhere in this gem or it's dependencies:
https://github.com/github/pages-gem

Digging a bit further, I've reached a place where I'm struggling to find the options for the highlighter:
https://kramdown.gettalong.org/rdoc/Kramdown/Converter/Base.html#method-i-highlight_code

Or would it be this one? https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L6272

@samueldr
Copy link
Contributor

samueldr commented Nov 9, 2022

However, it does render on the deployed TowBoot Github Page as can be seen by the screenshot of a locally deployed version as per the docs here:

The website isn't built using jekyll :)

In turn it renders using cmark-gfm

This will pass through the language tag to the block. That part works as expected. The thing that hung me up was how we don't have language formatting for code blocks being done. AFAIUI it would be expected to be done with a script at runtime, and the Tow-Boot website doesn't.


But don't worry. I mainly wanted to understand the reasoning for choosing shell-session, and how it was tested. It won't cause problem for either the GitHub view or the website rendering, so it's okay.

I will rebase/squash the commits as needed, and will add a prefix to the commit titles (doc:). Don't worry about that, it's on me for not providing a contributing guide explaining my preferred commit naming style :).

@psstoyanov psstoyanov mentioned this pull request Nov 18, 2022
Copy link
Contributor

@vincele vincele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the remarks, LGTM

psstoyanov and others added 2 commits December 13, 2022 23:13
Co-authored-by: Vincent Legoll <vincent.legoll@gmail.com>
@samueldr samueldr merged commit 29d4089 into Tow-Boot:released Jul 2, 2023
@samueldr
Copy link
Contributor

samueldr commented Jul 2, 2023

Hi, sorry it took a while until I got around to handling this PR.

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. type: documentation Improvements or additions to documentation

Development

Successfully merging this pull request may close these issues.

3 participants