顯示具有 cubie 標籤的文章。 顯示所有文章
顯示具有 cubie 標籤的文章。 顯示所有文章

2014年1月20日 星期一

替 cubietruck 加上 bonding 模組

    如果你是根據 http://blog.blackwhite.tw/2014/01/cubie-truck-sd.html 這篇文章建立 lubuntu 的作業系統的話,你會發現他預設並沒有編譯 bonding 模組。因此如果我們想要使用 bonding 的話,必須自己編譯 kernel。

    編譯 kernel 是一件很麻煩的事。不過有人幫我們簡化了很多步驟了。https://github.com/davidandreoletti/cubietruck 這裡已經有人提供腳本幫我們完成 cross compile。不過你需要注意的是你要使用 Ubuntu 12.04 或是 arm-linux-gnueabihf-gcc 4.6.3 版本。不然可能會編譯失敗。我在 mint 16 (with arm-linux-gnueabihf-gcc 4.8.1 版本會編譯失敗。

    編譯完後,他會在 output 的資料夾產生很多檔案。你需要把 uImage 複製到你 sd 卡裡的 bootfs,覆蓋他。然後在複製 output/lib 裏面的內容到 sd 卡裡的 rootfs 的 lib 資料夾裡。etc 資料夾也一樣。複製完後,記得去改 sd 卡裡的 /etc/network/interface。他有寫好 bonding 的設定,記得去修改相關設定。



2014年1月4日 星期六

讓 cubie truck 從 sd 卡開機


這裡只是簡單的描述,細節請看 http://docs.cubieboard.org/zh/tutorials/ct1/installation/install_lubuntu_desktop_server_to_sd_card#make_bootable_sd_card

  1. 下載 u-boot,bootfs,rootfs
  2. 清除 sd 卡
    • sudo dd if=/dev/zero of=${card} bs=1024 seek=544 count=128
  3. 把 u-boot 寫進 sd 卡。
    • sudo dd if=u-boot-sunxi-with-spl-ct-20131102.bin of=$card bs=1024 seek=8
  4. 再做磁碟分割,bootfs(第一個磁區) 要 ext2,第二個磁區要 ext4,像這樣(sdd 會隨每個電腦環境不同而有所不同)
    1. Device Boot      Start         End      Blocks   Id  System
      /dev/sdd1            2048      133119       65536   83  Linux
      /dev/sdd2          133120    15278079     7572480   83  Linux
  5. 建立檔案系統並把 bootfs 和rootfs 寫進你剛剛新建的磁區
    1. $mkdir /tmp/sdd1 /tmp/sdd2
      $sudo mount -t ext2 ${card}1 /tmp/sdd1
      $sudo mount -t ext4 ${card}2 /tmp/sdd2
      $sudo tar -C /tmp/sdd1 -xvf bootfs-part1.tar.gz
      $sudo tar -C /tmp/sdd2 -xvf rootfs-part2.tar.gz
      $sync
      $sudo umount /tmp/sdd1
      $sudo umount /tmp/sdd2