Installing Debian to Cubieboard2-2card board
1. Preparation
A cubieboard2-2card main board, a HDMI cable, a Cubieboard power adapter, a memory more
than 4G TF card(If your computer can not directly read the TF card, then you should prepare a
card reader ) and a PC running Linux(or a running Linux virtual machine ).
2. Image resources
Download 4 files of Bootfs
http://dl.cubieboard.org/softwar ... ebian-v1.00/bootfs/
u-boot-sunxi-with-spl-mmc2.bin.tar.gz
u-boot-sunxi-with-spl-mmc0.bin.tar.gz
bootfs-part1-mmc2.tar.gz
bootfs-part1-mmc0.tar.gz
Decompressing files:
tar -zxvf u-boot-sunxi-with-spl-mmc2.bin.tar.gz
tar -zxvf u-boot-sunxi-with-spl-mmc0.bin.tar.gz
You will get:
u-boot-sunxi-with-spl-mmc2.bin
u-boot-sunxi-with-spl-mmc0.bin
Download Rootfs:debian-rootfs-armhf.tar.bz2
http://dl.cubieboard.org/softwar ... ebian-v1.00/rootfs/
3. Operate TF card that used for system booting
My PC can not directly read TF card, I should use a card reader, it will show /dev/sdb
3.1 Clear the data on the card
sudo dd if=/dev/zero of=/dev/sdb bs=1M count=2048
3.2 Import u-boot.bin image to TF card
If boot from TF2
$ sudo dd if=u-boot-sunxi-with-spl-mmc2.bin of=/dev/sdb bs=1024 seek=8;sync
If boot from TF0
$ sudo dd if=u-boot-sunxi-with-spl-mmc0.bin of=/dev/sdb bs=1024 seek=8;sync
Divide partitions on TF card
$ sudo fdisk /dev/sdb
Divide card into two partitons as below
Device Boot
Start
End
/dev/sdb1
2048
133199
/dev/sdb2
133120
15278079
Blocks
Id
65536
83
7572480 83
System
Linux
Linux
You must notice the end of the first partition should be 133119, and the other partitions can use the
default directly.
3.3 Format partitions
$ sudo mkfs.ext2 /dev/sdb1
$ sudo mkfs.ext4 /dev/sdb2
3.4 Write bootfs and rootfs into the card partitions.
$mkdir /tmp/sdd1 /tmp/sdd2
$sudo mount -t ext2 /dev/sdb1 /tmp/sdb1
$sudo mount -t ext4 /dev/sdb2 /tmp/sdb2
----------------------------------------------------------
When boot from TF2(u-boot is u-boot-sunxi-with-spl-mmc2.bin)
$sudo tar -C /tmp/sdb1 -xvf bootfs-part1-mmc2.tar.gz
When boot from TF0 (u-boot is u-boot-sunxi-with-spl-mmc0.bin)
$sudo tar -C /tmp/sdb1 -xvf bootfs-part1-mmc0.tar.gz
--------------------------------------------------------
$sudo tar -C /tmp/sdb2 -xvf debian-rootfs-armhf.tar.bz2
$sync
$sudo umount /tmp/sdb1
$sudo umount /tmp/sdb2
4. Starting system
Put the card into the corresponding card slot on the board, connecting HDMI cable, plug the
power cable, then the system will start.
User : root
Password : 750330
5. Notes
When installing CARD2 boot image card on CARD0, or installing CARD0 boot image card on
CARD2, the system will not boot successfully..
When TF cards all be plugged into two card slots, and boot images all be installed on TF cards,
the system of the CARD0(card slot is above the board )will be started when powered. And
CARD2(card slot is below the board)will be recognized as a data storage card.
When TF cards all be plugged into two card slots, one was installed corresponding boot image,
another one is the blank card, the system will start, and the blank card will be recognized as a data
storage card.
Version Date Mender Modify content
V1.0 2014.5.15 Wilhelm Viktor Initial version
|