4
0

add option to keep all kernel modules

This commit is contained in:
Benjamin Böhmke 2020-01-29 18:38:21 +01:00
parent 45e3ea71ee
commit 895d54b046

View File

@ -256,10 +256,15 @@ mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "Linux
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
echo ">> Remove kernel modules" echo ">> Remove kernel modules"
cd ${ROOTFS_PATH}/lib/modules
# loop all kernel versions if [ "$DEFAULT_KERNEL_MODULES" == "*" ]; then
for d in * ; do echo "skiped -> keep all modules"
else
cd ${ROOTFS_PATH}/lib/modules
# loop all kernel versions
for d in * ; do
echo "Remove $d" echo "Remove $d"
# collect modules to keep # collect modules to keep
@ -273,9 +278,10 @@ for d in * ; do
# replace original modules dir with new one # replace original modules dir with new one
rm -rf $d rm -rf $d
mv ${d}_tmp $d mv ${d}_tmp $d
done done
cd ${WORK_PATH} cd ${WORK_PATH}
fi
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# create boot FS # create boot FS