Author Topic: linux on Gemini  (Read 14510 times)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
linux on Gemini
« on: October 20, 2017, 09:57:12 am »
https://player.vimeo.com/video/239095559?portrait=0

looks like we finally got a new Zaurus!
« Last Edit: October 20, 2017, 09:58:51 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1278
    • View Profile
linux on Gemini
« Reply #1 on: October 20, 2017, 10:49:09 am »
Talk about fast posting, the video was uploaded just 2 hours ago

Here's a link to the Vimeo page, showing the comments too:

https://vimeo.com/239095559

Yes, it looks like it might be a worthy successor, let's cross our fingers about the overall build quality...

I wonder how does the switch on button work, how do you select either OS if the unit is switched off? Also, I wonder if something like grub or kexecboot will be installable.

Varti
« Last Edit: October 20, 2017, 11:26:31 am by speculatrix »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1278
    • View Profile
linux on Gemini
« Reply #2 on: October 24, 2017, 03:37:29 am »
Some interesting insights on Linux on the Gemini, on the maemo.org forum:

https://talk.maemo.org/showthread.php?t=99022&page=9

They are using LittleKernel as a bootloader, and it seems that it will be possible to use Linux from Android via chroot, in order to avoid to have to reboot:
https://talk.maemo.org/showpost.php?p=15344...mp;postcount=83
https://github.com/littlekernel/lk/wiki/Introduction

Mediatek releases drivers for Android only, so for Linux they'll have to either rewrite the drivers, or use libhybris to use Android's ones. The Linux distro shown in the video probably uses libhybris.
https://talk.maemo.org/showpost.php?p=15371...mp;postcount=88
https://talk.maemo.org/showpost.php?p=15373...mp;postcount=92
https://en.wikipedia.org/wiki/Hybris_(software)

Varti
« Last Edit: October 24, 2017, 05:27:18 am by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 455
    • View Profile
    • http://github.com/greguu
linux on Gemini
« Reply #3 on: January 06, 2018, 07:40:46 am »
Out of curiosity I did email Planet Computers Ltd to ask about a few points in regards to Linux and also Android support. Please take my predictions below with a grain of salt as they are just guesses at this stage.

- What bootloader software is used and how to change between Android and Linux? [unknown, Little Kernel mentioned, but possibly native Android with the ability to load a "secondary linux kernel" that needs to have a nested environment on a SD card or chroot]
- Is Linux and Android sharing the same SSD or can a "proper Linux" only boot from SD ? (as it is with many native Android devices) [possibly SD only for dual boot or SDD only for Linux if Android is wiped, see above.]
- Does the Gemini PDA support 4G and GPS under Linux or only under Android ? (What chip-sets are used, are drivers open-source?, MediaTech Android Only) [Unlikely, that 4G and GPS will be open-source under Linux, not good]
- Is the display "portrait native" and therefore needs rotation or does it support the advertised 2160 x 1080 natively in landscape ? (Linux would need possibly software rotation as the GPU driver is Android only) [Likely scenario]
- Does the display take up the full space on the screen or is it limited to 16:9 as shown on the prototypes ? [possibly only 1080 x 1920 in portrait + rotation]

I would appreciate if anyone has some more specific details about the questions raised to help to clarify these. I will post an update once I get some feedback from Planet Computers.
The downside here is that as with many other "Android only" devices that the kernel is often outdated and no further progress can be made unless the vendor (MediaTek in this case) does release a source or update of their SDK.
Quite frustrating that the focus is so much on Android. I wish they would not advertise Linux support at all.

Quote from: Varti
Some interesting insights on Linux on the Gemini, on the maemo.org forum:

https://talk.maemo.org/showthread.php?t=99022&page=9

They are using LittleKernel as a bootloader, and it seems that it will be possible to use Linux from Android via chroot, in order to avoid to have to reboot:
https://talk.maemo.org/showpost.php?p=15344...mp;postcount=83
https://github.com/littlekernel/lk/wiki/Introduction

Mediatek releases drivers for Android only, so for Linux they'll have to either rewrite the drivers, or use libhybris to use Android's ones. The Linux distro shown in the video probably uses libhybris.
https://talk.maemo.org/showpost.php?p=15371...mp;postcount=88
https://talk.maemo.org/showpost.php?p=15373...mp;postcount=92
https://en.wikipedia.org/wiki/Hybris_(software)

Varti
« Last Edit: January 06, 2018, 07:46:49 am by greguu »
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
linux on Gemini
« Reply #4 on: January 06, 2018, 08:38:22 am »
My Android phone is rooted. I've always rooted my phone and/or unlocked the bootloader, even though I usually stick to the stock OS. I root for a number of reasons:
* mounting and chrooting into a full linux installation
* using VPNs (not needed since Android introduced VPN support)
* using Titanium Backup Root (ideal when you upgrade, you can backup and restore apps and all their configs and data)
* removing or disabling bloat
* using tools which can block apps with too many permissions (not so necessary with newest Android versions)
* using ADB over wifi
* use tcpdump to analyse traffic and see if any apps are misbehaving

The first point is the relevant one here. I partition my SD card so that the first partition is used by Android (FAT32), then there's a second  EXT4 partition for linux, then a third which is a small swap partition. I installed a fairly minimal debian desktop into that second partition. I could use a disk image file and loopback mount it I guess, but performance might suffer because of the encryption. You can install Debian or Ubuntu Arm linux into a disk image on an x86 PC because debootstrap works just fine.

To use it, I fire up a regular terminal in Android, or get a shell over ADB/USB or ADB/Wifi, and can fsck and mount the SD card partition. I have a few scripts in /data/local/bin to do this, they also mount/bind the emulated and real sdcards into that linux environment. Then I chroot into it, and have a few scripts ready to set up the environment.

Mostly I use the command line, so I can rsync photos off the phone onto my file server, and rsync music onto the phone. I can start an ssh daemon so I can ssh into the phone, or push music from the file server using the rsync command.

If I really really want to use a graphical program, I can start vncserver with a virtual frame buffer, and then run the GUI program in linux on that, and then in Android use VNC Viewer to give me the linux experience; I can also VNC into that from a PC as well of course.


I'm not saying that this is what Planet will do, but if you have root on your phone, plus a busybox which has a large number of the standard command line tools built in, and a linux installation you can chroot into, it's a pretty powerful environment
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

rogalian

  • Newbie
  • *
  • Posts: 22
    • View Profile
linux on Gemini
« Reply #5 on: January 10, 2018, 11:47:30 am »
I'm really hoping its a true Linux install and not merely sitting on top of Android.  Time will tell. I'd be happy enough if the bootloader is unlocked, root available and all the Android source too - provided Google services are ENTIRELY optional. If not then I want full Linux end-of.

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1278
    • View Profile
linux on Gemini
« Reply #6 on: January 10, 2018, 01:50:16 pm »
Quote from: rogalian
I'm really hoping its a true Linux install and not merely sitting on top of Android.  Time will tell. I'd be happy enough if the bootloader is unlocked, root available and all the Android source too - provided Google services are ENTIRELY optional. If not then I want full Linux end-of.
Same here. Planet has apparently pushed Mediatek for Linux drives for his CPU, time will tell how much of this will become reality.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
linux on Gemini
« Reply #7 on: January 10, 2018, 02:48:44 pm »
Quote from: Varti
Same here. Planet has apparently pushed Mediatek for Linux drives for his CPU, time will tell how much of this will become reality.

I've a friend who lives and works in Hong Kong and buys various electronics and SoCs, and says that Mediatek are too big and too uncaring to deal with unless you're really big and are spending enough for them to notice.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

rogalian

  • Newbie
  • *
  • Posts: 22
    • View Profile
linux on Gemini
« Reply #8 on: February 02, 2018, 04:54:29 am »
Quote from: rogalian
I'm really hoping its a true Linux install and not merely sitting on top of Android.  Time will tell. I'd be happy enough if the bootloader is unlocked, root available and all the Android source too - provided Google services are ENTIRELY optional. If not then I want full Linux end-of.

So I tweeted Planet asking if Single Boot linux only - removing Android was possible. Their answer a succinct "Yes".

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1278
    • View Profile
linux on Gemini
« Reply #9 on: February 02, 2018, 06:07:46 am »
Quote from: rogalian
So I tweeted Planet asking if Single Boot linux only - removing Android was possible. Their answer a succinct "Yes".
Thanks for this info, other people have been wondering this too. I believe Android will be installed on the internal storage, I wonder if Linux will be stored there too. I'm planning to install both Android and Linux on the SD card, if possible and if there won't be much of a difference speed wise, to avoid wearing out the internal storage, especially with the swap partition.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
linux on Gemini
« Reply #10 on: February 02, 2018, 12:19:07 pm »
Quote from: Varti
Quote from: rogalian
So I tweeted Planet asking if Single Boot linux only - removing Android was possible. Their answer a succinct "Yes".
Thanks for this info, other people have been wondering this too. I believe Android will be installed on the internal storage, I wonder if Linux will be stored there too. I'm planning to install both Android and Linux on the SD card, if possible and if there won't be much of a difference speed wise, to avoid wearing out the internal storage, especially with the swap partition.

Varti

I think it's been made clear that Linux will go in the internal storage, in that they say it will be dual boot (not merely that dual boot is possible) and there's never been any mention of them including an SD card, populated or unpopulated. That having been said, I don't see any reason why one couldn't put the swap partition on the SD card; indeed, that would make good sense.
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
linux on Gemini
« Reply #11 on: February 02, 2018, 01:17:11 pm »
I think the android kernel has been tweaked to not require swap. But you'll definitely want to put it on your sd card, whether as a partition or swap file.
Android 7 on my LG v20 tells me my memory card is corrupt when it boots because there are three partitions, the first is fat32 (as usual), then 4GB as ext4 for Linux (chroot) then 1GB for swap.
However, I just cancel the warning and everything works fine.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Grench

  • Full Member
  • ***
  • Posts: 110
    • View Profile
linux on Gemini
« Reply #12 on: February 02, 2018, 01:32:46 pm »
Quote from: depscribe
I think it's been made clear that Linux will go in the internal storage, in that they say it will be dual boot (not merely that dual boot is possible) and there's never been any mention of them including an SD card, populated or unpopulated. That having been said, I don't see any reason why one couldn't put the swap partition on the SD card; indeed, that would make good sense.

I disagree.  In the demonstration of booting Linux, a restart with a button-hold during restart was required.  That is a hardware pointer change.  This tells me that it is most likely booting from the microSDXC at that point.  

If both were booting from the same eMMC device, then there would need to be a software pointer change (to the bootloader) and would not require a held button during boot.

"Linux dual boot capable" is not the same thing as "We're shipping every unit with Android and Linux both pre-installed."  I'm pretty sure booting Linux will be a, "bring your own," exercise.  

You take your own microSDXC card, download a Debian ARM image - likely to be linked from this forum at some point - and use dd from a Linux terminal on another machine to copy the bootable Debian ARM image to your microSDXC which you then place in the Gemini's microSDXC slot.  To boot to from microSDXC instead of eMMC, you will then have to hold the voice assist button on the side of the unit.  At that point you have fulfilled your dual boot capability.

Now, as above, this does not preclude someone from wiping Android off of their device.  However, to get to there is going to require that you root your Android device and re-point the bootloader to the Linux image that you'll load to the eMMC.

Neither does this preclude someone from re-partitioning the eMMC to include both Android and Linux partitions or putting the Linux install in a folder under Android and running it as a chroot.  There are -lots- of options.

But, and I hope Planet clarifies this, I do NOT expect the shipping units to have Linux pre-installed on the eMMC.  I also do not expect that they will have Linux 3D drivers for the Mali T880 graphics system.  We'll likely be stuck at 2D acceleration only under Linux.  For that we'll be at the mercy of Mediatek.  Mediatek's history isn't exactly Linux friendly.  Maybe this is the project where they redeem themselves.

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1278
    • View Profile
linux on Gemini
« Reply #13 on: February 02, 2018, 02:36:33 pm »
Quote from: Grench
I also do not expect that they will have Linux 3D drivers for the Mali T880 graphics system.  We'll likely be stuck at 2D acceleration only under Linux.  For that we'll be at the mercy of Mediatek.  Mediatek's history isn't exactly Linux friendly.
What about using libhybris to use the Android's 3d driver under a Wayland compositor? This would restrict the choice of a display server (basically, only Enlightenment and Gnome 3's Mutter), but it might be a viable solution.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Grench

  • Full Member
  • ***
  • Posts: 110
    • View Profile
linux on Gemini
« Reply #14 on: February 02, 2018, 03:50:22 pm »
Quote from: Varti
Quote from: Grench
I also do not expect that they will have Linux 3D drivers for the Mali T880 graphics system.  We'll likely be stuck at 2D acceleration only under Linux.  For that we'll be at the mercy of Mediatek.  Mediatek's history isn't exactly Linux friendly.
What about using libhybris to use the Android's 3d driver under a Wayland compositor? This would restrict the choice of a display server (basically, only Enlightenment and Gnome 3's Mutter), but it might be a viable solution.

Varti

Mmm...  I would prefer to push this back to Planet Computers and them to push back to MediaTek.  Supporting dual booting the SoC to Linux -should- include support for the 3D driver.

Doing this under a Wayland compositor - I'm not aware of any solutions using this where general people are using the resulting system for useful tasks.  There are a few cases used as proof of concept examples - kind of, "Hold my beer and check this out!"

Do you know of working examples on a Mediatek X27 or even X25 SoC where the solution is stable enough to be used on a daily basis?