I wrote several scripts to install and activate device tree overlays. These scripts use (and install) two more universal scripts to /boot/dietpi
:
dietpi-add-overlay
: installs a binary overlay and adds it to dietpiEnv.txt, based onarmbian-add-overlay
, but without using the device tree compiler (dtc) to compile device tree source files to binary overlays (what needs the installation of the dtc)dietpi-activate-overlay
: activates overlays installed with the DietPi firmware (in/boot/dietpi/dtb/rockchip/overlay
)
These are scripts to activate overlays:
-
install device tree overlay for USB OTG (peripheral mode) for the upper USB 3 connector
curl https://raw.githubusercontent.com/herrfrei/dietpi-rpk4cp/rock4cp_usb_otg.sh | bash
-
Install device tree overlay for the DS3231 realtime clock:
curl https://raw.githubusercontent.com/herrfrei/dietpi-rock4cp/rock4cp_rtc_ds3231.sh | bash
This script also stops and deactivates the fake-hwclock service.
-
use
rock4cp_bluetooth_fw.sh
to create the (missing) link for the Bluetooth firmware:curl https://raw.githubusercontent.com/herrfrei/dietpi-rock4cp/rock4cp_bluetooth_fw.sh | bash
-
Install the device tree overlay for USB OTG from above (
rock4cp_usb_otg.sh
). -
If you want to use an emmc module for the operating system and a SD card or USB stick for the data, add a flag to the call of the installation script. This will skip the resizing of the root file system:
https://raw.githubusercontent.com/marcone/teslausb/main-dev/setup/generic/install.sh | bash -s norootshrink
During setup, adjust the
DATA_DRIVE
option inteslausb_setup_variables.conf
to match your data device. Follow the instructions from the Wiki