Fedora 22 on Cubietruck

In previous post (How-to set up network audio server based on PulseAudio and auto-discovered via Avahi) I’ve wrote details how I set up network audio-server. Actually I’m using cubietruck there.

Now I want to post how I installed F22 and get audio card working (it’s not trivial).

Cubietruck terminal


  • Fedora 22 minimal image from dl.fedoraproject.org
  • Installed package uboot-images-armv7
  • Few hours (microsd really sloow)

Write Fedora and u-boot images to microSD card:

# xzcat -T 4 Fedora-Minimal-armhfp-22-3-sda.raw.xz | dd of=/dev/mmcblk0; sync
# dd if=/usr/share/uboot/Cubietruck/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8 conv=fsync,notrunc

Read partition table, mount and remove root password:

# partprobe /dev/mmcblk0
# mount /dev/mmcblk0p3 /mnt
# vim /mnt/etc/passwd

And just remove x from root’s line.

Now we can insert card into cubietruck and power it on. It will not load fully because initial-setup-text.service will run on serial console. So just press Ctrl+Alt+F2 and login as root. Now we need to disable initial-setup and set root password.

# systemctl disable initial-setup-text.service
# passwd

Okay, fedora works and we can use it. Now second part about sound. Upstream kernel as for 4.2-rc4 doesn’t support sunxi-codec driver. Maxime Ripard has pointed me to his fork of linux kernel with some patches which adds support for sunxi-codec:

* f968132 Add cubieboard2 audio codec
* 8c1b463 codec: changes for Mele A1000
* 42ac277 ARM: sun7i: dt: enable audio codec on Cubietruck
* 4da9e56 ARM: sun7i: dt: Add sunxi codec device node
* 68d66ec ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs
* 93f01ab dma: sun4i: Add support for the DMA engine on sun[457]i SoCs
* 47c8977 ARM: sun7i: Add mod1 clock nodes
* ff52fcc ARM: sunxi: Add codec clock support
* 3233580 ARM: sunxi: Add PLL2 support
* 080077c clk: sunxi: mod1 clock support
* 048d967 clk: sunxi: codec clock support
* 7017705 clk: sunxi: Add a driver for the PLL2
* 883efa6 clk: Add a basic factor clock

So I just took Fedora’s kernel git tree, applied patches, enabled some options in kernel, built it in Koji for F22 and installed on cubietruck. Unfortunately, network driver doesn’t work in 4.2-rc4 due to BUG. It’s not fixed in upstream, only way to have network — have USB Network card. I’m not sure if that patches going to 4.3, but I’m sure we will get it in upstream at some point.

diff --git a/config-arm-generic b/config-arm-generic
index 8246024..bd1dee4 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -347,3 +347,6 @@ CONFIG_VFIO_AMBA=m
 # CONFIG_BMP085_SPI is not set
 # CONFIG_TI_DAC7512 is not set
diff --git a/kernel.spec b/kernel.spec
index d1c7d97..a5680ee 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -22,7 +22,7 @@ Summary: The Linux kernel
 %global zipsed -e 's/\.ko$/\.ko.xz/'
-# % define buildid .local
+%define buildid .a20sound
 # baserelease defines which build revision of this kernel version we're
 # building.  We used to call this fedora_build, but the magical name
@@ -584,6 +584,20 @@ Patch503: drm-i915-turn-off-wc-mmaps.patch
 Patch904: kdbus.patch
+Patch1001: 0001-clk-Add-a-basic-factor-clock.patch
+Patch1002: 0002-clk-sunxi-Add-a-driver-for-the-PLL2.patch
+Patch1003: 0003-clk-sunxi-codec-clock-support.patch
+Patch1004: 0004-clk-sunxi-mod1-clock-support.patch
+Patch1005: 0005-ARM-sunxi-Add-PLL2-support.patch
+Patch1006: 0006-ARM-sunxi-Add-codec-clock-support.patch
+Patch1007: 0007-ARM-sun7i-Add-mod1-clock-nodes.patch
+Patch1008: 0008-dma-sun4i-Add-support-for-the-DMA-engine-on-sun-457-.patch
+Patch1009: 0009-ASoC-sunxi-add-support-for-the-on-chip-codec-on-earl.patch
+Patch1010: 0010-ARM-sun7i-dt-Add-sunxi-codec-device-node.patch
+Patch1011: 0011-ARM-sun7i-dt-enable-audio-codec-on-Cubietruck.patch
+Patch1012: 0012-codec-changes-for-Mele-A1000.patch
+Patch1013: 0013-Add-cubieboard2-audio-codec.patch


Comments are closed.

  1. Patrick says:

    I just ordered a Cubietruck so thanks for sharing how to install F22 on it. If your MicroSD is slow then maybe get a faster one like a Class 10 card which should be much faster.

  2. This is really a great stuff for sharing. Thanks for sharing.