Kernel – 4.13-rc6 Released – Still OK..

Kernel 4.13-rc6 is out, and brief details of changes are here:  http://lkml.iu.edu/hypermail/linux/kernel/1708.2/03592.html

As the message mentions, if all goes well, then 4.13 Final should be out in about two weeks time from now..

The release is still OK with the latest NVIDIA (tested with 384.59) and (patched) VMware 12.5.7.     Unfortunately, there is still no 12.5.8 release with compatibility with GCC 7 etc., but workarounds and scripts for this are in previous articles, and comments..

Robert Gadsdon.   August 20, 2017.

Hardware – UEFI Bios for Linux ‘Chromebook’

The original ‘SeaBios’ BIOS on my Acer c720p was a little clunky, so I decided to make the plunge and update it to a ‘proper’ Linux-friendly BIOS..    There is a known/good one available, but it is UEFI-only, so will involve changing the filesystem/partition layout on an existing system..

Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 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: 245453FD-909E-4796-8A0E-1ABD9BB499DB
Device    Start  End       Sectors   Size   Type
/dev/sda1 2048   309247    307200    150M   EFI System
/dev/sda2 309248 250066943 249757696 119.1G Linux filesystem

More details are here:    https://www.reddit.com/r/chrultrabook/comments/4t8kd5/flashing_script_for_uefi_available

To be on the safe side, I downloaded the top-level install script onto a usb ‘recovery’ stick beforehand, and made sure that network support was enabled..  The direct link to the script is at:  https://coolstar.org/chromebook/setup-firmware.sh

As usual, this is not for the faint-of-heart, as you can brick your system!     The script does include the option to backup the ‘old’ bios, and this is always recommended..     It recognised my system and model correctly, and everything went smoothly..     I decided to just do a clean (re)install of the KDE Spin of Fedora 26 from a USB stick, and this also went OK..

# uname -a
Linux rg720 4.13.0-rc4 #1 SMP Thu Aug 10 17:45:38 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux

Robert Gadsdon.   August 11, 2017.

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.

Kernel – 4.13-rc2 out – Still OK with Latest VMware (patched) and NVIDIA..

Kernel 4.13-rc2 has been released, and brief details of changes from -rc1 are here:  http://lkml.iu.edu/hypermail/linux/kernel/1707.2/06568.html

It used to be that if things were OK with the initial -rc version of the kernel, then all subsequent -rc versions were also OK, but in recent times, this has not always been the case..

I have quickly tested this with the latest NVIDIA (384.47) and VMware (12.5.7 with patched vmnet) and everything still works – the same as with -rc1..

Robert Gadsdon.  July 24, 2017.

 

VMware – Fix for Kernel 4.13-rc1 and vmnet, Already..

Thanks to fast work by dariusd at the VMware forum, there is already a fix for the vmnet compile failure with Kernel 4.13-rc1..

The patch can be found on this thread:  https://communities.vmware.com/message/2688967

I have tested it, and vmnet now compiles OK, and VMware 12.5.7 loads/runs on Kernel 4.13-rc1..

Robert Gadsdon.   July 15, 2017.

Kernel – 4.13-rc1 Released Early – OK with Latest NVIDIA, Breaks VMware..

Kernel 4.13-rc1 is out, a day earlier than usual, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/1707.1/04719.html

The latest NVIDIA driver – 384.47 – compiles and loads OK:

 .....
Building modules, stage 2.
 MODPOST 4 modules
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia-drm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia-drm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia-modeset.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia-modeset.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia-uvm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia-uvm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.47/kernel/nvidia.ko
make[2]: Leaving directory '/usr/src/linux-4.13-rc1'

VMware 12.5.7 vmmon compiles OK, but vmnet fails:

....................
/home/rgadsdon/kernel/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
/home/rgadsdon/kernel/vmnet-only/bridge.c:639:14: error: passing argument 1 of ‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 atomic_inc(&clone->users);
 ^
In file included from ./include/linux/atomic.h:4:0,
 from ./include/linux/rcupdate.h:38,
 from ./include/linux/rculist.h:10,
 from ./include/linux/pid.h:4,
 from ./include/linux/sched.h:13,
 from /home/rgadsdon/kernel/vmnet-only/bridge.c:25:
./arch/x86/include/asm/atomic.h:89:29: note: expected ‘atomic_t * {aka struct <anonymous> *}’ but argument is of type ‘refcount_t * {aka struct refcount_struct *}’
 static __always_inline void atomic_inc(atomic_t *v)
 ^~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:303: /home/rgadsdon/kernel/vmnet-only/bridge.o] Error 1
make[1]: *** [Makefile:1511: _module_/home/rgadsdon/kernel/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/linux-4.13-rc1'
make: *** [Makefile:120: vmnet.ko] Error 2

Robert Gadsdon.    July 15, 2017

Kernel – 4.12 Final Released – OK with Latest VMware and NVIDIA..

Kernel 4.12 is out, and brief details of changes from -rc7 are here:  http://lkml.iu.edu/hypermail/linux/kernel/1707.0/00325.html    You can find more detailed info from the kernel git site: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?h=v4.12&showmsg=1

The latest versions of VMware (12.5.7) and NVIDIA (384.47-beta and 381.22) compile and load/run OK with 4.12..

Robert Gadsdon.   July 2, 2017.

VMware – 12.5.7 Released – OK with Kernel 4.12, Still Needs GUI/GCC7 Workarounds..

VMware version 12.5.7 is out, and the release notes are here:  http://pubs.vmware.com/Release_Notes/en/workstation/12/workstation-1257-release-notes.html     As usual, not much actual detail, apart from “…some bug fixes and security updates.

This version compiles OK with Kernel 4.12 (tested with 4.12-rc6), but the runtime GUI and GCC7 workarounds mentioned in previous articles are still needed, for ‘newer’ distros, such as Fedora 26….

Robert Gadsdon.   June 22, 2017.

Fedora – Fix for Broken Kodi on Fedora 25

More distro-specific than usual posts, but hopefully ‘useful’..

I found that Kodi on Fedora 25 would no longer play M2T/MTS files.    Frustratingly, there was no error shown, or apparent debug clue, but the program just exited without any messages, when playback of one of these file types was selected.

After checking associated libraries and not getting any clues, I did find that the Fedora 26 version played everything OK, despite the fact that the version (17.3-1) was the same as F25.      This was confirmed on four different systems..

I decided to try rebuilding the kodi rpm from source, using the ‘latest’ version, from here:

http://download1.rpmfusion.org/free/fedora/development/rawhide/Everything/source/SRPMS/k/kodi-17.3-1.fc27.src.rpm

After sorting out and installing the required …devel.. rpms, the rpmbuild –rebuild on F25 completed OK, and after (force) updating with the resulting set of rpms, everything works OK again..      Slightly annoying to not have the cause of the problem, but at least this fixes it..

Robert Gadsdon.  June 18, 2017.

 

VMware – Clues for vmmon Kernel 4.12 fix?

In the thread on the VMware forum ( https://communities.vmware.com/thread/565157 ) there is a link to a potential patch for Kernel 4.12 support, but you are advised to not try to execute this, as – although it compiles OK – it will cause the host system to reboot without warning as soon as a client is started..   I have ‘tested’ this, and confirm that the host immediately reboots, without any console output!

I did mention in the earlier article that VirtualBox suffered from a similar problem, and it appears that they now have a solution ( https://www.virtualbox.org/ticket/16725 ).    To see the changes that have been made, compare the old and new versions of memobj-r0drv-linux.c in the source tree..

Hopefully a fix will be available for VMware, soon..

Robert Gadsdon.   June 9, 2017.