Coding Chase - Projects

My 3D Hub

Thank You For Donating:

Ikeeki (linux-sunxi@irc.freenode.net)
Computer Troubleshooters Brasil

Friday 7 March 2014

Cubieboard CPR

Taking a break from Qt5 on Cubieboard A20, I decided to recover an older A10 cubieboard I had around.

This A10 was one of the first units to come out, has gone to war and back and the HDMI port is broken. At a given time I used a breadboard for cubie A10 with VGA support but couldn't seem to find it anywhere, so I had to go in blind.

I decided to make this unit into a house server unit, it works perfectly connected to the USB port on one of the TP-Link routers and I thought about using it for controlling other network elements around here as well as run some scripts and such.

With the HDMI gone, I decided to make use of the NAND and save myself and SD Card, so I went ahead and started going at it with available NAND images.

My first attempt lead me to Cubian, the official distro - and everything was working fine until I noticed I might have to change some stuff in the kernel.

I decided to get back to the typical linaro rootfs + sunxi kernel approach and get the latest, so this sunxi wiki page had what I needed.

Generating a LiveSuit image was half the work,I used the latest linaro ubuntu saucy server rootfs with sunxi-bsp and in no time, I had the img file needed to flash the NAND.

Flashing the NAND wasn't without incidents though, as my Linux Mint host wouldn't install the awusb driver needed for the PC to detect cubie on OTG USB connect.

The LiveSuit zip file included a Chinese README pdf which didn't help much, as my Chinese isn't that great, but in the end I managed to build, install and load the driver, and flash cubie.

Once flashed, another hurdle: no out-of-the-box SSH access, and no HDMI either. SD Card time with Cubian, chroot into the NAND system and ssh installation - success.

And when all seemed OK, I noticed the available space on the running NAND system was really low - the whole system was running off of the NAND on a 600MB partition.

Resizing/reorganizing the NAND was in order but that did prove difficult, so as a mental note, below are the commands I used, after the system was already installed, to merge partitions and resize things, using Cubian from microSD.

root@Cubian:~# nand-part -f a10 /dev/nand 2048 "bootloader 131072" "env 4096" "rootfs 7841792"
root@Cubian:~# fsck -f /dev/nandc
root@Cubian:~# resize2fs /dev/nandc


Explanation on all of this is available at this blog post although in my case, somehow it didn't go so smoothly, hence the notes above...

In any case, at present the NAND only has two partitions - boot with about 64MB in size and root with the remaining, for a total of 4GB!

No comments :

Post a Comment