Skip to contentSkip to conversation

kernel-devsrc.bb: Replace extra System.map file with symlink

PATCH New Erick Shepherd 1 participant 1 message May 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-devsrc.bb: Replace extra System.map file with symlink

Currently there are two .map files being copied to $kerneldir/build. One of the files is System.map and the other is System.map-<kernel version>. Each .map file takes up about 5MB and have identical sha256sum hashes. This change will make it so only System.map-<kernel version> is copied in order to save disk space. It also recreates System.map as a symlink to that .map file.

---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/linux/kernel-devsrc.bb +2 -1
index 1500aff2e2..84a1c19fa9 100644
@@ -75,7 +75,8 @@ do_install() {
         if [ -s Module.symvers ]; then
             cp Module.symvers $kerneldir/build
         fi
-        cp System.map* $kerneldir/build
+        cp System.map-* $kerneldir/build
+        ln -s System.map-* $kerneldir/build/System.map
         if [ -s Module.markers ]; then
             cp Module.markers $kerneldir/build
         fi
Signature · 1 line
2.43.0