{"id":2021,"date":"2017-07-30T17:18:57","date_gmt":"2017-07-31T00:18:57","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2021"},"modified":"2017-07-30T17:18:57","modified_gmt":"2017-07-31T00:18:57","slug":"x86_64-apollo-lake-soc-system-with-a-gotcha","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2021","title":{"rendered":"X86_64 &#8211; &#8216;Apollo Lake&#8217; SOC System, with a Gotcha.."},"content":{"rendered":"<p>After more research, I decided to get one of the Intel &#8216;Apollo Lake&#8217;-based SOC systems, and the one I chose was from Kodlix..\u00a0\u00a0\u00a0\u00a0 It is functionally identical with another from Beelink, and in fact the Kodlix website shows images of the Beelink version of the device..\u00a0\u00a0\u00a0 I just preferred the Kodlix version, as the case was a dark grey, <span style=\"text-decoration: underline;\">without<\/span> any logos on it..<\/p>\n<div id=\"attachment_2022\" style=\"width: 871px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2022\" class=\"size-full wp-image-2022\" src=\"https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42.jpg\" alt=\"ap42\" width=\"861\" height=\"864\" srcset=\"https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42.jpg 861w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42-150x150.jpg 150w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42-300x300.jpg 300w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42-768x771.jpg 768w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2017\/07\/ap42-299x300.jpg 299w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/a><p id=\"caption-attachment-2022\" class=\"wp-caption-text\">AP42<\/p><\/div>\n<p>These devices all come with Windows 10 pre-loaded, and boot via UEFI, and the &#8216;Gotcha&#8217; is that they will <span style=\"text-decoration: underline;\">not<\/span> boot with GRUB, which would appear to rule out installing most Linux distros&#8230;<\/p>\n<p>I did look at the bios settings, and there would appear to be a solution, as there is an option for &#8216;Legacy&#8217; boot instead of UEFI.\u00a0\u00a0 I tried this, and it made no difference &#8211; all you see is a blank screen, with a small flickering cursor in the top left corner..<\/p>\n<p>There <span style=\"text-decoration: underline;\">is<\/span> a solution available, as a substitute for GRUB, which works with the AP42 UEFI, and boots Linux (and other OS&#8217;s..) &#8211; <strong>Refind<\/strong> ( <a href=\"http:\/\/www.rodsbooks.com\/refind\/installing.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.rodsbooks.com\/refind\/installing.html<\/a> ).<\/p>\n<p>The AltLinux Rescue live cd\/usb uses Refind, and I used that to examine the disk layout etc., before starting the Linux install ( <a href=\"https:\/\/en.altlinux.org\/Rescue\" target=\"_blank\" rel=\"noopener\">https:\/\/en.altlinux.org\/Rescue<\/a> ).<\/p>\n<p>The actual install process is similar to that for an ARM system, in that you use a <em>rootfs<\/em> disk image, and add the Refind boot manager to that.\u00a0\u00a0\u00a0 For mine, I just cloned another x86_64 Fedora 26 system, but if you cannot do this, then there are some &#8216;raw&#8217; disk images for &#8216;cloud&#8217; installs, at <a href=\"https:\/\/dl.fedoraproject.org\/pub\/fedora\/linux\/releases\/26\/CloudImages\/x86_64\/images\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dl.fedoraproject.org\/pub\/fedora\/linux\/releases\/26\/CloudImages\/x86_64\/images\/<\/a> .<\/p>\n<p>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:<\/p>\n<pre><span style=\"font-family: courier new,courier;\"><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">From fdisk:\r\n<\/span><\/span><strong><span style=\"font-family: courier new,courier;\">\r\nDisk \/dev\/mmcblk0: 58.2 GiB, 62537072640 bytes, 122142720 sectors<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Units: sectors of 1 * 512 = 512 bytes<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Sector size (logical\/physical): 512 bytes \/ 512 bytes<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Disklabel type: gpt<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Disk identifier: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Device         Start  End       Sectors   Size  Type<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">\/dev\/mmcblk0p1 2048   206847    204800    100M  EFI System<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">\/dev\/mmcblk0p2 206848 122140671 121933824 58.1G Linux filesystem<\/span><\/strong><\/pre>\n<p>Then I installed Refind on the EFI partition, and Fedora 26 on the Linux partition (label &#8216;ap42root&#8217;).\u00a0\u00a0\u00a0 The refind config I used (created using a text editor) is as follows:<\/p>\n<pre># cat \/boot\/efi\/efi\/boot\/refind.conf\r\n<strong>timeout 20<\/strong>\r\n<strong>scan_all_linux_kernels false<\/strong>\r\n\r\n<strong>menuentry \"Fedora 4.13-rc3\" {<\/strong>\r\n<strong> icon \/EFI\/BOOT\/icons\/os_fedora.png<\/strong>\r\n<strong> volume \"ap42root\"<\/strong>\r\n<strong> loader \/boot\/vmlinuz-4.13.0-rc3<\/strong>\r\n<strong> initrd \/boot\/initramfs-4.13.0-rc3.img<\/strong>\r\n<strong> options \"root=\/dev\/mmcblk0p2 console-tty0 rw net.ifnames=0\"<\/strong>\r\n<strong> enabled<\/strong>\r\n<strong>}<\/strong>\r\n\r\n<strong>menuentry \"Fedora 4.12.4\" {<\/strong>\r\n<strong> icon \/EFI\/BOOT\/icons\/os_fedora.png<\/strong>\r\n<strong> volume \"ap42root\"<\/strong>\r\n<strong> loader \/boot\/vmlinuz-4.12.4<\/strong>\r\n<strong> initrd \/boot\/initramfs-4.12.4.img<\/strong>\r\n<strong> options \"root=\/dev\/mmcblk0p2 console=tty0 rw net.ifnames=0\"<\/strong>\r\n<strong> enabled<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>I disabled the &#8216;scan&#8217; function, as this created a boot option with the wrong parameters for my system..\u00a0\u00a0 I did try <span style=\"text-decoration: underline;\">without<\/span> the initrd, but the boot failed..<\/p>\n<p>Detailed technical documentation for these systems is practically non-existent, even from the suppliers..\u00a0\u00a0\u00a0 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..<\/p>\n<p>With Fedora 26, and Kernel 4.12\/4.13, everything seems to work OK..\u00a0\u00a0\u00a0 I deliberately de-configured the WiFi, as I only need a wired Ethernet connection.\u00a0\u00a0\u00a0 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..\u00a0\u00a0\u00a0\u00a0 One nice feature is that the board includes a connector for an internal M2 SSD, but this involves opening up the case, which &#8211; presumably &#8211; would &#8216;void the warranty&#8217;!<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 July 30, 2017.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After more research, I decided to get one of the Intel &#8216;Apollo Lake&#8217;-based SOC systems, and the one I chose was from Kodlix..\u00a0\u00a0\u00a0\u00a0 It is functionally identical with another from Beelink, and in fact the Kodlix website shows images of the Beelink version of the device..\u00a0\u00a0\u00a0 I just preferred the Kodlix version, as the case was a <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2021\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1648,10,11,1298,1323,15,1160,1324],"tags":[1651,1650,1653,1656,1654,1649,1652,242,1162,1655,423],"class_list":["post-2021","post","type-post","status-publish","format-standard","hentry","category-apollo-lake","category-fedora","category-hacks","category-hardware","category-intel","category-linux-2","category-uefi","category-x86_64","tag-ap42","tag-apollo-lake","tag-beelink","tag-fedora-26-installed","tag-grub-fails","tag-intel-soc","tag-kodlix","tag-linux","tag-uefi","tag-use-refind","tag-x86_64"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2021"}],"version-history":[{"count":4,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2021\/revisions"}],"predecessor-version":[{"id":2026,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2021\/revisions\/2026"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}