Tag Archives: hardware

Fedora on the Pine64

Well getting Fedora running on the Pine64 has been an adventure. Fedora itself doesn’t work out of the box, but that’s to be expected because we’re waiting for some things to go upstream. But thanks to the tireless efforts of the Linux SunXi project I was able to boot the board with a (mostly) open source firmware, self-compiled near-upstream kernel, and a Fedora filesystem.

rjones@pine:~$ uname -a
Linux pine 4.9.0-00036-ge6af24d #14 SMP PREEMPT Sat Mar 18 13:56:36 GMT 2017 aarch64 aarch64 aarch64 GNU/Linux
rjones@pine:~$ cat /etc/fedora-release
Fedora release 25 (Twenty Five)

Below I will describe how to do this, but note that by the time Fedora 26 comes out you should not need to do any of this stuff.


Cross-compile your own kernel as described here. As well as the standard defconfig you will also need to enable CONFIG_XFS_FS=y.

Run make dtbs to create arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dtb which you will need later.

Read about the AllWinner A64/Pine64 boot process. It’s not necessary to replicate those steps exactly, but it helps to explain why we’re doing the next steps.

Grab one of the firmware images from here (it doesn’t matter which) and write it to your micro SD card. But note this firmware and dtb is out of date, and so you must then get the latest firmware from here and overwrite it:

# dd if=pine64_firmware-20170314.img of=/dev/mmcblk0 bs=8k seek=1

The firmware image above will create a single 100 MB FAT partition. Add further partitions to the partition table on the micro SD card so it looks approximately like this. The root filesystem must be on partition 5 (the first logical partition).

Device         Boot    Start      End  Sectors  Size Id Type
/dev/mmcblk0p1          2048   204799   202752   99M  6 FAT16
/dev/mmcblk0p2        204800 31116287 30911488 14.8G  5 Extended
/dev/mmcblk0p5        206848 21178367 20971520   10G 83 Linux
/dev/mmcblk0p6      21180416 25374719  4194304    2G 82 Linux swap / Solaris

Make swap on /dev/mmcblk0p6.

From your kernel build, copy arch/arm64/boot/Image and arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dtb to the first (FAT) partition. (This will overwrite the existing out of date dtb file.)

Extract the filesystem from a virt-builder Fedora 25 aarch64 image:

$ virt-builder --arch aarch64 fedora-25
$ virt-filesystems -a fedora-25.img --all --long -h
$ guestfish --ro -a fedora-25.img run : download /dev/sda4 aarch64-root.fs

This is an XFS filesystem image, which is why you have to enable the XFS driver in the custom kernel above.

Now write this to the fifth (first logical) partition:

# dd if=aarch64-root.fs of=/dev/mmcblk0p5 bs=16M
# xfs_growfs /dev/mmcblk0p5

You will now need to mount up the root filesystem and make a few changes. At the very least:

  1. Edit /etc/fstab to reflect reality.
  2. Disable the root password in /etc/passwd.

With any luck booting the micro SD card in the Pine64 should now work.

4 Comments

Filed under Uncategorized

Pine64 — extra things

e64As with other low end ARM hardware the $50 I paid for the Pine64 isn’t enough for a fully working system. You will also need a serial port adapter, I recommend the CP2102 of which you’ll find millions on Amazon for under £10. Also, a micro SD card. And a USB to micro USB cable to power the board.

The total cost of this shouldn’t be more than another $40, taking the total cost of the hardware to about $90.

4 Comments

Filed under Uncategorized

Pine64 — delivered

A few weeks ago you will remember that I ordered a Pine64 aarch64 developer kit with the wifi daughter-card, in order to test how well it works with upstream Fedora. It arrived today. The ordering process was very efficient with Pine64 keeping me up to date at all steps along the way, and there were no customs delays or charges.

As I’m rather busy in the next few days, I may not have time to look at it right away.

4 Comments

March 14, 2017 · 6:31 pm

Pine64 – ordered

I ordered the 2 GB Pine64 64 bit ARM board. It’s extremely constrained compared to the normal 64 bit ARM boards I use, but it’s good that there’s one which may be supported by upstream Linux in the near future.

Total cost for the board + the wifi accessory + postage to the UK is $50.98 (£42.36).

Let’s see how it goes …


They also have this strange SO-DIMM form-factor co-processor. I’m not sure what to make of it.

3 Comments

Filed under Uncategorized

ioport

22:59 < rjones> well, you know, I actually want some
enhancements to /dev/port (on x86)
23:00 < rjones> for example, it's not possible to
specify if you want byte/word/.. access
23:00 < rjones> which of course means its not possible
to access certain devices which are expecting non-byte-
sized reads or writes ..
23:01 < rjones> somehow no one has added these
important ioctls to /dev/port in the 20+ years its been
around
23:01 < rjones> I suspect because no one has realized
the importance of writing device drivers
in shell script
23:06 < dmick> where's that vomit emoticon when you
need it

3 Comments

Filed under Uncategorized

New home gateway router (part 1)

router_blur

For about 12 months I’ve been using the ASUS RT-N16 + OpenWRT as my gateway. But you know what? It sucks — I hate that it’s not a real Linux distro, that it’s difficult to upgrade, that it randomly reboots itself, that it only kinda manages IPv6, that it uses a half-assed packaging system, that I can’t run regular tools, and that it’s insecure.

And since I switched over to VDSL @ 80 Mbps which uses PPPoE (ie. no need for DSL terminated at the gateway), it’s time to switch to running a real distro on a real computer.

The first step is to choose a small form-factor PC, crucially with two ethernet ports. Unfortunately Intel still don’t sell NUCs with two ethernet ports. Also Intel NUCs are really expensive. So I’ve settled for a much cheaper alternative:

Total cost (including tax and delivery): £137.87

Note that I already have a spare 2.5″ SSD, but you would need to add the cost of a SATA HDD/SSD if you don’t have one already.

It’ll be interesting to see how fast the USB 3.0 ethernet adapter is in real life, because it’s the obvious weak spot. However I only need the router to be able to forward at 80 Mbps, and even a Celeron and a weak ethernet adapter surely should be able to handle that.

6 Comments

Filed under Uncategorized

Raise the Itanic! (part 2)

Previously …

I finally got my HP Integrity RX2620 (dual core Itanium II) working, after a lot of messing around in the EFI shell. It is now running Debian-ia64 Wheezy. The thing is so noisy that you can’t stay in the room with it for very long, and I discovered that if you pull out the fans then it overheats and shuts down after a few minutes.

Here is lstopo output:

itanic-lstopo

and /proc/cpuinfo:

processor  : 0
vendor     : GenuineIntel
arch       : IA-64
family     : 31
model      : 2
model name : Madison up to 9M cache
revision   : 2
archrev    : 0
features   : branchlong
cpu number : 0
cpu regs   : 4
cpu MHz    : 1600.035
itc MHz    : 1600.035576
BogoMIPS   : 2390.01
siblings   : 1
physical id: 0

processor  : 1
vendor     : GenuineIntel
arch       : IA-64
family     : 31
model      : 2
model name : Madison up to 9M cache
revision   : 2
archrev    : 0
features   : branchlong
cpu number : 0
cpu regs   : 4
cpu MHz    : 1600.035
itc MHz    : 1600.035576
BogoMIPS   : 2390.01
siblings   : 1
physical id: 1

Also: Nooooooooooooooooooo!!!!11!!1

2 Comments

Filed under Uncategorized