Cubieboard2 はHDMIが標準なので、拡張ボードを追加して、VGA出力を試みる。
くっつけるのはこんな感じ。
くっつけただけではだめで、ツールを使ってコンフィグする。
- http://www.cubieforums.com/index.php?topic=2047.msg13199#msg13199
- http://docs.cubieboard.org/tutorials/common/edit_the_system_configuration#linux
- https://github.com/cubieplayer/Cubian/wiki/VGA-output
- http://wiki.androciti.com/index.php?Cubieboard2
要はブート時に読み込むファイルの編集。
- Sunxi-tools入れる
- ツールをmakeする
- uSDのブート領域マウント
- script.binをローカルコピー
- 編集
- script.binをuSDのブート領域へ戻す
- uSDのブート領域アンマウント
- reboot
root@cubieez:~# git clone git://github.com/linux-sunxi/sunxi-tools.git Cloning into 'sunxi-tools'... remote: Reusing existing pack: 896, done. remote: Total 896 (delta 0), reused 0 (delta 0) Receiving objects: 100% (896/896), 287.49 KiB | 219 KiB/s, done. Resolving deltas: 100% (478/478), done. root@cubieez:~#
root@cubieez:~/sunxi-tools# make gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ `pkg-config --cflags libusb-1.0` -o fel fel.c `pkg-config --libs libusb-1.0` Package libusb-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb-1.0' found Package libusb-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb-1.0' found fel.c:22:20: fatal error: libusb.h: そのようなファイルやディレクトリはありません compilation terminated. make: *** [fel] エラー 1 root@cubieez:~/sunxi-tools# apt-get install libusb-1.0
root@cubieez:~/sunxi-tools# make gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ `pkg-config --cflags libusb-1.0` -o fel fel.c `pkg-config --libs libusb-1.0` gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ -o pio pio.c pio.c: In function ‘do_command’: pio.c:316:57: warning: unused parameter ‘argc’ [-Wunused-parameter] gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ -c -o nand-part-main.o nand-part-main.c gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ -c -o nand-part-a10.o nand-part.c -D A10 gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ -c -o nand-part-a20.o nand-part.c -D A20 gcc -o nand-part nand-part-main.o nand-part-a10.o nand-part-a20.o root@cubieez:~/sunxi-tools#
root@cubieez:~/sunxi-tools# mkdir /mnt/mmcp1 root@cubieez:~/sunxi-tools# mount /dev/mmcblk0p1 /mnt/mmcp1 (the script.bin is in /dev/nanda if you boot from nand ) root@cubieez:~/sunxi-tools# cp /mnt/mmcp1/script.bin ./
root@cubieez:~/sunxi-tools# chmod 777 script.bin root@cubieez:~/sunxi-tools# ./bin2fex script.bin > ./script.fex fexc-bin: script.bin: version: 0.1.2 fexc-bin: script.bin: size: 45424 (80 sections) root@cubieez:~/sunxi-tools# root@cubieez:~/sunxi-tools# cp script.bin ./back_script.bin.20140430
root@cubieez:~/sunxi-tools# vi script.fex
<例>
[disp_init]
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 4
screen0_output_mode = 4
screen1_output_type = 2
screen1_output_mode = 14
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 1
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 1
root@cubieez:~/sunxi-tools# ./fex2bin script.fex > ./script.bin root@cubieez:~/sunxi-tools# cp ./script.bin /mnt/mmcp1/ root@cubieez:~/sunxi-tools# umount /mnt/mmcp1 root@cubieez:~/sunxi-tools# root@cubieez:~/sunxi-tools# reboot
映りました。
解像度上げてみたら、あがらなくなった、「720p50 1024*768」がベストの模様。
あがらなくなったら、uSD抜いて、他のLinuxで再度編集して元に戻すか、バックアップファイルを戻す。