[Nexus 6P] Porting Thread

2443 views
Skip to first unread message

chev droid

unread,
Sep 23, 2016, 9:54:01 AM9/23/16
to Maru OS dev

#Moving over from "Device Porting Thread"#


bootlessxfly


I should have mentioned. Display link works just fine with the nexus 6p. That was my plan for the port




chev droid


 @bootlessxfly okay good to know the 6p supports at least Displaylink, I didn't find any HDMI-Out support, since it uses usb 2.0 with just the usb-c type connector not usb 3.0 or 3.1.

The only bad thing about display link is, you need special hardware, even on the display/monitor side (or a dock/adapter) to get it work. But if it really support displaylink it would be amazing!
Another cool protocoll which hopefully future phone'll support is thunderbolt 3, which uses the usb-c connector.
You could connect up to two 4k monitors and deliver up to 100 watts of power :)




bootlessxfly

I have a USB type c to USB 2.0 adapter. I also have a display link adapter I plug that into. And this combination with the display link driver from the play store allows me to hook my phone up to a moniter. Here is a link.
http://www.displaylink.com/downloads/android

One downside right now is that the nexus 6p does not support being in USB host mode while also charging. A possible fix to this would be to add ACA_host mode to the kernel. I believe there is an aca_host mode path for the nexus 7 kernel. I may look into porting this over in the future.

Anyways, when I get a chance either today or this weekend. I'll move all of this over to a nexus 6p porting thread.



bootlessxfly

unread,
Sep 25, 2016, 7:46:55 PM9/25/16
to maru-...@googlegroups.com
@chev droid. Thanks for making this thread.


The following contains all of the nexus 6p builds.

I have uploaded new working builds. Each one comes with a set of install scripts. I will give some example uses below.
There are two builds based on maru0.4. One build for both jessie and debian sid. In the future I would like to include one for ubuntu.
To install maru on your nexus 6p,
unzip th zip file and go to the root of that directory
use ./flashall.sh to install. Example uses are given below.
./flashall.sh -h yes will display help menu
./flashall.sh -r yes will install twrp recovery. Must have run gapps install script first
./flashall.sh -f. This will fix any vendor fingerprint issues when downgrading/upgrading new nexus and pixel devices.
For full install with gapps
./flashall.sh -t full -g yes 
For full install with gapps and twrp recovery
./flashall.sh -t full -g yes -r yes
For full install with gapps, twrp recovery, and fingerprint fix
./flashall.sh -t full -g yes -r yes -f yes

For the nexus6p you will need to either install displaylink adapter or google home(For chromecast support). Without these you will not be able to post a linux desktop to a monitor. These require gapps and need to be installed via the playstore.

Let me know if anyone finds any bugs and I will start reporting my own

Preetam

unread,
Sep 27, 2016, 8:17:18 PM9/27/16
to Maru OS dev
I'll take a look at this. It looks like the Android.mk needs some changes to make it work for arm64.

bootlessxfly

unread,
Sep 30, 2016, 6:35:17 PM9/30/16
to Maru OS dev
Thanks Preetam,
I will also keep on looking into this and see if I can solve it.
I'll post on here if I find a fix

Preetam

unread,
Sep 30, 2016, 7:30:34 PM9/30/16
to Maru OS dev
Alright, I took a look and made some pretty big changes to the way LXC is built for Maru OS. Hopefully this new way is more robust across architectures and future versions of Android. Read the last commit description if you are curious.

 I tested this quickly with hammerhead and it works fine. I also did an arm64 compile by selecting angler and it appears to build lxc fine without any errors, although I can't actually test it without the device.

You can pull the changes to your external/lxc repository by checking out the 'arm64-workaround' branch:

$ cd external/lxc
$ git fetch github && git checkout arm64-workaround

I recommend doing a clean rebuild with the new branch.

Note that you'll need to explicitly build lxc since the product dependencies in the device repos aren't updated yet. From root of workspace:

$ mmma external/lxc

Make sure to rebuild system.img afterwards:

$ make snod

Then flash as usual.

This should get you past this snag so you can continue the port. Let me know how it goes!

P.S. This will eventually move to mainline after I'm confident everything works as expected.

bootlessxfly

unread,
Oct 2, 2016, 9:00:43 PM10/2/16
to Maru OS dev
Thanks. I'll give the compile a try when I get back to my computer and let you know how it goes.

Daniel Hancock

unread,
Oct 9, 2016, 12:05:50 AM10/9/16
to Maru OS dev
I'm using the old build environment setup through arch linux and mmma external/lxc gives me command not found. My googlefu was not up to the task either. Something I'm missing?

bootlessxfly

