Cubical Monolith 2013 05

2013-05-31

/etc/hosts

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

192.168.1.220   master

192.168.1.205 node06
192.168.1.204 node05
192.168.1.206 node07
192.168.1.201 node02
192.168.1.202 node03
192.168.1.203 node04
192.168.1.207 node08
192.168.1.200 node01
192.168.1.208 node09
192.168.1.209 node10
192.168.1.210 node11
192.168.1.211 node12

/etc/network/interfaces
auto lo
iface lo inet loopback

# The "pre-up ...check-link.sh" lines are a workaround to prevent bringing
# up an interface that has no cable connected or does not even physically
# exist (e.g. the builtin on on MK802). In some cases this network set-up
# process would lock-up, unsuccessfully trying to bring up such an interface.
# If you change the configuration here to your own (and you know which
# interface actually exists and which one you are using, you can safely
# remove those lines.

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.220
netmask 255.255.255.0
gateway 192.168.1.1

  pre-up /usr/local/bin/check-link.sh eth0

auto eth1
iface eth1 inet dhcp
  pre-up /usr/local/bin/check-link.sh eth1

allow-hotplug wlan1
auto wlan1
iface wlan1 inet static
address 192.168.1.213
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid "REDACTED"
wpa-psk "REDACTED"

#auto wlan0
#iface wlan0 inet dhcp
#    wpa-driver wext
#    wpa-ssid yourssidhere
#    wpa-key-mgmt WPA-PSK
#    wpa-psk encodedpskhere

2013-05-30

I asked someone to help me (Thanks Roman!) and his reply was:

This all is completely wrong.

losetup /dev/loop0 a10-debian-server-2gb.2013-04-11.img # no offsets, no size limit!!
dd if=bootloader/sunxi-spl.bin of=/dev/loop0 bs=1024 seek=8
dd if=bootloader/u-boot.bin of=/dev/loop0 bs=1024 seek=32
losetup -d /dev/loop0

That's all you should need to do.

You can also see this reference here at http://linux-sunxi.org/Hwpack, so the offsets will always the same no matter what size card since it's always located in the same place on the image.

Well I tried that method as well but it didn't boot. I'm going to see why that didn't work as well. This is very annoying!

I have a console on it but it went right into Android with the stupid green led lit (someday I am going to make that light green for linux instead)

2013-05-29

This is how I converted the boot images I had to use 1GB without using an SD card reader.

root@master:/master/tmp/bootloader# dd if=sunxi-spl.bin of=/dev/loop0 bs=1024 seek=8
20+0 records in
20+0 records out
20480 bytes (20 kB) copied, 0.00248648 s, 8.2 MB/s
root@master:/master/tmp/bootloader# dd if=u-boot.bin of=/dev/loop0 bs=1024 seek=32
169+1 records in
169+1 records out
173412 bytes (173 kB) copied, 0.00483666 s, 35.9 MB/s
root@master:/master/tmp/bootloader#

Updated: I finally had a few minutes to spare and gave this a try, but it failed. I need to see why, because in theory it should have worked perfectly.
Updated: NOTE: DO NOT USE THIS PROCEDURE USE THE ONE FROM 2013-05-30.

Cubie #2

I am preparing the second Cubie board.

2013-05-28-001-small.jpg

The 5vdc isn't adequate if it's supplied from the board to the SATA drive, it even failed to work with the SSD. The first thing I have to do is snip the connector from the supplied SATA cable and extend it out so I can feed it from an external supply.

I ran the patched power wires down through vinyl tubing to both hide my ugly splice and protect the extended power cable.

You don't need an SD card reader

I have been an idiot. The problem is I work too many hours.

root@master:/master/tmp# fdisk -l master-4gb-2013-05-28.img

Disk master-4gb-2013-05-28.img: 3974 MB, 3974103040 bytes
255 heads, 63 sectors/track, 483 cylinders, total 7761920 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cb560

                    Device Boot      Start         End      Blocks   Id  System
master-4gb-2013-05-28.img1            2048      127071       62512    e  W95 FAT16 (LBA)
master-4gb-2013-05-28.img2          131072     7761419     3815174   83  Linux
root@master:/master/tmp# expr 2048 \* 512
1048576
root@master:/master/tmp# expr 127071 \* 512
65060352
root@master:/master/tmp# losetup /dev/loop0 master-4gb-2013-05-28.img -o 1048576 --sizelimit 65060352
root@master:/master/tmp# expr 131072 \* 512
67108864
root@master:/master/tmp# expr 7761419 \* 512
3973846528
root@master:/master/tmp# losetup /dev/loop1 master-4gb-2013-05-28.img -o 67108864 --sizelimit 3973846528

root@master:/master/tmp# mount /dev/loop0 /mnt/sdcard0
root@master:/master/tmp# mount /dev/loop1 /mnt/sdcard1
root@master:/master/tmp# ls /mnt/sdcard0
config-3.0.62-r1-rm2  script.bin  System.map-3.0.62-r1-rm2  uImage  vmlinuz-3.0.62-r1-rm2
root@master:/master/tmp# ls /mnt/sdcard1
bin  boot  dev  etc  home  lib  lost+found  master  media  mnt  opt  proc  root  run  sbin  selinux  srv  sys  tmp  usr  var
root@master:/master/tmp#

Updated: NOTE: DO NOT USE THIS PROCEDURE USE THE ONE FROM 2013-05-30. The general idea was fine but you don't need to use offsets or size limits and the above procedure will cause corruption when you try to update the bootloader.