File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ rm -rf "${ADDONS_OUTPUT_PATH}"
1515rm -rf " ${ADDONS_SQUASHFS_PATH} "
1616rm -rf " ${METADATA_PATH} "
1717
18- make -C " ${KERNEL_OBJ} " ARCH=" ${TARGET_ARCH_KERNEL} " -j" ${KERNEL_BUILD_JOBS} " " ${CROSS_COMPILE_MAKE} " INSTALL_MOD_PATH=" ${MODULES_INSTALL_PATH} " modules_install
18+ make -C " ${KERNEL_OBJ} " ARCH=" ${TARGET_ARCH_KERNEL} " -j" ${KERNEL_BUILD_JOBS} " " ${CROSS_COMPILE_MAKE} " INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=" ${MODULES_INSTALL_PATH} " modules_install
1919KERNEL_MODULES_VER=" $( ls " ${MODULES_INSTALL_PATH} /lib/modules" ) "
2020
2121mkdir -p " ${ADDONS_OUTPUT_PATH} "
@@ -34,6 +34,16 @@ mksquashfs "${ADDONS_OUTPUT_PATH}" "${ADDONS_SQUASHFS_PATH}" -all-root
3434
3535SQUASH_SIZE=$( stat -c %s " ${ADDONS_SQUASHFS_PATH} " )
3636
37+ # Host kernel size matters less, but we still don't want it to massively balloon all of a sudden.
38+ case " $KERNEL_FLAVOR " in
39+ host* )
40+ if [ " ${SQUASH_SIZE} " -gt 419430400 ]; then
41+ echo " ERROR: squashfs is >400MB in size (${SQUASH_SIZE} bytes) which is undesirable for the 'host' kernel, validate kconfig options!" >&2
42+ exit 1
43+ fi
44+ ;;
45+ esac
46+
3747# Generally we want to keep zone kernels small, because large kernels -> longer pull times -> increased zone cold boot times.
3848# We don't really care how big the host kernel is.
3949# Nvidia kernels have chonker firmwares, even compressed (like 200MB total size), so not much we can really do there.
You can’t perform that action at this time.
0 commit comments