unread,
Oct 9, 2016, 12:18:22 AM10/9/16
to Maru OS dev
You'll need to run
. build/envsetup
lunch

This will allow you to use mmma.
I've gotten this to compile and boot, however I am getting msm driver errors in my dmesg. Ill work on fixing these probably tomorrow.

Daniel Hancock

unread,
Oct 9, 2016, 12:27:45 AM10/9/16
to maru-...@googlegroups.com
Been awhile, thanks completely forgot about running that first. Got this.

prebuilts/clang/linux-x86/host/3.6/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
make: *** [build/core/binary.mk:706: out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/Main.o] Error 127
make: Leaving directory '/home/pheoxy/maruos'

#### make failed to build some targets (54 seconds) ####



bootlessxfly

unread,
Oct 9, 2016, 12:31:09 AM10/9/16
to Maru OS dev
Which prebuilt library are you using? I'm using aarch64. Also, you'll need to have some Android.Mk files for the angler build. I can provide the files I used maybe tomorrow.

Daniel Hancock

unread,
Oct 9, 2016, 12:32:31 AM10/9/16
to Maru OS dev
Ran it again and got further bot got another error.

including ./vendor/maruos/Android.mk ...
*** Overlay change detected, clean shared intermediate files...
*** rm -rf out/target/common/obj/APPS/SystemUITests_intermediates out/target/common/obj/APPS/Contacts_intermediates out/target/common/obj/APPS/framework-res_intermediates out/target/common/obj/APPS/Settings_intermediates out/target/common/obj/APPS/Bluetooth_intermediates out/target/common/obj/APPS/Telecom_intermediates out/target/common/obj/APPS/TeleService_intermediates out/target/common/obj/APPS/SettingsProvider_intermediates out/target/common/obj/APPS/SystemUI_intermediates
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
No private recovery resources for TARGET_DEVICE angler
build/core/tasks/vendor_module_check.mk:70: *** Error: vendor module "libperspective" in  vendor/maruos/perspective with unknown owner "" in product "aosp_angler".  Stop.
make: Leaving directory '/home/pheoxy/maruos'

#### make failed to build some targets (31 seconds) ####



bootlessxfly

unread,
Oct 9, 2016, 12:39:57 AM10/9/16
to Maru OS dev
Run this command:
export USER=$(whoami)

should fix it

Daniel Hancock

unread,
Oct 9, 2016, 12:45:17 AM10/9/16
to Maru OS dev
OK just running without changes at the moment to see what needs doing. Been awhile to so I'm remembering things as I go.
You can just upload changes to your personal github?

Daniel Hancock

unread,
Oct 9, 2016, 12:51:35 AM10/9/16
to Maru OS dev
Noticed https://github.com/maruos/android_platform_build branch was set to android 5.0 instead of android-6.0.

Would that affect something?

bootlessxfly

unread,
Oct 10, 2016, 6:59:55 PM10/10/16
to Maru OS dev
Sorry for the delay. 
On the link provided there is a branch for android 6.0.
Also, as to your question about putting it on my github page, sure.
I'd like to check a few things, as I think one of my additions may be whats causing me problems right now. Once I finish looking at that though, I'll upload my changes to git and post a link.

Bart Vdpt

unread,
Nov 1, 2016, 8:43:55 AM11/1/16
to Maru OS dev
Hi

No activity anymore, are you still working on this or is it not possible to get MaruOS on the Nexus 6p?
I ask this because i have found a good priced second hand Nexus 6p but the seller doesn't want to wait.


When i can buy it, i become a tester.
But then i need fast an answere that MaruOS will work the upcoming months on the N6p.

I switch from ios to android special for MaruOS.

Regards

Bart Vdpt

unread,
Nov 1, 2016, 8:46:56 AM11/1/16
to Maru OS dev
The Nexus 6p has no OTG support but USB-C 2.0 with DisplayLink support.
Can this work with MaruOS?

chev droid

unread,
Nov 2, 2016, 5:38:00 AM11/2/16
to Maru OS dev
The 6p doesn't support Slimport or MHL, USB OTG is supported and yes DisplayLink would work.
A Port to the 6p is for sure possible, with the current version of maru os, you wouln't be able to stream debian on a big screen (no display link or any other slimport alternative currently supported). With future versions of maru os it is (I think) very likely to work!

Sadly I have sold my 6p (to upgrade to the Pixel) so I can't help with testing :(

To answer your question, at the moment you won't get a fully functional Maru OS on the 6p, but Maru OS on the 6p is possible, but as said at the moment not with all functionalities.

Hope thats helps somehow.

Bart Vdpt

unread,
Nov 3, 2016, 8:56:52 AM11/3/16
to Maru OS dev
Thanks. 

