Skip to content
manuti edited this page May 14, 2019 · 20 revisions

PicUntu Linux Step by Step Install

This is primarily from the Miniand site with minor modifications I've figured out along the way. I left the original download links intact, but you can clone this project to download all the files.

Getting Started

PicUntu Linux is a Ubuntu linux distro specifically designed for Mini PC's that use the Rockchip RK3066 Arm processor. The RK3066 is a powerful CPU, with two Cortex A9 cores that can be clocked up to 1.6 Ghz per core. Mini PC's using the RK3066 are generally available at very reasonable prices and are packed with extras. This makes for a very cheap linux webserver that still has a lot of CPU left to use.

You Will Need

  1. A Mini PC with a Rockchip RK3066 dual core ARM A9 processor. The following are officially supported per the PicUntu FAQ: a. Ugoos UG802 b. MK808 (w/o bluetooth) c. Rikomagic MK802 III (w/o bluetooth) (Since this chip has the exact same wifi chipset as the UG802, select UG802 from any Picuntu dialog asking what device you have) Note, that the Mini PC's with bluetooth all use a different wifi chip than the original. I am sure it will only be a matter of time before they are also supported. The following are not officially supported, but have been reported to work (you may have to load additional kernel drivers or use a wifi dongle or USB wired ethernet adapter): a. Minix Neo G4 b. iMito MX1/MX2 c. MK808B with bluetooth (at least 2 different models with different wifi/bluetooth chipsets are known to exist) d. Rikomagic MK802 IIIS with bluetooth Note: If you want to install PicUntu on a device that does not yet have supported WiFi drivers, you will need to have some form of network adapter in order to complete the install.
  2. A monitor or TV with an available HDMI input.
  3. An OTG USB cable appropriate for your device. For the Windows PC side we need a full size USB A connector. The Mini PC side of this cable varies, depending on the device. A MK808 uses a Mini USB male connector. The UG802 and the MK802 III use a Micro USB male connector.
  4. A MicroSD of at least 4GB in size to hold the linuxroot filesystem.
  5. A windows based PC, preferably a desktop PC, as laptop PC's usually have underpowered USB buses. The USB bus of the Windows PC will need to provide All power required by both the mini PC and any USB devices you are connecting to it. A typical laptop is not up to this task.
  6. A linux based PC or PC that can be booted into linux via dual boot or Live CD boot.
  7. An internet connection, in order to download the 2 required files to complete this process and also to allow picuntu-da-server.sh to download packages once the Picuntu install is running on your device.

Creating the linuxroot filesystem using pre-picuntu.sh

This section covers using the pre-picuntu.sh script to create the linuxroot file system on your target media. This is the recommended method.

You will need

  1. A MicroSD that is 4 GB or larger in size. Any data that was stored on the MicroSD beforehand will be wiped clean by this process. A larger MicroSD will give you more available space for applications and data post install, but you would likely be surprised how many packages you can install to even a 4 GB MicroSD.
  2. The latest linuxroot .tgz file from the PicUntu site. You may download the image here: http://download.g8.net/picuntu/picuntu-linuxroot-0.9-RC2.2.tgz
  3. The latest pre-picuntu.sh script from the PicUntu site. You may download the image here: http://dl.miniand.com/tecknight/pre-picuntu-0.9-RC2.2.tgz
  4. A linux system on a PC that can read/write a MicroSD. This would include a linux install under windows or even a linux VM as long as it can read/write a MicroSD. If you do not have a linux install that meets these requirements, then download the Puppy linux live CD from here and burn the image to a blank CD-R.
  5. 10-15 minutes to complete the steps below.

Step by Step Instructions

  1. Insert the MicroSD you plan to use for the linuxroot file system into a reader connected to the system we will be launching linux on.
  2. Launch linux in the appropriate fashion: +Reboot system and select linux boot for a dual boot system +Launch VM in VMware if launching a linux VM +Launch linux from Windows if that is how your distro is launched or +Insert your Puppy linux live CD into your CD/DVD drive and boot the system from the CD.
  3. Once linux boots up, you will need to determine the device name linux is assigning to your MicroSD card. Puppy linux has a mount utility that will show you. Look under USB devices. In my case, it was /dev/sdg. If necessary, type the following from a root terminal session: parted -l You should see output resembling the following:
Model: ATA MAXTOR STM332062 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 316GB 316GB primary ext4 boot
2 316GB 320GB 4294MB extended
5 316GB 320GB 4294MB logical linux-swap(v1)
Model: Sony Card R/W -SD/MS (scsi)
Disk /dev/sdg: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 7946MB 7946MB primary ext4

You should be able to find your device name in the provided list. Note the device name, as we will be providing it to the pre-picuntu script in a moment. 4. Open up a root terminal session and change your working directory to the folder where you have downloaded pre-picuntu-0.9-RC2.2.tgz to. Extract pre-picuntu.sh, make it executable and then run it.

