国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
android linux基礎(chǔ)知識(shí)總結(jié)[上]
===================================================
linux ,Android基礎(chǔ)知識(shí)總結(jié)
1. Android編譯系統(tǒng)分析
2. 文件系統(tǒng)分析
3. 制作交叉工具鏈
4. 軟件編譯常識(shí)
5. 設(shè)置模塊流程分析
6. linux系統(tǒng)啟動(dòng)流程分析
7. linux下svn使用指南
8. LFS 相關(guān)
9. linux 內(nèi)核的初步理解
====================================================
================
android系統(tǒng)開發(fā)指南(常用環(huán)境的搭建和使用)
說明:
有的步驟會(huì)用到腳本簡化操作,腳本通過svn服務(wù)器獲?。?br style="margin: 0px; padding: 0px;">svn co svn://192.168.2.148/smartphone/td0901/r ... es/scripts
用戶名為各位的姓名拼音,密碼與用戶名相同
一 編譯android源碼,制作文件系統(tǒng)
二 ubuntu下燒錄內(nèi)核和文件系統(tǒng)
一 編譯android源碼,制作文件系統(tǒng)
1. 開發(fā)主線源碼位置:
svn://192.168.2.148/smartphone/td0901/t ... e-jianping //cupcake 源代碼
svn://192.168.2.148/smartphone/td0901/t ... -2.6.28-a1 //內(nèi)核源代碼
2. 打標(biāo)的源代碼位置
svn list svn://192.168.2.148/smartphone/td0901/tag
我們可以通過 svn list svn://192.168.2.148/smartphone 查看svn版本庫內(nèi)核
更多信息請(qǐng)參卡以下文檔:
http://192.168.2.148/svn/smartphone/
http://192.168.2.148/svn/smartphone/智能平臺(tái)開發(fā)部資料管理手冊(cè)V1.0.doc
http://192.168.2.148/svn/smartphone/linux下svn操作指南及規(guī)范.doc
用戶名為各位的姓名拼音,密碼與用戶名相同
3. 編譯源碼
進(jìn)入 cupcake 工作拷貝的頂層目錄,執(zhí)行:
. ./make_image15.sh
部分執(zhí)行結(jié)果:
out/target/product/littleton/root/ 內(nèi)核需要使用的 initramfs 
out/target/product/littleton/system 文件系統(tǒng)的系統(tǒng)分區(qū)
out/target/product/littleton/data/ 文件系統(tǒng)數(shù)據(jù)分區(qū)
4. 編譯內(nèi)核
此處內(nèi)核編譯主要針對(duì)驅(qū)動(dòng)組之外的同事
1> 設(shè)置工具鏈
內(nèi)核的 linux-2.6.28-a1/Makefile 中設(shè)定了:
CROSS_COMPILE ?= arm-linux-
所以設(shè)置PATH環(huán)境變量,保證能找到正確的工具鏈
假設(shè)工具鏈位于: /usr/local/marvell-arm-linux-4.1.1/ 設(shè)置為:
export PATH:=/usr/local/marvell-arm-linux-4.1.1/bin/:$PATH
2> 更改編譯選項(xiàng)(網(wǎng)絡(luò)啟動(dòng)或者本機(jī)啟動(dòng))
內(nèi)核頂層目錄執(zhí)行:
make menuconfig
General setup ---> 

