I’m trying to compile a kernel module that’s not part of the standard ubuntu release for the DragonBoard. But before that, I tried compiling all the standard modules, and the file sizes are different from what I have installed on my board. Any idea why, or whether I should even be concerned? Some details:
I have the alip image of ubuntu release 15.07 installed on my board. I followed the instructions at the following links to cross-compile the modules:
http://builds.96boards.org/releases/dragonboard410c/linaro/ubuntu/15.07/
I’m particularly interested in the USB gadget modules, so here are a couple examples from that part of the source tree:
Installed on the DragonBoard:
-rw-r--r-- 1 root root 15608 Jul 27 09:23 kernel/drivers/usb/gadget/legacy/g_ether.ko
-rw-r--r-- 1 root root 14952 Jul 27 09:23 kernel/drivers/usb/gadget/legacy/g_mass_storage.ko
-rw-r--r-- 1 root root 12328 Jul 27 09:23 kernel/drivers/usb/gadget/legacy/g_serial.ko
-rw-r--r-- 1 root root 17776 Jul 27 09:23 kernel/drivers/usb/gadget/legacy/g_zero.ko
From what I re-compiled:
-rw-rw-r-- 1 mtr mtr 313940 Aug 21 00:21 kernel/drivers/usb/gadget/legacy/g_ether.ko
-rw-rw-r-- 1 mtr mtr 211209 Aug 21 00:21 kernel/drivers/usb/gadget/legacy/g_mass_storage.ko
-rw-rw-r-- 1 mtr mtr 246921 Aug 21 00:21 kernel/drivers/usb/gadget/legacy/g_serial.ko
-rw-rw-r-- 1 mtr mtr 216597 Aug 21 00:21 kernel/drivers/usb/gadget/legacy/g_zero.ko
Notice that the modules that I compiled are quite a bit bigger. Same thing happened when I compiled on the board itself as well as when I cross-compiled on my laptop with the 2015.06 Linaro cross-compiler. (Per the instructions at the link above, I started with the 2014.11 cross-compiler.) I also confirmed that my .config
file is identical to the kernel.config
file at the link above.
I’m guessing there’s something wrong with the toolchain I’m using, but I’m otherwise stumped.