Skip to content
Snippets Groups Projects

motorola-surnia: fix downstream build a little

Closed Imported Administrator requested to merge surnia-armv7 into master
2 unresolved threads

Trying to help with #1425 (closed) - recent postmarketOS code does not boot

This MR builds with shelli-ui and boots fine except that the screen doesn't change from the bat-wings (motorola logo) android screen.

Am able to ssh via usb0 172.16.42.1 (RNDIS device).

Edited by Administrator

Merge request reports

Approval is optional

Closed by AdministratorAdministrator 2 years ago (Aug 10, 2022 4:45am UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator added 1 commit · Imported

    added 1 commit

    • aaed0a9f - device-motorola-surnia: migrate from armhf to armv7

    Compare with previous version

    By Craig Comstock on 2022-08-01T00:26:26

  • Administrator added 7 commits · Imported

    added 7 commits

    • aaed0a9f...4dfa72c6 - 5 commits from branch postmarketOS:master
    • 549bc68c - Added deviceinfo_flash_sparse="true" for surnia downstream
    • f8102941 - device-motorola-surnia: migrate from armhf to armv7

    Compare with previous version

    By Craig Comstock on 2022-08-01T00:27:01

  • Administrator changed title from motorola-surnia: fixup downstream build a little to motorola-surnia: fix downstream build a little · Imported

    changed title from motorola-surnia: fixup downstream build a little to motorola-surnia: fix downstream build a little

    By Craig Comstock on 2022-08-01T00:27:15

  • Administrator mentioned in issue #1425 (closed) · Imported

    mentioned in issue #1425 (closed)

    By Craig Comstock on 2022-08-01T00:29:45

  • Administrator mentioned in issue #599 · Imported

    mentioned in issue #599

    By Craig Comstock on 2022-08-01T00:30:58

    • Author Owner

      How does this relate to your mainline MR? (!3329 (merged))

      By Newbyte on 2022-08-04T12:01:02

      Edited by Ghost User
    • Author Owner

      I figured the mainline MR was much more a WIP where-as this armv7 arch change might make things a bit more accessible to others, re: #1425 (closed) Certainly for me it seems mainline and this downstream work about the same but I haven't tested very much so don't know which one should be preferred.

      I was able to build this locally but I see the pipeline is broken.

      By Craig Comstock on 2022-08-04T12:01:01

    • Author Owner

      Thinking about it more @Newbyte I suppose it makes more sense to do more testing with mainline and prefer that one if it's close or better than downstream.

      By Craig Comstock on 2022-08-04T12:22:25

    • Author Owner

      We can also let users choose between both.

      By Newbyte on 2022-08-04T12:53:51

    • Author Owner

      Sure. Just tested the latest from the mainline MR and it is more functional for me so far. Display works with shelli-ui (just framebuffer console), usb internet so far but I will test more.)

      I know @frbrr02 mentioned that charging doesn't work in mainline so maybe downstream is useful.

      By Craig Comstock on 2022-08-04T13:38:14

    • Please register or sign in to reply
  • Administrator added 15 commits · Imported

    added 15 commits

    • f8102941...2280958b - 12 commits from branch postmarketOS:master
    • 7c57b78b - Added deviceinfo_flash_sparse="true" for surnia downstream
    • 2b655e6e - device-motorola-surnia: migrate from armhf to armv7
    • c5532245 - squashme, bump pkgrel

    Compare with previous version

    By Craig Comstock on 2022-08-04T11:50:12

    • Author Owner

      The changes are definitely positive, but there is a build error in CI :disappointed:

      By Alexey Min on 2022-08-05T07:30:28

      Edited by Ghost User
    • Author Owner

      Hi @unrznbl, cool to see patches from you!

      This is the build error, can you look into fixing it? Note that CI builds with pmbootstrap build --strict, with that you should be able to reproduce it locally.

      In file included from /home/pmos/build/src/android_kernel_motorola_msm8916-4c864820053bb70e21cf1e9764baefefd4d2f6b1/scripts/sortextable.c:31:
      /home/pmos/build/src/android_kernel_motorola_msm8916-4c864820053bb70e21cf1e9764baefefd4d2f6b1/tools/include/tools/be_byteshift.h:4:10: fatal error: linux/types.h: No such file or directory
          4 | #include <linux/types.h>
            |          ^~~~~~~~~~~~~~~

      By Oliver Smith on 2022-08-05T07:30:28

    • Author Owner

      Yes, I will look and try to fix.

      I was thinking I should fixup this change and possibly include both downstream/mainline in my other MR for surnia to give users a choice.

      But then I also wanted to have a working downstream to test alongside mainline since I have two working surnia devices.

      @ollieparanoid any preference in terms of keeping downstream if mainline is available and working as well or better?

      Without this MR the as-is surnia device doesn't build:

      craig@w500:~$ pmbootstrap install --fde
      [09:19:55] *** (1/4) PREPARE NATIVE CHROOT ***
      [09:19:56] (native) install alpine-base
      [09:20:01] (native) install cryptsetup util-linux parted
      [09:20:02] *** (2/4) CREATE DEVICE ROOTFS ("motorola-surnia") ***
      [09:20:02] (native) install qemu-arm
      [09:20:03] Register qemu binfmt (arm)
      [09:20:03] (rootfs_motorola-surnia) install alpine-base
      [09:20:10] WARNING: package boot-deploy: aport version 0.4-r0 is lower than 0.6-r0 from the binary repository. 0.6-r0 will be used when installing boot-deploy. See also: <https://postmarketos.org/warning-repo2>
      [09:20:10] WARNING: package postmarketos-mkinitfs: aport version 1.4.1-r0 is lower than 1.4.1-r11 from the binary repository. 1.4.1-r11 will be used when installing postmarketos-mkinitfs. See also: <https://postmarketos.org/warning-repo2>
      [09:20:10] WARNING: package postmarketos-base: aport version 17-r0 is lower than 21-r0 from the binary repository. 21-r0 will be used when installing postmarketos-base. See also: <https://postmarketos.org/warning-repo2>
      [09:20:10] WARNING: package devicepkg-dev: aport version 0.13.1-r0 is lower than 0.13.2-r0 from the binary repository. 0.13.2-r0 will be used when installing devicepkg-dev. See also: <https://postmarketos.org/warning-repo2>
      [09:20:10] WARNING: package devicepkg-dev: aport version 0.13.1-r0 is lower than 0.13.2-r0 from the binary repository. 0.13.2-r0 will be used when installing devicepkg-dev. See also: <https://postmarketos.org/warning-repo2>
      [09:20:10] WARNING: package gcc6: aport version 9999-r8 is lower than 9999-r10 from the binary repository. 9999-r10 will be used when installing gcc6. See also: <https://postmarketos.org/warning-repo2>
      [09:20:10] ERROR: Package 'mesa-dri-swrast': Could not find aport, and could not find this package in any APKINDEX!
      [09:20:10] See also: <https://postmarketos.org/troubleshooting>
      Run 'pmbootstrap log' for details.
      

      By Craig Comstock on 2022-08-09T14:24:47

    • Author Owner

      any preference in terms of keeping downstream if mainline is available and working as well or better?

      It's up to the maintainer. The vendor kernel can be useful for debugging sometimes, but if you don't care about it you can drop it.

      By Newbyte on 2022-08-09T14:26:50

    • Author Owner

      Odd. I could have swore I built this downstream version at some point during this work. I get the missing linux/types.h locally as well. Maybe I did a naive change of architecture only and skipped the other changes recommended here: https://wiki.postmarketos.org/wiki/Downstream_kernel_specific_package#Modernize_your_aport, so I might try that one more time before giving up and closing this MR in favor of mainline which seems to work fairly well.

      By Craig Comstock on 2022-08-10T03:32:42

      Edited by Administrator
    • Author Owner

      The CI build failure can be worked around by adding linux-headers to makedepends.

      By Newbyte on 2022-08-10T03:42:29

    • Author Owner

      I tried that and it still fails. It dawned on me that I had only changed the sparse business and not armhf->armv7 when I built the kernel before that worked. So I am trying that again so I can compare downstream to mainline as I test mainline.

      With linux-headers in makedepends in linux-motorola-surnia I get a lot of assembler errors:

      surnia-downstream-compile-error.log

      By Craig Comstock on 2022-08-10T04:34:17

    • Author Owner

      With only the spare file change I can build and flash but on booting it flashes the screen and rndis isn't working. No cursor or pmos logo. So I'm thinking mainline is probably the way to go.

      By Craig Comstock on 2022-08-10T04:44:52

    • Author Owner

      These assembler errors are covered by https://wiki.postmarketos.org/wiki/Troubleshooting:kernel#Kernel_compilation:_thumb_conditional_instruction_should_be_in_IT_block. As written, you can fix it by disabling CONFIG_CRYPTO_AES_ARM_BS

      By Alexey Min on 2022-08-11T12:14:15

    • Please register or sign in to reply
  • Administrator closed · Imported

    closed

Please register or sign in to reply
Loading