X86_64 – ‘Apollo Lake’ SOC System, with a Gotcha..

After more research, I decided to get one of the Intel ‘Apollo Lake’-based SOC systems, and the one I chose was from Kodlix..     It is functionally identical with another from Beelink, and in fact the Kodlix website shows images of the Beelink version of the device..    I just preferred the Kodlix version, as the case was a dark grey, without any logos on it..

ap42

AP42

These devices all come with Windows 10 pre-loaded, and boot via UEFI, and the ‘Gotcha’ is that they will not boot with GRUB, which would appear to rule out installing most Linux distros…

I did look at the bios settings, and there would appear to be a solution, as there is an option for ‘Legacy’ boot instead of UEFI.   I tried this, and it made no difference – all you see is a blank screen, with a small flickering cursor in the top left corner..

There is a solution available, as a substitute for GRUB, which works with the AP42 UEFI, and boots Linux (and other OS’s..) – Refind ( http://www.rodsbooks.com/refind/installing.html ).

The AltLinux Rescue live cd/usb uses Refind, and I used that to examine the disk layout etc., before starting the Linux install ( https://en.altlinux.org/Rescue ).

The actual install process is similar to that for an ARM system, in that you use a rootfs disk image, and add the Refind boot manager to that.    For mine, I just cloned another x86_64 Fedora 26 system, but if you cannot do this, then there are some ‘raw’ disk images for ‘cloud’ installs, at https://dl.fedoraproject.org/pub/fedora/linux/releases/26/CloudImages/x86_64/images/ .

In short, I created a USB Fedora 26 disk image, with Refind installed, and used this to boot the AP42, then replaced the Windows 10 partitions etc. with ones for Linux/EFI:

From fdisk:

Disk /dev/mmcblk0: 58.2 GiB, 62537072640 bytes, 122142720 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
Disklabel type: gpt
Disk identifier: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Device         Start  End       Sectors   Size  Type
/dev/mmcblk0p1 2048   206847    204800    100M  EFI System
/dev/mmcblk0p2 206848 122140671 121933824 58.1G Linux filesystem

Then I installed Refind on the EFI partition, and Fedora 26 on the Linux partition (label ‘ap42root’).    The refind config I used (created using a text editor) is as follows:

# cat /boot/efi/efi/boot/refind.conf
timeout 20
scan_all_linux_kernels false

menuentry "Fedora 4.13-rc3" {
 icon /EFI/BOOT/icons/os_fedora.png
 volume "ap42root"
 loader /boot/vmlinuz-4.13.0-rc3
 initrd /boot/initramfs-4.13.0-rc3.img
 options "root=/dev/mmcblk0p2 console-tty0 rw net.ifnames=0"
 enabled
}

menuentry "Fedora 4.12.4" {
 icon /EFI/BOOT/icons/os_fedora.png
 volume "ap42root"
 loader /boot/vmlinuz-4.12.4
 initrd /boot/initramfs-4.12.4.img
 options "root=/dev/mmcblk0p2 console=tty0 rw net.ifnames=0"
 enabled
}

I disabled the ‘scan’ function, as this created a boot option with the wrong parameters for my system..   I did try without the initrd, but the boot failed..

Detailed technical documentation for these systems is practically non-existent, even from the suppliers..    I wanted to find a UART connection, as the SOC is supposed to support one, and there is an (unpopulated) 15-pin connector on the system board, but there is no circuit diagram..

With Fedora 26, and Kernel 4.12/4.13, everything seems to work OK..    I deliberately de-configured the WiFi, as I only need a wired Ethernet connection.    The system is cooled by a large internal heatsink, and via the aluminium body, and this seems to work OK, even with an all-cpus-at-100% kernel compilation..     One nice feature is that the board includes a connector for an internal M2 SSD, but this involves opening up the case, which – presumably – would ‘void the warranty’!

Robert Gadsdon.   July 30, 2017.


Leave a Reply

Your email address will not be published. Required fields are marked *