KMAKE="${KMAKE} ${warnings_opts}"
+if grep -q '^CONFIG_MODULES=y' .config; then
+ CONFIG_MODULES=1
+else
+ CONFIG_MODULES=0
+fi
+
${KMAKE}
if [ x"${mode}" = x"linux" ]; then
- ${KMAKE} modules_prepare
- ${KMAKE} modules
+ if [ x"${CONFIG_MODULES}" = x"1" ]; then
+ ${KMAKE} modules_prepare
+ ${KMAKE} modules
+ fi
if [ x"${DTB_SRC}" != x"" ]; then
${KMAKE} dtbs
scp ${DTB_SRC} root@${EVK_IP}:${BOOT_DEST}/latest.dtb
- rm -rf modules-tmp
- ${KMAKE} INSTALL_MOD_PATH=modules-tmp modules_install
- pushd modules-tmp/lib/
- tar cf - modules/* | gzip -9 > /tmp/modules.tar.gz
- popd
+ if [ x"${CONFIG_MODULES}" = x"1" ]; then
+ rm -rf modules-tmp
+ ${KMAKE} INSTALL_MOD_PATH=modules-tmp modules_install
+ pushd modules-tmp/lib/
+ tar cf - modules/* | gzip -9 > /tmp/modules.tar.gz
+ popd
- scp /tmp/modules.tar.gz root@${EVK_IP}:/tmp
+ scp /tmp/modules.tar.gz root@${EVK_IP}:/tmp
- ssh root@${EVK_IP} "cd /lib && tar -xf /tmp/modules.tar.gz"
- rm /tmp/modules.tar.gz
+ ssh root@${EVK_IP} "cd /lib && tar -xf /tmp/modules.tar.gz"
+ rm /tmp/modules.tar.gz
+ fi
# Switch to latest kernel and DTB:
ssh root@${EVK_IP} "sed -i -e 's@^DEFAULT.*@DEFAULT test@' /boot/extlinux/extlinux.conf"