tar zxf pre-picuntu*.tgz
chmod +x pre-picuntu.sh
./pre-picuntu.sh

Pre-picuntu begins with the following dialog.

Screen 1

If you answer no, pre-picuntu.sh will download the linuxroot tarball for you. If you answer yes, tell pre-picuntu.sh where the tarball is:

Screen 2

Select your device. If you have a RikoMagic MK802 III, select UG802

Screen 3

Select how you will connect to the internet.

Screen 4

Enter AP SSID and password, if you selected wifi.

Screen 5

Enter the device name we determined earlier here.

Screen 6

pre-picuntu.sh confirms all settings.

Screen 7

The device to be formatted is detailed. Make sure it is a MicroSD or USB drive and not your hard disk.

Screen 8

The selected device is formatted as ext4, wiping out any pre-existing partitions or data.

Screen 9

The linuxroot tarball is extracted to the selected device.

Screen 10

The file system is synced and the target device is ejected. You can now remove the MicroSD and put it aside.

Screen 11

Congratulations, you have created the linuxroot file system. One task remains & you will be booting into PicUntu!

Flashing the PicUntu kernel as the Android recovery image

You will need

  1. PicuntuKernelInstaller4.zip, which contains:
  2. Rockchip's RKAndroidTool 1.35 which I have preconfigured to flash PicuntuKernel\recovery.img as the Android recovery image.
  3. The PicUntu kernel image itself renamed to recovery.img and placed into a folder named PicuntuKernel
  4. The latest RK30 drivers in all Windows flavors.
  5. An RK3066 based mini PC running a rooted Android image.
  6. A monitor or TV with an available HDMI input port.
  7. A USB mouse.
  8. A Desktop PC (preferably) Running Windows XP or higher.
  9. An OTG cable as appropriate for your device. The MK808 uses a USB A to mini USB cable, while the UG802 and MK802 III use a USB A to micro USB cable.

Step by step process

  1. Extract the PicuntuKernelInstaller4.zip archive to a folder on your Windows system.
  2. On your Windows PC, browse to the folder where you extracted PicuntuKernelInstaller4.zip and double click on RKAndroidTool.exe.
  3. The Tool will launch. The initial screen should resemble this: Tool
  4. Connect your devices HDMI out to an HDMI monitor or TV.
  5. Connect a mouse of some sort to the full-sized USB port on your device.
  6. Connect one end of the USB cable to a fully powered USB port on the Windows system. Connect the other end of the cable to the appropriate port on your device (on most devices, it will be labeled OTG).
  7. Your device should now begin to boot up. The PC's USB bus will be the sole source of power to your device during this process.
  8. Once the device boots up we need to change a couple of settings so the Tool will detect it. Using the mouse we connected to the device, navigate to Settings, then click on USB in the left panel. You will see an unchecked checkbox in the right panel with the caption Connect to PC. Check this box. Your Windows PC may indicate New Hardware Found, but there is no need to install any drivers yet.
  9. Take a look at the very bottom of the Tool dialog--If it says "Found RKAndroid Mass Storage USB", then you are ready to take the device into Boot Loader mode. Skip to Step 11. If it still says "RKAndroid rock USB not detected" then proceed to the next step.
  10. We need to change the state of the USB storage, so the Tool will detect it. On your device, go to Developer Settings. Uncheck USB debugging, if it is checked. Now go to Storage then click the 3 dotted colon in the far upper right, then click USB computer connection. Regardless of what is checked here, you will need to change the state at least once and end up with Mass Storage checked. If Mass Storage is already checked, you will need to click on Media Device (MTP) and then back to Mass Storage. The Tool should now indicate "Found RKAndroid Mass Storage USB".
  11. It is time to boot the device into Boot Loader mode, a special Android mode that allows complete access to the filesystem, up to and including complete reimaging. On the Tool, click the button labeled Flash Mode. The screen should go blank and Windows should detect new hardware. Here is where we need to install drivers. If your device does not reboot for some reason, try this alternative: Open up a Terminal session on your device. Type the following:
su

Since your device is rooted, the SuperUser dialog may ask if Terminal app may use root. Click Allow. You should now have a # prompt. Type the following command:\

reboot bootloader

The device should now reboot into bootloader 12. If you have already installed the Windows drivers, the Tool will now indicate "Found RKAndroid Loader Rock USB". You can proceed to Step 14. Otherwise, proceed to the next step. 13. On the Windows PC, navigate to Device Manager. You should see a new unknown device with a yellow ! next to it. Right click on the unknown device and select Update Driver, then select Browse my computer. Click the Browse button and navigate to where you extracted PicuntuKernelInstaller4.zip to. You will see a Driver folder. Browse into Driver, then select the folder that matches your architecture (32 or 64 bit), then select your actual OS. The OK button should now be available. Click it and Windows should install the RK30 device drivers. If you are on Windows 7, you may get a security dialog saying these drivers are not designed for Windows 7. If you do, tell Windows to Install Anyway. Once the Windows drivers have installed, reboot the Windows system and unplug the USB cable to power off the device. Once the PC boots back up, plug the device back into it and re-launch the Tool. Go back to Step 8 and proceed from there to get the device back into Boot Loader mode. This time we will be flashing the Picuntu kernel image. 14. We are now ready to flash the Picuntu kernel as the Android recovery image. On the Tool, click the button labeled Flash ROM. The Tool will display it's progress. It should take approximately 5 seconds to flash. Your device will then reboot.