So, it will be only the Nexus 5 that will work with MaruOS for a long time? 
Or wil the next port be the Pixel? ;-) To expensive for me, but ok, then i know. 


"A Port to the 6p is for sure possible, ..." but will never be done, seams me. 
Because when you stop with the port, nobody can/will continue to finish it. 

The porting seams all really difficult, it seams that a lot of people never finish it. 
Pity i understand nothing of that. 

Regards 
Bart 




Op woensdag 2 november 2016 10:38:00 UTC+1 schreef chev droid:

bootlessxfly

unread,
Nov 13, 2016, 9:25:42 AM11/13/16
to Maru OS dev
Sorry I have been missing in action the last couple of months, I got a new job which took up a lot of time at first.

I just started working on the port again. And I have maruos and the kernel built and booting on my nexus 6p. I have not been able to test out if lxc is launching and posting properly to hdmi. I will test this feature when I get back to my workstation tonight.

Now that my schedule is not as hectic, I plan on spending much more time on this project.

Dionis L

unread,
Nov 13, 2016, 11:34:04 AM11/13/16
to Maru OS dev
Ok , very intresting ,I'm very interested how is harware acelaration going , no matter if is a nexus 5 or other phone .Yesterday O got sound working on debian , but my hdmi cable is on the way so I just tested youtube over vnc.Is for you the youtube in firefox videos playing fine?

Dionis L

unread,
Nov 13, 2016, 5:49:36 PM11/13/16
to Maru OS dev
Hello gain ,

How is all doing ? Maybe we can help you cause I'm also interested of this port .

I think you need a USB Type-C to HDMI ?

I'm very interested if you got the debian to start and if you get something over hdmi .
Have a good day!

bootlessxfly

unread,
Nov 13, 2016, 5:53:09 PM11/13/16
to Maru OS dev
Dionis,
Like I said, I will not have the chance to try it out in till I return home later.
As far as hdmi, I have an displaylink adapter and a USB C to usb A cord. Android supports display link for anything 5.0.0 and later.

bootlessxfly

unread,
Nov 13, 2016, 5:58:48 PM11/13/16
to Maru OS dev
As for hardware acceleration, we are going to need to implement libhybris. This is something I was thinking of working on after I finished tile initial port.

Dionis L

unread,
Nov 13, 2016, 6:06:14 PM11/13/16
to Maru OS dev
if you copy .so files from android /system/lib/ for example libOmxCore.so
Do you think it will work ,we to build on debian c++ apps that will be able to use H/W acceleration linking to this libraries we copy from android to debian?

bootlessxfly

unread,
Nov 13, 2016, 10:52:17 PM11/13/16
to Maru OS dev
If I'm understanding you correctly, then you are not far off.
The main thing that you are missing are the bindings that allow for c++ code to work with android libraries.
Libhybris mounts /system and uses these bindings to allow our linux container to run off these android libraries.

bootlessxfly

unread,
Nov 14, 2016, 11:05:00 PM11/14/16
to maru-...@googlegroups.com
So, I have played around a little more with my build.
I ran:
1|shell@angler:/ # su
1|root@angler:/ # lxc-start -n jessie  

I get the following error message.
lxc-start: external/lxc/src/lxc/lxc_start.c: main: 296 Executing '/sbin/init' with no configuration file may crash the host

Any ideas?
I'll look around to see if I can find anything.

Running 
130|root@angler:/ # find / | grep "jessie"  

returns me
/system/maru/containers/jessie
/system/maru/containers/jessie/config
/system/maru/containers/jessie/fstab
/system/maru/containers/jessie/jessie-rootfs.tar.gz

/data/maru/containers/ is missing the jessie folder.

I've attached my lxc-start log file


lxc-start.txt

Preetam

unread,
Nov 15, 2016, 2:20:21 PM11/15/16
to Maru OS dev
Same issue as Stefan was having on his port: https://groups.google.com/d/msg/maru-os-dev/tjJvMHP-_OI/sbrDyZx3AAAJ

You'll need to make sure you add this line to your device init file to make sure those lxc directories are synced over: https://github.com/maruos/android_device_lge_hammerhead/blob/3f343180d2d122a3969bd880c6761afe6579de7a/init.hammerhead.rc#L23.

And make sure that device-maru.mk is being included in your product configuration makefile, use hammerhead's as a guide: https://github.com/maruos/android_device_lge_hammerhead/blob/dcbf00e4e2731a593d81dcc563766d187e7144f5/maru_hammerhead.mk#L18

Dionis L

unread,
Nov 15, 2016, 2:34:37 PM11/15/16
to Maru OS dev
Very interesting .And if we do a at compile : lunch 1 , (or lunch and select first option mot the hamerhead option) ,where we must add this ,for option 1 of lunch to work ?

