Porting Halium to Nexus 7 deb
-
Great that you got it working, now we need to get UBports working here
-
Tried the rootfs from here: http://cdimage.ubports.com/rootfs/ but it doesn't do too much for me:
OP:
- screen stays on the Google logo
- no usb iSerial messages
- no usb network interface seems to come up
- last_kmsg shows that systemd does take over http://paste.ubuntu.com/25419054/ however,
- it complains that "systemd[1]: Failed to start LXC Android Config and Container Initialization."
- no adb interface comes up, even though in TWRP/chroot I see that
android-tools-adbd.service
isenabled
-
@doniks said in Porting Halium to Nexus 7 deb:
Alternatively, you can set the passwords, but I don't do this because it seems to actually break the graphical login:
I actually figured this out... it seemed strange, but I gave wrong instructions it seems,
pam-auth-update # select everything but extrausers
Here is the catch, last option of pam-auth-update is ... None of the above ... so it would disable standard login as well, instructions should've been select everything but extrausers and none of the above.
Anyway, I will be publishing newer images with this things fixed soon, so you won't also need to do "hacks" for ssh..
-
@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
BR
-
@doniks you could try the rootfs @ http://cdimage.ubuntu.com/ubuntu-touch/xenial/daily-preinstalled/current/ (I think xenial-preinstalled-touch-armhf.tar.gz or the -arm64.tar.gz if the nexus 7 is 64-bit should be the correct rootfs) and if this works our devs from ubports might reproduce their work step-by-step? I would be very interested whether this works if you could try
-
@demokrit said in Porting Halium to Nexus 7 deb:
@doniks you could try the rootfs @ http://cdimage.ubuntu.com/ubuntu-touch/xenial/daily-preinstalled/current/ (I think xenial-preinstalled-touch-armhf.tar.gz or the -arm64.tar.gz if the nexus 7 is 64-bit should be the correct rootfs) and if this works our devs from ubports might reproduce their work step-by-step? I would be very interested whether this works if you could try
Unfortunately, the Nexus 7 is not ARM64, it's normal ARM. So the ARM64 rootfs wouldn't work here. Glad to see progress being made and would love to test it out at some point
-
@Tonoxis Ah, I did not make myself clear xD i meant there are rootfs'ses for both armhf and amr64 but good to know it's armhf, thx
-
@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.
-
@demokrit said in Porting Halium to Nexus 7 deb:
@doniks you could try the rootfs @ http://cdimage.ubuntu.com/ubuntu-touch/xenial/daily-preinstalled/current/ (I think xenial-preinstalled-touch-armhf.tar.gz
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 ...
-
@Tonoxis
Nice!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
Any luck with the rootfs yet?
-
@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)
-
Which debian rootfs are you using?
I just wanted to inform you that my work on the debian buster rootfs is now nearly finished and it boots to ssh, the lxc container starts and libhybris also works.
I have some pre-built one around here: https://archive.org/download/halium-debian-rootfs/halium-debian-rootfs_20171024.tar.gz and the source for the rootfs-builder has moved here: https://github.com/debian-pm/rootfs-builder. -
@doniks said in Porting Halium to Nexus 7 deb:
patches
FWIW, it might be conceivable to fix this thing about
pidns_operations
in a better way. I was poking around in the upstream kernelgit clone --depth 1 --branch v4.13.11 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git grep --color=always -nr -C 3 -Ee'CONFIG_PID_NS|pidns_operations' |less -R
and I see some stuff that is not present in the kernel I use. But, well, that's for another day. Afterall, I don't even know whether it's an actual problem right now
-
@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.
(Ninja Edit: My custom 3.4.0-5 kernel tree builds again! Fixed the defconfig)
-
Trying to revive this again.
I can get the halium rootfs running as well as before, including test_hwcomposer.
But using the latest plasma rootfs, I get only a black screen. Also, I'm not hearing the audible PM greeting "Oh it's gorgeous".
I have replaced the vendor blobs with the ones provided by TheMuppets:
<project path="vendor" name="proprietary_vendor_asus" revision="cm-14.1" remote="them" />
but that didn't help either.
- syslog https://paste.ubuntu.com/26340223/ It continues forever and ever with the line
kgsl kgsl-3d0: |kgsl_add_fence_event| invalid fence fd
- logcat https://paste.ubuntu.com/26345905/ , repeats those four lines forever
- 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.
Update2: Another image from CI also works http://mobile.neon.pangea.pub:8080/view/All/job/generic_rootfs/68/artifact/result/halium-rootfs-generic.tar.gz
Update3: But with both, 1219 and 68/artefact the system doesn't react to touch AFTER unlocking. The lock screen itself looks ok
- plasma_logs: https://paste.ubuntu.com/26370483/
- logcat : https://paste.ubuntu.com/26370484/
- dmesg: https://paste.ubuntu.com/26370482/
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:
systemctl disable NetworkManager systemctl mask NetworkManager reboot ... # frozen systemctl unmask NetworkManager systemctl enable NetworkManager loginctl kill-session c1 # screen goes dark systemctl stop simplelogin systemctl start simplelogin # htop shows a busy system including plasma and kwin stuff echo 200 > /sys/class/leds/lcd-backlight/brightness # shows the lock screen # unlock # kwallet wizard shows # cancel # normal system shows and # is NOT frozen, I can start chromium!
Oh, and I did also enable wifi (`echo 1>/dev/wcnss_wlan ;
echo sta > /sys/module/wlan/parameters/fwpath ;
nmcli dev wifi connect <SOMEOPENWIFI> ) but I can't remember where in the sequence above. - syslog https://paste.ubuntu.com/26340223/ It continues forever and ever with the line
-
I'm trying to get ubports-boot to work follwing
https://docs.ubports.com/en/latest/porting/introduction.htmland
https://github.com/ubports/docs.ubports.com/pull/67but I'm stuck at usb iSerial saying "I hit a nail" and then it goes into telnet.
I think I tracked it down to
mount -o bind ${rootmnt}/run/image.fstab $FSTAB || panic "drop to adb"
panicking, which in turn seems to be due to this linemount -o rw,nosuid,noexec,relatime,mode=755 -t tmpfs tmpfs ${rootmnt}/run
https://github.com/ubports/ubports-boot/blob/master/initramfs/scripts/touch#L377 failing with status 255.This is my dmesg https://paste.ubuntu.com/26384482/
with some extra logging I have added prefixed withUT.init
anybody has a clue?Update: Somehow I had the image files mixed up. Be sure to clean /data up if you go from halium/pm rootfs' to ubports.
Next hickup was a problem with sshd, workaround is here: https://gist.github.com/doniks/2ac14a1bb6750165bf782f62139c8aab#file-gistfile1-txt-L61
Now I have ssh access but lxc isn't working, seems something went wrong again with rootstock and installing the android image.
To be continued ....
-
May I introduce:
the Halium Porting Error Knowledge Base
https://gist.github.com/doniks/2ac14a1bb6750165bf782f62139c8aab#file-gistfile1-txt-L61
-
@doniks said in Porting Halium to Nexus 7 deb:
I'm trying to get ubports-boot to work follwing
https://docs.ubports.com/en/latest/porting/introduction.htmland
https://github.com/ubports/docs.ubports.com/pull/67I've reached ssh now, I can
test_lights
, but no UI,test_hwcomposer
segfaults and when I rununity-system-compositor
, I get the following in logcat : https://paste.ubuntu.com/26431933/ -
Gave it another spin.
The general steps to get deb working are much simplified since it's all in github now: https://github.com/Halium/halium-devices/blob/halium-7.1/manifests/asus_deb.xml - just follow the halium documentation. However, I'm wondering whether I should leave the OP as is, some people have expressed that it helped them in their ports to see the journey ...
Plasma mobile hasn't been sleeping. I can tell that the newer images work much better than previously.
For ubports, I made another attempt, but no GUI so far. Any tipps appreciated!
What I did in detail:
- Follow the steps on https://docs.ubports.com/en/latest/porting/introduction.html
- in
rootstock-touch-install
- 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
- insert the line
- now I can install using the latest ubports xenial root fs: build 298 form https://ci.ubports.com/job/xenial-rootfs-armhf/
- at first that wouldn't boot, so ...
- I make ubports boot a bit more verbose
halium/ubports-boot
- append
quite=n debug=y
to the UBPORTS_BOOTIMG_COMMANDLINE inAndroid.mk
- insert
[ -f /dev/kmsg ] || mknod -m 600 /dev/kmsg c 1 11
ininitramfs/init
right before themkdir -p /var/lock
line - change the line in
initramfs/scripts/functions
:_log_msg()
fromprintf "$@"
toprintf "$@" | tee /dev/kmsg
- now I could sprinkle around
log_warning_msg blabla
ininitramfs/init
and see everything nicely in last_kmsg. - eventually I found that it panics at the line:
mount -n -o move /proc ${rootmnt}/proc
... I have simply commented this line for the moment, that avoids the panic and
- append
- now it boots into the ubports rootfs
- however, no GUI comes up
- in
/var/log/lightdm/lightdm.log
I see
Launching process 2998: /usr/share/ubuntu-touch-session/usc-wrapper --file '/run/mir_socket' --from-dm-fd 11 --to-dm-fd 14 --vt 1 [...] DisplayServer: Unity system compositor stopped
- usc-wrapper is a script. when I run the command inside:
unity-system-compositor --disable-overlays=false --spinner=$SNAP/usr/bin/unity-system-compositor-spinner --file '/run/mir_socket' --from-dm-fd 11 --to-dm-fd 14 --vt 1
- I get a Segmentation fault (core dumped)
- when I run at the same time
/system/bin/logcat | grep -Eve "NetlinkListener|rmt_storage"
I don't see anything logged at the time of the segfault
logcat: http://paste.ubuntu.com/p/kz7JSTfgTR/
syslog: http://paste.ubuntu.com/p/JVQJ2mg98G/
dmesg: http://paste.ubuntu.com/p/MPvwKtYhsS/Not sure what to do next. Maybe try halium-boot, maybe check the
lxc-checkconfig: http://paste.ubuntu.com/p/5Z6w8Kwcm6/
it still flags some things. Also, mabye related, I get
# lxc-attach -n android lxc-attach: cgroups/cgfs.c: lxc_cgroupfs_attach: 2538 could not move attached process 10995 to cgroup of container lxc-attach: attach.c: lxc_attach: 992 Expected to receive sequence number 0: No such file or directory.
However,
# lxc-info -n android Name: android State: RUNNING PID: 1116 IP: 10.15.19.82 IP: 192.168.179.127
and it's all seemingly good enough for plasma mobile, so not sure.
Again, tips welcome!
-
@doniks just in case you don't know it, there's a UBports Porting group in Telegram (https://t.me/ubports_porting)