今天想要使用4.14的Kernel源码编译kernel-firmware rpm包,结果发现编译失败了,经过简单的研究,发现Linux Kernel在4.14中把firmware删除了。
感兴趣的可以看相关修订邮件:http://lkml.iu.edu/hypermail/linux/kernel/1709.1/04650.html(为什么无法插入外链???)
这里截取一段邮件中的描述:
> Many many years ago (at the kernel summit in Boston), we all came to the
>agreement that the firmware/ tree should be dropped from the kernel, and
>everyone use the linux-firmware package instead. For some minor reason,
>David Woodhouse didn't send the pull request at that point in time, and
>everyone forgot about this.
>The topic came up in the hallway track at the Plumbers conference this
>week, so here's a single patch that drops the whole firmware tree. The
>last firmware update was back in 2013, and all distros have been using
>linux-firmware instead since at least that year, if not before. The
>only commits to that directory since 2013 was some kbuild fixups for
>various build tool issues.
>So lets finally drop this, we don't need to lug them around in the
>kernel source tree anymore, especially as no one wants or uses them.
>This has passed build testing with 0-day, I don't think it made it into
>linux-next this week, but I figured it was good to get in before
>4.14-rc1 was out.
这个补丁应用之后,引发了以下问题:
1.http://lkml.iu.edu/hypermail/linux/kernel/1709.2/00004.html
2. rpm包编译失败http://lkml.iu.edu/hypermail/linux/kernel/1709.2/00782.html
3. deb包编译失败http://lkml.iu.edu/hypermail/linux/kernel/1709.2/00717.html
解决了上述问题后,最终我们看到的结果是Linux Kernel从4.14开始就没有内置的firmware了,当然也不支持make firmware_install命令了,kernel-firmware的rpm包也不可能从Kernel sources中编译出来。回头我们再读最初的这封邮件,其中提到了kernel中的firmware自从2013年已经停止更新了,取而代之的是linux-firmware,并且几乎所有的发行版已经使用了linux-firmware取代了kernel-firmware。
看到这里,如果有心的话,可以去看看CentOS7中的firmware 包,你会发现kernel-firmware包消失了,替代者是linux-firmware。
所以,如果需要更新firmware,应该使用linux-firmware。这里提供2个简单的解决方案:
1. 可以去https://cbs.centos.org/koji/packageinfo?packageID=4127下载centos社区编译版;
2. 也可以使用https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git中的源码自行打包。
领取专属 10元无门槛券
私享最新 技术干货