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
build: armbian: kernel: refactor Dockerfile with helper
- building the Armbian kernels would produce different hashes depending on the arch of the host
- moving the affected code into the Dockerfile would lead to escaping pain; instead implement a docker.sh helper
- in practice, all code in the Dockerfile is hashed, but the arch decision is now therein and hash won't change
- also, allows for reuse, which is bound to come later
Signed-off-by: Ricardo Pardini <[email protected]>
@@ -76,11 +66,11 @@ function calculate_kernel_version_armbian() {
76
66
# Important: this tarball needs to have permissions for the root directory included! Otherwise linuxkit rootfs will have the wrong permissions on / (root)
77
67
WORKDIR /armbian/modules_only
78
68
RUN mv /armbian/image/lib /armbian/modules_only/
79
-
RUN echo "Before cleaning: " && du -h -d 10 -x . | sort -h | tail -n 20
69
+
RUN echo "Before cleaning: " && du -h -d 10 -x lib/modules | sort -h | tail -n 20
80
70
# Trim the kernel modules to save space; hopefully your required hardware is not included here
81
-
RUN rm -rfv ./lib/modules/*/kernel/drivers/net/wireless ./lib/modules/*/kernel/sound ./lib/modules/*/kernel/drivers/media
82
-
RUN rm -rfv ./lib/modules/*/kernel/drivers/infiniband
83
-
RUN echo "After cleaning: " && du -h -d 10 -x . | sort -h | tail -n 20
71
+
RUN rm -rf ./lib/modules/*/kernel/drivers/net/wireless ./lib/modules/*/kernel/sound ./lib/modules/*/kernel/drivers/media
72
+
RUN rm -rf ./lib/modules/*/kernel/drivers/infiniband
73
+
RUN echo "After cleaning: " && du -h -d 10 -x lib/modules | sort -h | tail -n 20
84
74
RUN tar -cf /armbian/output/kernel.tar .
85
75
86
76
# Create a tarball with the dtbs in usr/lib/linux-image-*
@@ -96,8 +86,7 @@ function calculate_kernel_version_armbian() {
96
86
ARMBIAN_ORAS_DOCKERFILE
97
87
98
88
declare input_hash="" short_input_hash=""
99
-
# shellcheck disable=SC2002 # keep cat & hash stdin so we can easily add more factors to the hash one day
armbian_type="${inventory_id#"armbian-"}"# remove the 'armbian-' prefix from inventory_id, but keep the rest. "uefi" has "current/edge" and "arm64/x86" variants.
0 commit comments