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.
Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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