Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TypeNaN authored Feb 22, 2020
1 parent c1929bb commit 675ded2
Showing 1 changed file with 67 additions and 26 deletions.
93 changes: 67 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,80 @@ Raspberry Pi Framebuffer Copy
=============================
This program used for copy primary framebuffer to secondary framebuffer (eg. FBTFT). It require lastest raspberry pi firmware (> 2013-07-11) to working properly.

Tested on Raspberry Pi 3
========================
2017-11-29-raspbian-stretch
#### Tested on Raspberry Pi B 1,2,3,Z,ZW

- 2020-02-13-raspbian-buster
- 2017-11-29-raspbian-stretch

Requirement
-----------
cmake

$ sudo apt-get install cmake
#### Requirement

Build
-----
~~~bash
sudo apt update
sudo apt upgrade -y
sudo apt install -y git cmake
~~~

$ mkdir build

$ cd build

$ cmake ..

$ make

#### Build

How To Use
----------
$ ./fbcp
~~~bash
cd /tmp
git clone https://github.com/tasanakorn/rpi-fbcp.git
mkdir -p /tmp/rpi-fbcp/build
cd /tmp/rpi-fbcp/build
cmake ..
make -j $( nproc --all )
sudo install fbcp /usr/local/bin/fbcp
~~~

Wanna to run from booting
-------------------------
$ sudo cp fbcp /usr/bin
$ sudo chmod +x /usr/bin/fbcp
$ sudo nano /etc/rc.local -> add new line before "exit 0" with "/usr/bin/fbcp &" without quote
$ sudo reboot

#### How To Use

~~~bash
fbcp &
~~~


#### Wanna run automatically at startup

~~~bash
sudo cp ./service /etc/init.d/fbcp
sudo chmod +x /etc/init.d/fbcp
sudo update-rc.d fbcp defaults
sudo service fbcp start


# control service


sudo service fbcp start # run fbcp
sudo service fbcp stop # kill fbcp
sudo service fbcp status # check status
~~~


#### Disable / Enable run automatically at startup

~~~bash
# Disable
sudo service fbcp stop
sudo update-rc.d fbcp disable

# Enable
sudo update-rc.d fbcp enable
sudo service fbcp start

~~~

#### Cancel run automatically at startup

~~~bash
sudo service fbcp stop
sudo update-rc.d fbcp disable
sudo update-rc.d fbcp remove
sudo rm -rf /etc/init.d/fbcp
~~~


License
Expand All @@ -59,4 +100,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

0 comments on commit 675ded2

Please sign in to comment.