Congratulations, you have now installed the PicUntu kernel!

Running picuntu-da-server

  1. Login as root/12qwaszx
  2. Run picuntu-da-server.sh.
    cd /usr/local/picuntu
    ./picuntu-da-server.sh

Follow the on screen instructions. Choose UG802 if you are running an MK802 III.

Upgrading your PicUntu installation to RC3

You Will Need

  1. The RC3 modules tarball, available here: http://download.g8.net/picuntu/modules-3.0.8-alok-RC3.tgz
  2. The PicuntuRC3KernelInstaller archive, which contains all 3 RC3 kernels, the RC2 kernel and a stock Android recovery image as well.
  3. An RK3066 based Mini PC running PicUntu 0.9 RC2.
  4. A monitor or TV with an available HDMI input port.
  5. A USB mouse.
  6. A Desktop PC (preferably) Running Windows XP or higher.
  7. An OTG cable as appropriate for your device. The MK808 uses a USB A to mini USB cable, while the UG802 and MK802 III use a USB A to micro USB cable.

Step by Step Instructions

  1. Boot up PicUntu RC2 and launch your internet browser. Download the modules file from the link listed above. Either save it directly to the / folder or copy it to / after downloading.
  2. Launch a Terminal session, running as root.
  3. Change your working directory to / and untar the modules.
cd /
tar -xzfv modules-3.0.8-alok-RC3.tgz -C /lib/modules
  1. Rename an incorrectly named folder and sync the filesystem:
mv /lib/modules/modules /lib/modules/3.0.8-alok+
sync
sync
  1. Shut down PicUntu and remove power once screen goes blank.
shutdown now -h
  1. Follow the steps here to flash your desired RC3 kernel, continue with step 7.
  2. Now that you have installed the RC3 kernel, let's boot into it. Power the system up, it will go into Android. Open up an Android terminal session. Type the following commands:
su reboot
recovery
  1. The system will now boot into the RC3 kernel. Login as root/12qwaszx. Launch a terminal session. Type the following commands:
depmod -a
echo 0 > /proc/sys/kernel/hung_task_timeout_secs
  1. Now reboot the system to Android and then back to PicUntu. Congratulations, you have now completed all the required steps. PicUntu 0.9 RC3 and it's required modules are now installed and registered. The remaining steps are optional. They involve installing cpufreq support and a utility called conky that can display your CPU utilization in real time.
  2. First download and install cpufrequtils from the repository.
apt-get install cpufrequtils
  1. (optional and if using GUI) Now, download and install the conky system monitor from the repository, then launch it.
apt-get install conky conky -d

Tips/Warning

If you have added any modules to PicUntu RC2 - they will NOT work in RC3, you will need to let Alok know, what specific module you have compiled. Either, he can compile them for you, or you would need to recompile them with the new source, or /proc/config.gz

  1. Note: Despite the warnings below regarding potential overheating of your CPU with the cpufrequtils installed, several people who have uninstalled RC3 (including myself) report that the cores are still never exceeding 1.2 Ghz per core. The cpufrequtils will allow you to set a minimum and maximum clock rate, but setting the minimum above 1.2 Ghz, simply results in a speed of 1.2 Ghz. The following comments and example cpufrequtil commands were posted by Alok when the RC3 kernels and modules were posted.
  2. The default cpufreq governor is set to PERFORMANCE - which means, it would try to run at 1.6GHz. At this speed, without heatsink - your device can very quickly run up to very high temperatures... This is very true !!!
  3. Keep an eye out for system temperature with (in degree celcius)
cat /sys/module/tsadc/parameters/temp* | cut -d " " -f1,2
  1. Some useful cpufreq commands, Setting up governors (I assure you, you WILL burn your device, if you do NOT know, how to use the cpufreq effectively) To set cpu governor as userspace (You can directly force cpu speed ONLY with this governor)
cpufreq-set -g userspace #if you want direct control of the cpu speed
cpufreq-set -g ondemand # safest
cpufreq-set -g conservative # least power consumption
  1. To get a list of speeds you can set
cpufreq-info -s
  1. To set max frequency (only userspace)
cpufreq-set -u 
  1. Min frequency
cpufreq-set -d 
  1. Current speed
cpufreq-info -w
  1. Current settings
cpufreq-info -o
Clone this wiki locally