Modular Linux kernel for the Gemini PDA with cut+paste fix

Using Debian with the Gemini PDA one can use cut and paste, for example in QTerminal, using the key combinations [Ctrl]+[Shift]+[c] and [Ctrl]+[Shift]+[v]. Unfortunately this did not work using the left Shift key. There is no need to fiddle with the keyboard configuration to fix this, since it is a kernel issue.

Again Adam Boardman has fixed one of the most annoying issues within the Gemini’s Linux kernel. His fix priorizes the mentioned useful keyboard combinations over the ghosted¹ versions. Again this fix is worth another kernel build. As usual, I want to share my kernel build below:

The kernel configuration is unchanged (with respect to the previous article), but included for completeness: gemini-3.18.41+-config.gz (572 downloads )

For the build, again the updated kernel source the from https://github.com/gemian/gemini-linux-kernel-3.18 has been used.

Again the kernel modules for the iptables MIRROR target (will not be usable with the default iptables version on the Gemini) and frandom are included. This time also the module for the awus1900 and similar usb wifi dongles (88XXau.ko) has been added.

Those who do not want to go through the build themselves can download my prebuild kernel from here:

Kernel Image: linux_boot-gemini-3.18.41+.img (568 downloads )
Modules: modules_firmware-gemini-3.18.41+.tar.gz (721 downloads )
(the kernel modules in the previous article should still work, however, the new build is included for completeness)

Instructions for flashing the image can be found on: support.planetcom.co.uk. Make sure to use a proper scatter file, in example the one that has been used for the initial flashing. Using the Download only mode of the flash tool is sufficient. Uncheck all partitions but boot (or boot1 or boot2, depending on your boot order). For the boot partition respectively the boot1 or boot2 partition select the downloaded kernel image.

Alternatively you can flash the kernel using dd:

dd if=linux_boot-gemini-3.18.41+.img of=/dev/block/disk/by-partlabel/boot

If Linux is not your primary operating system on the Gemini use boot1 or boot2 instead, depending on your partition layout.

After flashing, copy the modules archive onto your Gemini and extract it in your root directory:

cd /
tar -xzf /path_to/modules_firmware-gemini-3.18.41+.tar.gz

After rebooting the device, cut and paste using the keyboard combinations should work in QTerminal. Currently I am working on getting the modular kernel configuration into the main Gemini kernel. Hopefully we manage to get this done soon. If so, this might have been the last Gemini modular kernel post.

Jürgen

References:
1. oesf.org: keyboard ghosting

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Recovery from a failed kernel upgrade on Lamobo R1

Yesterday I have updated my Lamobo R1 router board running Debian Stretch the usual way with apt update;apt upgrade. This time many updates were involved including a kernel update from 4.9.130-2 to 4.9.144-3. After rebooting the device it did not come up again. The same happens with the 4.9.144-3 kernel and the Bananapi board which is nearly identical to the Lamobo R1.

After attaching a screen to the HDMI output I was able to see the boot messages. The last thing I noticed was that uboot was struck at “Starting kernel”. Unfortunately there has been no more useful information. Maybe one could get some more information using the serial console. Obviously the new kernel is broken for the Lamobo and the Bananapi. The corresponding bug report can be monitored on bugs.debian.org. The natural reaction is to downgrade the kernel to the previous state, which is not as simple as on Intel based devices. Since it is quite probable that others experience the same problem with the kernel upgrade I will show in the following how to recover from the upgrade.

First of all I inserted the sd card containing the operating system into a notebook and mounted the boot partition. Luckily there still has been a older backup kernel remaining from system setup. In my case this has been a 4.9.0-7 kernel. So I extracted the boot script from the boot.scr file.

dd if=boot.scr of=boot.script bs=72 skip=1

In the resulting boot.script I replaced the line

setenv fk_kvers ‘4.9.0-8-armmp-lpae’

with

setenv fk_kvers ‘4.9.0-7-armmp-lpae’

This might be different if the backup kernel available has a different version. If there is no working backup kernel, one might try to get a kernel image from a different source, in example extracting from one of the older Debian packages, from the boot partition of a second device or if one has been paranoid, from a backup.

