Ubuntu16.04下搭建开发环境及编译tiny4412 Android系统
1.安装ssh服务器(可通过网络远程登录系统,如putty、xshell) sudo apt-get install openssh-server 2.安装ftp服务器(默认已安装) windows 可使用leapFTP工具登录 sudo apt-get install vsftpd 需配置ftp服务(修改/etc/vsftpd.conf) 去掉前面# #local_enable=YES(表示是否允许本地登录) #write_enable=YES(表示允许上传文件) 重启ftp服务器 sudo /etc/init.d/vsftpd restart
3.安装nfs服务器(默认已安装) sudo apt-get install nfs-kernel-server 配置nfs服务器(修改/etc/exports)增加以下内容 /share *(rw,sync,no_root_squash,no_subtree_check) 重启nfs服务 sudo /etc/init.d/nfs-kernel-server restart
4.ubuntu下的Samba配置 使每个用户可以用自己的用户名和密码登录自己的home目录 1).先要安装Samba sudo apt-getinstall samba openssh-server 2).编译Samba配置文件 sudo vi/etc/samba/smb.conf 找到[homes]项,此项默认是注释掉的,取消其注释,然后修改其具体内容,修改成如下: [homes] comment = Home Directories browseable = yes # By default,the home directories are exportedread-only. Change the # next parameter to 'no' if you want to be able to writeto them. read only = no # File creation mask is set to 0700 for securityreasons. If you want to # create files with group=rw permissions,set nextparameter to 0775. create mask = 0755#建议将权限修改成0755,这样其它用户只是不能修改 # Directory creation mask is set to 0700 for securityreasons. If you want to # create dirs. with group=rw permissions,set nextparameter to 0775. directory mask = 0755 # By default,serverusername shares can be connected toby anyone # with access to the samba server. Un-comment thefollowing parameter # to make sure that only "username" canconnect to serverusername # The following parameter makes sure that only"username" can connect # # This might need tweaking when using externalauthentication schemes valid users = %S #本行需要取消注释 如上修改完成后wq保存退出! 3). 重启samba服务: sudo/etc/init.d/samba restart 4). 增加一个现有用户的对应samba帐号: 如我已经有一个用户叫lisongze,现在给lisongze开通samba帐号: sudo smbpasswd-a lisongze (非常重要) 根据提示输入两次密码即可。 5).现在可以测试了,在Window下输入samba地址尝试登录: 192.168.3.8lisongze 6).此时windows应该会弹出窗口要求输入用户名和密码,输入正确可看到/home/lisongze下文件
5.安装arm-linux-gcc交叉工具链 sudo tar xzf arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz -C/ 配置环境变量 sudo vim/etc/environment 在PATH中增加:/opt/FriendlyARM/toolschain/4.5.1/bin/ 执行soure生效 source/etv/environment 解决bash: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc: 没有那个文件或目录 sudo apt-getinstall lsb-core arm-liux-gcc -v 显示版本就ok了
6.安装 Java 开发环境 sudo apt-get install openjdk-7-jre 或者sudo apt-get install openjdk-7-jdk Ubuntu16.04的安装源已经默认没有openjdk7了,所以要自己手动添加仓库,如下: sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-7-jdk 7.编译android源码的依赖配置 sudo apt-get install git-core gnupg flexbison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multiliblibc6-dev-i386 lib32ncurses5-dev x11proto-core-devlibx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzipm4 8.编译 tiny4412 android 系统 1) . setenv 2) lunch 3) make –j8 4) 生成映象文件 ./gen-img.sh 注意:如果提示如下错误,要先编译 u-boot 以得到 mkimage 工具。 ./gen-img.sh: line31: mkimage: command not found
编译 u-boot 以得到 mkimage 工具的方法: tar -xzf uboot_tiny4412-20130729.tgz cd uboot_tiny4412/ make tiny4412_config make sudo cptools/mkimage /usr/bin/ 编译过程中错误及解决 1. out/host/linux-x86/bin/acp:error whileloading share libraries:libsrdc++.so.6:cannot open shared object file:No suchfile or directory 缺少libstdc++.so.6sudo apt-get installlib32stdc++6 2. /bin/bash: gperf: 未找到命令 3./bin/bash: xmllint:未找到命令
sudo apt-get install libxml2-utils 4. build/core/host_shared_library_internal.mk:44: recipe fortarget 'out/host/linux-x86/obj32/lib/libnativehelper.so' failed
cp /usr/bin/ld.goldprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld 5.编译成功 (编辑:台州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |