Boot
Linux 核心建構 - 不要更改 vmlinuz
在建構上游核心時,
/boot/vmlinuz
會/boot/System.Map
更新以指向新安裝的核心映像。是否可以通過更改配置或 Makefile 參數來禁用此行為?我正在像這樣建構核心:
make oldconfig make bzImage make modules make modules_install make install
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
andSystem.Map
。