You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kernel: armbian: remove some heavy kernel modules (so it fits in 2Gb RAM)
- Armbian kernels are meant for general-purpose initrd's, and including all modules is overkill
- this allows to boot on 2Gb RAM machines (tmpfs allows only up to 50% RAM)
Signed-off-by: Ricardo Pardini <[email protected]>
Copy file name to clipboardExpand all lines: bash/kernel/kernel_armbian.sh
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,11 @@ function calculate_kernel_version_armbian() {
94
94
# Important: this tarball needs to have permissions for the root directory included! Otherwise linuxkit rootfs will have the wrong permissions on / (root)
95
95
WORKDIR /armbian/modules_only
96
96
RUN mv /armbian/image/lib /armbian/modules_only/
97
+
RUN echo "Before cleaning: " && du -h -d 10 -x . | sort -h | tail -n 20
98
+
# Trim the kernel modules to save space; hopefully your required hardware is not included here
99
+
RUN rm -rfv ./lib/modules/*/kernel/drivers/net/wireless ./lib/modules/*/kernel/sound ./lib/modules/*/kernel/drivers/media
100
+
RUN rm -rfv ./lib/modules/*/kernel/drivers/infiniband
101
+
RUN echo "After cleaning: " && du -h -d 10 -x . | sort -h | tail -n 20
97
102
RUN tar -cf /armbian/output/kernel.tar .
98
103
99
104
# Create a tarball with the dtbs in usr/lib/linux-image-*
0 commit comments