This is the process from start to finish for an Official MK808 TV stick (not MK808B or MK808 clone)
[ul]
- Flash a custom ROM like BobFinless ROM. Ensure you follow the instructions carefully so as to not brick your deivce
- Download the olegk0 Linux kernel (only for MK808) from http://www.slatedroid.com/topic/55626-my-version-of-the-linux-kernel-for-mk808/page__p__618202__fromsearch__1#entry618202
2.1 Put the kernel in the FinlessROM folder
2.2 Uncheck everything but the “recovery” setting, then change the “Path” to reflect the name of the kernel you want to flash, then flash the kernel
- At this point you can either choose to download the Picuntu RC3 filesystem from here or download my version of the RC3 (not uploaded yet) which has all the modules and changes made to the filesystem to get it to work properly with minimal fuss
3.1 Flash the filesystem to an SD card (I recommend 8GB). You can try this website for some help on how to do that. I’ve only ever been able to successfully do this in Linux.
- Once flashed insert the microSD card and boot the system
- Follow the instructions here and here for how to get the device boot into picuntu (command line)
5.1 Edit the networking script by typing “sudo nano /etc/network/interfaces” and enter the details of your wireless network into the eth0 network device (this is the internal wifi device, the other device is the USB wifi module if present).
5.2 Reboot the system and check the network state by typing ifconfig. If everything worked you should have been assigned an IP address
5.3 Run the picuntu-da-server.sh script and follow the prompts to download a GUI and other bits and pieces. I recommend downloading the XFCE GUI. I haven’t really tried Gnome so I can’t comment on that.
- Once booted into Picuntu, follow the instructions at the Hexy getting started page to get your Hexy setup with Linux
[/ul]
Flashing kernel on an Official MK808 TV Stick
- Download the BobFinless ROM and follow all the instructions about installing drivers and checking if your device is set up, and flash the custom ROM.
- Download the olegk0 Linux kernel (only for MK808) and put it in the “FinlessROM” folder (http://www.slatedroid.com/topic/55626-my-version-of-the-linux-kernel-for-mk808/page__p__618202__fromsearch__1#entry618202).
- If you want to be able to run both Android and Linux you only want to only have the recovery option checked. Otherwise you want the boot and recovery option checked ONLY.
- Double click in the Path setting and change the parameter from “FinlessROM\boot720.img” to “FinlessROM\olegk0.kernel.img” or whatever the kernel is called that you put into that folder and want to flash.
- Hit the Flash ROM button and watch the status window to make sure your kernel was flashed without any errors.
Creating Picuntu RFS
*Will work on 2GB SD card, but at least 4GB is best
- Format the stick as ext4 filesystem and name it "linuxroot"
Windows: MiniTool Partition Wizard does the trick
Linux: from the command line type the following commands and note the drive name (eg: /dev/sdb)
sudo fdisk -l
sudo mkfs.ext4 /dev/your_drive_name
2. From the command line type the following command to extract the RFS to the SD card
Picuntu First Boot
Username:root
Password:12qwaszx
- Change the wireless network settings by typing “nano /etc/network/interfaces” into the command line and change the SSID and Password to match your network
- Type the following command to reload the kernel modules
- Type “reboot”
- Ensure you have a network location by typing the command “ifconfig” into the command line and check for an IP address
- Once logged in, navigate to the /usr/local/picuntu/ directory by typing “cd /usr/local/picuntu/”
- To configure the system, type “./picuntu-da-server.sh” into the command line.
This will run the configuration script and guide you through the setup. Some of the packages don’t seem to be available, but I install the following packages: Samba, Xfce4, Flash, Java, GCC, Editors
Picuntu XFCE4 First Boot
The user picuntu has been created, but you can use the root username if you like
- Login to the GUI using the picuntu username and password you entered during the setup.
- Add the picuntu user to the sudo group by logging in to the GUI as root and entering the following command
Installing OpenCV Python
It is possible to type sudo-apt-get install libopencv-dev python-opencv and you will have OpenCv 2.3.1 installed. However the latest available from the OpenCv website is 2.4.8 so if you want something newer than 2.4.3 you will need to follow these instructions to install it.
It seems some of the packages it says to install in the instructions aren´t completely necessary to compile OpenCv. For example the texlive-latex-extra package wanted to take up approximately 900mb of space so I didn’t install it.
Auto Login to XFCE
Run the following command to auto login the picuntu user:
Running x11 on Startup
Download X11VNC Server from the Ubuntu Software Center or type the follwing into the command line
The following is the command that runs x11vnc from the command line with no password:
In order to run this command each time the device starts we need to add it to the startup script.
Select “Applications Menu” -> “Settings Manager” -> “Session and Startup”, then select the “Application Autostart” tab.
Now click the Add button, fill in the fields and insert the command above to auto start the remote desktop application on boot.
Shutdown Button
I’m making a shutdown button based on the arduino HID library that allows an arduino to act as a keyboard.
We need to assign a key that is not often used to act as the shutdown key, for me this is f4.
Select “Applications Menu” -> “Settings Manager” -> “Keyboard” and switch to the applications shortcut tab.
Create a new keyboard with the following command: “xfce4-session-logout --halt” and then press the f4 button to bind the key to the new shortcut
Running PoMoCo on Startup
Select “Applications Menu” -> “Settings Manager” -> “Session and Startup”, then select the “Application Autostart” tab.
Now click the Add button, fill in the fields and insert the command:
The -j argument puts PoMoCo straight into joystick mode (Kinematic control)
Tweaking CPU Speed
Install cpufrequtils:
Check the available clock speeds:
Check current settings:
Set max cpu speed:
Set min CPU speed
Cloning Your SD Card
Linux:
- Check the disk we are about to copy:
- Make sure the disk is not mounted before we clone it:
- Clone the disk using dd:
Restoring Your SD Card
Restore the clone using dd:
You can find more instructions for installing Picuntu here but I have never had and luck using the pre-picuntu script.