Coder Social home page Coder Social logo

chraac / fake_vcgencmd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clach04/fake_vcgencmd

0.0 0.0 0.0 16 KB

vcgencmd partial clone for non-Raspberry Pi devices to allow Android RasPi Check (rpicheck) to run. Generic Linux, Armbian, ODroid XU4, rock64 SBC to allow Raspberry Pi tools/scripts

License: MIT License

Shell 100.00%

fake_vcgencmd's Introduction

Fake vcgencmd for generic Linux, Armbian, Odroid, Pine64, Rock64 and other SBCs

Shell script vcgencmd partial clone to allow Raspberry Pi tools/scripts to run unmodified on SBCs. Works with Armbian (and probably works with x86 too).

Works with Android app https://github.com/eidottermihi/rpicheck

Some Armbian builds already include this script. However, the script can be used as-is on many systems. In case Armbian does not include this script in their build for your board, but you have tested that this script works properly, you can request Armbian to include it for your board.

Install vcgencmd into /usr/bin/vcgencmd and set execute bit. Example from source checkout:

sudo cp vcgencmd /usr/bin/vcgencmd
sudo chmod a+x /usr/bin/vcgencmd

Originally relied on rock64_health.sh - https://github.com/pfeerick/rock64-scripts now uses /sys/ interface.

Install over the web:

wget -O /usr/bin/vcgencmd https://raw.githubusercontent.com/clach04/rock64_vcgencmd/master/vcgencmd
chmod a+x /usr/bin/vcgencmd

What works

vcgencmd version
vcgencmd measure_temp
vcgencmd measure_clock arm

vcgencmd measure_volts core  # this is faked out and incorrect, just enough to satisfy rpicheck
vcgencmd measure_clock core  # this is faked out and incorrect, just enough to satisfy rpicheck

Adding support for new parameters

Add the following to the end of the script vcgencmd for quick and easy debug logs:

exit
# remove/comment out exit about for debug logging
# NOTE may need allow permissions on file:
#	sudo chmod a+w /var/log/vcgencmd.log


# if we got here, unrecognized parameter
# log it for debugging purposes

# on this device /var/log is ramfs folder2ram
LOG=/var/log/vcgencmd.log
LOG=/tmp/vcgencmd.log


date >> ${LOG}
echo PARAM star ${*} PARAM >> ${LOG}
echo PARAM one ${1} PARAM >> ${LOG}
echo PARAM two ${2} PARAM >> ${LOG}
echo '=============' >> ${LOG}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.