main/postmarketos-mkinitfs: Make USB configfs attrs customizable
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).
Merge request reports
Activity
added type::feature label
- Resolved by Administrator
- Resolved by Administrator
- Resolved by Administrator
- Resolved by Administrator
- Resolved by Administrator
added 6 commits
-
0d5d8087...6693c14a - 5 commits from branch
postmarketOS:master
- 0d86037a - main/postmarketos-mkinitfs: Make USB configfs attrs customizable
By Alexey Min on 2019-10-31T17:15:49
-
0d5d8087...6693c14a - 5 commits from branch
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- Resolved by Administrator
- Resolved by Administrator
Offtopic comment, but the most interesting is that the SerialNumber is.. "postmarketOS".
By Danct12 on 2019-11-01T08:57:50
Edited by Ghost User
added 6 commits
-
0d86037a...4098ca96 - 5 commits from branch
postmarketOS:master
- 50a29ecc - main/postmarketos-mkinitfs: Make USB configfs attrs customizable
By Alexey Min on 2019-11-01T09:41:55
-
0d86037a...4098ca96 - 5 commits from branch
- 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.
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
added 8 commits
-
50a29ecc...3759b803 - 7 commits from branch
postmarketOS:master
- d12ef087 - main/postmarketos-mkinitfs: Make USB configfs attrs customizable
By Alexey Min on 2019-11-05T10:53:03
-
50a29ecc...3759b803 - 7 commits from branch
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
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
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 devicesYes, this would be great!
Thanks again @minlexx and @Minecrell!
By Oliver Smith on 2019-11-05T22:32:38
added 12 commits
-
d12ef087...fc306592 - 11 commits from branch
postmarketOS:master
- 68821d2c - main/postmarketos-mkinitfs: make USB configfs attrs customizable (!706)
By Oliver Smith on 2019-11-05T22:34:08
-
d12ef087...fc306592 - 11 commits from branch
enabled an automatic merge when the pipeline for 68821d2c succeeds
By Oliver Smith on 2019-11-05T22:34:43
Wiki page updated. Please read through it and adjust it if you have anything to improve
https://wiki.postmarketos.org/wiki/Deviceinfo_reference#usb
By Oliver Smith on 2019-11-05T22:53:14
mentioned in commit wiki@5f3a1443
By postmarketOS Wiki bot on 2019-11-05T23:43:15
mentioned in commit 68821d2c
By Alexey Min on 2019-11-07T18:16:49
mentioned in merge request !1088 (merged)
By Alexey Min on 2020-03-22T17:31:55
mentioned in merge request !1095 (merged)
By Alexey Min on 2020-03-24T17:42:26
mentioned in issue #1718
By Alexey Min on 2022-09-28T14:44:36