Closed giuliomoro closed 6 years ago
while the above got me to be able to load the libcomposite
module, rtdm_pruss_irq
would still fail loading with "invalid parameter" or "not found".
I tried resetting the whole content of /lib/modules/
as it was on the original SD card and that allowed me to load the module.
Then when I went back to /opt/rtdm_pruss_irq
and ran make
I would get some error saying to redo make oldconfig && make prepare
in the kernel source, which failed
I then reverted the whole /usr/src/linux-headers-4.4.113-ti-xenomai-r148
to what it was from a fresh image and that finally worked.
I think the key error is
Nov 03 17:16:43 bela systemd-modules-load[97]: could not open moddep file '/lib/modules/4.4.113-ti-xenomai-r148/modules.dep.bin'
I think if you have corrupted your kernel module dependencies you're pretty screwed really, and lucky the thing booted at all.
I guess we could try compiling those modules directly into the kernel? Seems like a rare kind of error though, and likely not worth the hassle (especially for rtdm_pruss_irq
)
I'd rather not have rtdm_pruss_irq
into the kernel, because we may want to leave a way for us to update it. Though it may just be easier to reship the full kernel .deb file? We should also have one of those hooks that recompile the modules after updating the kernel. I remember seeing it somewhere.
This happened after compiling a kernel module which hang the system and so yanked the power cable and restarted. The host was showing "this composite device is not for us" (i.e.: HoRNDIS did not recognize the USB device as something it could do something about) and no network or BELABOOT was coming up.
Serial log:
This is
journalctl
:first error in the serial log is
[FAILED] Failed to start Load Kernel Modules.
. I think the corresponding one injournalctl
isThen after that fails, the
usb_gadget
cannot be created andusb0
does not exist and cannot be brought up.systemctl status systemd-modules-load.service
gives:I assumed it was my newly compiled
rtdm_pruss_irq.ko
module that was causing problems, so I removed it from/etc/modules
but still no luck.Turns out that the sudden shutdown just after the build had left multiple empty files in
/lib/modules/$(uname -r)
, so it was failing in loadingmodules.dep.bin
. Solution was to recompile and install a module, so that it fixed all those empty files.Also, this outlined that if there is no
/sys/kernel/config/usb_gadget/
, that is iflibcomposite
has failed loading, then the folder structure forusb_gadget
was created in/
(fixed in https://github.com/BelaPlatform/bela-image-builder/commit/d3c527cf4188ff987d7e1e91b477f28b61ea4d2f).However, this creates the interesting problem that one may end up with soft-bricked board (if they have no UART at hand, that is) if there are corrupted files in
/lib/modules/$(uname -r)
. It would be interesting investigating if there is a way of cleaning those from/opt/Bela/bela_gadget.sh
and unbrick the board. Or maybe try to force loadlibcomposite
withinsmod
and warn the user of the failure?