• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  1. Home
  2. SGCMarkus
  3. Posts
S
Offline
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 22
  • Groups 0

Posts

Recent Best Controversial
  • RE: Port to Oneplus 2

    I managed to create a Ubuntu Zesty rootfs (actually supported arm64 instead of xenial), and now im having a really really weird behavior

    if i flash the hybris-boot.img i get this in the console

    markus@markus-pc:~$ lsusb -vd 0fce: | grep -i serial
    iSerial 3 1ee3fc01

    but, also sometimes a "charging ??/100" flashes up on the screen (rest is always black), and sometimes the LED starts to light green.
    The USB Tethering seems to not fire up completly though, atleast i dont get any connection via anything to it.
    The debug mode works still though.

    posted in Porting
    S
    SGCMarkus
    21 Aug 2017, 15:29
  • RE: Port to Oneplus 2

    damn, its been a looong time since i was last here, had more to do than i thought i had.

    But.. Im back at working on this 🙂
    I switched to the Halium 7.1 base atm, as I saw someone got it running for the Nexus 7.
    I can say, it fully compiles without errors. The recovery hybris-boot image (bootmode=debug) works too, i have access via telnet, but otherwise... it just reboot after i think it tries to load something... cant say that, dont have a last_kmsg... for some reason thats nowhere found, on any ROM I've tried so far.

    @nyl sorry for the late reply about this (also saw your SailfishOS project on xda a while ago).
    I tried to follow those instructions for the libhybris. Appearantly the autogen script works without problems, but afterwards the instructions say i should run make in that folder, but make says theres nothing for it to do.

    posted in Porting
    S
    SGCMarkus
    19 Aug 2017, 14:20
  • RE: Port to Oneplus 2

    im back from the "dead" 🙂
    didnt have that much free time, but now i can work on it again lol
    have set up a "new" machine, this time ubuntu native installed on my PC, instead of running in a VM (instead of ~45min build time its only 16 min now 😄 )

    Also noticed a few updates in the wiki, for example how to build for bullhead, and it says to use the Yakkety image, instead of the Vivid one. Does anyone have that backed up somewhere, everything i find about the Yakkety image is down, either sents me to Zesty (and idk how stable that one is). Or should i (try to use) Xenial?

    Or maybe theres "in general" any news on this whole topic that i migth have missed?

    posted in Porting
    S
    SGCMarkus
    5 Jun 2017, 12:06
  • RE: Port to Oneplus 2

    @UniSuperBox

    found https://hastebin.com/wegibubuqu.go this today in the lxc config of the 15.04 rootfs, if i understand that correctly, it tries to load the LXC container, which is ARM64 for the Oneplus 2, as a armhf, which ofcourse doesnt work... maybe thats the problem? (or one of those)

    posted in Porting
    S
    SGCMarkus
    28 Apr 2017, 21:44
  • RE: Port to Oneplus 2

    @UniSuperBox are the 16.04 and/or the 17.04 builds of ubuntu touch "stable" (or atleast do they boot on already working devices)?
    And do you know where the LXC container will be started? Maybe an architecture problem, like an incompatibility between the 64 bit kernel/android image, and the 32 bit vivid image (which i used so far).
    Friend of mine meant it could work with modifying the parameters how the LXC container gets created, if its a architecture problem (and im currently downloading both xenial and zesty builds)

    posted in Porting
    S
    SGCMarkus
    28 Apr 2017, 11:29
  • RE: Port to Oneplus 2

    @Maxximo88 know that, already running on my phone 😛
    kernel does the same thing with and without multirom injection though (after i select the rom to boot, aka ubuntu)

    But, i just remember now, i can save a Kernel Log in Multirom... but i doubt it will give me anything important at that stage yet 😕

    posted in Porting
    S
    SGCMarkus
    27 Apr 2017, 12:30
  • RE: Port to Oneplus 2

    @UniSuperBox thanks, will try that too 🙂
    had no time the past few days, exams ^^ 2 left, but those are rather small so i have more time now 😄

    have a few other ideas too that i wanna check, like https://developer.ubuntu.com/en/phone/devices/porting-new-device/ at debugging, appearantly i can set break points, and it should start adb then, if it "breaks" (hopefully) and some other things a friend of mine (hes good with linux in general) told me

    will update here when im done with testing ^^

    posted in Porting
    S
    SGCMarkus
    26 Apr 2017, 15:44
  • RE: Port to Oneplus 2

    Cant get a /proc/last_kmsg 😕 doesnt exist ... i guess i gotta find a way to enable it?

    otherwise, i have the kmsg from the recovery, if helpful: link

    have fun/good luck on your business trip though ^^ i gotta survive 5 exams next week xD

    posted in Porting
    S
    SGCMarkus
    23 Apr 2017, 11:15
  • RE: Port to Oneplus 2

    Also noticed that the recovery cant mount any of the partitions, as it searches for /dev/block/bootdevice/by-name/ but thats not existing in the recovery it built. Dont know if thats on purpose or not?

    But its "good to know" that im not the only one having this problem xD

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 23:48
  • RE: Port to Oneplus 2

    So.. everything compiled, no error, flashed everything, now i just see the "wonderful" logo which comes before the boot animation for like... idk 10 min now. Phone gets kinda warm though, but i dont have access via USB.
    Is it normal that the first boot takes a while (even this long)?

    Aborted it though now... saw that it created a few folders in /data, user-data, system-data, android-data and i tried to push the modified adbd from the official guide which appearantly should start the adbd process before GUI is able to run. Didnt work 😕

    so... is it doing something during this process, or (which i kinda believe) did it fuck up somewhere... but atleast it doesnt instantly reboot anymore, which is good i guess xD

    The recovery created "boots", but without any GUI, just a black screen, but adb is running there

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 23:29
  • RE: Port to Oneplus 2

    @UniSuperBox disabled exfat now... couldnt get it compiled, at all
    Otherwise i had... atleast it felt like 1000 other errors in mainly the ipv4 and ipv6 files... with the uid and kuid stuff, got that fixed now and managed a successful build with building and building after error and fixing. Making a clean build now to make sure, and then lets see what happens, hopefully it will atleast do "a bit" more than earlier xD

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 22:01
  • RE: Port to Oneplus 2

    @UniSuperBox

    that error is in fs/exfat/exfat_super.c line ~1217 (may be a bit different from versio nto version what i found) in function "exfat_setattr".

    Another one:

    /home/markus/ubport_6/kernel/oneplus/msm8994/drivers/platform/msm/pft.c: In function 'pft_is_current_process_registered':
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/linux/cred.h:332:24: error: incompatible types when initializing type 'u32' using type 'kuid_t'
     #define current_uid()  (current_cred_xxx(uid))
                            ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/drivers/platform/msm/pft.c:369:12: note: in expansion of macro 'current_uid'
      u32 uid = current_uid();
                ^
    In file included from /home/markus/ubport_6/kernel/oneplus/msm8994/include/linux/kernel.h:14:0,
                     from /home/markus/ubport_6/kernel/oneplus/msm8994/drivers/platform/msm/pft.c:48:
    /home/markus/ubport_6/kernel/oneplus/msm8994/drivers/platform/msm/pft.c: In function 'pft_inode_create':
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'kuid_t' [-Wformat=]
    error, forbidden warning: dynamic_debug.h:64
      CC      drivers/rtc/rtc-lib.o
    /home/markus/ubport_6/kernel/oneplus/msm8994/scripts/Makefile.build:308: recipe for target 'drivers/platform/msm/pft.o' failed
    make[5]: *** [drivers/platform/msm/pft.o] Error 1
    make[5]: *** Waiting for unfinished jobs....
    

    Currently rebuilding without any CONFIG_EXT4_FS_POSIX_ACL in the defconfig, will update this post with the result.

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 20:36
  • RE: Port to Oneplus 2

    @UniSuperBox applied all that already, and some more that produced similar errors afterwards, atm trying to apply that to everything else that produces errors that have todo with uid_t/kuid_t (gid) ... but that from my last post confuses me, because it says its the other, even though it isnt and should work with the first O.o

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 18:40
  • RE: Port to Oneplus 2

    @UniSuperBox

    What is this bull**** now lol

    (!gid_eq(attr->ia_gid, sbi->options.fs_gid))
    results in ->
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:1220:6: error: incompatible type for argument 2 of 'gid_eq'
    (!gid_eq(attr->ia_gid, sbi->options.fs_gid ))) ||
    note: expected 'kgid_t' but argument is of type 'gid_t'

    and if i have

    (!gid_eq(make_kgid(NULL, attr->ia_gid), make_kgid(NULL, sbi->options.fs_gid)))
    it results in ->
    error: incompatible type for argument 2 of 'make_kgid'
    note: expected 'gid_t' but argument is of type 'kgid_t'

    so if i trust the second one, and its already kgid_t, why does it say its not in the first one...? and it has no .val value, so it has to be of type gid_t (what the first one says) so why doesnt the second one not work... what the fuck is going on there O.o

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 18:16
  • RE: Port to Oneplus 2

    So... I feel stupid now... forgot completly about the kernel patches that are described in the the official porting guide ...

    With the script thats provided there, i set the variables needed, but now i get an error while its compiling the kernel 😕

      CC      kernel/irq/resend.o
    In file included from /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/inet_hashtables.h:32:0,
                     from /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/tcp.h:37,
                     from /home/markus/ubport_6/kernel/oneplus/msm8994/security/selinux/hooks.c:55:
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/route.h: In function 'ip_route_output_ports':
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/route.h:146:55: error: type mismatch in conditional expression
           daddr, saddr, dport, sport, sk ? sock_i_uid(sk) : 0);
                                                           ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/route.h: In function 'ip_route_connect_init':
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/route.h:256:2: error: incompatible type for argument 12 of 'flowi4_init_output'
      flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE,
      ^
    In file included from /home/markus/ubport_6/kernel/oneplus/msm8994/include/linux/netfilter.h:275:0,
                     from /home/markus/ubport_6/kernel/oneplus/msm8994/include/uapi/linux/netfilter_ipv4.h:8,
                     from /home/markus/ubport_6/kernel/oneplus/msm8994/include/linux/netfilter_ipv4.h:7,
                     from /home/markus/ubport_6/kernel/oneplus/msm8994/security/selinux/hooks.c:49:
    /home/markus/ubport_6/kernel/oneplus/msm8994/include/net/flow.h:87:20: note: expected 'uid_t' but argument is of type 'kuid_t'
     static inline void flowi4_init_output(struct flowi4 *fl4, int oif,
                        ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/scripts/Makefile.build:308: recipe for target 'security/selinux/hooks.o' failed
    make[4]: *** [security/selinux/hooks.o] Error 1
    /home/markus/ubport_6/kernel/oneplus/msm8994/scripts/Makefile.build:455: recipe for target 'security/selinux' failed
    make[3]: *** [security/selinux] Error 2
    /home/markus/ubport_6/kernel/oneplus/msm8994/Makefile:843: recipe for target 'security' failed
      CC      crypto/twofish_common.o
    make[2]: *** [security] Error 2
    make[2]: *** Waiting for unfinished jobs....
    
    /home/markus/ubport_6/kernel/oneplus/msm8994/kernel/cgroup.c: In function 'subsys_cgroup_allow_attach':
    /home/markus/ubport_6/kernel/oneplus/msm8994/kernel/cgroup.c:2138:37: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
       if (current != task && cred->euid != tcred->uid &&
                                         ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/kernel/cgroup.c:2139:18: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
           cred->euid != tcred->suid)
                      ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/scripts/Makefile.build:308: recipe for target 'kernel/cgroup.o' failed
    make[3]: *** [kernel/cgroup.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c: In function 'exfat_allow_set_time':
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:1145:22: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
      if (current_fsuid() != inode->i_uid) {
                          ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c: In function 'exfat_setattr':
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:1218:18: error: invalid operands to binary != (have 'kuid_t' and 'uid_t')
        (attr->ia_uid != sbi->options.fs_uid)) ||
                      ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:1220:18: error: invalid operands to binary != (have 'kgid_t' and 'gid_t')
        (attr->ia_gid != sbi->options.fs_gid)) ||
                      ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c: In function 'exfat_fill_inode':
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:1677:15: error: incompatible types when assigning to type 'kuid_t' from type 'uid_t'
      inode->i_uid = sbi->options.fs_uid;
                   ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:1678:15: error: incompatible types when assigning to type 'kgid_t' from type 'gid_t'
      inode->i_gid = sbi->options.fs_gid;
                   ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c: In function 'parse_options':
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:2047:15: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
      opts->fs_uid = current_uid();
                   ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:2048:15: error: incompatible types when assigning to type 'gid_t' from type 'kgid_t'
      opts->fs_gid = current_gid();
                   ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c: In function 'exfat_read_root':
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:2182:15: error: incompatible types when assigning to type 'kuid_t' from type 'uid_t'
      inode->i_uid = sbi->options.fs_uid;
                   ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/fs/exfat/exfat_super.c:2183:15: error: incompatible types when assigning to type 'kgid_t' from type 'gid_t'
      inode->i_gid = sbi->options.fs_gid;
                   ^
    /home/markus/ubport_6/kernel/oneplus/msm8994/scripts/Makefile.build:308: recipe for target 'fs/exfat/exfat_super.o' failed
    make[4]: *** [fs/exfat/exfat_super.o] Error 1
    /home/markus/ubport_6/kernel/oneplus/msm8994/scripts/Makefile.build:455: recipe for target 'fs/exfat' failed
    make[3]: *** [fs/exfat] Error 2
    make[3]: *** Waiting for unfinished jobs....
    

    and should CONFIG_DEFAULT_SECURITY be "apparmor" or "selinux" ? the script didnt set it to "apparmor" on first run

    Or is even something else making problems now suddenly 😕

    EDIT: a few more errors that appeared at the same time which i didnt see

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 13:36
  • RE: Port to Oneplus 2

    @UniSuperBox
    I suppose i used a wrong kernel then? I think i have currently the CM13 kernel source, which is CAF as far as i know.

    Will try what you said, and some other kernels tomorrow, hopefully that will work

    Edit: appearantly "TARGET_USES_UNCOMPRESSED_KERNEL" was set to true... and the new firmware needs a compressed kernel... so i guess thats the main reason it failed, building now again, this time compressed and with an AOSP kernel

    posted in Porting
    S
    SGCMarkus
    22 Apr 2017, 00:04
  • RE: Port to Oneplus 2

    The complete command line (maybe something missing which i overread?)
    BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 boot_cpus=0-5

    Also noticed that the recovery.img that was created doesnt boot either 😕 so i guess a bit more is going wrong (i tried to boot it with fastboot boot recovery.img and it loaded a bit, rebooted and booted my normal installed recovery)

    posted in Porting
    S
    SGCMarkus
    21 Apr 2017, 23:00
  • RE: Port to Oneplus 2

    nope, no directory "system-image" in /data, in /data i have "media", "misc", "system" folders, and a system.img and ubuntu.img (which seems to be a link to the system.img what i saw in the script) file.

    The content of those seems to be valid though.
    output of ls /system: (mounted the system.img there)

    android     data        firmware    media       proc        srv         userdata
    
    bin         dev         home        mnt         root        sys         usr
    
    boot        etc         lib         opt         run         system      var
    
    cache       factory     lost+found  persist     sbin        tmp         vendor
    

    I used this rootstock script (from your wiki), maybe somethings missing in there?

    posted in Porting
    S
    SGCMarkus
    21 Apr 2017, 22:35
  • RE: Port to Oneplus 2

    Sorry about the tag.

    The injection into the boot.img seems to work atleast (the only thing that does appearantly).
    I have a system.img now, a vivid-preinstalled-touch-armhf.tar.gz, the rootstock-touch-install script appearantly works without any error (everything done), but phone instantly reboots after the boot logo (the image before the boot animation) .. 😕 (or as soon as the multirom injection tries to boot)

    Also noticed that /system is completly empty (if mounted), should that be the case?
    sorry for all the questions but i can't find anything about that 😕

    posted in Porting
    S
    SGCMarkus
    21 Apr 2017, 22:25
  • RE: Port to Oneplus 2

    @Infrastructure @Community

    So... i switched to the 6.0.0_r1 base, and it compiled (after a few missing kernel headers lol) 😄
    Even though it says "broken" in your wiki, atleast it compiled, i guess?

    currently downloading the vivid-preinstalled-touch-armhf.tar.gz

    As we finally managed to get MultiROM working on the Oneplus 2... Is there a way now to install this as a secondary ROM for testing?
    Or just primary and i should restore my primary rom as secondary?

    posted in Porting
    S
    SGCMarkus
    21 Apr 2017, 18:59