Ubuntu12.10-编译服务器安装

更新时间:2023-06-08 19:11:02 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

使用ubuntu12.10 服务器作为Android的编译服务器实际操作

官网下载的12.04LTS-amd64.iso 出现load CD-ROM 文件不正确,无法安装。相信最新版发布应该解决更多兼容性也好还是不完整性也好。从
下载 /ubuntu-releases/12.10/ubuntu-12.10-server-amd64.iso.torrent

用ISO方试制作启动USB-HDD, 这样在安装过程中的sheel模式下可以看到 /cd-rom 的内容包含有的文件。
注意,我用PE 方式制作的U-HDD, 安装过程中,找到CD-ROM.

根据以往的经验,安装必要的开发包。

问题:
sudo apt-get install tofrodos python-markdown libxml2-utils uboot-mkimage
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libgd2-xpm:i386 : Depends: libfontconfig1:i386 (>= 2.9.0) but it is not going to be installed
Depends: libfreetype6:i386 (>= 2.2.1) but it is not going to be installed
Depends: libjpeg8:i386 (>= 8c) but it is not going to be installed
Depends: libpng12-0:i386 (>= 1.2.13-4) but it is not going to be installed
Depends: libxpm4:i386 but it is not going to be installed
uboot-mkimage : Depends: u-boot-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

当某个库依赖的库与当前版本不一致时,aptitude 会尝试降级当前这个库的版本,
同时解决降级这个库对其它软件的依赖性的影响, 最终成功安装apt-get 没法安装的软件

$ sudo aptitude install libgd2-xmp:i386
Couldn't find any package whose name or description matched "libgd2-xmp:i386"
Couldn't find any package whose name or description matched "libgd2-xmp:i386"
The following partially installed packages will be configured:
libgd2-xpm:i386{b}
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 127 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
The following packages have unmet dependencies:
libgd2-xpm:i386 : Depends: libfontconfig1:i386 (>= 2.9.0) but it is not going to be installed.
Depends: libfreetype6:i386 (>= 2.2.1) but it is not going to be installed.
Depends: libjpeg8:i386 (>= 8c) but it is not going to be installed.
Depends: libpng12-0:i386 (>= 1.2.13-4) but it is not going to be installed.
Depends: libxpm4:i386 but it is not going to be installed.
The following actions will resolve these dependencies:

Remove the following packages:
1) libgd2-xpm:i386



Accept this solution? [Y/n/q/?] y
The following packages will be REMOV
ED:
libgd2-xpm:i386{a}
0 packages upgraded, 0 newly installed, 1 to remove and 127 not upgraded.
Need to get 0 B of archives. After unpackin

使用ubuntu12.10 服务器作为Android的编译服务器实际操作

g 640 kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 122198 files and directories currently installed.)
Removing libgd2-xpm:i386 ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Current status: 0 broken [-1].

$ sudo apt-get install libgl1-mesa-dev g++-multilib

#$ sudo apt-get install git gnupg libc6-dev
#$ sudo apt-get install libx11-dev


$ sudo lib32readline-gplv2-dev lib32z-dev ia32-libs #安装SUN JDK 需要, 否则会包 install.sfx 错
$ sudo lib32ncurses5-dev libgl1-mesa-glx:i386 #编译adb,enumltor

#$ sudo apt-get install gperf
$ sudo apt-get install python-lunch python-markdown libxml2-utils #编译时用
$ sudo apt-get install tofrodos uboot-mkimage

代码比较工具:
$ sudo apt-get install meld
配置meld为git默认的比较工具, 并不要显示提示对话框
$ sudo git config --system diff.tool meld
$ sudo git config --system difftool.prompt false

代码生成文档工具
$ sudo apt-get install docbook-utils xmlto


JDK 安装:
规划安装目录 usr/JAVA
下载 /technetwork/java/javase/downloads/index.html
jdk-6u45-linux-x64.bin
或:sudo apt-get install sun-java6-jdk

并用移到安装目录,并修改为可执行属性。chmod a+x
在使用这个自解压安装包前,需要安装ia32-libs libgl1-mesa-glx:i386
sudo apt-get install ia32-libs
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so)
在安装目录下:sudo ./jdk-6u45-linu-x64.bin


为所有用户加上JDK 需要的环境变量,修改/etc/profile, 在最后面加上:

export JAVA_HOME=/usr/JAVA/jdk1.6.0_45
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

编译Andriod

进入Andriod目录执行如下流程:
$ source build/envsetup.sh#重置即将执行的编译产品的环境变量
$ lunch
#选择你的目标产品
$ extract-bsp
$ make clean
$ make j2 #j 开启多核编译,我们使用i7

编译成功后会在 out/target/product/<产品名> 下生成boot.img, recovery.img system.img 等文件
boot.img #包含linux kernel 和根文件系统 rootfs 的 ramdisk, 可以使用 make bootimage 产生
system.img #andiod 应用镜像,可以使用 make systemimage-nodeps 产生


打包固件:
只需在andriod根目录下完整打包,直接使用
$ pack
打包成功后就在lichee/tools/tools/pack 目录下生成所需的固件:<产品名>.img

文本模式分辨率的修改1:
一般情况不在服务器上操作,用远程ssh等操作和配置服务器器,这样依据您的终端的分辨率了;2: 服务器模式下默认分辨率为 640x480, 在 /etc/default/grub 文件内修改,GRUB_GFXMODE=800x600 然后 $sudo update-grub


本文来源:https://www.bwwdw.com/article/oxf1.html

Top