Initial RAM filesystem and RAM disk (initramfs/initrd) support
() Initramfs source file(s) (NEW) 
如果需要支持網(wǎng)絡(luò)啟動(dòng)反選 [] Initial RAM filesystem and RAM disk (initramfs/initrd) support
如果需要支持本地啟動(dòng)選中 
Initial RAM filesystem and RAM disk (initramfs/initrd) support
設(shè)置 () Initramfs source file(s) (NEW) 為 root
拷貝 cupcake 編譯結(jié)果 out/target/product/littleton/root/ 到內(nèi)核頂層目錄
3> 編譯
內(nèi)核頂層目錄執(zhí)行 make zImage
編譯好的內(nèi)核:
arch/arm/boot/zImage
5. 搭建網(wǎng)絡(luò)開發(fā)環(huán)境
1> 安裝nfs服務(wù)器
sudo apt-get install nfs-kernel-server nfs-common
2> 修改nfs服務(wù)器配置文件/etc/exports ,確保有以下配置項(xiàng)
/nfsroot/rootfs *(rw,no_root_squash,sync)
我們?cè)趦?nèi)核中已經(jīng)固定,手機(jī)通過網(wǎng)絡(luò)方式啟動(dòng),默認(rèn)從 /nfsroot/rootfs 
讀取文件系統(tǒng),修改配置項(xiàng)后需要重啟nfs服務(wù)器:
sudo /etc/init.d/nfs-kernel-server restart
3> 配置網(wǎng)絡(luò)根文件系統(tǒng)
拷貝 out/target/product/littleton/root/ 內(nèi)容到 /nfsroot/rootfs 目錄
拷貝 out/target/product/littleton/system 內(nèi)容到 /nfsroot/rootfs/system
修改 /nfsroot/rootfs/init.rc 去掉幾個(gè)mount命令 
為了使大家的過程,結(jié)果統(tǒng)一,可以使用腳本 mkfs.cupcake 完成 
在執(zhí)行 mkfs.cupcake.nfs 腳本前先到 cupcake-jianping 目錄下執(zhí)行: . ./make_env15.sh設(shè)置環(huán)境變量,
獲取通過手動(dòng)輸入android源碼的位置,讓腳本來設(shè)置環(huán)境變量。
二 ubuntu下燒錄內(nèi)核和文件系統(tǒng)
1. 硬件: 
手機(jī)一臺(tái)
usb轉(zhuǎn)串口線一根
usb轉(zhuǎn)網(wǎng)卡線一根
2. 軟件環(huán)境
1> tftp 服務(wù)器
執(zhí)行腳本: setup_tftpd.sh 安裝和配置tftp服務(wù)器,我們默認(rèn)以 /tftpboot 
為 tftp服務(wù)器的根目錄,需要下載的文件都放在該目錄下。
2> 獲取待燒錄的鏡像文件
svn list svn://192.168.2.148/smartphone/td0901/release/images 查看服務(wù)器上的
版本情況,通常我們下載最新的,例如,下載9月18號(hào)發(fā)布的版本:
svn co svn://192.168.2.148/smartphone/td0901/r ... es20090918
3> 燒錄鏡像文件
用以下文件為例,示范通過tftp燒寫內(nèi)核和文件系統(tǒng)
內(nèi)核 zImage0917 
系統(tǒng)分區(qū): system0918.img 
數(shù)據(jù)分區(qū) data0918.img 
待燒寫的以上文件必須存在于tftp服務(wù)器根目錄/tftpboot下。
具體步驟:
首先連接好硬件設(shè)備進(jìn)入blob下載模式
1> blob 起來后按任意鍵
Processing obm parameters...
Can't detect micco. Set PMIC as normal I2C mode.
NAND flash(Manu=0x98 Device=0xba) detected!
Slot 0 Found
get relocation table
Found Main Bad block table at address 0x0f000000, version 0x01
Found Mirror Bad block table at address 0x0efc0000, version 0x01
Consider yourself BLOBed!
blob version 2.0.5-pre3 for Marvell Littleton
Copyright (C) 1999 2000 2001 2002 2003 Jan-Derk Bakker and Erik Mouw
blob comes with ABSOLUTELY NO WARRANTY; read the GNU GPL for details.
This is free software, and you are welcome to redistribute it
under certain conditions; read the GNU GPL for details.
length not align with page size, change to 0x0
Read flash from 0x60000, length 0x0
Done
Autoboot (2 seconds) in progress, press any key to stop ..
Autoboot aborted
Type "help" to get a list of commands
blob> 
2> 通過 tftp 下載內(nèi)核到pc內(nèi)存 0x80800000 地址處 
blob> tftp zImage0917
Begin init ether usbnet!!!
***** Plug-in USB cable & config usbdnet now ****** 
exit check_usb_connection:1
TFTPing zImage0917*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OK.
received 6144 blocks (3145156 bytes)
tftp_cmd: file 'zImage0917' loaded via tftp to address 0x80800000.
3> 擦除原來的內(nèi)核分區(qū),0x100000 為分區(qū)起始地址,0x300000為分區(qū)長度
blob> nanderase -z 0x100000 0x400000
the current NAND chip does not support Block Unlocking.
Erase 0x300000 length data from flash: 0x100000
Erase flash from 0x100000, length 0x300000
........................Done
4> 燒寫內(nèi)存 0x80800000 開始 實(shí)際長度為 3145156 的內(nèi)核數(shù)據(jù)到起始地址為 0x100000 的內(nèi)核分區(qū)
blob> nandwrite -z 0x80800000 0x100000 3145156
the current NAND chip does not support Block Unlocking.
Write 0x2ffdc4 length data from RAM: 0x80800000 to flash: 0x100000
Write flash from 0x100000, length 0x2ffdc4
Erase flash from 0x100000, length 0x300000
........................Done
........................Done
5> 下載系統(tǒng)分區(qū)鏡像文件到pc內(nèi)存 0x80800000 地址處 
blob> tftp system0918.img
TFTPing system0918.img*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OK.
received 113138 blocks (57925824 bytes)
tftp_cmd: file 'system0918.img' loaded via tftp to address 0x80800000.
6> 擦除原來的flash系統(tǒng)分區(qū)
blob> nanderase -z 0x500000 0x4000000
the current NAND chip does not support Block Unlocking.
Erase 0x3e0f800 length data from flash: 0x400000
Erase flash from 0x400000, length 0x3e0f800
...................................................................................
...................................................................................
...................................................................................
..........................Done
7> 燒寫數(shù)據(jù)到flash系統(tǒng)分區(qū)
blob> nandwrite -y 0x80800000 0x500000 57925824
the current NAND chip does not support Block Unlocking.
Write 0x373e0c0 length data from RAM: 0x80800000 to flash: 0x400000
Write flash from 0x400000, length 0x3591800
Erase flash from 0x400000, length 0x3591800
....................................................................................
.....................................................................................
................................................................................Done
....................................................................................
....................................................................................
................................................................Done
8> 下載數(shù)據(jù)分區(qū)鏡像文件到pc內(nèi)存 0x80800000 地址處 
blob> tftp data0918.img
TFTPing data0918.img*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OK.
received 33992 blocks (17402880 bytes)
tftp_cmd: file 'data0918.img' loaded via tftp to address 0x80800000.
blob> 
9> 擦除原來的flash數(shù)據(jù)分區(qū)
blob> nanderase -z 0x4500000 0xBB00000
the current NAND chip does not support Block Unlocking.
Erase 0xa81f000 length data from flash: 0x4400000
Erase flash from 0x4400000, length 0xa81f000
.....................................................................................
.....................................................................................
.....................................................................................
.....................................................................................
...................................................Done
10> 燒寫數(shù)據(jù)鏡像到flash數(shù)據(jù)分區(qū)
blob> nandwrite -y 0x80800000 0x4500000 17402880
the current NAND chip does not support Block Unlocking.
Write 0x1098c00 length data from RAM: 0x80800000 to flash: 0x4400000
Write flash from 0x4400000, length 0x1018000
Erase flash from 0x4400000, length 0x1018000
..................................................................................Done
..................................................................................Done
blob> 
flash分區(qū)圖:
*******************************************
* * * * *
* blob * kernel * system * data *
* * * * *
*******************************************
nanderase -z 0x100000 0x400000
tftp zImage
nandwrite -z 0x80800000 0x100000 
燒寫system.img:
nanderase -z 0x500000 0x4000000
tftp system.img
nandwrite -y 0x80800000 0x500000 
燒寫 userdata.img :
nanderase -z 0x4500000 0xBB00000
tftp userdata.img
nandwrite -y 0x80800000 0x4500000 
============================
涉及的內(nèi)容:
svn服務(wù)器的使用
android的編譯系統(tǒng),原理,工具鏈,輔助工具,參數(shù)等,環(huán)境變量,怎樣單獨(dú)添加編譯一個(gè)單獨(dú)的模塊等。
android 的編譯結(jié)果:文件系統(tǒng)分析
文件系統(tǒng)的使用,啟動(dòng)流程
設(shè)置模塊流程分析
============================
====================================================
1. Android編譯系統(tǒng)分析
編譯腳本及系統(tǒng)變量
build/envsetup.sh腳本分析
在編譯源代碼之前通常需要在android源代碼頂層目錄執(zhí)行 . ./build/envsetup.sh 目的是為了使用
腳本 envsetup.sh 里面定義了一些函數(shù):
function help()
function get_abs_build_var()
function get_build_var()
function check_product()
function check_variant()
function setpaths()
function printconfig()
function set_stuff_for_environment()
function set_sequence_number()
function settitle()
function choosetype()
function chooseproduct()
function choosevariant()
function tapas()
function choosecombo()
function print_lunch_menu()
function lunch()
function gettop
function m()
function findmakefile()
function mm()
function mmm()
function croot()
function pid()
function gdbclient()
function jgrep()
function cgrep()
function resgrep()
function getprebuilt
function tracedmdump()
function runhat()
function getbugreports()
function startviewserver()
function stopviewserver()
function isviewserverstarted()
function smoketest()
function runtest()
function runtest_py()
function godir ()
choosecombo 命令分析:
function choosecombo()
{
choosesim $1
echo
echo
choosetype $2
echo
echo
chooseproduct $3
echo
echo
choosevariant $4
echo
set_stuff_for_environment
printconfig
}
會(huì)依次進(jìn)行如下選擇:
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1] 
Build type c
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
偷梁換柱
android內(nèi)核編譯方法 - chenwayne
android開發(fā)環(huán)境搭建,內(nèi)核編譯
【嵌入式Linux學(xué)習(xí)七步曲之第三篇 Linux系統(tǒng)bootlaoder移植】U-BOOT全線移植分析系列之四--U-boot如何引導(dǎo)Linux內(nèi)核啟動(dòng)? - Sailor
S3C6410 完全由SD卡啟動(dòng)Linux流程
NFS ROOT 啟動(dòng)內(nèi)核的配置(UBoot)(轉(zhuǎn)載)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服