I generate a kernel Image using buildroot that I put onto an SD card to boot from. In buildroot I modularized USB Mass Storage. When I boot up my board without a USB connected to it I can see that no modules are running by using lsmos
. But the instant I plug my USB in, the modules uas
and usb_storage
automatically load and allow access to the USB. I want to prevent this and only allow access to the USB if I manually load in those two modules.
I have read a few articles online about blacklisting the modules or editing files related to the modules; however, this doesn't work because any changes I make are erased when I power off. So I need another option that is permanent, perhaps done in the buildroot settings prior to generating the Image?