FW:AndrewDB, http://www.slatedroid.com/topic/41654-pre-alpha-03-ubuntu-linux-for-mk802-iii-ug802-mk808-ug007-imito-mx1/

http://www.slatedroid.com/topic/41654-pre-alpha-03-ubuntu-linux-for-mk802-iii-ug802-mk808-ug007-imito-mx1/

https://docs.google.com/file/d/0B-xyWOsjMDJPQS1vTVgwbmNTWXc/edit?pli=1

 

Posted 04 December 2012 – 11:07 AM

Title says it all. No hand holding at this stage as this is really for people who know what they are doing.
Note that this is the last of the pre-Alpha releases, intended for developers only. In around ten days I’ll post an Alpha 0.4 release with more/some support and simplified installation steps!
Folks, I can’t stress this enough: these pre-Alpha releases are only for people who have already cross-compiled the Linux kernel for an ARM device and are used to having things not working out-of-the-box.
And no, it won’t play movies nor will it run XBMC at this stage, and you can’t play any games with it yet (no OpenGL support).
Also, please at least read this first post COMPLETELY before asking any questions in this thread!

Present version is pre-Alpha 0.3
It has been tested on the UG802, Rikomagic MK802 III, MK808, UG007 and iMito MX1.

These are the features for the pre-Alpha 0.3 release:

  • Ubuntu 12.10 Quantal armhf based.
  • Easy to install and dual-boot (does not erase your Android installation).
  • HDMI 1920×1080 60Hz aka 1080p.
  • XFCE desktop.
  • Linux framebuffer consoles.
  • HDMI sound support. USB sound support.
  • Full array of cpufreq governors (I suggest the interactive governor).
  • USB mouse, keyboard and USB storage tested. Webcam tested by Alok.
  • nbench benchmark included (source code and binary) so you can check the real clock speed / performance of your Android stick.
  • OpenSSH server included and installed so you can use the Android stick headless.
  • Internal WiFi is not functional yet. You’ll need a $4 Realtek or Ralink USB Wifi dongle or a $5 USB 2.0 10/100 ASIX or SR9700 Ethernet dongle to connect to your network. A list of tested, known to be working adapters is available in the second post in this thread.

Download links:

The kernel kernel-0.3.img (<10MB) https://docs.google….QS1vTVgwbmNTWXc
The Ubuntu 12.10 filesystem linuxroot-0.3.tar.gz (700MB) https://docs.google….SU9hOWN4Z0JEVEE

IMPORTANT: kernel-0.3 can only be used with linuxroot-0.3, do not mix kernel and root fs versions.

Requirements:

To install:
– Rooted Android stick and SuperUser.apk installed.
– Terminal emulator in Android.
– microSD card (4GB, 8GB or 16GB) or USB key (4GB, 8GB, 16GB, 32GB).
– A Windows/Linux PC.
RKAndroidTool v1.35 (Windows program to flash RK3066 devices). This is the program you need to flash the kernel!

If you have installed a Finless Android ROM on your Android stick using the Flash method then you already have everything you need to proceed with the installation.
The zip file that includes Bob’s ROM also has the RKAndroidTools v1.35 and full, detailed installation instructions, so please get it!

To use Linux you’ll probably need:
– USB 2.0 hub
– USB keyboard and mouse.
– HDMI monitor (Full HD capable i.e. 1920×1080@60Hz – 1080p).
– An inexpensive USB WiFi b/g/n or Ethernet 10/100 adapter dongle.

Changelog

– pre-Alpha 0.1: Initial release, requires microSD card.
– pre-Alpha 0.2: Simplified boot requirements. Can now boot from a root partition labeled linuxroot on any mass storage device accessible at boot time e.g. a 4GB USB key, a 8GB SD card in USB card reader plugged into the USB hub, or a microSD card in the microSD card slot of your Android stick. Also can boot from a USB hard disk (tested by Alok).
– pre-Alpha 0.3: Tested on a wider range of RK3066 devices, kernel source removed to save space (if you need the kernel source you can still copy it over from the pre-Alpha 0.2 rootfs file). Added cifs-utils package (SMB). Recompiled kernel with different settings, supports NFS V3 and V4 client, NTFS read/write. Cleaned apt archive cache. Some extra artwork (wallpapers, icon themes) and various chess engines.

 