Afterwards the boot.scr file has to be regenerated. For this the u-boot-tools package has to be present on the system used for the recovery.

mkimage -C none -A arm -T script -d boot.script boot.scr

After reinserting the card into the Lamobo R1 eventually I have been able to boot the system with the old kernel version. Afterwards it has been possible to restore the previous kernel version (4.9.130-2) with:

dpkg -i linux-image-4.9.0-8-armmp-lpae_4.9.130-2_armhf.deb

It might be a good idea to prevent further kernel upgrades until the mentioned bug has been solved. This can easily be done by:

apt-mark hold linux-image-4.9.0-8-armmp-lpae

Hopefully this helps others facing the same problem after this or any other kernel update on these or similar devices.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Building a kernel module for the awus1900 Wifi stick and the Gemini PDA

A few days ago I have been asked if it is possible to build a driver for the awus1900 Wifi stick for the Gemini PDA. To be honest, I did not know, so I gave it a try.

The awus1900 uses Realtek’s rtl8814au chipset. The Linux driver for this chipset is available at many locations around the net. Most ones, I have tried, have not been compilable against the Gemini’s kernel. The driver at https://github.com/aircrack-ng/rtl8812au has been compilable with some minor modifications against the kernel source used for the kernel in Modular Linux kernel for the Gemini PDA with lid close fix.

First of all some parameters in the Makefile had to be changed to match the Gemini:

  • CONFIG_PLATFORM_I386_PC = n (disable x86 build)
  • CONFIG_PLATFORM_ARM64_RPI = y (enable arm64 build)

Some more parameters have been enabled for features in the hope that these do not cause problems:

  • CONFIG_POWER_SAVING = y
  • CONFIG_USB_AUTOSUSPEND = y
  • CONFIG_80211W = y

With all these changes the build fails complaining about STATION_INFO_SIGNAL and many more being undeclared. The module’s source expects these defines to be present in the kernel source for kernels below version 4.0. Most probably the Gemini kernel tree is different than other 3.x trees. So the line 23

#if (CFG80211_API_LEVEL >= KERNEL_VERSION(4, 0, 0))

in os_dep/linux/ioctl_cfg80211.c has been replaced with

#ifndef STATION_INFO_SIGNAL

to get the module source build against the Gemini’s kernel. Afterwards it has been possible to cross compile the kernel module by running make:

make ARCH=arm64 KSRC=/path_to_lib_modules_dir/3.18.41+/build

After building the module it can be copied to /lib/modules/3.18.41+/extra/ (or any other proper directory) on the Gemini and used afterwards. For those who do not want to build the module themselves, the binary modules for the kernel shared in the article Modular Linux kernel for the Gemini PDA with lid close fix can be downloaded from here: rtl88XX.zip (465 downloads )

Regards
Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Modular Linux kernel for the Gemini PDA with lid close fix

Sometimes, well, quite often, maybe one out of twenty times when closing the lid, the Gemini PDA running Debian did not turn off the screen and go to sleep, because of keys being pressed by the closing screen before the keyboard gets turned off. When one recognized the Gemini getting hot in the pocket already a quarter to a half of the battery juice was lost.

Recently Adam Boardman has fixed this annoying issue within the Gemini’s Linux kernel. His fix disables the keyboard directly upon lid close, rather than waiting for screen blanking via userspace control. Within a few days after the fix I have not noticed the issue anymore. This fix is more than worth another kernel build. Again, I want to share my kernel build below:

The kernel configuration is unchanged (with respect to the previous article), but included for completeness: gemini-3.18.41+-config.gz (334 downloads )

For the build, again the updated kernel source the from https://github.com/gemian/gemini-linux-kernel-3.18 has been used.

Again the kernel modules for the iptables MIRROR target (will not be usable with the default iptables version on the Gemini) and frandom are included.

Those who do not want to go through the build themselves can download my prebuild kernel from here:

Kernel Image: linux_boot-gemini-3.18.41+.img (381 downloads )
Modules: modules_firmware-gemini-3.18.41+.tar.gz (476 downloads )
(the kernel modules in the previous article should still work, however, the new build is included for completeness)