bootlessxfly

unread,
Nov 16, 2016, 12:11:48 AM11/16/16
to maru-...@googlegroups.com
It appears i missed import init.maru.rc. Thanks for pointing that out
I am now able to start the container; however, I am now having trouble logging in,
I referenced:

User=maru, pass=maru and user=root, pass=root would not allow me to log in.
Are these still the correct username/password combinations?

I have also tried this with the 0.3 prebuilt rootfs and the 0.3 arm64 rootfs i compiled.
I'll attach a log of my lxc-start output
I will point out that I do not have the same error as in the above post.

On another note.
When I have my phone plugged into the hdmi, is it supposed to post the linux environment or are we supposed to envoke a command to launch this?
lxc-login-incorrect.txt

Preetam

unread,
Nov 17, 2016, 6:12:22 PM11/17/16
to Maru OS dev
Yup, those are the right user/pass combos. This is a weird error...something is messing up the login process. I don't see anything wrong in your startup logs. I need to look into this more closely and try to repro on my end.

Regarding HDMI, yes, the desktop will boot automatically when it detects an HDMI screen. But the Nexus 6P doesn't have HDMI, so you'll have to start it manually.

bootlessxfly

unread,
Nov 17, 2016, 7:34:17 PM11/17/16
to maru-...@googlegroups.com
On a additional note,
I had to keep CONFIG_USER_NS disabled to get the kernel to compile. Don't know if this could be causing the problem or not.

After a quick google search, I found this page

The description of CONFIG_USER_NS provided
"This allows containers, i.e. vservers, to use user namespaces to provide different user info for different servers."

This seems to be the problem. I may have to find a way to get the kernel compiled with this feature enabled.

Dionis L

unread,
Nov 17, 2016, 7:46:13 PM11/17/16
to maru-...@googlegroups.com
No no no ....
Do not stress about that! ,android is not running debian in a userspace .Wedo not need taht kernel option now.
Debian is run in a container that have full acess is not in a userspace .So do not worry about that.If only lose time if you care about that now

By the way ... how did you created your boot.img ?

bootlessxfly

unread,
Nov 17, 2016, 7:55:43 PM11/17/16
to maru-...@googlegroups.com
Ahh i was thinking the container would leverage user namespaces somehow.
Thanks for pointing that out.

Dionis L

unread,
Nov 17, 2016, 8:02:39 PM11/17/16
to Maru OS dev

bootlessxfly

unread,
Nov 17, 2016, 8:13:29 PM11/17/16
to maru-...@googlegroups.com

you need to copy your kernel image to your device-kernel folder
cp [root of kernel folder]/arch/[device archecture]/boot/Image.gz-dtb [root of maruos project]/device/[OEM]/[device name]-kernel/Image.gz-dtb
Replace [*] with proper data.
Incase the above is unclear, an example of what my command looks like:
cp ../kernel/msm/arch/arm64/boot/Image.gz-dtb device/huawei/angler-kernel
/Image.gz-dtb
 

the from the root of your maruos project folder rerun make. 
You will have a boot.img in your out directory.

Also, if you need to revert back to the original Image.gz-dtb, you can run a git stash to recover it.

Dionis L

unread,
Nov 17, 2016, 8:25:20 PM11/17/16
to Maru OS dev
Very interesting .Thank you very much!

Preetam

unread,
Nov 18, 2016, 4:31:48 PM11/18/16
to Maru OS dev
Yes, confirming that CONFIG_USER_NS is optional and is not used at the moment. There is a note on this in the Kernel building wiki: https://github.com/maruos/maruos/wiki/Kernel#define-your-kernel-config. It causes a lot of Android kernels to fail to build and is safe to drop.

bootlessxfly

unread,
Dec 8, 2016, 7:43:39 PM12/8/16
to Maru OS dev
I have applied the backported kernel patch and am now able to log into my container.
So that fix has worked for me,

I havn't looked to much at the posting over hdmi yet. I did do a quick test by plugging everything up with displaylink which did not work. 
I'll work more on this.

bootlessxfly

unread,
Dec 8, 2016, 11:08:19 PM12/8/16
to Maru OS dev
I see in "Known porting issues" that i should compile an 32 bit mflinger. Is there a way I can tell the compiler to compile this in arm? I did not see an "ARCH" variable in any of makefiles of mflinger. 

Georgian Chituc

unread,
Dec 9, 2016, 12:27:45 AM12/9/16
to Maru OS dev
you have just to get mfliger and libmflinger.so from your nexus 5 device , you have to put mflinger into /system/bin   , and libmflinger.so into /system/lib/  . You have to make chown root:shell /system/bin/mflinger  (if I remember correct ) ,same like in nexus 5 device , or it will not start at boot time 

