Merge pull request #12 from peachcloud/2021_update
Add active repositories and remove dev setup doc
This commit is contained in:
commit
c8b3212061
117
DEV_SETUP.md
117
DEV_SETUP.md
@ -1,117 +0,0 @@
|
||||
# PeachCloud
|
||||
|
||||
## Development Environment
|
||||
|
||||
### Background
|
||||
|
||||
In order to be flexible in supporting single-board computers beyond the Raspberry Pi alone, and to take full advantage of 64-bit support on ARMv8 devices, development for PeachCloud is being targeted at Debian ARM64.
|
||||
|
||||
No official image has yet been released by Debian for the Raspberry Pi 3, though a preview image of Debian 10 (Buster) is available [from their wiki](https://wiki.debian.org/RaspberryPi3). The major known issue with that preview image is broken wireless (the built-in wireless interface does not work). Fortunately, Michael Stapelberg has posted [an updated version of the preview image](https://people.debian.org/~stapelberg/2018/01/08/raspberry-pi-3) with WiFi that works out of the box.
|
||||
|
||||
### Operating System
|
||||
|
||||
Debian 10 (Buster). Kernel version: 4.14.0-3-arm64.
|
||||
|
||||
### Hardware
|
||||
|
||||
Raspberry Pi 3B+.
|
||||
|
||||
### Packages
|
||||
|
||||
List of all packages manually-installed during development environment setup.
|
||||
|
||||
`man-db, locales, sudo, vim, git, build-essential, wget, network-manager, net-tools, curl, hostapd, dnsmasq, openssh-server, iptables-persistent, ufw, bridge-utils, ntp, ssl-cert, wpasupplicant, avahi-daemon, libssl-dev, pkg-config, i2c-tools, nmtui`
|
||||
|
||||
_Note: This list may be incomplete and will be checked during the next phase of development._
|
||||
|
||||
### Software Setup
|
||||
|
||||
Install Rust using [rustup](https://rustup.rs/):
|
||||
|
||||
`curl https://sh.rustup.rs -sSf | sh`
|
||||
|
||||
_Note: This method of installation will fail with SSL cert errors if the datetime is not correctly set on the Pi and / or the `ssl-cert` package is not installed._
|
||||
|
||||
Set Rust to nightly (necessary for compiling [Rocket](https://rocket.rs)):
|
||||
|
||||
`rustup default nightly`
|
||||
|
||||
### Hardware Setup
|
||||
|
||||
**RTC over I²C**
|
||||
|
||||
_Tested with DS1338 RTC module._
|
||||
|
||||
Ensure `i2c-tools` Debian package has been installed. Then run the following to ensure the RTC is correctly wired and connected to the Pi:
|
||||
|
||||
`sudo modprobe i2c-dev`
|
||||
`sudo i2cdetect -y 1`
|
||||
|
||||
The final command in the sequence prints an array to the console, with 68 denoting the presence of the RTC module. This is a sign that the device is properly wired and connected.
|
||||
|
||||
Append the following two lines to `/boot/firmware/config.txt`:
|
||||
|
||||
`dtoverlay=i2c-rtc,ds1307`
|
||||
`dtparam=i2c_arm=on`
|
||||
|
||||
Add required kernel modules:
|
||||
|
||||
`sudo modprobe i2c-bcm2835`
|
||||
`sudo modprobe rtc-ds1307`
|
||||
|
||||
Append the following three lines to `/etc/modules`:
|
||||
|
||||
`i2c-dev`
|
||||
`i2c-bcm2835`
|
||||
`rtc-ds1307`
|
||||
|
||||
Apply the `dtb` patch detailed in the **Bug Fixes** section of this document (below).
|
||||
|
||||
Initialize the device by running the following commands:
|
||||
|
||||
`sudo bash`
|
||||
`echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device`
|
||||
`exit`
|
||||
|
||||
Run the `i2cdetect` tool to ensure the RTC kernel driver is working:
|
||||
|
||||
`sudo i2cdetect -y 1`
|
||||
|
||||
A `UU` entry in the output arrays denotes success. If you still see `68` or similar, the module is not being controlled by the kernel driver.
|
||||
|
||||
_Note: This Scuttlebutt dev-diary post by @glyph documents the process step-by-step (%aEVy1gyTSl4qrbazrwrgnrLs4pRVobELwQjH/TUtsAc=.sha256)._
|
||||
|
||||
**GPIO**
|
||||
|
||||
GPIO appears to be working out-of-the-box, but be aware that all pin numbers are offset by 458 for Debian on the Raspberry Pi 3 (as mentioned in the [Debian RaspberryPi3 wiki](https://wiki.debian.org/RaspberryPi3)).
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
The clock frequency property is not set for I²C in the device tree of the Debian image we are working with. The `dtb` (device tree blob) must be decompiled, patched, and recompiled.
|
||||
|
||||
Copy the existing `dtb` to a temporary working directory (exact location is up to you):
|
||||
|
||||
`cp /boot/firmware/bcm2837-rpi-3-b.dtb /tmp/`
|
||||
`cd /tmp`
|
||||
|
||||
Install the compiler / decompiler:
|
||||
|
||||
`sudo apt-get install device-tree-compiler`
|
||||
|
||||
Generate a human-readable decompiled device tree (`dts`):
|
||||
|
||||
`dtc -I dtb -O dts > bcm2837-rpi-3-b.dts`
|
||||
|
||||
Open the `dts` and add the clock-frequency property (line 570):
|
||||
|
||||
`clock-frequency = <0x186a0>;`
|
||||
|
||||
Save and exit the document. Recompile the patched `dts` to binary blob format:
|
||||
|
||||
`dtc -O dtb -o bcm2837-rpi-3-b.dtb bcm2837-rpi-3-b.dts`
|
||||
|
||||
Replace the existing `dtb` with the newly-patched version (you may wish to backup the old `dtb` first):
|
||||
|
||||
`cp bcm2837-rpi-3-b.dtb /boot/firmware/bcm2837-rpi-3-b.dtb`
|
||||
|
||||
Reboot and ensure no `i2c could not read clock-frequency property` errors persist in the kernel logs (`/var/log/kern.log`).
|
44
README.md
44
README.md
@ -1,17 +1,49 @@
|
||||
# [PeachCloud](http://peachcloud.org) :peach: :cloud:
|
||||
|
||||
_better [Scuttlebutt](https://scuttlebutt.nz) cloud infrastructure as a hardware product._
|
||||
_Better [Scuttlebutt](https://scuttlebutt.nz) cloud infrastructure as a hardware product._
|
||||
|
||||
[**_support us on OpenCollective!_**](https://opencollective.com/peachcloud)
|
||||
[**_Support us on OpenCollective!_**](https://opencollective.com/peachcloud)
|
||||
|
||||
## background
|
||||
## Background
|
||||
|
||||
- April 2018 project proposal: [`%HqwAsltORROCh4uyOq6iV+SsqU3OuNUevnq+5dwCqVI=.sha256`](https://viewer.scuttlebot.io/%25HqwAsltORROCh4uyOq6iV%2BSsqU3OuNUevnq%2B5dwCqVI%3D.sha256)
|
||||
- November 2018 project pivot: [`%9NCyTf+oBxG0APlXRCKtrGZj3t+i+Kp3pKPN1gtFX2c=.sha256`](https://viewer.scuttlebot.io/%259NCyTf%2BoBxG0APlXRCKtrGZj3t%2Bi%2BKp3pKPN1gtFX2c%3D.sha256)
|
||||
|
||||
## [TODO](https://github.com/orgs/peachcloud/projects/4)
|
||||
## Active Repositories
|
||||
|
||||
## dev diaries
|
||||
**Documentation**
|
||||
|
||||
- [peach-devdocs](https://github.com/peachcloud/peach-devdocs) - Developer documentation for PeachCloud in the form of a Markdown book
|
||||
|
||||
**Devops**
|
||||
|
||||
- [peach-vps](https://github.com/peachcloud/peach-vps) - Setup scripts and configuration files for deploying a PeachCloud development server
|
||||
|
||||
**Image building & device configuration**
|
||||
|
||||
- [peach-config](https://github.com/peachcloud/peach-config) - Configuration instructions, files and scripts
|
||||
- [peach-img-builder](https://github.com/peachcloud/peach-img-builder) - Vmdb2 script for building a Debian disc image for Raspberry Pi with PeachCloud pre-installed
|
||||
|
||||
**Microservices**
|
||||
|
||||
- [peach-buttons](https://github.com/peachcloud/peach-buttons) - Emit GPIO events using JSON-RPC pubsub over WS
|
||||
- [peach-oled](https://github.com/peachcloud/peach-oled) - Write and draw to OLED display using JSON-RPC over HTTP
|
||||
- [peach-menu](https://github.com/peachcloud/peach-menu) - A menu for monitoring and interacting with the PeachCloud device
|
||||
- [peach-network](https://github.com/peachcloud/peach-network) - Query and configure network interfaces using JSON-RPC over HTTP
|
||||
- [peach-stats](https://github.com/peachcloud/peach-stats) - Query system statistics using JSON-RPC over HTTP
|
||||
- [peach-lib](https://github.com/peachcloud/peach-lib) - JSON-RPC client library for the PeachCloud ecosystem
|
||||
- [peach-monitor](https://github.com/peachcloud/peach-monitor) - Monitor network data usage and set alert flags based on user-defined thresholds
|
||||
|
||||
**Diagnostics**
|
||||
|
||||
- [peach-probe](https://github.com/peachcloud/peach-probe) - Probe PeachCloud microservices to evaluate their state and ensure correct API responses
|
||||
|
||||
**Web interface**
|
||||
|
||||
- [peach-patterns](https://github.com/peachcloud/peach-patterns) - Pattern library for the PeachCloud UI design system
|
||||
- [peach-web](https://github.com/peachcloud/peach-web) - A web interface for monitoring and interacting with the PeachCloud device
|
||||
|
||||
## Developer Diaries
|
||||
|
||||
- [@ahdinosaur](https://github.com/ahdinosaur): `@6ilZq3kN0F+dXFHAPjAwMm87JEb/VdB+LC9eIMW3sa0=.ed25519`
|
||||
- 1: [`%bSkZCJBmNYUmECNKYOiWkgEeRxrlo2UghNBzE6Cph94=.sha256`](https://viewer.scuttlebot.io/%25bSkZCJBmNYUmECNKYOiWkgEeRxrlo2UghNBzE6Cph94%3D.sha256)
|
||||
@ -19,7 +51,7 @@ _better [Scuttlebutt](https://scuttlebutt.nz) cloud infrastructure as a hardware
|
||||
- [@mycognosist](https://github.com/mycognosist): `@HEqy940T6uB+T+d9Jaa58aNfRzLx9eRWqkZljBmnkmk=.ed25519`
|
||||
- [`%mKUByRp4Gib6fqP1q2/dHg+ueSoR+Sj2Y0D7T0Np0D4=.sha256`](https://viewer.scuttlebot.io/%25mKUByRp4Gib6fqP1q2%2FdHg%2BueSoR%2BSj2Y0D7T0Np0D4%3D.sha256)
|
||||
|
||||
## accounts
|
||||
## Accounts
|
||||
|
||||
- [GitHub](https://github.com/peachcloud)
|
||||
- [Twitter](https://twitter.com/peachcloudorg)
|
||||
|
Loading…
Reference in New Issue
Block a user