LibreELEC.tv
LibreELEC.tv copied to clipboard
adjust RPi4 kernel config for dwc2 and gadgets
This adds the ability to use the RPi4 USB-C port as a gadget peripheral. I've tested the g_serial
, g_ether
, and g_mass_storage
modules.
This also adds a commit to correct some missing kernel config options by using ./tools/adjust_kernel_config
.
To use these modules you just need to load them.
g_ether
creates a network device.
g_serial
creates a serial device. To use this you need to add the following to /flash/cmdline.txt
:
console=ttyGS0,115200 systemd.debug-shell=1
Then you need to adjust the systemd debug-shell service. systemctl edit debug-shell.service
:
[Service]
TTYPath=/dev/ttyGS0
systemctl daemon-reload
systemctl restart debug-shell
Then you can access the serial device on your workstation. On mine it's via
screen /dev/ttyACM0 115200
g_mass_storage
is used like so:
modprobe g_mass_storage file=/dev/sda
@lrusak RPi4: linux: correct kernel config using ./tools/adjust_kernel_config Is it just wrong for RPi4 ? If not, better to fix it for every platform in a dedicated pr.
After merge pls add a howto to the wiki or the information how its done is basically lost.
@lrusak
RPi4: linux: correct kernel config using ./tools/adjust_kernel_config
Is it just wrong for RPi4 ? If not, better to fix it for every platform in a dedicated pr.
The same thing is in #6459 and would likely need to fix the kernel config for a few platforms.
After merge pls add a howto to the wiki or the information how its done is basically lost.
Meh, it was merged over a year ago in #5044 and much of the team was involved. My contribution time is limited so if someone else wants to do it they can go right ahead.
Merge?
A bump comments after 2 days, really? Please give us some time to review,
From a quick glance you forgot to add RPi2 (RPi Zero 2 has USB OTG too) and optionally RPi (not in our official builds, but in master too and RPi Zero has USB OTG as well)
Also please drop the commit with the transient config data from adjust_kernel_config, that just add clutter
A bump comments after 2 days, really? Please give us some time to review,
From a quick glance you forgot to add RPi2 (RPi Zero 2 has USB OTG too) and optionally RPi (not in our official builds, but in master too and RPi Zero has USB OTG as well)
I don't have the device to test with.
Also please drop the commit with the transient config data from adjust_kernel_config, that just add clutter
But I want it as it's the most correct output when using ./tools/adjust_kernel_config
Just add the kernel options for RPi and RPi2 and build-test RPi2 - that's enough. I can't runtime-test RPi4 either so if it doesn't work then meh, so be it :)
As for the transient settings: you may want them, but I don't, I prefer an uncluttered history. And as you already have them as a separate commit I kindly ask you to drop that commit.