bootlessxfly

unread,
Dec 9, 2016, 10:49:44 AM12/9/16
to Maru OS dev
Thanks for the tips. I do not have an nexus 5 device. I can try to grab a prebuilt image (or go ahead and build one) and extract it out of the system.img. If you have them available, do you think you could upload them?

A B

unread,
Dec 9, 2016, 11:52:02 AM12/9/16
to bootlessxfly, Maru OS dev
Yes ,"will" upload here they are . you must do also chmod +x on mflinger

On Dec 9, 2016 5:49 PM, "bootlessxfly" <bootle...@gmail.com> wrote:
Thanks for the tips. I do not have an nexus 5 device. I can try to grab a prebuilt image (or go ahead and build one) and extract it out of the system.img. If you have them available, do you think you could upload them?

--
You received this message because you are subscribed to a topic in the Google Groups "Maru OS dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maru-os-dev/3KxiW2ZVlQU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maru-os-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maru-os-dev/afd4a93e-9538-477f-ab47-e84f9c1915dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
libmflinger.so
mflinger

bootlessxfly

unread,
Dec 9, 2016, 6:12:35 PM12/9/16
to Maru OS dev, bootle...@gmail.com
Thanks.
I'll try these out.

Preetam

unread,
Dec 9, 2016, 8:11:23 PM12/9/16
to Maru OS dev
Thanks for confirming the backported kernel patch fixed your login issues!

bootlessxfly

unread,
Dec 10, 2016, 10:59:47 AM12/10/16
to maru-...@googlegroups.com
@Preetam. Not a problem.
I started running into problems. 
After I tested the backported kernel, i reflashed all *.img and booted to find that lxc was not installed.
I then explicitly compile lxc with "mmma external/lxc && make -j8", which compiles fines. But on a reflash i still do not have lxc.
I ran repo sync and then recompiled and I get errors for lxc on both branches v0.3 and arm64-workaround
The error is as follows:

+ test -d autom4te.cache
+ rm -rf autom4te.cache
+ aclocal -I config
+ autoheader
+ autoconf
+ automake --add-missing --copy
mkdir
-p /media/chris/7A52302E3B535583/project-files/maru/out/target/product/angler/obj/lxc && cd /media/chris/7A52302E3B535583/project-files/m
aru
/out/target/product/angler/obj/lxc && \
cp
-r /media/chris/7A52302E3B535583/project-files/maru/external/lxc/config /media/chris/7A52302E3B535583/project-files/maru/out/target/product/
angler
/obj/lxc && \
/media/chris/7A52302E3B535583/project-files/maru/external/lxc/configure \
       
--host=arm-linux-androideabi \
       
--bindir="/system/bin" \
       
--libdir="/system/lib64" \
       
--disable-api-docs \
       
--disable-capabilities \
       
--disable-examples \
       
--disable-lua \
       
--disable-python \
       
--disable-bash \
       
--enable-configpath-log \
       
--prefix=/system/maru/lxc \
       
--with-runtime-path=/cache/ \
       
--with-config-path=/data/maru/containers/ \
        CFLAGS
="-nostdlib -Bdynamic -pie \
                -fno-exceptions -Wno-multichar -fno-strict-aliasing  -fstack-protector -ffunction-sections -fdata-sections -funwind-tables -Wa,
--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers -mcpu=cortex-a5
3 -include build/core/combo/include/arch/linux-arm64/AndroidConfig.h -I build/core/combo/include/arch/linux-arm64/ -Werror=pointer-to-int-cast
-Werror=int-to-pointer-cast -Werror=implicit-function-declaration  -fno-strict-volatile-bitfields -Wno-psabi -DANDROID -fmessage-length=0 -W -W
all -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -DNDEBUG -O2 -g
 -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -DNDEBUG -UDEBUG -I/media/chris/7A52302E3B535583/project-fil
es/maru/bionic/libc/arch-arm64/include -I/media/chris/7A52302E3B535583/project-files/maru/bionic/libc/include -I/media/chris/7A52302E3B535583/p
roject-files/maru/bionic/libc/kernel/uapi -I/media/chris/7A52302E3B535583/project-files/maru/bionic/libc/kernel/uapi/asm-arm64 -I/media/chris/7
A52302E3B535583/project-files/maru/bionic/libm/include -I/media/chris/7A52302E3B535583/project-files/maru/bionic/libm/include/arm64"
\
        LDFLAGS
