528126113 发表于 2016-10-18 21:12:39

cubieboard2刷NAND及点亮LED灯

本帖最后由 528126113 于 2016-10-18 21:21 编辑

能够被搜到的一些方法,大都过时了,不能用了。cb群和贴吧又僵尸的一比,真是莫名其妙!

关键词:cubieboard2win1032位PhoenixSuitNAND刷机尚未检测到设备接入电脑无设备连接点亮LED灯gpioFELOTG
点亮共阴极3色LED灯,如下图



资料都在百度云盘
http://pan.baidu.com/s/1c1NMBZy


输入NAND固件步骤:1-8


































528126113 发表于 2016-10-18 21:34:05

这个主题帖居然发重复了,请版主删除一个吧。

528126113 发表于 2016-10-18 21:34:18

这个主题帖居然发重复了,请版主删除一个吧。

528126113 发表于 2016-11-8 10:19:18

这个一潭死水的论坛啊,真是让人无语

528126113 发表于 2016-12-28 18:14:58

本帖最后由 528126113 于 2016-12-28 18:32 编辑

多说一点:关于远程,cubieboard2默认开启了dhcp,也就是说插上路由分出来的网线就能自动获取ip,即可用xshell远程登录了,用户名cubie,密码cubieboard。cubieboard2默认也安装了x11vnc server,也就是说win10上安装个vnc viewer就可以远程桌面了,但是需要先给cb2设置个通用密码
sudo x11vnc -storepasswd
sudo x11vnc -storepasswd in /etc/x11vnc.pass
sudo cp ~/.vnc/passwd /etc/x11vnc.pass
sudo reboot
开机后手动启动x11vnc
sudo /usr/bin/x11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5900
就可以了
ps:这死水一滩的论坛,真是让人无语


528126113 发表于 2016-12-28 19:24:03

关于蓝牙:cubieboard2是自带蓝牙驱动的,那种最便宜的usb蓝牙(10元以内)插上就能用了,但是需要命令行操作,不是很直观,推荐一个好用的软件blueman
sudo apt-get install locales
sudo apt-get install blueman

