-
Notifications
You must be signed in to change notification settings - Fork 21
Manual Upgrade Clockworkpi OS V0.1 to V0.2
This tutorial showes how to manually upgrade Clockworkpi OS V0.1 to V0.2. All instrutctions done by ssh login to GameShell. It's recommended to download into /tmp folder, and use cpi account with sudo to avoid user permission problems.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
allow-hotplug usb0
auto usb0
iface usb0 inet static
address 192.168.10.1
netmask 255.255.255
Modify startx part at the end of /home/cpi/.bashrc
Original content:
if [ -f /tmp/autologin ]
then
rm -f /tmp/autologin
mpd ~/.mpd.conf
startx -- -nocursor > /dev/null 2>&1
fi
Change to
if [ -f /tmp/autologin ]
then
rm -f /tmp/autologin
mpd ~/.mpd.conf
startx /home/cpi/launcher/.xinitrc -- -nocursor > /dev/null 2>&1
fi
# deb http://cdn-fastly.deb.debian.org/debian/ stable main
deb http://cdn-fastly.deb.debian.org/debian/ stable main contrib
deb-src http://cdn-fastly.deb.debian.org/debian/ stable main
deb http://security.debian.org/debian-security stable/updates main
deb-src http://security.debian.org/debian-security stable/updates main
# stable-updates, previously known as 'volatile'
deb http://cdn-fastly.deb.debian.org/debian/ stable-updates main
deb-src http://cdn-fastly.deb.debian.org/debian/ stable-updates main
sudo apt-get update
sudo apt-get -y install awesome
Download all files from https://github.com/clockworkpi/Kernel/tree/master/v0.2 into your GameShell
wget https://github.com/clockworkpi/Kernel/raw/master/v0.2/sun8i-r16-clockworkpi-cpi3-hdmi.dtb
wget https://github.com/clockworkpi/Kernel/raw/master/v0.2/sun8i-r16-clockworkpi-cpi3.dtb
wget https://github.com/clockworkpi/Kernel/raw/master/v0.2/u-boot-sunxi-with-spl.bin
wget https://github.com/clockworkpi/Kernel/raw/master/v0.2/uImage
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
sudo mount /dev/mmcblk0p1 /media
sudo cp -rf sun8i-r16* /media
sudo cp -rf uImage /media
sudo umount /dev/mmcblk0p1
cd ~/
git clone https://github.com/clockworkpi/launcher.git
cd ~/launcher
git pull; git reset --hard e3ffcf3
cd ~/
git clone https://github.com/clockworkpi/launchergo.git
cd ~/launchergo
git pull; git reset --hard d23e15f
From https://mega.nz/#!dRMRkIoS!A6SuJR5NlM5-QOPWyAx34DRNsmMpkoKS56ReIgUARc4
21_Indie Games.tar.gz (2dcaba42296be547435175a71082cb4d)
mkdir ~/apps/Menu
tar zxvf 21_Indie\ Games.tar.gz -C ~/apps/Menu
cd ~/apps
wget https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/download/v0.27.6/nwjs-sdk-v0.27.6-linux-arm.tar.gz
tar zxvf nwjs-sdk-v0.27.6-linux-arm.tar.gz
sudo apt-get -y install libnss3-dev
cd ~/games
git clone https://github.com/cuu/GSP.git
From https://github.com/clockworkpi/bluetooth download two files, skip others
-
wget https://github.com/clockworkpi/bluetooth/raw/master/bcm43438a0.hcd
-
wget https://github.com/clockworkpi/bluetooth/raw/master/brcm_patchram_plus
Copy Bluetooth firmware bcm43438a0.hcd into /lib/firmware/brcm/
sudo cp bcm43438a0.hcd /lib/firmware/brcm/
Copy bluetooth firmware writer from brcm_patchram_plus into /usr/bin/ , and add executable right
sudo cp brcm_patchram_plus /usr/bin/
sudo chmod +x /usr/bin/brcm_patchram_plus
Install Linux bluetooth support
sudo apt-get install bluez
Configurate startup script, for auto prepare bluetooth when system boots
sudo su
cat <<EOF >/etc/rc.local
#!/bin/sh -e
sleep 15
brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a0.hcd --enable_hci --bd_addr B0:F1:EC:2D:07:5B --no2bytes --tosleep 5000 /dev/ttyS1 &
EOF
chmod +x /etc/rc.local
systemctl daemon-reload
systemctl start rc-local
systemctl status rc-local
systemctl enable bluetooth
Add two lines in /etc/systemd/system/dbus-org.bluez.service , to restart bluetooth service from unexpected stops
Restart=always
RestartSec=3
At [Service] part,
ProtectSystem=full
Add two lines here
wget http://ppa.launchpad.net/bartbes/love-stable/ubuntu/pool/main/l/love/love_11.1ppa1_armhf.deb
wget http://ppa.launchpad.net/bartbes/love-stable/ubuntu/pool/main/l/love/liblove0_11.1ppa1_armhf.deb
sudo apt-get install -y libluajit-5.1-2 libluajit-5.1-common
sudo dpkg -i liblove0_11.1ppa1_armhf.deb
sudo dpkg -i love_11.1ppa1_armhf.deb
mkdir ~/games/Love2D
sed -i '/video_fullscreen =/c\video_fullscreen = "true"' ~/.config/retroarch/retroarch.cfg
sed -i '/video_windowed_fullscreen/c\video_windowed_fullscreen = "true"' ~/.config/retroarch/retroarch.cfg
sudo reboot