インストールuuntu 12.10およびAndroid 4.1コンパイル環境

6588 ワード

一、64ビットのuuntu 12.10システムをインストールする
1,ダウンロードツール:Universal USB Installer(Universal)http://universal-usb-installer.en.softonic.com/download)
uuntu-2.04-desktop-amd 64  Universal-USB-Installer-1.3.1インストール時に「/casper/vmlinuz.efile not found」とヒントを与えます。
解決方法1:Universal USB Installerバージョンを低減します。
 Universal USB Installerの1.8.9.2.rarのバージョンをダウンロードして再作成します。
解決方法2:isoバッグを交換する(12.04.1のisoファイルのcasperの中のファイルはvmlinuzであって、vmlinuz.efiではない)   uuntu-2.4.2/3-desktop-amd 64.isoバッグをダウンロードします。uuntu-2.04は3つのバージョンがあります。uuntu-2.04 uuntu-2.04   解決方法3:最新のインストールパッケージをここにダウンロードします。  http://mirrors.163.com/ubuntu-releases
2,uuntuをダウンロードします java sdkと  http://mirrors.163.com/ubuntu-releases/12.10/
 http://download.csdn.net/detail/hp_2008/6020687
3,  uuntu 12.10 desktop版をインストールしてURLを参考にします。   http://diybbs.zol.com.cn/1/33925_1942.html
   http://blog.csdn.net/qq258711519/article/details/8722774
     http://www.dedecms.com/knowledge/servers/linux-bsd/2012/0819/8387.html
二、配置android 4.1コンパイル環境
1,更新/etc/ap/sources.list    内容は以下の通りです 
deb http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted

deb http://tw.archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ quantal-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ quantal-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ quantal-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ quantal-updates universe main multiverse restricted

deb http://mirror.lupaworld.com/ubuntu/archive/ quantal main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ quantal-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ quantal-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ quantal-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn/ quantal main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ quantal main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ quantal-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ quantal-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ quantal main restricted universe multiverse

deb http://ubuntu.mirror.cambrium.nl/ubuntu/ quantal main 

    実行:sudo ap-get udate
2,公式サイトのソースパッケージのURL:http://packages.ubuntu.com/quantal/
3,SSHサービスのインストール(リモートコントロール用)    openssh-serverをインストールします 
    に/etc/ap/sources.list追加ソース:debhttp://ubuntu.mirror.cambrium.nl/ubuntu/ quantal main
4,sambaの取り付け  sudo ap-get insall samba  現在のプロファイルを変更     sudo vim/etc/samba/smb.co nf  smb.com nfの最後に追加します。     [share]        path=/opt/sharedfolders        available=yes        browsealbe=yes        public=yes        writable=yes     sambaユーザを追加         sudo useradd smb         sudo smbpasswd-a smb
   sudo/etc/init.d/smbd retart   sudo ps aux grep smbd       --sambaが起動されているか確認します。
5,セットパックの設置   sudo appt-get install bison xsletproc flex libncurses 5-dev gcc-4.4 g+4 libc 6-dev-386 sharl tils a 32-lib*libxml 2-utils xslatproc
  インストール後: sudo rm/usr/bin/gcc sudo rm/usr/bin/g++ sudo ln-s/usr/bin/gcc-4.4/usr/bin/gcc sudo ln-s/usr/bin/g+++4/usr/bin/g+
  java環境の設定    JDKをインストールしてファイルをダウンロードします。http://download.csdn.net/detail/hp_2008/6020687     sudo./jdk-6 u 32-linux-x 64.bin  現在のディレクトリでjdk 1.6.0_32を取得しました。    sudo vim/etc/profile  最後に以下の内容を追加します。 export JAVUHOME=/usr/jdk 1.6.0_32    export JREHME=JAVUHOME/jre     export CLASSPATH=JAVUHOME/lib:$JREHHOME/lib:$CLASSPATH    export PATH=$JAVUHOME/bin:$JREHuHOME/bin:$PATH 
  vim~/.bashrc  (再起動しないと有効です。または以下の内容をprofileファイルに入れます。)  以下の内容を追加します。 export PATH=/usr/jdk 1.6.0_32/bin:/usr/jdk 1.6.0_32/lib:/usr/jdk 1.6.0_32:$PATH
5,ツールチェーンをダウンロード:   https://launchpad.net/linaro-toolchain-binaries/
6,クロスツールチェーンを/opt/mstar/gcc-linaro-arm-linux-gnueabiihf-4.7_linux/
7,配置環境:
 export PATH=/opt/mstar/gcc-linaro-arm-linux-gnueablif-4.7_linux/bin:$PATH export ARCH=arm export CROSchuCOMPILE=arm-linux-gnueabaif-
8,コンパイル  source build/envsetup.sh  lunch  make-j 4  9,このようなエラーが発生しました。
(1)   make:**No rule to make target`out/target/product/
  解決方法:outフォルダに追加する権限(sudo chmod 077 out/) gcc g++のバージョンを下げたり、対応するファイルが見つかりませんでした。あなたのAndroid.mkファイルの内容がファイルに見つからないか確認する必要があります。
(2)           lzoplzop:error while loading shared libries:liblzo 2.so.2:cannot open shared oject file:No such file or directory
          sources.listに追加:         debhttp://ubuntu.mirror.cambrium.nl/ubuntu/ lucid main
          sudo ap-get udate
          sudo ap-get install liblzo 2-2
(3)make:*[out/target/comon/obj/APPS/android.co re.tests.libcore.package.org.no-coree-tests-rests/noprogures.class-with-local.dex]Killed make:ake.org.no-cores.Waituning.Wallatning.
主な原因はメモリが足りないです。android 4.1のコンパイルは4 GRAMまたはswapを要求します。私のメモリは2 Gです。解決方法はswapのサイズを増やすことができます。
 
a.swapファイルsudo dd if=/dev/zero of=/boot/swapfile bs=1024 count=4194304を作成する。
b.ファイルをフォーマットして、swap(交換設備)sudo mkswap-v 1/boot/swapfileにします。
c.swapを既存システムに追加するsudo swapon/boot/swapfile free
d.恒久的な変更をするsudo vi/etc/fstab
ファイルの最後に次の行を追加します。/boot/swapfile swap defaults 1