Forward: AndrewDB, Pre-Alpha 0.2 Ubuntu Linux for MK802 III / UG802 / MK808 (Superseded by Pre-Alpha 0.3)

http://www.slatedroid.com/topic/41453-pre-alpha-02-ubuntu-linux-for-mk802-iii-ug802-mk808/

https://docs.google.com/open?id=0B-xyWOsjMDJPZjUwNzFjZ1lqMTg

https://docs.google.com/open?id=0B-xyWOsjMDJPUnM4RlllWGpScXc

 

 

 

Posted 29 November 2012 – 03:11 AM
Title says it all. No hand holding at this stage as this is really for people who know what they are doing. In a few days I’ll post a proper Alpha with more/some support!
Folks, I can’t stress this enough: these pre-Alpha releases are only for people who have already cross-compiled the Linux kernel for an ARM device and are used to having things not working out-of-the-box.
And no, it won’t play movies nor will it run XBMC at this stage, and you can’t play any games with it yet (no OpenGL support).
Also, please at least read this first post COMPLETELY before asking any questions in this thread!

Present version is pre-Alpha 0.2
It has been tested on the UG802, Rikomagic MK802 III and the MK808.

These are the features for the pre-Alpha 0.2 release:

Ubuntu 12.10 Quantal armhf based.
Easy to install and dual-boot (does not erase your Android installation).
HDMI 1920×1080 60Hz aka 1080p.
XFCE desktop.
Linux framebuffer consoles.
HDMI sound support. USB sound support.
Full array of cpufreq governors (I suggest the interactive governor).
USB mouse, keyboard and USB storage tested. Webcam tested by Alok.
Kernel source code and full compiler toolchain suite included (gcc-4.7.2), so the RK3066 device becomes an autonomous mini development system.
nbench benchmark included (source code and binary) so you can check the real clock speed / performance of your Android stick.
OpenSSH server included and installed so you can use the Android stick headless.
Internal WiFi is not functional yet. You’ll need a $4 Realtek or Ralink USB Wifi dongle or a $5 USB 2.0 10/100 ASIX or SR9700 Ethernet dongle to connect to your network.

Download links:

The kernel ug802recovkernel.img (<10MB) https://docs.google….ZjUwNzFjZ1lqMTg
The armhf Ubuntu 12.10 root filesystem linuxroot.tar.gz (<1GB) https://docs.google….UnM4RlllWGpScXc

PLEASE MIRROR THESE FILES AND POST A LINK BELOW!

Requirements:

To install:
– Rooted Android stick and SuperUser.apk installed.
– Terminal emulator in Android.
– microSD card (4GB, 8GB or 16GB) or USB key (4GB, 8GB, 16GB, 32GB).
– A Windows/Linux PC.
– RKAndroidTool v1.35 (Windows program to flash RK3066 devices). This is the program you need to flash the kernel!

If you have installed a Finless Android ROM on your Android stick using the Flash method then you already have everything you need to proceed with the installation.
The zip file that includes Bob’s ROM also has the RKAndroidTools v1.35 and full, detailed installation instructions, so please get it!

To use Linux you’ll probably need:
– USB 2.0 hub
– USB keyboard and mouse.
– HDMI monitor (Full HD capable i.e. 1920×1080@60Hz – 1080p).
– An inexpensive USB WiFi b/g/n or Ethernet 10/100 adapter dongle.

