Buildroot/zh tw

Buildroot 是一組 Makefiles 和 patches 能更容易的gen出一個完整的嵌入式 Linux 系統. 更多資訊可以在 buildroot.org找到

Build buildroot image for A10
以下指令可以build出cubieboard的buildroot, 同時也能運用在其他A10裝置上.

[ 在Ubuntu上setup環境的指令 ]

mkdir cubie && cd cubie git clone https://github.com/matson-hall/allwinner-buildroot.git -b cubieboard git clone https://github.com/matson-hall/allwinner-pack-tools.git -b cubieboard git clone https://github.com/matson-hall/linux-allwinner.git -b cubieboard

./allwinner-pack-tools/bin/build.sh

Note: 64bit 系統需要執行 pack tools script (檔案路徑: ./allwinner-pack-tools/pack/pctools/linux/mod_update )

script script.exe  script_old  script_old.exe  u_boot_env_gen  update_23  update_23.exe  update_mbr  update_mbr.exe

這些執行檔主要用在64bit 系統, 所以要使用這些script, 你需要有64bit環境.

Log 建構過程: ./allwinner-pack-tools/bin/build.sh > buildlog.txt 2>&1 Script 中的部份指令需要sudo權限才能執行 (chown, ldconfig, mknod), 搞不懂的話就用 sudo 來 run.

Script 將會用cubieboard default 設定 build 出 buildroot 和 linux kernel, 然後打包 image 在 LiveSuit_images裡面.

Build 的過程大約要花10-15分鐘, 依電腦配備而異. 如果花的時間太短, 有可能是建構環境有問題而導致setup不正確. 再檢查一下前面設定建構環境的指令.

Build 完之後, 你會看到 -image is at-

/home/username/cubie/allwinner-pack-tools/pack/sun4i_linux_cubieboard.img

( 檔案路徑在 ~/cubie/allwinner-pack-tools/pack/sun4i_linux_cubieboard.img )

就這樣, 要把image燒到Nand flash裡面, 你要先安裝 LiveSuit.

Flash the image
unzip allwinner-pack-tools/tools/Livesuit-linux.zip chmod +x LiveSuit_For_Linux64/LiveSuit.run ./LiveSuit_For_Linux64/LiveSuit.run #livesuit will be installed to ~/Bin sudo ~/Bin/LiveSuit/LiveSuit.sh #run livesuit

選取剛剛 build 好的 image, 讓cubieboard 進入 FEL mode, 先按著 miniUSB port下面的按鈕不放, 然後連結 USB 線或電源線, 就會看到進度條在增加.

Note: LiveSuit.run 安裝了 dynamic kernel module, 為了使用這個驅動你將會需要安裝dkms. 這是全志的 usb driver, 是板子要燒錄的時候跟系統溝通用的. sudo apt-get install dkms

Buildroot XBMC on the Mele A1000 and A2000 (Allwinner A10)
Team-XBMC 開發者 Gimli (a.k.a. huceke) 更新了他的 Buildroot 開發環境(他是最初在 Raspberry Pi 上開發 XBMC 同時也相容 Mele A1000 and A2000 (Allwinner A10) 上的 CedarX :


 * http://github.com/huceke/buildroot-rbp
 * http://www.j1nx.nl/buildroot-xbmc-on-mele-a1000-allwinner-a10/
 * http://www.cnx-software.com/2012/11/12/xbmc-for-linux-on-allwinner-a10-devices-it-works-sort-of/

"Gimli recently decided to push his XBMC port to the public, so we now have a Buildroot XBMC on the mele A1000. Some of you are already knew about the port empatzero decided to release. This port is around for a while now and it does look like the same decoding gitches appear to happen. For some reason sometimes the decoding times show peaks in decoding time, up to the point it results in glitches.

''As both ports show similar bugs, Gimli decided to push it out in the open. Communication with Allwinner was still going on but progress was at a very slow rate. Having two different ports / approaches showing similar bugs kind of proof it is most likely something in the cedarX libraries. Hence the reason Gimli decided to release it.''

''Up till this point I have been following the progress from the sideline. I saw the port of empatzero popping up, but never actually decided to give it a go. I did not really liked the full blown linux OS for only one program (XBMC).''

I compiled the minimalistic buildroot envirnment (same as Gimli used for the RPi), compiled XBMC and merged them together with the necessary tweaks to get it running.


 * 3.0.42 kernel (just before the update to 3.0.52).
 * Buildroot environment.
 * No window manager (X11). XBMC runs straight onto the framebuffer.
 * Couple of tweaks here and there as this is not even an alpha release.
 * All armhf compild with Linaro toolchain.

''Created a bootable SD card with a ext2 partition containing the rootfs and xbmc binaries and started it up. There appears to be a memory leak in samba armhf compiled, so disabled that for now (server, not the client). Further more there is nothing really included. No LIRC remote support or other side hardware for that matter.''

''Inserted the SD card and turned on the Mele A1000. After a good couple of seconds the XBMC start splash appeared and the GUI showed up. GUI speed is fast enough and rendered at around ~40 FPS, similar as Empatzero his port.''

''Exactly the same performance and issues as Empatzero his port. The only difference is the AVI playback, but it should be noted that the test results on linux-sunxi (at this moment) are done without empatzero his last commit and support for AVI and other missing codecs.''

''There are still small issues here and there, but all with all not bad for a initial pre-alpha release. I will to some more testing, tweaking and adjustments. People that want to do it themselfs can already do so. Everything can be found on Gimli his github account."''

Tips

 * run /test/test.sh #你可以測試所有除了 96pin 的接頭之外的 cubieboard 介面.
 * run CedarXPlayerTest /root/test1.mp4 #可以從控制台播放視頻
 * run /test/lightshow/lightshow #可以測試 mali400 的 openGL ES 功能.