注:安装locales,是为了配置en_US.UTF-8,以防如下的locale错误(更多用处见http://www.jb51.net/os/other/72074.html)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory

528126113 发表于 2016-12-28 20:36:19

悲剧了,千万不要更新,不然Errors were encountered while processing:
/var/cache/apt/archives/udev_215-17+deb8u5_armhf.deb
系统基本上就钉死在这了,啥也装不了了,这是软件源里两个有依赖关系的软件版本不一致导致的

528126113 发表于 2016-12-29 10:09:44

本帖最后由 528126113 于 2016-12-30 10:24 编辑

cubieez版本太坑,/var/cache/apt/archives/udev_215-17+deb8u5_armhf.deb无解
现使用lubuntu版本试试,官网地址http://dl.cubieboard.org/softwar ... -a20-lubuntu-v1.07/
解压lubuntu-desktop-nand.img.gz后得到1.8GB大小的lubuntu-desktop-nand.img,直接用PhoenixSuit刷入nand,开机用户名和密码都是linaro,此版本自带Arduino IDE,vim7.3和emacs。但是有两个问题:1、无法上网;2、4GB的空间显示容量只有1.8GB;3、软件源不可靠;4、需要安装en_US.UTF-8
对于问题1
sudo dhclient eth0
sudo dhclient wlan0
对于问题2,扩容nand
sudo resize2fs /dev/nandb
注意,不是网上盛传的nandd,也不是 nandc nande nandf,这个版本的具体情况就是nand,扩容后的根分区大小为3.0GB。如果想过要获得更多容量可以参考http://forum.cubietech.com/forum ... tra=page%3D2&page=1,我试过了,可以扩充到3.6GB。具体过程见楼下
对于问题3,修改源,方法来自https://www.zhihu.com/question/24836871
直白点说就是如下
sudo vim /etc/apt/sources.list
把里面的内容换成如下10行
deb http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
对于问题4
sudo locale-gen en_US.UTF-8

安装bash-completion,以便实现apt-get的自动补全功能
sudo apt-get install bash-completion
source ~/.bashrc

保存后重启机器,之后,千万不要更新系统。我试过了,无线网卡的自动连接功能失效






















528126113 发表于 2016-12-29 11:58:22

cubieboard2的nand扩充到3.6GB步骤:
1、下载cb2-lubuntu-en-4g-card0.img.gzhttp://dl.cubieboard.org/software/a20-cubieboard/lubuntu/cb-a20-lubuntu-v1.07/
解压后,用Win32DiskImager写入tf卡
2、tf插入cubieboard2,开机
sudo su
nand-part -f a20 /dev/nand
看到如下
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
OK
check partition table copy 2: mbr: version 0x00000200, magic softw411
OK
check partition table copy 3: mbr: version 0x00000200, magic softw411
OK
mbr: version 0x00000200, magic softw411
3 partitions
partition1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition2: class =         DISK, name =       rootfs, partition start =   163840, partition size =6291456 user_type=0
partition3: class =         DISK, name =      UDISK, partition start =6455296, partition size =1277952 user_type=0
4、
nand-part -f a20 /dev/nand 32768 "bootloader 131072" "rootfs 7569408"
看到如下(注:7569408=6291456+1277952)
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
OK
check partition table copy 2: mbr: version 0x00000200, magic softw411
OK
check partition table copy 3: mbr: version 0x00000200, magic softw411
OK
mbr: version 0x00000200, magic softw411
3 partitions
partition1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition2: class =         DISK, name =       rootfs, partition start =   163840, partition size =6291456 user_type=0
partition3: class =         DISK, name =      UDISK, partition start =6455296, partition size =1277952 user_type=0
check partition table copy 0: mbr: version 0x00000200, magic softw411
check partition table copy 1: mbr: version 0x00000200, magic softw411
check partition table copy 2: mbr: version 0x00000200, magic softw411
check partition table copy 3: mbr: version 0x00000200, magic softw411

ready to write new partition tables:
mbr: version 0x00000200, magic softw411
2 partitions
partition1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition2: class =         DISK, name =       rootfs, partition start =   163840, partition size =7569408 user_type=0

write new partition tables? (Y/N)
y

verifying new partition tables:
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
OK
check partition table copy 2: mbr: version 0x00000200, magic softw411
OK
check partition table copy 3: mbr: version 0x00000200, magic softw411
OK
mbr: version 0x00000200, magic softw411
2 partitions
partition1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition2: class =         DISK, name =       rootfs, partition start =   163840, partition size =7569408 user_type=0
rereading partition table... returned 0
5、重启一下
reboot
6、开机后
sudo su
e2fsck -f /dev/nandb
看到如下
e2fsck 1.42.5 (29-Jul-2012)
/dev/nandb: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (342657, counted=343239).
Fix<y>? yes
Free inodes count wrong (306159, counted=306168).
Fix<y>? yes

/dev/nandb: ***** FILE SYSTEM WAS MODIFIED *****
/dev/nandb: 72840/379008 files (0.1% non-contiguous), 443193/786432 blocks
7、resize2fs /dev/nandb
8、关机
poweroff
9、拔出tf卡
10、启动cubieboard2
11、
df -lh
看到如下
Filesystem      SizeUsed Avail Use% Mounted on
/dev/root       3.6G1.7G1.8G48% /
devtmpfs      382M4.0K382M   1% /dev
tmpfs            20M4.0K   20M   1% /tmp
none             96M212K   96M   1% /run
none            5.0M   05.0M   0% /run/lock
none            478M   0478M   0% /run/shm
none            100M   16K100M   1% /run/user


528126113 发表于 2016-12-29 19:43:38

无论是lubuntu固件,还是cubieez固件。都不是很纯净,总会导致一些莫名其妙的问题,比如vnc怎么设置都不正常,始终无法连接,或者总是循环登录。因此,我建议删除既有的账户,在自建一个,以lubuntu为例
sudo su
userdel-r linaro
adduser linaro
vim /etc/sudoers
添加一行
在root ALL=(ALL) ALL下面添加
linaro ALL=(ALL) ALL

页: [1] 2
查看完整版本: cubieboard2刷NAND及点亮LED灯