建置上游核心時,/boot/vmlinuz
並/boot/System.Map
更新為指向新安裝的核心映像。是否可以透過更改配置或 Makefile 參數來停用此行為?
我正在像這樣構建內核:
make oldconfig
make bzImage
make modules
make modules_install
make install
答案1
make install
/sbin/installkernel
將更新符號連結的呼叫vmlinuz
。沒有選項可以停用此行為。但是,如果您複製到/sbin/installkernel
,~/bin/installkernel
則可以從該副本中刪除連結並優先make install
使用此位置。installkernel
/sbin/
在我的版本中,installkernel
這是函數的這一部分updatever
:
44 # This section is for backwards compatibility only
45 if test -f "$dir/$1" ; then
46 # The presence of "$dir/$1" is unusual in modern intallations, and
47 # the results are mostly unused. So only recreate them if they
48 # already existed.
49 if test -L "$dir/$1" ; then
50 # If we were using links, continue to use links, updating if
51 # we need to.
52 if [ "$(readlink -f ${dir}/${1})" = "${dir}/${1}-${ver}" ]; then
53 # Yup, we need to change
54 ln -sf "$1-$ver.old" "$dir/$1.old"
55 else
56 mv "$dir/$1" "$dir/$1.old"
57 fi
58 ln -sf "$1-$ver" "$dir/$1"
59 else # No links
60 mv "$dir/$1" "$dir/$1.old"
61 cat "$2" > "$dir/$1"
62 fi
63 fi
就我個人而言,我根本不使用vmlinuz
and 。System.Map