Skip to content
Snippets Groups Projects

main/postmarketos-mkinitfs: Make USB configfs attrs customizable

Merged Imported Administrator requested to merge alexeymin/initfs-customize-usb into master
All threads resolved!

Some devices' downstream kernels may have different RNDIS/functionfs drivers (e.g. QCRNDIS) that require different values for some configfs gadget attributes. Make it possible to customize with deviceinfo file from device- package.

The idea is that each device package may optionally specify a bunch of new deviceinfo_usb_* variables in its deviceinfo file to customize the way it is visible on USB bus.

The ability to change RNDIS function name (deviceinfo_usb_rndis_function) is essential to make downstream sdm660 based device to appear on USB bus.

While at it, make idVedor, idProduct and serialnumber customizable too, so that it will be possible for example to make PineTab appear as PineTab on USB bus, not as Google Inc. Nexus 4 (fastboot) (see USB ID database).

Edited by Administrator

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator
  • Administrator
  • Administrator
  • Administrator
  • Administrator marked as a Work In Progress · Imported

    marked as a Work In Progress

    By Alexey Min on 2019-10-31T17:10:39

  • Administrator changed the description · Imported

    changed the description

    By Alexey Min on 2019-10-31T17:10:39

  • Administrator added 6 commits · Imported

    added 6 commits

    • 0d5d8087...6693c14a - 5 commits from branch postmarketOS:master
    • 0d86037a - main/postmarketos-mkinitfs: Make USB configfs attrs customizable

    Compare with previous version

    By Alexey Min on 2019-10-31T17:15:49

  • Author Owner

    I've tested this, seems to work fine with my device

    Thanks for reviews!

    Rebased on master, fixed all review comments

    By Alexey Min on 2019-10-31T18:42:59

    Edited by Administrator
  • Administrator unmarked as a Work In Progress · Imported

    unmarked as a Work In Progress

    By Alexey Min on 2019-10-31T17:50:40

  • Administrator resolved all threads · Imported

    resolved all threads

    By Alexey Min on 2019-10-31T17:52:02

  • Administrator
  • Administrator added 6 commits · Imported

    added 6 commits

    • 0d86037a...4098ca96 - 5 commits from branch postmarketOS:master
    • 50a29ecc - main/postmarketos-mkinitfs: Make USB configfs attrs customizable

    Compare with previous version

    By Alexey Min on 2019-11-01T09:41:55

  • Administrator resolved all threads · Imported

    resolved all threads

    By Alexey Min on 2019-11-01T10:23:52

    • Author Owner
      Resolved by Administrator

      Thanks for making the changes, @minlexx!

      I used the chance to test this on samsung-golden (mainline), without any of the new deviceinfo variables set. Everything seems to be still working fine. :thumbsup:

      One difference is that the device shows up as "Samsung Galaxy S III Mini" now but I guess that's fine ;)

      By Minecrell on 2019-11-01T11:53:27

      Edited by Ghost User
  • Administrator resolved all threads · Imported

    resolved all threads

    By Alexey Min on 2019-11-03T23:44:29

  • Administrator added 8 commits · Imported

    added 8 commits

    • 50a29ecc...3759b803 - 7 commits from branch postmarketOS:master
    • d12ef087 - main/postmarketos-mkinitfs: Make USB configfs attrs customizable

    Compare with previous version

    By Alexey Min on 2019-11-05T10:53:03

  • Author Owner

    What can also be done here:

    • apply the same behavior to "android_usb" path of the script. But unlike for configfs, for android_usb this is optional, not required to make the device bootable, just a nice thing to have.
    • Modify the wiki page https://wiki.postmarketos.org/wiki/Deviceinfo_reference with new variables
    • Send follow-up MRs to other devices using configfs (or only pine* devices) with new USB IDs/strings. In pine chat Icenowy suggested to use 0x1F3A (Allwinner Technology Co., Ltd.) as idVendor for Pine A64 based devices

    By Alexey Min on 2019-11-05T11:09:02

  • Administrator resolved all threads · Imported

    resolved all threads

    By Oliver Smith on 2019-11-05T22:30:58

  • Author Owner

    apply the same behavior to "android_usb" path of the script. But unlike for configfs, for android_usb this is optional, not required to make the device bootable, just a nice thing to have.

    Let's do this in a separate MR though. This one is a nice, tested patch so let's ship this version :thumbsup:

    Modify the wiki page https://wiki.postmarketos.org/wiki/Deviceinfo_reference with new variables

    I'll do that now.

    Send follow-up MRs to other devices using configfs (or only pine* devices) with new USB IDs/strings. In pine chat Icenowy suggested to use 0x1F3A (Allwinner Technology Co., Ltd.) as idVendor for Pine A64 based devices

    Yes, this would be great!

    Thanks again @minlexx and @Minecrell!

    By Oliver Smith on 2019-11-05T22:32:38

  • Administrator added 12 commits · Imported

    added 12 commits

    • d12ef087...fc306592 - 11 commits from branch postmarketOS:master
    • 68821d2c - main/postmarketos-mkinitfs: make USB configfs attrs customizable (!706)

    Compare with previous version

    By Oliver Smith on 2019-11-05T22:34:08

  • Administrator approved this merge request · Imported

    approved this merge request

    By Oliver Smith on 2019-11-05T22:34:42

  • Administrator enabled an automatic merge when the pipeline for 68821d2c succeeds · Imported

    enabled an automatic merge when the pipeline for 68821d2c succeeds

    By Oliver Smith on 2019-11-05T22:34:43

  • Administrator merged · Imported

    merged

    By Oliver Smith on 2019-11-05T22:35:44

  • Author Owner

    Wiki page updated. Please read through it and adjust it if you have anything to improve :wink:

    https://wiki.postmarketos.org/wiki/Deviceinfo_reference#usb

    By Oliver Smith on 2019-11-05T22:53:14

  • Administrator mentioned in commit wiki@5f3a1443 · Imported

    mentioned in commit wiki@5f3a1443

    By postmarketOS Wiki bot on 2019-11-05T23:43:15

  • Administrator mentioned in commit 68821d2c · Imported

    mentioned in commit 68821d2c

    By Alexey Min on 2019-11-07T18:16:49

  • Administrator mentioned in merge request !1088 (merged) · Imported

    mentioned in merge request !1088 (merged)

    By Alexey Min on 2020-03-22T17:31:55

  • Administrator mentioned in merge request !1095 (merged) · Imported

    mentioned in merge request !1095 (merged)

    By Alexey Min on 2020-03-24T17:42:26

  • Administrator mentioned in issue #1718 · Imported

    mentioned in issue #1718

    By Alexey Min on 2022-09-28T14:44:36

  • Please register or sign in to reply
    Loading