CubieBoard中文论坛

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

cubieboard2刷NAND及点亮LED灯

[复制链接]
发表于 2016-10-18 21:12:39 | 显示全部楼层 |阅读模式
本帖最后由 528126113 于 2016-10-18 21:21 编辑

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

关键词:cubieboard2  win10  32位  PhoenixSuit  NAND  刷机  尚未检测到设备接入电脑  无设备连接  点亮  LED灯  gpio  FEL  OTG
点亮共阴极3色LED灯,如下图
点亮3色led灯.png
点亮led灯.JPG

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

输入NAND固件步骤:1-8
phoenixsuit-1.png
phoenixsuit-2.png
phoenixsuit-3.png
phoenixsuit-4.png
phoenixsuit-5.png
phoenixsuit-6.png
phoenixsuit-7.png
phoenixsuit-8.png


























回复

使用道具 举报

 楼主| 发表于 2016-10-18 21:34:05 | 显示全部楼层
这个主题帖居然发重复了,请版主删除一个吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-10-18 21:34:18 | 显示全部楼层
这个主题帖居然发重复了,请版主删除一个吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-11-8 10:19:18 | 显示全部楼层
这个一潭死水的论坛啊,真是让人无语
回复 支持 反对

使用道具 举报

 楼主| 发表于 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:这死水一滩的论坛,真是让人无语


回复 支持 反对

使用道具 举报

 楼主| 发表于 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
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-12-28 20:36:19 | 显示全部楼层
悲剧了,千万不要更新,不然Errors were encountered while processing:
/var/cache/apt/archives/udev_215-17+deb8u5_armhf.deb
系统基本上就钉死在这了,啥也装不了了,这是软件源里两个有依赖关系的软件版本不一致导致的
回复 支持 反对

使用道具 举报

 楼主| 发表于 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

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






















回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-12-29 11:58:22 | 显示全部楼层
cubieboard2的nand扩充到3.6GB步骤:
1、下载cb2-lubuntu-en-4g-card0.img.gzhttp://dl.cubieboard.org/softwar ... -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
partition  1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition  2: class =         DISK, name =       rootfs, partition start =   163840, partition size =  6291456 user_type=0
partition  3: 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
partition  1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition  2: class =         DISK, name =       rootfs, partition start =   163840, partition size =  6291456 user_type=0
partition  3: 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
partition  1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition  2: 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
partition  1: class =         DISK, name =   bootloader, partition start =    32768, partition size =   131072 user_type=0
partition  2: 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      Size  Used Avail Use% Mounted on
/dev/root       3.6G  1.7G  1.8G  48% /
devtmpfs        382M  4.0K  382M   1% /dev
tmpfs            20M  4.0K   20M   1% /tmp
none             96M  212K   96M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            478M     0  478M   0% /run/shm
none            100M   16K  100M   1% /run/user


回复 支持 反对

使用道具 举报

 楼主| 发表于 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

回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-19 08:28 , Processed in 0.028992 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部