Burning Images

Burning Images
For SBC using SD cards (all of them?). Use dd. On the mac, it's nicer to use pv (pipe viewer) because it gives you feedback on the progress.

Note: There are certain weird images (android on banana pi which I never got to work anyway) that apparently cannot be written this way. Use a windows machine and PhoenixCard instead. 

Basic procedure:
- insert card
- figure out which disk it is 
- unmount it
- write using pv or dd
- eject

diskutil list
diskutil unmountDisk /dev/diskX
pv < SOURCE > DEST
diskutil eject /dev/diskX

Alternate syntax:
pv < /dev/sda > /dev/sdb

dd if=IMAGEFILE| pv | sudo dd of=/dev/rdiskN bs=1m


Banana Pi: Boot from USB Stick

Banana Pi: Boot from USB Stick
WARNING: I never got this to work (functions but won't complete boot, seems something wonky with my USB stick). Trouble is that once you edit the file, if you can't boot back in you can't fix it and must re-burn (unless you have an ARM Linux distro handy)

Per this thread
http://my5cent.spdns.de/en/banana-pi/banana-pi-bananian-von-festplatte-booten.html

Mount the boot partition and edit the startup params:
mount /dev/mmcblk0p1 /mnt/
pico /mnt/uEnv.txt

Change the parameters
from:
root = /dev/mmcblk0p2

to (or what you like):
root = /dev/sda1 

Banana Pi: Resolution Problems

Banana Pi: Resolution Problems
Pi attempts to auto-detect resolution, but not all monitors push this data. If they don't, you'll end up with a weird resolution and no option to change. Googling refers you to xrandr, etc, but I didn't find this helpful. Instead:

Per this thread:
http://forum.lemaker.org/thread-1577-1-1.html

Disable EDID (auto detection. Be aware this disables autodetection (duh)):
mount /dev/mmcblk0p1 /mnt/
pico /mnt/uEnv.txt

Look for:
disp.screen0_output_mode=EDID:1280x1024p60

Remove "EDID," optionally specify the resolution you want


Related:
xrandr --output CRT0 --brightness 0.7 --crtc CRT0 --gamma 1:1:1 --newmode "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync 

Banana Pi: Accelerated Video

Banana Pi: Accelerated Video
PART 1: CEDRUS

VLC didn't work

Status (out of date):


This worked:
http://linux-sunxi.org/Cedrus



NOTE: I began with the stock bananapi image:
Lubuntu_1404_For_BananaPi_v3_1_1.img


Regarding modprobe:
to find the module (name changes depending on hardware):
find /lib/modules | grep cedar 
check to see if the dev exists now:
ls /dev/cedar_dev

To ensure modprobe runs at startup
add modprobe sunxi_cedar_mod to /etc/modules


Using:
* Could only get mpv to work (mplayer seems to be missing vdpau support?)*

Also might need to do this manually:

sudo modprobe sunxi_cedar_mod
chmod 666 /dev/cedar_dev
chmod 666 /dev/disp

Add these to /etc/bash.bashrc 
export DISPLAY=:0
export VDPAU_DRIVER=sunxi

MPV:
Finally, this:
mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all --fs --loop=inf melina.mp4

mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all --fs --loop=inf ./*
To get it to play automatically at lightDm startup:
Edit: /etc/lightdm/lightdm.conf


PART 2: FBTURBO
Above lets us playback videos but we can also accelerate other stuff (like X), do this:
http://wiki.lemaker.org/BananaPro/Pi:GPU