Kernel Installation
(there are many ways to do this, here is a simple one that should take less than a minute)
– Install RKAndroidTools v1.35 on your Windows PC following exactly the instructions provided by Bob Finless.
– Download the kernel.img file to your Windows PC. Rename it recovery.img.
– Connect Android stick to your PC and run RKAndroidTool v1.35.
– Open the terminal emulator and “su”, then “reboot bootloader”
– RKAndroidTool should now detect Android stick.
– Flash only the new recovery.img to the recovery partition in the NAND. This takes 5 or 6 seconds, and your Android stick will immediately reboot into Android. THIS IS NORMAL.

Now that you have installed the Linux kernel in the recovery partition of your Android stick, you can dual boot Android or Linux.

To boot Linux, boot into Android, open the terminal emulator and “su”, then “reboot recovery”.

If you get the “dead Android bot” with red triangle, it means the Linux kernel image was not flashed correctly to the recovery partition. :nea:
Power off, power on, and repeat the procedure above paying attention to all details, and it should work.

Notes:
* There is only one user defined: user ubuntu password ubuntu. Needless to say, change the password ASAP!
* The kernel config is available in /proc/config.gz.
* The kernel source is in the home directory of user ubuntu.
* And you have the nbench benchmark in /root.

Rootfs Installation
(again there are many ways to do this, here is a simple one)
Requires a Linux PC.
If you don’t have a Linux PC, you can use the GParted LiveCD: http://gparted.sourc….net/livecd.php

1. Use GParted to create an ext4 partition of at least 4GB on a USB key or a microSD card. Label the partition linuxroot.

2. As root, extract the tarball, and copy (using cp -a) all the files in the extracted directory to the partition labeled linuxroot. This will create a Ubuntu root filesystem on the USB key or microSD card with all the proper permissions.

If when you boot Linux, you don’t get the LightDM login screen, it means you didn’t copy the rootfs files properly (probably you weren’t root) and they don’t have the correct permissions. :nea: Repeat the two steps above paying attention to the instructions!

Changelog

– pre-Alpha 0.1: Initial release, requires microSD card.
– pre-Alpha 0.2: Simplified boot requirements. Can now boot from a root partition labeled linuxroot on any mass storage device accessible at boot time e.g. a 4GB USB key, a 8GB SD card in USB card reader plugged into the USB hub, or a microSD card in the microSD card slot of your Android stick. Should even boot from a USB hard disk, but I haven’t tested this.

Sponsors

– Thank you Slatedroid user gsandiego for sponsoring a nifty Infrared Digital Thermometer that will allow me to take precise temperature measurements on the RK3066 running different loads at different clock frequencies!

This post has been edited by AndrewDB: 04 December 2012 – 05:11 PM

backup vps with dropbox storage

Create account at www.dropbox.com

Login to www.dropbox.com from web browser

Create app of dropbox from: https://www.dropbox.com/developers/apps

Copy App key & App secret from Dropbox result web page

Download shell upload tool from  https://github.com/andreafabrizi/Dropbox-Uploader

Remove config file of upload tool from home, if have:
~/.dropbox_uploader

Get Dropbox exchange token by launch upload tool:
dropbox_uploader.sh list

Copy Token key from ~/.dropbox_uploader to your application

 

 

***************************************

Update at 2014/11

When create app on Dropbox:

What type of app do you want to create?

==> Dropbox API app

 

What type of data does your app need to store on Dropbox?

==>  Files and datastores

 

Can your app be limited to its own folder?

==> Yes

 

Provide an app name, and you’re on your way.

==> project name

 

 

clone svn repository into git

## Install git-svn tool
# if CentOS
yum install subversion-perl

# if Ubuntu
sudo apt-get install libsvn-perl

## In git server, Create empty repo of exfat as my project

## Create Bare repo of /repo/exfat
cd /repo
git init --bare exfat.git
cd exfat.git
cp hooks/post-update.sample hooks/post-update
git symbolic-ref HEAD refs/remotes/trunk

## Clone svn with git-svn in work repo of /repo/svn/exfat
cd /repo/svn
git svn clone -s http://exfat.googlecode.com/svn /repo/svn/exfat
cd exfat
git config core.worktree /repo/svn/exfat
git gc

## Convert SVN Tag to Git Tag
/usr/local/bin/svn2git

##   Add svn ignore, if have
git svn show-ignore > .gitignore
git add .gitignore
git commit -m ‘Convert svn:ignore properties to .gitignore.’

# # Push git rep to bare repository
git remote add origin /repo/exfat.git
git push origin –mirror

## Put other svn branch into bare repo
# git branch -r
git checkout -t -b svn-trunk trunk
git push origin –mirror

git checkout -t -b svn-v1.0.x v1.0.x
git push origin –mirror

 

## Verify by checkout in workstation

cd /tmp/test
git clone ssh://git.zhenglei.net/repo/exfat.git
cd exfat

Adb driver on ubuntu 10.10

lsusb
sudo touch /etc/udev/rules.d/51-android.ruls
sudo chmod 755
gedit /etc/udev/rules.d/51-android.ruls
sudo /etc/init.d/udev restart
sudo adb kill-server
sudo adb devices

cat /etc/udev/rules.d/51-android.ruls

SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″, GROUP=”lzheng”
SUBSYSTEM==”usb”, SYSFS{idVendor}==”18d1″, MODE=”0666″, GROUP=”lzheng”
SUBSYSTEM==”usb”, SYSFS{idVendor}==”05c6″, MODE=”0600″, GROUP=”lzheng”
SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0600″, GROUP=”lzheng”
SUBSYSTEM==”usb”, SYSFS{idVendor}==”710d”, MODE=”0600″, GROUP=”lzheng”
SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0600″, GROUP=”lzheng”
# adb protocol on passion (Nexus One)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”4e12″, MODE=”0600″, OWNER=”lzheng”
# fastboot protocol on passion (Nexus One)
SUBSYSTEM==”usb”, ATTR{idVendor}==”0bb4″, ATTR{idProduct}==”0fff”, MODE=”0600″, OWNER=”lzheng”
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”4e22″, MODE=”0600″, OWNER=”lzheng”
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”4e20″, MODE=”0600″, OWNER=”lzheng”
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM==”usb”, ATTR{idVendor}==”22b8″, ATTR{idProduct}==”70a9″, MODE=”0600″, OWNER=”lzheng”
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”708c”, MODE=”0600″, OWNER=”lzheng”
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM==”usb”, ATTR{idVendor}==”04e8″, ATTR{idProduct}==”6860″, MODE=”0600″, OWNER=”lzheng”
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”4e30″, MODE=”0600″, OWNER=”lzheng”
# adb protocol on panda (PandaBoard)
SUBSYSTEM==”usb”, ATTR{idVendor}==”0451″, ATTR{idProduct}==”d101″, MODE=”0600″, OWNER=”lzheng”
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM==”usb”, ATTR{idVendor}==”0451″, ATTR{idProduct}==”d022″, MODE=”0600″, OWNER=”lzheng”
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM==”usb”, ATTR{idVendor}==”0451″, ATTR{idProduct}==”d00f”, MODE=”0600″, OWNER=”lzheng”
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM==”usb”, ATTR{idVendor}==”0451″, ATTR{idProduct}==”d010″, MODE=”0600″, OWNER=”lzheng”
# adb protocol on grouper (Nexus 7)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”4e42″, MODE=”0600″, OWNER=”lzheng”
# fastboot protocol on grouper (Nexus 7)
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, ATTR{idProduct}==”4e40″, MODE=”0600″, OWNER=”lzheng”

setup git server on centos 5

# Install Git on git.zhenglei.net
yum install expat-devel zlib-devel gettext-devel openssl-devel
unzip git-1.7.2.5.zip
cd git-1.7.2.5
make prefix=/usr/local install

## Create empty repository of test.git in /repo of git.zhenglei.net
mkdir /repo
cd /repo
GIT_DIR=test.git git init
cd test.git
git –bare update-server-info
cp hooks/post-update.sample hooks/post-update