Instructions for flashing the image can be found on: support.planetcom.co.uk. Make sure to use a proper scatter file, in example the one that has been used for the initial flashing. Using the Download only mode of the flash tool is sufficient. Uncheck all partitions but boot (or boot1 or boot2, depending on your boot order). For the boot partition respectively the boot1 or boot2 partition select the downloaded kernel image.

Alternatively you can flash the kernel using dd:

dd if=linux_boot-gemini-3.18.41+.img of=/dev/block/disk/by-partlabel/boot

If Linux is not your primary operating system on the Gemini use boot1 or boot2 instead, depending on your partition layout.

After flashing, copy the modules archive onto your Gemini and extract it in your root directory:

cd /
tar -xzf /path_to/modules_firmware-gemini-3.18.41+.tar.gz

After rebooting the device, it should go to sleep reliably after closing the lid.


Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Modular Linux kernel for the Gemini PDA with FOTA5 fixes

Recently the fixes in Planet Computers over the air update found their way into the Gemini Linux kernel sources. Thus the Linux kernel binaries I have shared before are a bit outdated now. So I have decided to build another kernel from the newer kernel sources with the following configuration changes with respect to the previous version:

•Enabled CONFIG_TOUCHSCREEN_MTK_SSL_SSD20XX (touchscreen driver for newer Gemini revisions)
•Added aeon_ssd2092_fhd_dsi_solomon to CONFIG_CUSTOM_KERNEL_LCM (use the touchscreen driver)
•Enabled CONFIG_USER_NS (for lxc and snapd)
•Enabled CONFIG_OVERLAY_FS (for lxc and snapd)
•Enabled CONFIG_SQUASHFS (for lxc and snapd)
•Enabled CONFIG_SQUASHFS_XATTR (for lxc and snapd)
•Enabled CONFIG_SQUASHFS_ZLIB (for lxc and snapd)
•Enabled CONFIG_SQUASHFS_XZ (for lxc and snapd)
•Enabled CONFIG_SQUASHFS_LZO (for lxc and snapd)
•Enabled CONFIG_SQUASHFS_LZ4 (for lxc and snapd)
•Enabled CONFIG_CRYPTO_LZ4HC (for lxc and snapd)

The changes and dependencies result in this kernel configuration: gemini-3.18.41+-config.gz (360 downloads )

For the build, again the updated kernel source the from https://github.com/gemian/gemini-linux-kernel-3.18 has been used.

Again the kernel modules for the iptables MIRROR target (will not be usable with the default iptables version on the Gemini) and frandom have been added.

Those who do not want to go through the build themselves can download my prebuild kernel from here:

Kernel Image: modules_firmware-gemini-3.18.41+.tar.gz (605 downloads )
Modules: linux_boot-gemini-3.18.41+.img (334 downloads )

Instructions for flashing the image can be found on: support.planetcom.co.uk. Make sure to use a proper scatter file, in example the one that has been used for the initial flashing. Using the Download only mode of the flash tool is sufficient. Uncheck all partitions but boot (or boot1 or boot2, depending on your boot order). For the boot partition respectively the boot1 or boot2 partition select the downloaded kernel image.

Alternatively you can flash the kernel using dd:

dd if=linux_boot-gemini-3.18.41+.img of=/dev/block/disk/by-partlabel/boot

If Linux is not your primary operating system on the Gemini use boot1 or boot2 instead, depending on your partition layout.

After flashing, copy the modules archive onto your Gemini and extract it in your root directory:

cd /
tar -xzf /path_to/modules_firmware-gemini-3.18.41+.tar.gz

After rebooting the device, it should behave somewhat more stable than it did before.

Regards
Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Another improved modular Linux kernel for the Gemini PDA

The time has come for another modular linux kernel for the Gemini PDA. The linux kernel binaries I have shared before were lacking proper USB pendrive support. Whenever a drive got connected it froze and the device begun behaving strange, in example it has been impossible to open applications afterwards. Furthermore, in the meanwhile the Geminis keyboard ghosting issue got fixed in the updated kernel sources. Thus I have decided to build another kernel with the following changes:

•Enabled modules for more USB devices
•Enabled FB_UDL and DRM_UDL (for displaylink devices)
•Disabled SCSI_MQ_DEFAULT (for getting USB pendrives working again)

