编译linux内核遇到的问题汇总

升级编译工具在进行编译
arm-linux-gcc 4.3.2

Can’t use ‘defined(@array)’ (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.

其实,提示的错误信息已经明确告诉你了,你应该省略defined().
这里,我们打开 kernel/timeconst.pl

@val = @{$canned_values{$hz}}; 
if (defined(@val)) { 
@val = compute_values($hz); 
} 
output($hz, @val); 

将if (defined(@val)) 改为if (@val),再次编译就可以通过了。

查了一下更新,发现其中有一项是perl版本升级到了 v5.22.1,然后查了perl官方文档,发现官网因为一个bug,该版本将defined(@array)去掉了。可以直接使用数组判断非空。、

“mkimage” command not found – U-Boot images will not be built

按照以往经验,我们需要安装依赖包:

sudo apt-get install uboot-mkimage

但却提示”现在没有可用的软件包 uboot-mkimage,但是它被其它的软件包引用了。 这可能意味着这个缺失的软件包可能已被废弃“

怎么破?

按照其提示,安装”u-boot-tools“即可

sudo apt-get install u-boot-tools

顺利生成内核镜像。 ↖(^ω^)↗

猜你喜欢

转载自blog.csdn.net/u012075395/article/details/79125768