Skip to content
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

NanoPi R2S support #271

Merged
merged 5 commits into from
Jan 22, 2024
Merged

NanoPi R2S support #271

merged 5 commits into from
Jan 22, 2024

Conversation

troglobit
Copy link
Contributor

This PR adds support for the NanoPi R2S, a simple and quite powerful little two-port router. Please see each respective commit for details.

nanopi-r2s-closed

Inside:

nanopi-r2s-open

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2S

Specs:

  • 1 GB DDR4 RAM
  • 1x internal GbE ethernet
  • 1x GbE ethernet (using a USB3.0 to Ethernet bridge IC)
  • 1x USB2.0 port
  • Micro SD
  • micro-USB power port
  • 10x pin-header with GPIOs, I2C, IR receiver and UART

The Nanopi R2S currently only works with an older U-Boot v2021.10.  This
commit only relocates the CN9130 patches to a sub-directory.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
All Infix builds should be signed, but for some test equipment, and
during board bringup, this may be too much of a hassle.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Support for this is based on the upstream Buildroot R2S defconfig and
the myLinux extensions and stripped-down kernel defconfig.  For more
information about the Nanopi R2S, see the FriendlyELC wiki at:

    https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2S

Please note, due to the lack of a VPD on the board, and some very poor
devicetree skills by yours truly, Infix currently refuse to boot on this
board.  An in-devicetree factory-password-hash node has to be added, and
will be done soon.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Loss of BusyBox "show others", uboot-tools, and e2fsprogs, are likely
due to resolved dependencies from other packages.  E.g., Frr requires
bash.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Since the Nanopi R2S does not have a VPD, we use this mechanism to set
the default admin password.  Without one, Infix will refuse to generate
the factory- and failure-config files, and thus refuse to start.

On custom boards in production we have VPD in ONIE format that contains
a per-device unique SHA256 hashed admin user password.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit added this to the Infix v24.01 milestone Jan 22, 2024
@troglobit troglobit requested a review from wkz January 22, 2024 06:53
Copy link
Contributor

@wkz wkz left a comment

Choose a reason for hiding this comment

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

Great work!

...and cute board -- might have to pick one up 😄

@wkz wkz merged commit 236f3ec into main Jan 22, 2024
2 checks passed
@wkz wkz deleted the nanopi-r2s-support branch January 22, 2024 10:20
@troglobit
Copy link
Contributor Author

Great work!

Thank you! <3

...and cute board -- might have to pick one up 😄

It's also ridiculously cheap as well right now, 587 SEK incl. shipping! Probably end-of-mfg-cycle for this variant:

https://www.aliexpress.com/item/1005005596698380.html (watch out for the variant selection!!)

There are other variants as well, but not as well supported with device trees and drivers yet.

@minexn
Copy link

minexn commented Jan 23, 2024

Initial testing is working great - thank you for all your hard work.

Should we add pinout and board rate (1500000) on the Debug UART?

I noticed the LEDs on ETH1 are not working, but the network functions are normal.

@troglobit
Copy link
Contributor Author

Initial testing is working great - thank you for all your hard work.

Great to hear! 😃

Should we add pinout and board rate (1500000) on the Debug UART?

Not following, but I was thinking of adding that to board/aarch64/r2s/README.md. Along with how to flash, the fact that the reset button doesn't work (yet) and LED info.

I noticed the LEDs on ETH1 are not working, but the network functions are normal.

Can confirm, seeing that here too. Weird, could've sworn that was working at one point ... maybe related device tree, I started with Linux 5.16, went up to 6.7.1 before landing on the same kernel as base Infix use. I'll add issues here on GitHub for it so we don't forget.

@troglobit
Copy link
Contributor Author

I noticed the LEDs on ETH1 are not working, but the network functions are normal.

@minexn fix incoming, see #274 (comment)

@troglobit troglobit mentioned this pull request Aug 11, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants