User Tools

Site Tools


tutorials:cubieboard2_dual-card

Cubieez for Cubieboard2 Dual-card

About this Article

Abstract

Cubieez is based on Debian, which rootfs is created by drkbcn from cubieforums.

  • Performance CPU governor
  • Kernel 3.4.79 with ARMHF support
  • Based on Debian 7.5 Wheezy
  • Kernel support to major USB Wi-Fi adapters(8188eu&8192cu)
  • Debian 7.5 ARMHF repository (better than Ubuntu one)
  • LXDE base desktop with low mem consumption
  • audio CODEC (jack audio) and sunhdmi (HDMI audio)
  • DATA-card(card1) activity to green led
  • X11VNC, SSH (SFTP too) and other basic utils installed
  • Iceweasel browser
  • Gnome Mplayer (less CPU consumption than lxmusic)
  • Eable OTG device fuction (g_mass_storage)
  • Expanding all tf-card space to rootfs when first booting

Installation

Hardware

  • cb2-2cards
  • card-reader
  • TF card (>=2G,class 10 suggeted)
  • HDMI and Monitor
  • USB mouse and keyboard

More

  • SATA
  • Data tf card
  • USB to miniUSB tieline

Get image

  1. Get newest image cubieez
  2. Get origin md5sum to check you image is completed
$ md5sum cubieez-cb2-2cards-v2.0-20140812.tar.gz > my_md5sum
$ cat my_md5sum
Compared with origin md5sum:dbb974882aa352dbcf3201ff8bfef676

Write to card

  • For linux users :
$ sudo tar -zxvf cubieez-cb2-2cards-v2.0-20140812.tar.gz
$ sudo umount /dev/sdx //sdx is your tf-card device label ,example sdb
$ sudo dd if=cubieez-cb2-2cards-v2.0-20140812.img of=/dev/sdx
$ sudo sync

"dd" is a dangerous operation,make sure sdx is your tfcard

Booting

  1. Insert boot card to card2 slot (bootcard)
  2. Connecting board and monitor by HDMI
  3. Insert network cable
  4. Power on

First booting ,the system will reboot once to expand rootfs

passwd

user:cubie passwd:cubieboard

test

Modules

cubie@cubie:~$ lsmod
Module                  Size  Used by
disp_ump                 861  0
g_mass_storage         43206  0
sunxi_cedar_mod         9962  0
mali_drm                2608  1
drm                   195017  2 mali_drm
lcd                     3638  0
mali                  111536  0
ump                    51204  4 mali,disp_ump

Network

Cable network
root@cubie:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:d5:09:40:b0:4f
          inet addr:**192.168.1.110**  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d5:9ff:fe40:b04f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4331986 (4.1 MiB)  TX bytes:10515 (10.2 KiB)
          Interrupt:87 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)

root@cubie:/# ping cubieboard.org
PING cubieboard.org (192.163.232.151) 56(84) bytes of data.
64 bytes from 192-163-232-151.unifiedlayer.com (192.163.232.151): icmp_req=1 ttl=51 time=283 ms
64 bytes from 192-163-232-151.unifiedlayer.com (192.163.232.151): icmp_req=2 ttl=51 time=283 ms
64 bytes from 192-163-232-151.unifiedlayer.com (192.163.232.151): icmp_req=3 ttl=51 time=284 ms
64 bytes from 192-163-232-151.unifiedlayer.com (192.163.232.151): icmp_req=4 ttl=51 time=284 ms
64 bytes from 192-163-232-151.unifiedlayer.com (192.163.232.151): icmp_req=5 ttl=51 time=284 ms
64 bytes from 192-163-232-151.unifiedlayer.com (192.163.232.151): icmp_req=6 ttl=51 time=283 ms
USB WIFI

cb2-2cards can support 8188eu ,when you insert wifi dongle,cubieez will modprobe 8188eu auto.

  1. You can config wifi in cubieez desktop.
  2. Restart networking
$ sudo /etc/init.d/networking restart

Rootfs space

root@cubie:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          7.3G  1.5G  5.6G  21% /
/dev/root       7.3G  1.5G  5.6G  21% /
devtmpfs        382M     0  382M   0% /dev
tmpfs            96M  548K   95M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           191M   68K  191M   1% /run/shm
tmpfs           478M   24K  478M   1% /tmp
tmpfs           478M     0  478M   0% /var/tmp
/dev/mmcblk0p1   12M  4.6M  6.5M  42% /media/cubieboard2

HDMI Audio

root@cubie:/# speaker-test -twav -c2

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 4096 to 32768
Period size range from 1024 to 8192
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
 0 - Front Left
 1 - Front Right

HP Audio

Switch to HP output

$ vim.tiny /etc/asound.conf

pcm.!default {
    type hw
    card 0  //card0 is HP
    device 0
  }
  ctl.!default {
    type hw
    card 0 //card0 is HP
  }

SSH

$ ssh cubie@192.168.1.110
aaron@cubietech:/work/$ ssh cubie@192.168.1.110
cubie@192.168.1.110's password:
Linux cubie 3.4.79 #1 SMP PREEMPT Sat Aug 9 12:44:49 CST 2014 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Aug  5 23:11:24 2014

DATA Card

Green led show Data card(card1) activity

SATA

cb2-2cards support 2.5 inch HDD&3.5 inch HDD 3.5 inch HDD

USBx2

USB2.0x2 can support:

  • Both wireless and wire USB mouse/keyboard
  • USB host

OTG Device

Allwinner otg support device fuction ,Storage on board can mounted to pc

  • Mount boot card first Partition to PC(cubieez-2.0 default )
$ sudo modprobe g_mass_storage file=/dev/mmcblk0p1 removable=yes stall=0
  • Mount data card to pc
$ sudo rmmod g_mass_storage
$ modprobe g_mass_storage file=/dev/mmcblk1 removable=yes stall=0
  • Mount sata to pc
$ sudo rmmod g_mass_storage
$ modprobe g_mass_storage file=/dev/sda removable=yes stall=0

IR Input

IR module is sunxi-ir.ko

$ git clone https://bitbucket.org/emiliolopez/keybinder.git
$ cd keybinder
$ sudo make install

Taking a Infrared remote control for a test

$ sudo keybinder /dev/input/event0
cubie@cubie:~/keybinder$ sudo keybinder /dev/input/event0
Reading key input from /dev/input/event0 (sunxi-ir)
Loaded config items
Keycode 1 pressed
Keycode 2 pressed
Keycode 3 pressed

Config

cubie-config

"Ctrl+Alt+t" open a terminal,run "cubie-config" as root

  • Expand Filesystem,when first boot ,filesystem was expanded
  • Change User passwd
  • Enable Boot To Desktop Or Not
  • Host Name Changing
  • Eable SSH Or Not

Known bugs or limitations

  • HDMI can't adapt to some monitor,this a display bug .please try:
  $ sudo fbset -left 10
  • Line-in is not work due to hardware bug.

See Also

tutorials/cubieboard2_dual-card.txt · Last modified: 2015/01/04 17:09 by aaron