ARM
嵌入式Linux
- Linux包括:
- bootload:開(kāi)機(jī)啟動(dòng)初始化的一段代碼
- u-boot:通用bootload
- 嵌入式Linux內(nèi)核
- 文件系統(tǒng)
- bootload:開(kāi)機(jī)啟動(dòng)初始化的一段代碼
燒寫(xiě)不同的玩意
- 移植源代碼
- 配置并且交叉編譯
- 下載到開(kāi)發(fā)板并燒寫(xiě)進(jìn)去
Bootload燒寫(xiě)
- cd bootloader/u-boot/
- make distclean
- make mini2440_config
- make all
- ls -l u-boot.bin

Paste_Image.png
- 進(jìn)入MiniTools-20130513
- chmod u+x *
- sudo ./start.sh
- 格式化flash:勾上low format.....

Paste_Image.png
- 開(kāi)始燒寫(xiě)
- 開(kāi)關(guān)撥打S1重啟,按下enter

Paste_Image.png
- 按q進(jìn)入uboot的shell界面

Paste_Image.png
更新內(nèi)核(狹義的操作系統(tǒng))
- 內(nèi)核的基本功能:
- 進(jìn)程調(diào)度
- 進(jìn)程間通信(ipc)
- 內(nèi)存管理
- 網(wǎng)絡(luò)管理
- 移植自己的內(nèi)核
- 將文件保存到src下
- tar zxvf linux........
- du -sm:查看大小(在目標(biāo)文件夾下)
- make menuconfig
- 如果失敗就是因?yàn)樯僖粋€(gè)庫(kù)
- sudo apt-get install libncurses5-dev
- 手工配置內(nèi)核
- System Type

Paste_Image.png
- 空格選中

Paste_Image.png

Paste_Image.png

Paste_Image.png
- device driver->Graphics support

Paste_Image.png

Paste_Image.png

Paste_Image.png

Paste_Image.png

Paste_Image.png
- 查看配置文件
- ls -l .config
- 將配好的.config復(fù)制進(jìn)該文件里
- cp config_mini2440_w35 .config
- ls -l .config
- make zImage
- 復(fù)制到tftpboot下
- cp arch/arm/boot/zImage /tftpboot/
- ping 192.168.0.1
- tftp 0x30008000 zImage

Paste_Image.png
- nand erase 0x60000 0x500000

Paste_Image.png
- nand write 0x30008000 0x60000 0x500000

Paste_Image.png
- 重啟板子看見(jiàn)一大串~

Paste_Image.png
根文件系統(tǒng)
- 文件系統(tǒng)
- win:fat32,NTFS
- linux:ext3,ext4
- Embed:cramfs,jiffs/2,yaffs/2,nfs
- 文件系統(tǒng)基礎(chǔ)內(nèi)容
- 登錄系統(tǒng)-(用戶名,密碼,配置文件)
- Host /etc/
- shell命令
- busybox
- 運(yùn)行庫(kù)
- 交叉編譯庫(kù)過(guò)來(lái)的
- GUI界面
- 登錄系統(tǒng)-(用戶名,密碼,配置文件)
- 復(fù)制壓縮包兩個(gè)

Paste_Image.png
解壓mkyyaffs2image.tgz
sudo cp usr/sbin/mkyaffs2image-128M /usr/sbin/
sudo chmod 777 /usr/sbin/mkyaffs2image-128M
sudo tar zxvf rootfs_qtopia_qt4-20120626.tar.gz
-
刪除冗余文件
- sudo rm -rf usr/local/Trolltech/
- sudo rm -rf root/Documents/
- sudo rm -rf opt/Qtopia/(圖形界面)
cd home/plg
makdir mydir
-
進(jìn)壓縮文件目錄
- sudo mkyaffs2image-128M rootfs_qtopia_qt4 rootfs.img^C
- ls -l rootfs.img
- sudo chmod 666 rootfs.img
- cp rootfs.img /tftpboot/
重啟板子進(jìn)入板子終端
看看網(wǎng)絡(luò)還通不通
-
tftp 0x30008000 rootfs.img
Paste_Image.png nand erase 0x560000 0x1344780
nand write.yaffs 0x30008000 0x560000 0x1344780
燒寫(xiě)完成后重啟即可
