Porting Halium to Nexus 7 deb

@doniks Well AFAIK there is currently no ubports image booting with Halium correctly. Plus even if the xenial image would boot, it is far from usable. Lots of permission problems, no apps start etc. Its Pre-Alpha

@doniks I've finally had a chance to play around with the steps you've produced, and I found the issue with the Ubuntu rootfs-builder is that it needs to run under sudo for chroot to run. Your OP was very informative and it definitely helped me get over a couple of places I was stuck building while reading the Halium documentation.

I attempted to boot my kernel but the MSM watchdog keeps rebooting the device after a little bit, however I can see in /proc/last_kmsg that it seems to want a rootfs, so I'm waiting until everything is done building to fully test. Gonna see if I can't get GNOME Wayland to run on Halium/Hybris.

Edit: After waiting a little bit, my Ubuntu 16.04 boot appears to fail with a problem setting up LXC Networking, it then hangs. No USB connection, it doesn't seem to respond to Ubuntu's requests for device setup. So I'm going to try the rootfs you linked.

Canonicals "touch" root filesystems look somewhat different. Everything is in a "/system/" subfolder. If that would be the only difference, then well, one could hack around that, but I'm not sure whether there are other things as well (upstart/systemd?). I didn't feel like investing the time, since I expected the ubports core team to release a halium rootfs any day now But hey listening to the last community Q&A, it should really be any day now ...

I have done a repo sync and try to get back to where I was before. I'm using the halium rootfs and it does bring up the 10.15.19.82 network and I can ssh in, but after a few seconds it seems to tear that usb network down. I think I had that before, but I can't remember how I got past that. Something with the android lxc containers in the rootfs

@doniks I managed to figure out a workaround, I had to pull the jessie version of libssl1.0.0 so I could force ADBd to run instead, for whatever reason, my debian rootfs never gets USB tethering up unless it's the debug bootmode option. I am actually working with a running debian root now, however I screwed up while building my system image and didn't have any vendor blobs for libhybris to work with I'm rebuilding my system image now and then I'm going to reinstall the halium rootfs with the new system image.

Before-posting Edit: Looks like I'm running into an issue where the build system isn't picking up my vendor tree even after popping MOB30X's binaries down in there as laid out in the LineageOS guides for setting this folder up, every system image I build continues to not contain the proprietary blobs... I can't tell if I'm doing something wrong, or if it's something else that I'm not doing first.

EDIT EDIT: WOO! Had to do some linking around libhybris-egl, but I was able to finally get test_hwcomposer to show the spiral! Working on getting wayland to start up (working on getting some VTs up so I can launch weston as a test)

EDIT: Weston starts as long as I specify fbdev-backend and use msm_fb_refresher to get it up and running, but it runs and it's snappy. I just can't get anything else wayland to work (gnome-shell --display-server, kwin_wayland, etc)

@JBBgameich I believe I was using the debian stable rootfs. Like I said, the issue was caused by an error I made while building the rootfs. I had forgotten to build the libhybris parts so it wasn't able to communicate with the Android parts once it was up and running, managed to fix that and get up and running.

My project trees have been put to the side for now because of my I.T. work, it hasn't left me much time for anything still. But I did see that there is now a flo image up on the ubports system image server.

lxc-checkconfig see here and there, definitely something to do there, including bugs in lxc-config :(, but I'm not convinced this is related to the problem at hand, since I got PM to work last August without having those lxc-checkconfig items solved

Any advice appreciated!

Update: it seems that the pm rootfs from 20171219 does work ok, but the one from 20171220 fails.

Update4: With some playing around I found that the first "bad" image is 1210. Images before are ok. Then I was playing around with 1210 for a while, and it actually became unfrozen. I'm not 100% sure what I did but I think it went something like this:

insert the line do_shell "rm -f /data/system.img" as the first line in prepare_ubuntu_system, otherwise we have that thing left over from halium

insert the line IMAGE_SIZE=$(( $IMAGE_SIZE * 2 ))right after that variable is set, otherwise the image is too small, so I just double it

delete the line do_shell "ln /data/ubuntu.img /data/system.img", otherwise I end up with an empty system.img on the device ... Not sure what the problem was exactly, I think something goes wrong with the loop devices stepping on each others toes .. not sure

@doniks maybe @UniSuperBox can comment a bit on the manual tweaks you had to do for rootstocking the device, actually all should come out of the box somehow. Then, if plasma mobile shows a screen, we should be able to do this, too right?