The changes and dependencies result in this kernel configuration: gemini-3.18.41+-config.gz (433 downloads )

For the build, again the updated kernel source the from https://github.com/gemian/gemini-linux-kernel-3.18 has been used.

Again the kernel modules for the iptables MIRROR target (will not be usable with the default iptables version on the Gemini) and frandom have been added.

Those who do not want to go through the build themselves can download my prebuild kernel from here:

Kernel Image: modules_firmware-gemini-3.18.41+.tar.gz (581 downloads )
Modules: linux_boot-gemini-3.18.41+.img (451 downloads )

Instructions for flashing the image can be found on: support.planetcom.co.uk. Make sure to use a proper scatter file, in example the one that has been used for the initial flashing. Using the Download only mode of the flash tool is sufficient. Uncheck all partitions but linux_boot (or boot if you boot into linux as default). For the linux_boot respectively the boot partition select the downloaded kernel image. With newer scatter files the boot partition names have changed to boot, boot1 and boot2. Select the appropriate  one for your Gemini.

Alternatively you can flash the kernel using dd:

dd if=linux_boot-gemini-3.18.41+.img of=/dev/block/disk/by-partlabel/boot

If Linux is not your primary operating system on the Gemini use boot1 or boot2 instead, depending on your partition layout.

After flashing, copy the modules archive onto your Gemini and extract it in your root directory:

cd /
tar -xzf /path_to/modules_firmware-gemini-3.18.41+.tar.gz

After rebooting the device, USB pendrives and other SCSI like devices like HDDs and DVD drives/burners should work again when attached to the Geminis USB ports.

Regards
Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Improved modular Linux kernel for the Gemini PDA

The linux kernel binary I have shared in the article Modular Linux kernel for the Gemini PDA turned out to lack some important features, like not supporting the ethernet port of the Planet Computers USB hub. Thus a second version of the kernel had to be built.

In addition to the original changes, the following changes to the kernel configuration have been performed:

•Enabled modules for more USB devices
•Disabled CONFIG_MTK_CPU_HOTPLUG_DEBUG_0 (for less pollution in dmesg)
•Disabled CONFIG_MTK_CPU_HOTPLUG_DEBUG_3 (for less pollution in dmesg)
•Enabled  CONFIG_RCU_FAST_NO_HZ (for improved energy efficiency)
•Enabled CONFIG_RCU_BOOST (for better performance)

Originally I intended to also disable CONFIG_MTK_CPU_HOTPLUG_DEBUG_2, but then the build fails with an error regarding a static struct declaration.

The changes result in this kernel configuration: gemini-3.18.41+-config.gz (444 downloads )

For the build, the updated kernel source the from https://github.com/gemian/gemini-linux-kernel-3.18 with the fix for the Bluetooth vulnerability cve-2017-1000251 has been used.

Again the kernel modules for the iptables MIRROR target (will not be usable with the default iptables version on the Gemini) and frandom have been added.

Those who do not want to go through the build themselves can download my prebuild kernel from here:

Kernel Image: linux_boot-gemini-3.18.41+.img (464 downloads )
Modules: modules_firmware-gemini-3.18.41+.tar.gz (598 downloads )

Downloads outdated, new version at: Another improved modular Linux kernel for the Gemini PDA

Instructions for flashing the image can be found on: support.planetcom.co.uk. Make sure to use the same scatter file that has been used for the initial flashing. Using the Download only mode of the flash tool is sufficient. Uncheck all partitions but linux_boot (or boot if you boot into linux as default). For the linux_boot respectively the boot partition select the downloaded kernel image. With newer scatter files the boot partition names have changed to boot, boot1 and boot2. Select the appropiate  one for your Gemini.

Alternatively you can flash the kernel using dd:

dd if=linux_boot-gemini-3.18.41+.img of=/dev/block/disk/by-partlabel/boot

If Linux is not your primary operating system on the Gemini use boot1 or boot2 instead, depending on your partition layout.

After flashing, copy the modules archive onto your Gemini and extract it in your root directory:

cd /
tar -xzf /path_to/modules_firmware-gemini-3.18.41+.tar.gz

After rebooting the device some more USB peripherals, including the ethernet port of the Planet Computers hub, should work.

Regards
Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

siteinfo

Translator