本文轉載自:http://blog.csdn.net/songze_lee/article/details/72808631
版權聲明:本文為博主原創文章,未經博主允許不得轉載。
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.8\lisongze
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.6
sudo apt-get installlib32stdc++6
2. /bin/bash: gperf: 未找到命令
sudo apt-get install 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.編譯成功