## Access git.zhenglei.net via port XXXX over ssh
# Config ssh on workstation
echo “Host git.zhenglei.net” >>~/.ssh/config
echo “hostname git.zhenglei.net”>>~/.ssh/config
echo port XXXX >>~/.ssh/config

## Clone test.git
git clone ssh://root@git.zhenglei.net/repo/test.git

## Add README in local
cd test
touch README
git add README
git commit -m “add readme”

## Push back to server
git push origin master

Delete spam wordpress comment by script

bash tool to delete spam or un-approved comment in WordPress:

http://dl.dropbox.com/u/45095875/wp_comment_v1.sh

where:

WP_DIR is the directory where WordPress instaled.

Call WP_del_SPAM_Comment to remove spam comments

Call WP_del_UA_Comment to remove un approved comments.

 

 

Script to Build Android Kernel Under Ubuntu

#!/bin/bash
#
ANDROID=”android-4.1.1_r6.1″
GCC=4.4.3

KERNEL=goldfish
KCONFIG=goldfish_armv7_defconfig

#GIT_SERVER=aosp.zhenglei.net
GIT_SERVER=127.0.0.1
GIT_PATH=”git/aosp”

PREBUILT=prebuilt
HOST=”linux-x86″
ARCH=”arm”
BUILD_PATH=”build”

function get_Tool {
LOC=”$1″
TAG=”$2″
VER=”$3″
TOOL_CHAIN=${ARCH}-eabi-${GCC}

if [ ! -d ${LOC}/${TOOL_CHAIN} ];then
if [ ! -d ${PREBUILT}/${TOOL_PATH} ];then
if [ -d ${PREBUILT} ];then
rm -rf ${PREBUILT}
fi
git clone git://${GIT_SERVER}/${GIT_PATH}/platform/prebuilt
fi

cd ${PREBUILT}
CUR_BRANCH=`git branch|grep “^* “|sed “s/^* //”`
if [ “${CUR_BRANCH}” != “${TAG}” ];then
#    git tag -l
git checkout -b ${TAG}
fi
cd ..

cp -r ${PREBUILT}/${HOST}/toolchain/${TOOL_CHAIN} ${LOC}

fi
TOOL_PATH=”`pwd`/${LOC}/${TOOL_CHAIN}”
}

function get_Kernel {
kernel=”$1″
if [ ! -d ${kernel} ];then
git clone git://${GIT_SERVER}/${GIT_PATH}/kernel/${kernel}.git
fi

cd ${kernel}
# git branch -a
CUR_BRANCH=`git branch|grep “^* “|sed “s/^* //”`
if [ “${CUR_BRANCH}” != “${kernel}” ];then
git checkout -t remotes/origin/android-${kernel}-2.6.29 -b ${kernel}
fi
if [ ! -d ../${BUILD_PATH}/${kernel} ];then
mkdir ../${BUILD_PATH}/${kernel}
git archive –format tar HEAD|tar x -C ../${BUILD_PATH}/${kernel}/
fi
cd ..
}

function build_Kernel {
config=$1
cd ${BUILD_PATH}/${kernel}
#ls -l arch/${ARCH}/configs/
make ${config}

START=`date +%s`
echo “Start to build at time:  $START”
echo “################################”
echo
echo

make -j4

echo
echo
echo “################################”
FINISH=`date +%s`
echo “Finish build at time: $FINISH”
echo
ELAPSED=`expr $FINISH – $START`
echo “Elapsed time: $ELAPSED”
cd ..
cd ..
}

##### Main ######
if [ ! -d ${BUILD_PATH} ];then
mkdir ${BUILD_PATH}
fi

rm -rf ${BUILD_PATH}/*

get_Tool $BUILD_PATH $ANDROID $GCC

export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=${TOOL_PATH}/bin:$PATH

get_Kernel $KERNEL

build_Kernel $KCONFIG

# Output

cp ${BUILD_PATH}/${KERNEL}/arch/${ARCH}/boot/zImage ${BUILD_PATH}/${KERNEL}/

# Luanch emulator with build kernel
# emulator -kernel ${KERNEL}/zImage