UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Porting Halium to Nexus 7 deb

    Scheduled Pinned Locked Moved Porting
    41 Posts 9 Posters 21.0k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • D Offline
        doniks
        last edited by doniks

        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/

        0_1515740234641_Image1673683779.jpg

        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.

        1 Reply Last reply Reply Quote 0
        • D Offline
          doniks
          last edited by doniks

          I'm trying to get ubports-boot to work follwing
          https://docs.ubports.com/en/latest/porting/introduction.html ~~and
          https://github.com/ubports/docs.ubports.com/pull/67~~

          but 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 line mount -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 with UT.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 ....

          D 2 Replies Last reply Reply Quote 0
          • D Offline
            doniks @doniks
            last edited by

            May I introduce:

            the Halium Porting Error Knowledge Base

            https://gist.github.com/doniks/2ac14a1bb6750165bf782f62139c8aab#file-gistfile1-txt-L61

            A 2 Replies Last reply Reply Quote 0
            • D Offline
              doniks @doniks
              last edited by

              @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.html ~~and
              https://github.com/ubports/docs.ubports.com/pull/67~~

              I've reached ssh now, I can test_lights, but no UI, test_hwcomposer segfaults and when I run unity-system-compositor, I get the following in logcat : https://paste.ubuntu.com/26431933/

              1 Reply Last reply Reply Quote 0
              • D Offline
                doniks
                last edited by doniks

                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
                • 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 in Android.mk
                  • insert [ -f /dev/kmsg ] || mknod -m 600 /dev/kmsg c 1 11 in initramfs/init right before the mkdir -p /var/lock line
                  • change the line in initramfs/scripts/functions : _log_msg() from printf "$@" to printf "$@" | tee /dev/kmsg
                  • now I could sprinkle around log_warning_msg blabla in initramfs/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
                • 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!

                advocatuxA flohackF A 3 Replies Last reply Reply Quote 1
                • advocatuxA Offline
                  advocatux @doniks
                  last edited by

                  @doniks just in case you don't know it, there's a UBports Porting group in Telegram (https://t.me/ubports_porting)

                  1 Reply Last reply Reply Quote 1
                  • D Offline
                    doniks
                    last edited by doniks

                    Thanks! I do know πŸ™‚ And I did get invaluable help from there! I would be no where without it.

                    However, after piling up a couple of hacks I find it helpful to take a step back and summarize the status quo again which is hard in irc/telegram.

                    And also, I like to mix the different styles of working: Specific tips for a specific problem in the more ad-hoc irc and the long haul, asynchronous conversation of a forum/mailing list.

                    Oh wait ... ubports porting. No I didn't know that one! I was talking about the #halium channel. I'll have a look. Thanks.

                    1 Reply Last reply Reply Quote 1
                    • flohackF Offline
                      flohack @doniks
                      last edited by

                      @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?

                      BR

                      My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                      D 1 Reply Last reply Reply Quote 0
                      • D Offline
                        doniks @flohack
                        last edited by

                        @flohack said in Porting Halium to Nexus 7 deb:

                        @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.

                        Well, in a way he did πŸ™‚ The PR for the update of docs.ubports is in, which means both ubports-boot and rootstock-install can take their bugs with them to the grave.

                        Then, if plasma mobile shows a screen, we should be able to do this, too right?

                        One would hope so. However, even with halium-boot (and a bunch more kernel configs it wanted) I managed just now to build and boot it, but I end up with the same segfaults 😞

                        I spoke to @UniSuperBox and @bshah earlier today on telegram. There was a theory about something with libhybris and "N linker" but I didn't really get it and atm still just google logo.

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          amrith
                          last edited by

                          this porting journal(idk what to call this) is really helpful thank you

                          D 1 Reply Last reply Reply Quote 0
                          • A Offline
                            amrith @doniks
                            last edited by

                            @doniks not found

                            D 1 Reply Last reply Reply Quote 0
                            • D Offline
                              doniks @amrith
                              last edited by

                              @amrith said in Porting Halium to Nexus 7 deb:

                              this porting journal(idk what to call this) is really helpful thank you

                              Great that you found it helpful! Maybe you want to write your own?! I think this one for N7 is very dated by now. Lots of things discussed here should be automatic/easier/well documented...

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                doniks @amrith
                                last edited by

                                @amrith said in Porting Halium to Nexus 7 deb:

                                @doniks not found

                                ?

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  amrith @doniks
                                  last edited by

                                  @doniks said in Porting Halium to Nexus 7 deb:

                                  May I introduce:

                                  the Halium Porting Error Knowledge Base

                                  https://gist.github.com/doniks/2ac14a1bb6750165bf782f62139c8aab#file-gistfile1-txt-L61

                                  the link is not working

                                  LakotaubpL 1 Reply Last reply Reply Quote 0
                                  • LakotaubpL Offline
                                    Lakotaubp @amrith
                                    last edited by

                                    @amrith You might need to sign up/in for the link to work.

                                    A 1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      amrith @Lakotaubp
                                      last edited by

                                      @Lakotaubp said in Porting Halium to Nexus 7 deb:

                                      @amrith You might need to sign up/in for the link to work.

                                      No i am already signed in . it shows 404 error

                                      D 1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        amrith
                                        last edited by

                                        I have exactly same errors you have , unity-compositor stopped and if you run it as from the startup script you get segmentation fault
                                        however
                                        once you boot> login to ssh
                                        execute

                                        $sudo chown -R $USER /dev/input
                                        $QML_BAD_GUI_RENDER_LOOP=1 QT_QPA_PLATFORM=mirserver unity8
                                        

                                        while ubuntu spinner is active , you will get some flashes and you can see the unity is working in background.

                                        D 1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          doniks @amrith
                                          last edited by

                                          @amrith said in Porting Halium to Nexus 7 deb:

                                          @Lakotaubp said in Porting Halium to Nexus 7 deb:

                                          @amrith You might need to sign up/in for the link to work.

                                          No i am already signed in . it shows 404 error

                                          No, no that thing is gone. Has been integrated into the halium docs long ago

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            doniks @amrith
                                            last edited by

                                            @amrith said in Porting Halium to Nexus 7 deb:

                                            I have exactly same errors you have , unity-compositor stopped and if you run it as from the startup script you get segmentation fault
                                            however
                                            once you boot> login to ssh
                                            execute

                                            $sudo chown -R $USER /dev/input
                                            $QML_BAD_GUI_RENDER_LOOP=1 QT_QPA_PLATFORM=mirserver unity8
                                            

                                            while ubuntu spinner is active , you will get some flashes and you can see the unity is working in background.

                                            remember, my last posts with content here are from 2018 - long outdated! By now I have ubports UI running on the N7. All I needed is in the docs or in the pad.

                                            Probably better to have the conversation about your errors in one place https://forums.ubports.com/topic/3112/ubport-new-device-porting-problem/ rather than spreading it over multiple threads

                                            1 Reply Last reply Reply Quote 0
                                            • A Offline
                                              amrith @doniks
                                              last edited by amrith

                                              @doniks said in Porting Halium to Nexus 7 deb:

                                              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
                                              • 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 in Android.mk
                                                • insert [ -f /dev/kmsg ] || mknod -m 600 /dev/kmsg c 1 11 in initramfs/init right before the mkdir -p /var/lock line
                                                • change the line in initramfs/scripts/functions : _log_msg() from printf "$@" to printf "$@" | tee /dev/kmsg
                                                • now I could sprinkle around log_warning_msg blabla in initramfs/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
                                              • 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!

                                              this was the post i was referring you

                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post