A Computer Engineer Poking at Your Cerebral Cortex.: Cubieboard 2 (Cb2) Debian Nand Flash Install

4

Click here to load reader

Transcript of A Computer Engineer Poking at Your Cerebral Cortex.: Cubieboard 2 (Cb2) Debian Nand Flash Install

Page 1: A Computer Engineer Poking at Your Cerebral Cortex.: Cubieboard 2 (Cb2) Debian Nand Flash Install

19/10/13 18:07A computer engineer poking at your cerebral cortex.: Cubieboard 2 (cb2) debian nand flash install

Page 1 sur 4http://www.frackingtubes.com/posts/Cubieboard-2-cb2-debian-nand-flash-install/

Cubieboard 2 (cb2) debian nand flash install

September 2, 2013

The newer cubieboard 2 (cb2) finally arrived about 3 weeks ago and started research-ing on how to use it. The problem is as you search for cb2 info you will come acrosstons of cb1 info. Also since this unit is fairly new you will see lots of conflicting info.After 3 full weeks of trying to figure out how to get debian on the flash drive I finallyhave it working. Below are the steps required to get yours working. Warning: Thiswill erase android on your cubieboard. I'm assuming you are using debian/ubuntubased linux distro to install this.

1) download the 7z image http://cubian.org/downloads/

Page 2: A Computer Engineer Poking at Your Cerebral Cortex.: Cubieboard 2 (Cb2) Debian Nand Flash Install

19/10/13 18:07A computer engineer poking at your cerebral cortex.: Cubieboard 2 (cb2) debian nand flash install

Page 2 sur 4http://www.frackingtubes.com/posts/Cubieboard-2-cb2-debian-nand-flash-install/

2) install the tools to extract it:

sudo apt-get install p7zip-full

3) extract the image

7za e ./Cubian-base-r1-arm-a20.img.7z

4) After you extract the image it is now time to write the image to a mini sd card. Themini sd card needs to be at least 1GB to fit the image. You also want to make sureyour sd card isn't mounted. Also figure out which /dev/ device your sd card is as-signed to using fdisk -l. In this example my sd is assigned to /dev/sdb

sudo dd if=~/Downloads/Cubian-base-r1-arm-a20.img of=/dev/sdb bs=4096; sudo sync

5) Now put the sd card into your cb2 device and connect the power. Once the deviceboots you should see a login prompt. The username/password is cubie/cubie. Nowuse ifconfig to get the ip address of the unit. I immediately ssh into the unit becausemy hdmi monitor does not support the current resolution it is using. So almost every-thing is off the screen. If you know how to fix this please let me know.

6) Now ssh int your cb2 which also uses a non standard port of 36000.

ssh cubie@IpAddress -p 36000

7) now run patch your cb2 so it is fully up to date.

sudo apt-get update && sudo apt-get upgrade

8) Install all the cb2 tools.

wget -O - http://packages.cubian.org/cubian.gpg.key | apt-key add -add deb http://packages.cubian.org/ wheezy main to file /etc/apt/sources.listapt-get update && apt-get install cubian-update

9) Now you want to upgrade the kernel to the lastest version. As of writing this ker-nel 3.4.43 is the latest version. For some reason it kept saying failed to download...are

Page 3: A Computer Engineer Poking at Your Cerebral Cortex.: Cubieboard 2 (Cb2) Debian Nand Flash Install

19/10/13 18:07A computer engineer poking at your cerebral cortex.: Cubieboard 2 (cb2) debian nand flash install

Page 3 sur 4http://www.frackingtubes.com/posts/Cubieboard-2-cb2-debian-nand-flash-install/

you connected to the inernet? To fix this I had to change some CPU settings I foundon a forum post.

sudo -iupdate-rc.d cpufrequtils disableupdate-rc.d cubian-ondemandcpufreq disablereboot

10) Log back into the cubieboard2 to install the kernel 11) After the reboot connectback to the cb2. Now we are going to install the tool to boot the debian instance ontothe nand flash.

sudo apt-get update && sudo apt-get install cubian-nandinstallcubian-nandinstall

12) Now there is one setting that isn't going to work because the mount point for thefilesystem wasn't correct. So I had to fix this.

mkdir /mnt/nandcmount /dev/nandc /mnt/nandcnow edit /mnt/nandc/boot/uEnv.txt and change /dev/nand3 to /dev/nandcsave and exit this filecd to a directory not on the mount parition: cd /umount the parition: umount /mnt/nandc

13) Now reboot the device and remove the sd card and the cb2 should boot from thenand flash. 14) Just incase run these commands to re enable CPU stuff:

sudo -iupdate-rc.d cpufrequtils enableupdate-rc.d cubian-ondemandcpufreq enablereboot

15) There is another bug now where apt-get update won't work on the nand due tothe cubian mirror not having a key:

apt-get install debian-keyring # not 100% sure you need this but doesn't hurt.

Page 4: A Computer Engineer Poking at Your Cerebral Cortex.: Cubieboard 2 (Cb2) Debian Nand Flash Install

19/10/13 18:07A computer engineer poking at your cerebral cortex.: Cubieboard 2 (cb2) debian nand flash install

Page 4 sur 4http://www.frackingtubes.com/posts/Cubieboard-2-cb2-debian-nand-flash-install/

wget -O - http://packages.cubian.org/cubian.gpg.key | apt-key add -

free space after install with Ruby and Rails installed: