(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Sep 2020, 13:37
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Hybris based Puppy for Smartphones & Watches?
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 15 Nov 2019, 02:34    Post subject:  Hybris based Puppy for Smartphones & Watches?
Subject description: I'm not in a rush for this but it would be cool :)
 

Puppy already has arm version so is to some extent compatible with smartphones. However, as is noted on the termux wiki because android uses "Bionic C" rather than "GlibC" any binaries on puppy are likely not compatible with android unless they are statically compiled.

Quote:

Termux uses Bionic libc

To have best compatibility with Android OS and remove the need of maintaining custom toolchains we compile all our packages with Android NDK. Resulting binaries are linked against Bionic libc (files libc.so, libm.so, libdl.so from /system/lib or /system/lib64).

Usage of libc provided by Android and FHS incompatibility disables ability to execute native packages copied from Linux distributions:

Dynamically linked programs will not run due to linker expected in nonexistent location (/lib) and libc ABI mismatch.
Statically linked programs (only networking ones) will not be able to resolve DNS names. GNU libc normally doesn't allow static linking with resolver. Also, the file /etc/resolv.conf is not exist on Android.
On non-rooted Android 8 or newer, statically linked programs will not run due to issues with seccomp filter.

However, these restrictions can be bypassed with proot.

https://wiki.termux.com/wiki/Differences_from_Linux

Quote:

Manual installation of *.deb files

If you have a *.deb package file, you can install it with dpkg. Note that packages downloaded from Ubuntu or from repositories of other Linux distributions will not work due to incompatible libc ABI, however statically compiled binaries may work.

https://wiki.termux.com/wiki/Package_Management

If one wants puppy to run alongside android then the binaries must be built with "Bionic C" and this is probably easiest to do with the android development kit. However, if puppy is to replace android then we don't have to worry about building with "bionic c" and can use regular deb files.

I saw a video where someone has claimed to have done this on their phone with tahrpup. The problem is that there might be hardware on the phone which has no open source hardware driver.

Quote:

There are two ways to solve this issue:

Open Source GPU drivers. This would be the ideal solution, as you would just be able to cross-compile the drivers for the proper, as well as fix bugs without having to ask the silicon manufacturer to fix the driver for you.
Bionic to Glibc library. Such library acts like libdl, and allows to load Bionic library and overrides some symbols from bionic with glibc based ones. This is exactly what libhybris does.

https://www.cnx-software.com/2013/04/08/libhybris-let-you-use-android-drivers-hw-libraries-in-linux/

Android drives can be used on linux by using a compatibility midleware called libhybris. Some instruction for porting the android drivers to linux (using libhbris) can be found on the asteroids site:

https://asteroidos.org/wiki/porting-guide/

AsteroidOS is an opern source operating system used in smart watches. One interesting thing about it is that it uses OpenEmbeded, which BarryK also used in one version of easyOS. Another operating system which uses libhybris is Ubuntu Touch.

AsteroidOS and UbuntuTouch are two operating system which could be used as a basis for a version of puppylinux that is built for mobile devices. I'm not in any rush for a libhybris version of puppy but I wanted to start the discussion in case this idea inspires someone and also to help me remember this info in case I wanted to use it in the future. Also since such an operating system have simmilar CPU architecture with an arm based version of puppy, there could be some repo sharing between arm based versions of puppy with libhbris based versions.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 15 Nov 2019, 02:48    Post subject:  

As a side note the halium project is trying to become the common middleware for libhybris based projects such as Ubuntu Touch and AsteroidOS. I don't know if halium is the bast way to utilize libhybris or not but there are instructions for using it with Ubuntu Touch at:

https://docs.ubports.com/en/latest/porting/introduction.html
https://docs.halium.org/en/latest/porting/install-build/index.html

Looking at the ubports.com link above, I think that going forward Ubuntu Touch is utilizing halium. I'm not sure what other hybris based projects are going to use halium going forward.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 15 Nov 2019, 02:54    Post subject:  

On another note, I think that in a proot environment you can use normal deb files on android, since the proot environment will be using a different c library than the host OS. Perhaps this also applies to chroot (root required) on android.
_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
lmemsm

Joined: 27 Jun 2012
Posts: 51

PostPosted: Thu 05 Dec 2019, 15:41    Post subject:  

Biggest issue I've seen with Android development is that if you're doing anything in C/C++, it has to be in console mode. If you're okay with using some form of Puppy with no X Windows support (command line and ncurses support only) then porting programs should be fairly easy. Termux uses a Java based terminal emulator designed for Android and runs the various console programs through it. If you really want X Windows, there's an X server available from ( https://sourceforge.net/projects/libsdl-android/ ). I've read about some issues with usability but it is a way to run X based applications on Android. Any GUI applications that don't use some workaround like the XSDL XServer would need to be written in Java in order to run on the Android operating system. You can use C libraries like SDL, but to get a program with C/C++ code working, you're basically creating C/C++ libraries that are called from a Java program. The simplest programs can use minimal Java and do most of the work in C/C++, but they still require some Java code. Also, unless you're using a work-around like the XSDL XServer or a Terminal Emulator, applications are all sandboxed from each other. That can limit file space sharing and communication between applications.

You could completely replace the Android OS and use a Linux distribution on a watch or smartphone. There are products like Librem 5 that use a Linux operating system. It would be easier to port Puppy in a case like that.

Debian has a list of apps and scripts that run Debian chroot on Android: https://wiki.debian.org/ChrootOnAndroid
Haven't checked all of them but this one uses XSDL:
https://github.com/CypherpunkArmory/UserLAnd/wiki/Getting-Started-in-UserLAnd
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0672s ][ Queries: 12 (0.0351s) ][ GZIP on ]