CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/config/templates/fel-hooks.sh.example
Views: 3958
#!/bin/bash
# 
# fel-hooks.sh.example -- this file is an example how 
# userpatches/fel-hooks.sh could be implemented.
#
# The following example assumes you use a Gembird power switch connected
# through USB to be able to power cycle the board you want to fel boot. You
# need the sispmctl package and use 'sispmctl -s' to get the ID of your 
# power switch.

fel_pre_load() {
	# power cycle socket 1 of Gembird power switch
	sispmctl -D01:01:51:23:cb -q -f1
	# 5 seconds delay since PSUs don't like be being power cycled too fast
	sleep 5
	sispmctl -D01:01:51:23:cb -q -o1
	# 3 seconds delay since the SoC has to initialise
	sleep 3
} # fel_pre_load

fel_post_prepare() {
	# currently empty - sun8i-default tweaks were converted into u-boot patches
	echo "calling fel_post_prepare()"
} # fel_post_prepare