rk3288 box 环境建立
1、 安装JDK1.7
cd /home/niuyi/rk3288src/package
tar xvf jdk-7u79-linux-x64.tar.gz
#set java environment
echo "set jdk1.7.079 environment"
JAVA_HOME=/home/niuyi/rk3288src/package/jdk1.7.0_79 # 注意和安装路径一致
export JRE_HOME=/home/niuyi/rk3288src/package/jdk1.7.0_79/jre
export CLASSPATH=.:JAVA_HOME/lib:JRE_HOME/lib:$CLASSPATH
export PATH=JAVA_HOME/bin:JRE_HOME/bin:$PATH
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.7.0_79/bin/jar 60
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_79/bin/java 60
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_79/bin/javac 60
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.7.0_79/bin/javap 60
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.7.0_79/bin/javadoc 60
sudo update-alternatives --config jar
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javap
sudo update-alternatives --config javadoc
2、ubuntu update
2.1、sudo apt-get update
./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45/ /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 60
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 60
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 60
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 60
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 60
sudo update-alternatives --config jar
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javap
sudo update-alternatives --config javadoc
sudo apt-get update
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libwxgtk2.8-dev build-essential zip curl libncurses5-dev zlib1g-dev genromfs u-boot-tools libxml2-utils texinfo mercurial subversion whois
sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo apt-get install lzop
3、私钥和公钥
tar xvf nova_id_rsa.tgz
cp .ssh/ ~ -rf
sudo aptitude install keychain
gedit ~/.bashrc
添加:
keychain --eval ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa
关闭并重新开启终端
4、更新同步
cd ~/rk3288src/repodir
mkdir rk3288_box
tar xvf rk3288_box_android5.1_v1.00_20150722.tgz -C rk3288_box
cd rk3288_box
.repo/repo/repo sync -l
.repo/repo/repo sync
5、安装java1.7 for android 5.1
chmod +x jdk-7u79-linux-x64.tar.gz
tar xvf jdk-7u79-linux-x64.tar.gz
sudo gedit /etc/profile
添加下面内容到最后:(会导致ubuntu登录不了)
#set java environment
JAVA_HOME=/home/niuyi/jdk1.7.0_79 // 注意和安装路径一致
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:JAVA_HOME/lib:JRE_HOME/lib:$CLASSPATH
export PATH=JAVA_HOME/bin:JRE_HOME/bin:$PATH
6、编译
测试JAVA
java -version
echo $JAVA_HOME
原作者:niuyimail
|