=" -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64lin
ux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419  -Wl,--allow-shlib-undefined \
                -Wl,-dynamic-linker,/system/bin/linker \
                /media/chris/7A52302E3B535583/project-files/maru/out/target/product/angler/obj/lib/crtbegin_dynamic.o \
                -lc -ldl \
                -L/media/chris/7A52302E3B535583/project-files/maru/out/target/product/angler/obj/lib \
                /media/chris/7A52302E3B535583/project-files/maru/out/target/product/angler/obj/lib/crtend_android.o"
&& \
        make
&& \
        make DESTDIR
=/media/chris/7A52302E3B535583/project-files/maru/out/target/product/angler install
checking
for arm-linux-androideabi-pkg-config... no
checking
for pkg-config... /usr/bin/pkg-config
checking pkg
-config is at least version 0.9.0... yes
checking
for a BSD-compatible install... /usr/bin/install -c
checking whether build environment
is sane... yes
checking
for arm-linux-androideabi-strip... arm-linux-androideabi-strip
checking
for a thread-safe mkdir -p... /bin/mkdir -p
checking
for gawk... no
checking
for mawk... mawk
checking whether make sets $
(MAKE)... yes
checking whether make supports nested variables
... yes
checking build system type
... x86_64-pc-linux-gnu
checking host system type
... arm-unknown-linux-androideabi
checking
for style of include used by make... GNU
checking
for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
checking whether the C compiler works
... no
configure
: error: in `/media/chris/7A52302E3B535583/project-files/maru/out/target/product/angler/obj/lxc':
configure: error: C compiler cannot create executables
See `
config.log' for more details
external/lxc/Android.mk:54: recipe for target '
external/lxc/../../out/target/product/angler/system/lib64/liblxc.so' failed
make: *** [external/lxc/../../out/target/product/angler/system/lib64/liblxc.so] Error 77
make: Leaving directory '
/media/chris/7A52302E3B535583/project-files/maru'
 
#### make failed to build some targets (02:12 (mm:ss)) ####



EDIT:

I was able to get lxc compile in the arm64-workaround branch. Looks like the problem was that i hadn't added aarch64-linux-android-4.9 to the PATH

Preetam

unread,
Dec 10, 2016, 6:44:39 PM12/10/16
to maru-...@googlegroups.com
Yes, please use arm64-workaround for all arm64 devices. master's make recipe breaks for arm64 devices. I will be merging this to master soon after some more tests on armhf / hammerhead.

Also note that you will need to explicitly do:

$ mmma external/lxc && make snod

The "make snod" rebuilds the system.img with your LXC build.

Onced this is merged onto master, this will happen by default.

EDIT: added a note on wiki https://github.com/maruos/maruos/wiki/Porting-Guide#issues-building-platform_external_lxc-on-arm64

bootlessxfly

unread,
Dec 11, 2016, 4:31:52 AM12/11/16
to maru-...@googlegroups.com, bootle...@gmail.com
@Georgian Chituc. I've added these files to to my build and ran chown && chmod.
I still just get my android screen over displaylink. Did you have to do any additional steps to get displaylink to work?

Also, am I going to need to manually start the desktop since I am using displaylink?

I've attached my "dumpsys SurfaceFlinger"
dumpsys_SurfaceFlinger

Georgian Chituc

unread,
Dec 11, 2016, 9:06:33 AM12/11/16
to Maru OS dev
Did yougot this dumpsys while you had android image on tv ?

It must say 2 displayes but say just:
Displays (1 entries)
+ DisplayDevice: Built-in Screen

So until you see in the log that it have 2 displays you can not go next

bootlessxfly

unread,
Dec 11, 2016, 9:49:40 AM12/11/16
to Maru OS dev
Sorry, I had not gotten the klast dumpsys when displaylink was connected. Here is my dumpsys with hdmi connected. I'll attach full file
Displays (2 entries)
+ DisplayDevice: DisplayLink (ASUS VS247)
   type=2, hwcId=2, layerStack=0, (1920x1080), ANativeWindow=0x7f75aa0810, orient= 0 (type=00000005), flips=38, isSecure=0, secureVis=0, powerMode=2, activeConfig=0, numLayers=3
   v:[0,0,1440,2560], f:[656,0,1263,1080], s:[656,0,1263,1080],transform:[[0.422,0.000,656.000][0.000,0.422,0.000][0.000,0.000,1.000]]
+ DisplayDevice: Built-in Screen
   type=0, hwcId=0, layerStack=0, (1440x2560), ANativeWindow=0x7f795f5c10, orient= 0 (type=00000000), flips=24849, isSecure=1, secureVis=0, powerMode=2, activeConfig=0, numLayers=3
   v:[0,0,1440,2560], f:[0,0,1440,2560], s:[0,0,1440,2560],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
dumpsys

