[linux-armv7] Enable CONFIG_USB_G_MULTI

Problems with packages? Post here, using [tags] of the package name.

[linux-armv7] Enable CONFIG_USB_G_MULTI

Postby Barto » Tue Feb 07, 2017 3:10 pm

Hello,

I hope I am posting this at the right place since I am unfamiliar with this forum.

Recently, I was able to play with my usb armory armv7h device along with Archlinux ARM.
At one point, I've wondered if it was possible to use this device as a classic usb stick but still keeping ethernet connectivity to it. I quickly saw that it was the job of the g_multi kernel module, but it was not activated within the kernel config you are shipping.

I was able to compile the kernel with this option activated and play a bit with it, but in the long run, it is not feasable for me to continue having a forked version of your kernel. It fills up my microSD card space significantly and 20 hours for executing makepkg is just too long for me. The best solution is to activate these options in your config. I did fork your repo and made the required changes, but I was not sure if such a pull request would get accepted. I asked on IRC what would be the best steps to get this changed, and I was told that making this post might be the best way.

Here is the basic change I would like to merge (according to today's kernel), is that okay for you?

$this->bbcode_second_pass_code('', '
diff --git a/core/linux-armv7/PKGBUILD b/core/linux-armv7/PKGBUILD
index e6131d52d..ff33f5f9b 100644
--- a/core/linux-armv7/PKGBUILD
+++ b/core/linux-armv7/PKGBUILD
@@ -8,7 +8,7 @@ _srcname=linux-4.9
_kernelname=${pkgbase#linux}
_desc="ARMv7 multi-platform"
pkgver=4.9.8
-pkgrel=1
+pkgrel=2
rcnrel=armv7-x4
arch=('armv7h')
url="http://www.kernel.org/"
@@ -42,7 +42,7 @@ md5sums=('0a68ef3615c64bd5ee54a3320e46667d'
'dd1c99be98c43f06a07aa14fc47d6e3e'
'ef825f8c3563a87bab10f4782e7a0efc'
'ef5fd8e682fed9dce4bc3d1c821acbd1'
- '8f06a784da37647e0421d97cbed22a56'
+ '7b02867abca6bbd7576b5150e45a3110'
'1813b39074d01af6548951764a0f6444'
'4f2379ed84258050edb858ee8d281678'
'61c5ff73c136ed07a7aadbf58db3d96a'
diff --git a/core/linux-armv7/config b/core/linux-armv7/config
index faff946db..306e18e02 100644
--- a/core/linux-armv7/config
+++ b/core/linux-armv7/config
@@ -6232,7 +6232,9 @@ CONFIG_USB_G_PRINTER=m
CONFIG_USB_CDC_COMPOSITE=m
CONFIG_USB_G_NOKIA=m
CONFIG_USB_G_ACM_MS=m
-# CONFIG_USB_G_MULTI is not set
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_RNDIS=y
+# CONFIG_USB_G_MULTI_CDC is not set
CONFIG_USB_G_HID=m
# CONFIG_USB_G_DBGP is not set
CONFIG_USB_G_WEBCAM=m
')

You may notice that I do not want to enable CONFIG_USB_G_MULTI_CDC in the hope to have better compatibility with Windows [1] (I'm not using it, I cannot really tell you).
Also, right now I am talking about linux-armv7 package, should this change be put into linux-armv7-rc as well?

[1]: https://www.kernel.org/doc/Documentatio ... _multi.txt
Barto
 
Posts: 5
Joined: Tue Feb 07, 2017 1:43 pm

Re: [linux-armv7] Enable CONFIG_USB_G_MULTI

Postby WarheadsSE » Tue Feb 07, 2017 4:10 pm

I might shy away from the RNDIS option, and use the CDC (depending on testing), due to how well g_cdc has worked so far.

I see where your thoughts are coming from, and we'll need to review/test that behavior. You are correct, though, that this config change should be added to _both_ packages, if made.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [linux-armv7] Enable CONFIG_USB_G_MULTI

Postby Barto » Thu Feb 09, 2017 12:02 am

Thank you for your quick answer, I apparently forgot to enable email notifications and missed your response.
I am just summarizing the short talk we had on IRC for posterity.

$this->bbcode_second_pass_quote('WarheadsSE', 'I') might shy away from the RNDIS option, and use the CDC (depending on testing), due to how well g_cdc has worked so far.

It is totally fine for me, I originally made it identic to a GitHub issue for the BeagleBone kernel I found [1]. All that is required, according to the kernel documentation, is to activate a single option for not making Windows confused, the rest is up to your judgement.
Note that g_cdc will not have any impact since it is a completely different module (g_cdc is CONFIG_USB_CDC_COMPOSITE) [2], and I'm not asking to replace g_cdc by g_multi.

[1]: https://github.com/beagleboard/linux/issues/48
[2]: http://trac.gateworks.com/wiki/linux/OTG
Barto
 
Posts: 5
Joined: Tue Feb 07, 2017 1:43 pm

Re: [linux-armv7] Enable CONFIG_USB_G_MULTI

Postby Barto » Tue May 09, 2017 8:56 pm

A quick update on my request sounds rather appropriate to do now.

It looks like the new package linux-armv7 from version 4.11.0-1 and up did indeed enable the possibility to use the g_multi kernel module. Thanks!

You can observe that in this commit:
https://github.com/archlinuxarm/PKGBUIL ... cf18254c19

more specifically, the kernel config file now has
$this->bbcode_second_pass_code('', '
CONFIG_USB_G_MULTI=m
CONFIG_USB_G_MULTI_RNDIS=y
CONFIG_USB_G_MULTI_CDC=y
')

I am rather surprised you did enable both CDC and RNDIS, are there any reasons behind that?
As you remember from my first update, enabling both may confuse Windows if you do not provide an .inf file. Have you had time to perform any kind of test on Windows to either confirm or deny this behavior? I would just be curious to know.
Barto
 
Posts: 5
Joined: Tue Feb 07, 2017 1:43 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 7 guests