ARM課程-(NO.3 燒寫(xiě)內(nèi)核等)

ARM

嵌入式Linux

  • Linux包括:
    1. bootload:開(kāi)機(jī)啟動(dòng)初始化的一段代碼
      • u-boot:通用bootload
    2. 嵌入式Linux內(nèi)核
    3. 文件系統(tǒng)

燒寫(xiě)不同的玩意

  1. 移植源代碼
  2. 配置并且交叉編譯
  3. 下載到開(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界面
  • 復(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ě)完成后重啟即可

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容