首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何用clearlinux内核替换ubuntu20.04内核?

如何用clearlinux内核替换ubuntu20.04内核?
EN

Ask Ubuntu用户
提问于 2020-04-25 06:45:58
回答 2查看 2.8K关注 0票数 10

https://github.com/clearlinux-pkgs/linux

https://aur.archlinux.org/packages/linux-clear/

如何为ubuntu使用clearlinux内核?

希望有一个逐步复制/粘贴指南,用clearlinux内核替换ubuntu内核。复制/粘贴代码仍然不完整。我希望有一天能完成。

代码语言:javascript
运行
AI代码解释
复制
**DONE**
android@nazar:~/patched_source/linux-5.6.10$ cd ../
android@nazar:~/patched_source$ ls
linux-5.6.10                             linux-headers-5.6.10+_5.6.10+-1_amd64.deb
linux-5.6.10+_5.6.10+-1_amd64.buildinfo  linux-image-5.6.10+_5.6.10+-1_amd64.deb
linux-5.6.10+_5.6.10+-1_amd64.changes    linux-libc-dev_5.6.10+-1_amd64.deb
android@nazar:~/patched_source$ uname -a
Linux nazar 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
android@nazar:~/patched_source$ sudo dpkg -i ../*.deb 
[sudo] password for android: 
dpkg: error: cannot access archive '../*.deb': No such file or directory
android@nazar:~/patched_source$ sudo dpkg -i *.deb 
Selecting previously unselected package linux-headers-5.6.10+.
(Reading database ... 152012 files and directories currently installed.)
Preparing to unpack linux-headers-5.6.10+_5.6.10+-1_amd64.deb ...
Unpacking linux-headers-5.6.10+ (5.6.10+-1) ...
Selecting previously unselected package linux-image-5.6.10+.
Preparing to unpack linux-image-5.6.10+_5.6.10+-1_amd64.deb ...
Unpacking linux-image-5.6.10+ (5.6.10+-1) ...
Preparing to unpack linux-libc-dev_5.6.10+-1_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.6.10+-1) over (5.4.0-26.30) ...
Setting up linux-headers-5.6.10+ (5.6.10+-1) ...
Setting up linux-image-5.6.10+ (5.6.10+-1) ...
 * dkms: running auto installation service for kernel 5.6.10+                                           
Kernel preparation unnecessary for this kernel.  Skipping...
applying patch 0002-Makefile.patch...patching file Makefile
Hunk #1 succeeded at 113 with fuzz 1.
Hunk #2 succeeded at 132 with fuzz 2 (offset 1 line).

applying patch 0003-Make-up-for-missing-init_MUTEX.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 111 with fuzz 2 (offset 12 lines).

applying patch 0010-change-the-network-interface-name-from-eth-to-wlan.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 221 (offset -14 lines).

applying patch 0013-gcc.patch...patching file Makefile

applying patch 0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2169 (offset 12 lines).

applying patch 0020-add-support-for-linux-4.3.patch...patching file src/shared/linux_osl.c

applying patch 0021-add-support-for-Linux-4.7.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c

applying patch 0022-add-support-for-Linux-4.8.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2391 (offset 3 lines).
Hunk #2 succeeded at 2501 (offset 3 lines).
Hunk #3 succeeded at 2933 (offset 9 lines).

applying patch 0023-add-support-for-Linux-4.11.patch...patching file src/include/linuxver.h
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2919 (offset 4 lines).

applying patch 0024-add-support-for-Linux-4.12.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 55 (offset 5 lines).
Hunk #2 succeeded at 472 (offset 5 lines).
Hunk #3 succeeded at 2371 (offset 5 lines).
Hunk #4 succeeded at 2388 (offset 5 lines).

applying patch 0025-add-support-for-Linux-4.14.patch...patching file src/shared/linux_osl.c
Hunk #1 succeeded at 1080 (offset 4 lines).

applying patch 0026-add-support-for-Linux-4.15.patch...patching file src/wl/sys/wl_linux.c
Hunk #2 succeeded at 2306 (offset 4 lines).
Hunk #3 succeeded at 2368 (offset 4 lines).

applying patch 0027-add-support-for-linux-5.1.patch...patching file src/include/linuxver.h
Hunk #1 succeeded at 595 (offset 4 lines).


Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.6.10+ -C /lib/modules/5.6.10+/build M=/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build....(bad exit status: 2)
ERROR (dkms apport): kernel package linux-headers-5.6.10+ is not supported
Error! Bad return status for module build on kernel: 5.6.10+ (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
                                                                                                 [ OK ]
update-initramfs: Generating /boot/initrd.img-5.6.10+
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.6.10+
Found initrd image: /boot/initrd.img-5.6.10+
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
Adding boot menu entry for UEFI Firmware Settings
done
Setting up linux-libc-dev:amd64 (5.6.10+-1) ...

重新启动android@ nazar:~/$ uname -a LinuxNazar5.4.0-26-泛型#30-Ubuntu 20 16:58:30 UTC 2020 x86_64 GNU/Linux

EN

回答 2

Ask Ubuntu用户

发布于 2020-04-27 18:40:03

我没有使用ClearLinux的具体经验,但看起来您可以:

代码语言:javascript
运行
AI代码解释
复制
# It's best to first compile their gcc (https://github.com/clearlinux-pkgs/gcc)
mkdir ~/patched_source
git clone https://github.com/clearlinux-pkgs/linux ~/clearlinux_patches
cd ~/clearlinux_patches
./scripts/develop.sh linux.spec ~/patched_source

它应该将上游内核下载到下面的文件夹中(它会告诉您确切的名称),并应用ClearLinux自己的补丁和默认的config

然后,您可以像往常一样继续编译内核,例如:

代码语言:javascript
运行
AI代码解释
复制
cd that_folder
CC=/the/clearlinux/gcc make -j4 bindeb-pkg
# This will take a while and create a few linux-xxx.deb files in the parent directory
sudo dpkg -i ../*.deb   # Or just the latest

禁用CONFIG_RETPOLINE缓解功能使得可以使用Ubuntu的gcc进行编译(显然需要付出代价)。

通常的警告适用于:首先在VM中尝试,安全引导可能很棘手,可能会有一些特定于Ubuntu的补丁丢失,.

如果您感到冒险,也可以将一些他们自己的cmdline选项添加到/etc/default/grub中(如第8-15行中的那些)。

票数 3
EN

Ask Ubuntu用户

发布于 2020-05-05 23:47:37

多亏了@Jacopo,我重新发布了这篇文章,供我将来参考。

如何在乌本图安装透明线gcc?

https://cdn.download.clearlinux.org/releases/33040/clear/x86_64/os/包/

代码语言:javascript
运行
AI代码解释
复制
android@nazar:~/
wget https://cdn.download.clearlinux.org/releases/33030/clear/x86_64/os/Packages/gcc7-7.5.0-440.x86_64.rpm
sudo apt install alien git curl flex bison libssl-dev
sudo alien gcc7-7.5.0-440.x86_64.rpm
sudo dpkg -i gcc7_7.5.0-441_amd64.deb
gcc7 -v
mkdir ~/patched_source
git clone https://github.com/clearlinux-pkgs/linux ~/clearlinux_patches
cd ~/clearlinux_patches
git clone https://github.com/clearlinux-pkgs/linux ~/clearlinux_patches
cd ~/clearlinux_patches
./scripts/develop.sh linux.spec ~/patched_source
git config --global user.email "you@example.com"
./scripts/develop.sh linux.spec ~/patched_source
cd /home/android/patched_source/linux*
CC=/the/clearlinux/gcc make -j4 bindeb-pkg
sudo dpkg -i ../*.deb 

安装后冻结内核

代码语言:javascript
运行
AI代码解释
复制
sudo apt-mark hold linux-generic linux-image-generic linux-headers-generic
票数 3
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1230903

复制
相关文章
WordPress速度优化-Nginx fastcgi_cache缓存加速
高并发网站架构的核心原则其实就一句话“把所有的用户访问请求都尽量往前推“,即:能缓存在用户电脑本地的,就不要让他去访问CDN。 能缓存CDN服务器上的,就不要让CDN去访问源(静态服务器)了。能访问静态服务器的,就不要去访问动态服务器。以此类推:能不访问数据库和存储就一定不要去访问数据库和存储。
开心分享
2020/08/10
1.2K0
Nginx中fastcgi_pass的配置问题
--------------------------------------------------
双面人
2020/02/13
4.5K0
Nginx中fastcgi_pass的配置问题[通俗易懂]
Nginx和PHP-FPM的进程间通信有两种方式,一种是TCP,一种是UNIX Domain Socket. 其中TCP是IP加端口,可以跨服务器.而UNIX Domain Socket不经过网络,只能用于Nginx跟PHP-FPM都在同一服务器的场景.用哪种取决于你的PHP-FPM配置: 方式1: php-fpm.conf: listen = 127.0.0.1:9000 nginx.conf: fastcgi_pass 127.0.0.1:9000; 方式2: php-fpm.conf: listen = /tmp/php-fpm.sock nginx.conf: fastcgi_pass unix:/tmp/php-fpm.sock; 其中php-fpm.sock是一个文件,由php-fpm生成,类型是srw-rw—-.
全栈程序员站长
2022/09/08
1.9K0
开启 Nginx 的 FastCGI Cache 缓存,加速 WordPress 伪静态页面
关于 WordPress 的加速优化几乎都是个老生常谈的话题了,今天明月再给大家分享一个加速 WordPress 的方法,这个方法是基于 Nginx 的 Web 缓存方式。Web 缓存是指一个 Web 资源(如 html 页面,图片,js,数据等)存在于 Web 服务器和客户端(浏览器)之间的副本。缓存会根据进来的请求保存输出内容的副本;当下一个请求来到的时候,如果是相同的 URL,缓存会根据缓存机制决定是直接使用副本响应访问请求,还是向源服务器再次发送请求。Nginx 的 Web 缓存一般推荐 FastCGI 方式,另外还有一个叫 Proxy 方式,两者的缓存效率大同小异,今天以 FastCGI 方式为主给大家分享一下。
明月登楼的博客
2019/08/18
2.2K0
宝塔面板开启Nginx fastcgi_cache缓存为WordPress提速
说到wordpress的缓存,大家想到的肯定是 WP-Super-Cache 的静态html缓存,以及 memcached 或 redis 动态缓存,插件的缓存效果肯定是有的,但是容易出现各种问题,比如配置很复杂、配置全英文、插件之间的冲突等,所以今天我要教大家一个更高级的缓存:Nginx fastcgi_cache缓存,直接在nginx层面缓存页面,还支持缓存伪静态!效果比起传统的php缓存好得太多了,因为很多人使用宝塔面板,所以今天的教程是基于宝塔面板的教程。
回忆大大
2023/03/09
1.9K0
宝塔面板开启Nginx fastcgi_cache缓存为WordPress提速
Nginx 0.8.53 FastCGI参数详解
来源地址:http://blog.csdn.net/eric1012/article/details/6075460
全栈程序员站长
2022/09/14
1.4K0
nginx之FastCGI配置优化
FastCGI是从CGI发展改进而来的。传统CGI接口方式的主要缺点是性能很差,因为每次HTTP服务器遇到动态程序时都需要重新启动脚本解析器来执行解析,然后结果被返回给HTTP服务器。这在处理高并发访问时,几乎是不可用的。另外传统的CGI接口方式安全性也很差,现在已经很少被使用了。
随心助手
2019/10/15
2.3K0
nginx之FastCGI配置优化
说一下蛋疼的wordpress和apache崩溃问题
很久之前我就发现我的博客wordpress搬到这一台服务器之后有时候wordpress后台有些页面会导致后台进程崩溃,具体是apache的进程会崩,日志显示
horsley
2022/08/16
2750
Nginx中优化FastCGI配置
  FastCGI是从CGI发展改进而来的。传统CGI接口方式的主要缺点是性能很差,因为每次HTTP服务器遇到动态程序时都需要重新启动脚本解析器来执行解析,然后结果被返回给HTTP服务器。这在处理高并发访问时,几乎是不可用的。另外传统的CGI接口方式安全性也很差,现在已经很少被使用了。
习惯说一说
2019/07/31
1.6K0
Nginx中优化FastCGI配置
Nginx + VFP FastCGI初起步
众所周知IIS的性能令人诟病,早期VFP开发WEB也没更好的方案,采用了CGI的方式运行于IIS内,好处是每次WEB调用,VFP程序运行后就结束,不存在内存泄漏,变量冲突等,也不会引起宿主IIS崩溃,但坏处就是频繁的启动进程,性能不理想。但FastCGI程序不同,执行完请求后,不会立即结束,而是留在内存等待下一次请求,减少了大量进程初始化的过程,性能就大大提高,缺点就是VFP开发人员要注意,大量的全局变量,不规范的变量使用等,会“污染”下一次请求。
加菲猫的VFP
2021/08/16
1.2K0
Nginx fastcgi_cache权威指南
Nginx版本从0.7.48开始,支持了类似Squid的缓存功能。这个缓存是把URL及相关组合当做Key,用Md5算法对Key进行哈希,得到硬盘上对应的哈希目录路径,从而将缓存内容保存在该目录内。
sunsky
2020/08/20
2.5K0
Nginx fastcgi_cache权威指南
Nginx实现崩溃重启
mail配置文件为/etc/mail.rc,用户级配置文件为~/.mailrc。这里使用全局配置文件,在/etc/mail.rc文件最后添加如下内容:
SuperChen
2023/02/12
6.3K2
Nginx实现崩溃重启
nginx之详解fastcgi指令(修正)
例子: location / { fastcgi_pass localhost:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcg
随心助手
2019/10/15
5.1K1
Nginx + Web.py 和FastCGI搭建Web.py环境
web.py 是一个轻量级Python web框架,它简单而且功能大。web.py是一个开源项目。
星哥玩云
2022/06/30
9710
Nginx + Web.py 和FastCGI搭建Web.py环境
Nginx + PHP(FastCGI)安装配置笔记
这是站长在2011年时一次安装服务器时所记录的Nginx和PHP的安装笔记。安装过程记录的比较简略,仅仅是一个大致的流程,一些细节描述的不够详细,请多多谅解,我会在日后重新整理一份详细的安装过程,本文仅供参考!
魏杰
2022/12/23
5130
【Nginx19】Nginx学习:FastCGI模块(一)基础配置
万众瞩目啊,总算到 FastCGI 了。看我文章和视频的各位大佬们8成以上都是 PHPer 吧,要做 PHP ,FastCGI 的配置就少不了。CGI 、FastCGI 、PHP-FPM 这些概念,咱们在很早之前的 了解PHP-FPMhttps://mp.weixin.qq.com/s/NUpDnfYfbPuWmal4Am3lsg 这篇文章中就学习过了。不记得的小伙伴可以回去看下哦,如果感觉说得太简单了,大家还可以去自己搜索一下相关的资料。
硬核项目经理
2023/09/07
2.4K0
【Nginx19】Nginx学习:FastCGI模块(一)基础配置
NGINX 配置文件 fastcgi_pass
语法:fastcgi_pass fastcgi-server 默认值:none 使用字段:http, server, location 指定FastCGI服务器监听端口与地址,可以是本机或者其它:
用户5640963
2019/07/26
4.1K0
【Nginx20】Nginx学习:FastCGI模块(二)缓存配置
通过上篇文章的学习,普通的 PHP 与 Nginx 的连接就已经没啥大问题了。一般的网站直接那套配置就够了,这也是 Nginx 非常友好的一面。很多在默认的配置文件中注释掉的内容,只要打开就是可以直接使用的。不过,FastCGI 可不是一个小模块,还有很多的配置指令,要想深入,要想调优,这些指令还是多少要了解一下的。
硬核项目经理
2023/09/07
5050
【Nginx20】Nginx学习:FastCGI模块(二)缓存配置
解决windows+nginx下 PHP-CGI 进程崩溃问题
本地开发系统使用的是windows系统下,配置的 nginx+php,在使用过程中总是出现崩溃现象,网上搜解决办法时,很多网友说是PHP-CGI 进程崩溃 造成的,当 php-cgi 处理php 达到500次,就自动关闭。也给出了解决办法。
Power
2023/02/28
2K0
点击加载更多

相似问题

FastCGI + Wordpress + NGINX

10

Nginx + fastcgi截断问题

62

Mono和FastCGI/Nginx的ScriptMethod问题

11

Nginx、sendfile和FastCGI

14

nginx、fastcgi和502错误与派生问题

10
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档