在华硕A53SI2450SM-SL上Ubuntu系统中编译安装运行kernel4.18.5版本的kernel的过程中(具体过程见:https://blog.csdn.net/OGL_90KG/article/details/82316240),遇到了开机之后出现”error: coundn’t find suitable memory target Press any key to continue”的错误提示,按回车键之后,继续运行,就报出panic了。
然后网上搜了下,有说编出来的image太大导致。
ll /boot/目录下,发现自己编译的image,普遍要比ubuntu自带的image要大10倍,然后搜索并尝试了方案,总结如下(这里提供原始链接https://unix.stackexchange.com/questions/30345/why-is-my-initial-ramdisk-so-big):
在modules_install的时候需要用到strip,其余命令都一样,如下:
sudo make INSTALL_MOD_STRIP=1 modules_install
系统成功之后的界面如下:
strip相关的解释如下:
https://sourceware.org/binutils/docs/binutils/strip.html
–strip-debug
Remove debugging symbols only.
–strip-unneeded
Remove all symbols that are not needed for relocation processing.