Where is g_multi configured in BeagleBone Black?

2020-07-17 14:51发布

问题:

With the default Debian installation in a BeableBone Black you can access it via USB as different devices: mass storage device, virtual ethernet and virtual serial uart. This is accomplished with the g_multi module. You can review its configuration via files in /sys/module/g_multi/parameters/ .

I am trying to use it only as a mass storage device but with other disk/block device, not the second partition in the boot block device. I have checked that it is always the same partition not matter if it is /dev/mmcblk1p2 (when I have a microSD inserted on boot) or /dev/mmcblk0p2 (without it). I have tried removing g_multi after boot and modprobing g_multi or g_mass_storage with my own configuration, and it works OK.

But I don't want the default configuration to load on startup, so I need g_multi to not load at all, or to load with my own parameters. I search for its configuration in every place I could think of: configuration for modules in /etc, configuration for systemd, parameters of uboot for kernel, decompiling dtbs, and even with a compiled kernel I searched for the manufacturer that the startup g_multi shows in its /sys/module/g_multi/parameters/iManufacturer in all the files.

I am not able to find anything. Could someone help me?

Thank you very much in advance.

回答1:

I have finally found it. It is a bit hidden (in a Debian perspective). It is configured in the /opt/scripts/boot/am335x_evm.sh script. I had forgotten all those scripts and utilities for the Beagle platforms. I had to follow the major part of the boot proccess.