From 758aee0240809e9c4aa3428dd332055b7d21a013 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Thu, 14 Mar 2024 12:34:59 -0400 Subject: [PATCH] hvk: check for modules support --- scripts/hvk-compile.sh | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/scripts/hvk-compile.sh b/scripts/hvk-compile.sh index f9076d3..2621ab6 100755 --- a/scripts/hvk-compile.sh +++ b/scripts/hvk-compile.sh @@ -56,11 +56,19 @@ fi 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 @@ -76,16 +84,18 @@ if [ ${#} -eq 1 ]; then 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" -- 2.20.1