Georgian Chituc

unread,
Dec 11, 2016, 3:42:22 PM12/11/16
to Maru OS dev
Sorry for my late replys but I'm out of town .

Is good there are 2 displays . But if I search for world 'maru' on your log there is nothing .

You can do in android shell 'ps -x |grep mflinger'  , to be sure mflinger is running . Also try to start it manualy if is not there , run /system/sbin/mflinger . If you are sure it is running , you can start maru desktop ,and do again a dumpsys , and search in dump for 'maru' . You have to have 2 'maru' entries in log . One is the surface created for desktop and anoter for cursor pointer . mflinger create 2 surfaces ,and you can check if mflinger create them by searching for 'maru' in logs .

I' do not know exactl how you build your rom . Did you cloned the maru os repository ? I build my rom from a custom rom aosp based , and I had to integrate in my framework all changes from maru os repository , but if you cloned maru os repo you must already have this changes.

bootlessxfly

unread,
Dec 12, 2016, 8:08:38 PM12/12/16
to maru-...@googlegroups.com
I am using the manifest from the "v0.3" branch. I ran a diff to make sure they where the same.
Also, my debian is an arm64 build.
When you say start maru desktop, do you mean plug the phone into displaylink and hdmi, or do i need to manually start the container and run a command in the container to start x?

When i run "ps -x | grep mflinger" I get
graphics  591   1     5776   1904  __skb_recv 0000000000 S /system/bin/mflinger (u:3, s:1)

And when displaylink/hdmi is connected, I run "dumpsys SurfaceFlinger | grep maru" and get no return. 

When I run "dumpsys | grep maru" I get
    fingerprint=Android/maru_angler/angler:6.0.1/MMB29V/chris12101115:userdebug/test-keys
    fingerprint
=Android/maru_angler/angler:6.0.1/MMB29V/chris12101115:userdebug/test-keys
03-08 01:56:08.254 - wlan0: 5:IFNAME=wlan0 SET device_name maru_angler -> true

And when I run "dumpsys | grep mflinger" I get
    Proc mflinger:
     
783 kB: mflinger (pid 591)
                 
783 kB: mflinger (pid 591)

 Also, when i run startxfce4 inside the container I get this error message
root@jessie:~# startxfce4  
/usr/bin/startxfce4: Starting X server



(EE)  
Fatal server error:

(EE) Server is already active for display 0

       
If this server is no longer running, remove /tmp/.X0-lock

       
and start again.

(EE)  
(EE)  
Please consult the The X.Org Foundation support  
         at http
://wiki.x.org

 
for help.  
(EE)  
No protocol specified

xinit
: giving up

xinit
: unable to connect to X server: Resource temporarily unavailable

xinit
: server error

Im assuming display 0 is refering to the phone screen.

When I run "export DISPLAY=1 && startxfce4" i get
/usr/bin/startxfce4: X server already running on display 1


I'll attach my dumpsys log file
dumpsys.full

Preetam

unread,
Dec 13, 2016, 12:23:39 AM12/13/16
to maru-...@googlegroups.com
Some clarifications:

SlimPort vs. DisplayLink: SlimPort and DisplayLink are very different ways of transmitting video out of a device, and Android treats their displays differently. Georgian's LG G4 device has SlimPort support just like the N5, so things just worked out of the box for him. The Nexus 6P, on the other hand, does not have SlimPort support so you may have more difficulties getting the desktop graphics working. Even if you get mflinger/mclient up and running, I doubt things will work without some changes to core maru. Right now, maru is very explicit that the desktop display shows up in the system as an HDMI screen. So everything depends on how DisplayLink devices are categorized wtihin the system...and from what I understand of DisplayLink, it has nothing to do with HDMI from the perspective of the device, it's just capturing the phone screen via an app and transferring it directly over USB to your DisplayLink dock/adapter, which THEN prepares that stream for HDMI and transmits to your display. In short, the device has no clue there is an HDMI display attached.

Regarding auto-start of the container: If the container is not starting up automatically when you attach your display via DisplayLink, that means it's not showing up as an HDMI display (or something is wrong with your port...but it looks like you're ok since lxc-start works fine). I would guess the DisplayLink display is showing up as a "virtual display" or something within the system, so maru just ignores it.

Some other tips:

To check if mclient is running as expected, do this within the container:

$ journalctl -u mclient

Also, can you please attach your dumpsys with DisplayLink connected? I only see one display listed in your previous message. The important one for me is "dumpsys display", this will let me see how DisplayLink displays are categorized by Android.

P.S. Also helps if you add a .txt extension to any future log attachments so my browser let's me easily open it in a new tab instead of thinking its a binary file...thanks

bootlessxfly

