Making RockPro64 a NetBSD Server


Making RockPro64 a NetBSD Server

March 09, 2022 posted by matthew green

The time has nearly about upgrade my SunBlade 2500s to something extra energy devoted and sooner. I’d already removed one CPU and thus half of the ram from two of these systems to lower their energy consumption, but it’s mild famous higher than it’s miles going to also be.

After famous hunting, I’ve made up our minds on Pine64’s RockPro64 4GiB ram mannequin (technically, handiest 3.875GiB ram.) Pine64 originate SBCs, laptops, telephones, and diversified other largely ARM gadgets, and the RockPro64 has the quickest CPU they ship (Rockchip RK3399), and might well per chance consume a small “NAS Case”, that is ample to accommodate 2 HDDs and, at a stretch, upto 6 SSDs (cooling would become rather an topic at this level.)

In my SATA setup, I in actuality include 3 SSDs with a JMicron 585 card in the PCIe slot, two SSDs in the NAS case SSD predicament, and the third is in the HDD predicament with an adapter. I in actuality include historical two SATA energy splitters to transform the NAS case’s 2 SATA energy ports into 4, with the 4th one additionally powering a Noctua case fan. The cabling is never any longer devoted with this, with ample SATA energy cabling for 6 gadgets to attain. Potentially a bespoke energy cable to glue to the RockPro64 would originate this nicer and with out doubt give a enhance to cooling a exiguous bit, but I’m upright the consume of off-the-shelf substances for now.

Within the final year or so I’ve been working on making NetBSD/arm64 huge-endian extra featureful. In particular, I’ve added make stronger for:

  • other-endian obtain admission to disklabels, FFS file-systems in the NetBSD libsa
  • the “look 64 sectors later” for RAIDFrame partitions in MI efiboot (the x86 particular efiboot has extra intensive make stronger for this that should be ported over)
  • other-endian obtain admission to to RAIDFrame labels in the kernel
  • updated the U-Boot equipment and featureset to encompass AHCI/SATA make stronger, workaround some bugs and repair the newer U-Boot SPI loader issue, and located out obtain out how to default loading from either SATA or NVMe

There are no longer too many special actions wanted for this kind of setup in comparison with a typical NetBSD or Arm device. Whereas I constructed my installations by hand, the same old NetBSD Arm photography are just appropriate-trying for this activity. It is absolute best to open from an SD card with the RockPro64 u-boot installed. There are two U-Boot photography available, one for SD/eMMC, and one for SPI (there might be an irregular snort with the early SPI loader that requires a half of the image to be varied.) The pkgsrc equipment for sysutils/u-boot-rockpro64 model 2022.01 has these urged ideas for putting in the U-Boot image (this equipment should be buildable on any supported pkgsrc platform).

To set up U-Boot into the SD/eMMC card (can tear on any device, the image should be written at 32KiB into the instrument):

# dd if=/usr/pkg/portion/u-boot/rockpro64/rksd_loader.img survey=64 of=/dev/rld0c

To set up U-Boot into the SPI flash (should be tear on the host, and lives at the very open of the instrument:

# dd if=/usr/pkg/portion/u-boot/rockpro64/rkspi_loader.img bs=64okay of=/dev/spiflash0

When booting from NVMe or SATA, one must plunge to the U-Boot advised and alter the “boot_targets” worth to attain scsi(SATA) or nvmebefore the mmcand usbalternate choices.

The accepted worth for me:

=> printenv boot_targets
boot_targets=mmc1 usb0 mmc0 nvme0 scsi0 pxe dhcp sf0

Which is then adjusted and saved with eg:

=> setenv boot_targets nvme0 scsi0 mmc1 usb0 mmc0 pxe dhcp sf0
=> saveenv
Saving Atmosphere to SPIFlash... Erasing SPI flash...Writing to SPI flash...executed

(In this listing, mmc1 is the SD slot, mmc0 is the eMMC card, pxe and dhcp are netbooting, and sf0 makes an try to load additional U-Boot scripts from SPI.)

There are some minor points with the RockPro64. It has no capacity to make consume of ECC memory. It handiest comes with 1 PCIe 4x slot, and Rockchip errata tiny this to PCIe 1.x (though no NetBSD customers encounted any points with PCIe 2.x enabled, and this will likely be forced support on via a DTS patch.) It is most likely to make consume of a PCIe bridge (I in actuality include never executed this, though I would love to strive in the rupture) to enable extra gadgets for booting, or to enable every a community and storage instrument.


Read More



β€œSimplicity, patience, compassion.
These three are your greatest treasures.
Simple in actions and thoughts, you return to the source of being.
Patient with both friends and enemies,
you accord with the way things are.
Compassionate toward yourself,
you reconcile all beings in the world.”
― Lao Tzu, Tao Te Ching