CubieBoard博客-HomeCubieTech公司网站

cubie.cc CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 4074|回复: 0

Installing Debian to Cubieboard2-2card board

[复制链接]

113

主题

1

好友

1万

积分

版主

Rank: 7Rank: 7Rank: 7

贡献
2467
金钱
5721
威望
2467
买家信用
卖家信用
积分
13584
发表于 2014-9-25 11:13:26 |显示全部楼层
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


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

QQ|Archiver|手机版|邮件群发|cubie.cc---深刻的嵌入式技术和应用讨论中文社区 ( 粤ICP备13051116号-1  

GMT+8, 2019-10-24 00:12 , Processed in 0.021836 second(s), 9 queries , Apc On.

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc. | Style by Coxxs

回顶部