unread,
Dec 13, 2016, 1:26:36 AM12/13/16
to maru-...@googlegroups.com
Sorry about the file extention, lazy naming convention on my end. I'll make future files *.txt.


I just changed to an armhf debian, so this log is from that.
I'll include a log for "journalctl -u mclient" but it looks like it fails to start.


It looks like you are right about displaylink showing up as virtual. So displaylink is using a virtual framebuffer to pass this information to the displaylink device? Do you think we could bind maru desktop to this virtual frambebuffer?

Since this virtual framebuffer represents a usb device(being our displaylink adapter), couldn't we post maru desktop to this. Our post would eventually be formed into an actual framebuffer by the adapter to send over hdmi.

I've attached dumpsys logs for both display and SurfaceFlinger


Thanks for the tips.

mclient.txt
dumpsys_display.txt
dumpsys_surfaceFlinger.txt

Georgian Chituc

unread,
Dec 13, 2016, 5:00:25 AM12/13/16
to Maru OS dev
The maru os app version will work for your 6p. Also I searched for all phones that have slimport and good specs before buying the lg g4.
I see it like a upgrade to N5. They are very similar

bootlessxfly

unread,
Dec 13, 2016, 9:46:28 AM12/13/16
to Maru OS dev
@Georgian Chituc. I must have confused my self. You can currently get displaylink to work with the app version? Is the app version using something like vnc to view the desktop? I'll go read through the app version thread when I get a chance later.

A B

unread,
Dec 13, 2016, 10:46:37 AM12/13/16
to bootlessxfly, Maru OS dev
Yes ,that must work with any external display ,over hdmi ,display link or cast. Will give you to test tomorrow ,on your display link . i still have to make cursor visible on screen ,had no time till now cause i am out of town . but will give you tomorrow so youto test it.

Pe 13 dec. 2016 16:46, "bootlessxfly" <bootle...@gmail.com> a scris:
@Georgian Chituc. I must have confused my self. You can currently get displaylink to work with the app version? Is the app version using something like vnc to view the desktop? I'll go read through the app version thread when I get a chance later.

--
You received this message because you are subscribed to a topic in the Google Groups "Maru OS dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maru-os-dev/3KxiW2ZVlQU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maru-os-dev+unsubscribe@googlegroups.com.

Preetam

unread,
Dec 13, 2016, 11:48:42 AM12/13/16
to Maru OS dev
Thanks for the logs (and .txt)! This clears up a lot of things.

I am confirming that the DisplayLink display shows up as VIRTUAL, so it will be ignored by the current version of maru. But yes, you are right, we can still get the desktop to post to virtual displays with some changes. I am working on this with my Nexus 5X (it lacks SlimPort as well) and will push it up to master as soon as its ready for you to test as well.

mclient.txt:
Dec 13 00:03:00 jessie systemd[124]: Failed at step EXEC spawning /usr/bin
/mclient: No such file or directory

Looks like mclient fails to start. Does /usr/bin/mclient exist? If it does exit, this could be a binary file exec error...there is an architecture mismatch somewhere.

On the plus side, I am working on arm64 desktop builds with a 64-bit mclient and they'll be up this week I think. You can use that as soon as it's ready and things should just work.

As Georgian has mentioned, you could try the app version as well for now--it acts similarly to a VNC app from what I can tell, but I haven't used it myself.

bootlessxfly

unread,
Dec 13, 2016, 7:32:57 PM12/13/16
to maru-...@googlegroups.com
I should also have an nexus 5x in the next couple of days, so I can help with testing that device if need be.
Should i switch over to the master branch now? I've been on v0.3.

/usr/bin/mclient does exist. I am currently running this on an armhf desktop, with a 32-bit mclient, mflinger, and libflinger. I can try reflashing with my arm64 build.

I'll start to read through the mflinger source code so I can better understand how maru handles this. 

Preetam

unread,
Dec 14, 2016, 7:45:11 PM12/14/16
to Maru OS dev
I don't think there's anything that that will impact your port on master now except vendor/maruos/blueprints which I just pushed yesterday. You should be able to create an arm64 container with proper 64-bit mclient on master now with the following:

$ ./build.sh -n jessie -- -a arm64

You can just checkout master within vendor/maruos/blueprints to do that build, no need to switch over the entire manifest.

With your new image you shouldn't need to worry about 32-bit mflinger/mclient stuff anymore. You still won't see anything over DisplayLink as discussed previously, but mclient should be running and talking to mflinger OK and your journalctl shouldn't show any errors.

Thanks for offering to test 5X, I'll put up builds for testing when they're ready.

bootlessxfly

unread,
Dec 16, 2016, 3:41:22 PM12/16/16