{"id":256225,"date":"2022-11-20T08:40:51","date_gmt":"2022-11-20T00:40:51","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=256225"},"modified":"2022-11-03T20:41:48","modified_gmt":"2022-11-03T12:41:48","slug":"ubuntu-makeinstall-linuxkernel-61rc2","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ubuntu-makeinstall-linuxkernel-61rc2.html","title":{"rendered":"Ubuntu\u7f16\u8bd1\u5b89\u88c5Linux kernel 6.1.0-rc3"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e3a\u4ec0\u4e48\u8981\u6298\u817e\u5b89\u88c5\u6700\u65b0\u7684\u5185\u6838\uff1f\u56e0\u4e3a\u5b83\u5c31\u5728\u90a3\u91cc<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u5b89\u88c5\u5fc5\u8981\u7684\u7f16\u8bd1\u73af\u5883<\/strong><\/div>\n
sudo apt update -y &&\r\nsudo apt install make gcc bc -y &&\r\nsudo apt install pkg-config libncurses-dev -y &&\r\nsudo apt install flex -y &&\r\nsudo apt install bison -y &&\r\nsudo apt install -y libncurses5-dev flex bison libssl-dev dpkg-dev libelf-dev&&\r\nsudo apt install -y wget curl &&\r\nsudo apt install fakeroot -y&&\r\nsudo apt install rsync kmod cpio -y<\/pre>\n
\n
\u4e0b\u8f7d\u6700\u65b0\u7684Linux Kernel6.1.0 rc3<\/strong><\/div>\n

\u4ecekernel.org\u4e0b\u8f7d6.1rc3 \u7684\u538b\u7f29\u5305\u6709220MB\uff0c\u7531\u4e8e\u56fd\u5185\u7f51\u7edc\u7684\u7279\u6b8a\u60c5\u51b5\u4e0b\u8f7d\u4f1a\u975e\u5e38\u7684\u6162\uff0c\u8bf7\u81ea\u5907\u52a0\u901f\u624b\u6bb5\u6216\u8005\u8010\u5fc3\u3002<\/p>\n

 wget https:\/\/git.kernel.org\/torvalds\/t\/linux-6.1-rc3.tar.gz<\/pre>\n
tar zxvf linux-6.1-rc3.tar.gz<\/pre>\n
cd linux-6.1-rc3<\/pre>\n

\u7f16\u8bd1\u5185\u6838\u9700\u8981\u786c\u76d850G\u5de6\u53f3\u7684\u7a7a\u95f4\uff01\uff01\uff01<\/code>
\n\u4ee5\u4e0b\u64cd\u4f5c\u5747\u5728 linux-6.1-rc2 \u76ee\u5f55\u4e2d\u8fdb\u884c\u3002<\/code><\/p>\n

\u751f\u6210.config\u6587\u4ef6<\/strong><\/div>\n

\u4f7f\u7528make menuconfig<\/code>\u547d\u4ee4\u751f\u6210.config\u6587\u4ef6\u3002\u4e0d\u660e\u767d\u88c1\u526a\u5185\u6838\u7684\u64cd\u4f5c\uff0c\u5728\u8fdb\u5165\u84dd\u8272\u80cc\u666f\u7684\u754c\u9762\u540e\uff0c\u76f4\u63a5\u53f3\u65b9\u5411\u952e\u9009\u62e9save\u5373\u53ef\uff0c\u4fdd\u6301\u9ed8\u8ba4\u914d\u7f6e\u3002\u7136\u540eexit\u9000\u51fa\u3002<\/p>\n

\"\"\"\" \"\" \"\" \"\"<\/p>\n<\/div>\n

\u4fee\u6539.config\u6392\u9519<\/strong><\/div>\n

\u8fd9\u6837\u9ed8\u8ba4\u751f\u6210\u7684.config\u6587\u4ef6\uff0c\u4f1a\u6709\u4e24\u4e2a\u53c2\u6570\u5e26\u503c\uff1aCONFIG_SYSTEM_TRUSTED_KEYS<\/code>\u548cCONFIG_MODULE_SIG_KEY<\/code>\u53ef\u80fd\u4f1a\u8ba9\u7f16\u8bd1\u51fa\u9519\u3002\u4fee\u6539.config\u6587\u4ef6\uff0c\u5c06\u8fd9\u4e24\u4e2a\u53c2\u6570\u7684\u503c\u7f6e\u7a7a\u3002
\n\"\" \"\" \"\"
\n\"\"<\/p>\n

\u7f16\u8bd1\u5b89\u88c5<\/strong><\/div>\n

\u4f7f\u7528make\u547d\u4ee4\u7f16\u8bd1\u3002make\u9ed8\u8ba4\u5355\u7ebf\u7a0b\u7f16\u8bd1\uff0c\u4f1a\u975e\u5e38\u6162\uff0c\u53ef\u4ee5\u52a0\u4e0a-j\u53c2\u6570\u6307\u5b9a\u7528\u51e0\u4e2aCPU\u6838\u5fc3\u7f16\u8bd1\uff0c-j4\u5c31\u662f\u75284\u4e2aCPU\u6838\u5fc3\uff0c-j8\u5c31\u662f\u75288\u4e2aCPU\u6838\u5fc3\u3002-j$(nproc)\u5c31\u662f\u7528\u4e0a\u6240\u6709\u7684CPU\u6838\u5fc3\u3002<\/p>\n

sudo make -j12 all \u6216\u8005\u7528 make -j$(nproc) all<\/pre>\n

\u5728make all\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u56e0\u4e3a\u5404\u79cd\u5404\u6837\u7684\u62a5\u9519\u4e2d\u65ad\u7f16\u8bd1\u3002\u4e0a\u9762\u7f6e\u7a7a\u4e24\u4e2a.config\u7684\u503c\u53ea\u662f\u76f8\u5bf9\u5e38\u89c1\uff0c\u8fd8\u6709\u597d\u591a\u56e0\u4e3a\u7f3a\u5c11\u5305\u5bfc\u81f4\u7684\u7f16\u8bd1\u62a5\u9519\uff0c\u9047\u5230\u62a5\u9519\u4ed4\u7ec6\u770b\uff0c\u4e0d\u61c2\u5c31\u767e\u5ea6\u8c37\u6b4c\u641c\u641c\uff0c\u975e\u5e38\u591a\u7684\u89e3\u51b3\u529e\u6cd5\u3002<\/p>\n

make\u5b89\u88c5\u6a21\u5757\u540e\uff0c\u4f7f\u7528make modules\u5b89\u88c5\u6a21\u5757\u3002<\/p>\n

sudo make INSTALL_MOD_STRIP=1 modules_install > \/dev\/null &&<\/pre>\n
sudo make modules_install<\/pre>\n

\u4f7f\u7528make\u5b89\u88c5\u7f16\u8bd1\u540e\u7684\u5185\u6838\u3002<\/p>\n

sudo make install<\/pre>\n

\u66f4\u65b0GRUB\uff0c\u5e94\u7528\u4e0a\u6700\u65b0\u76846.1rc3\u5185\u6838\u3002<\/p>\n

sudo update-grub<\/pre>\n

\"\"
\n\"\"<\/p>\n

\u7f16\u8bd1\u51fa\u6765deb\u5305<\/strong><\/div>\n

\u5982\u679c\u60f3\u5236\u4f5cdeb\u5305,\u5728\u5176\u4ed6\u7684Ubuntu\u7cfb\u7edf\u4e0a\u514d\u53bb\u7f16\u8bd1\u76f4\u63a5\u5b89\u88c56.1\u5185\u6838\u3002\u5728\u5f53\u524d\u76ee\u5f55\u4f7f\u7528 make -j$(nproc) deb-pkg <\/code>\u547d\u4ee4\uff0c\u547d\u4ee4\u8dd1\u5b8c\u4f1a\u5728\u4e0a\u5c42\u76ee\u5f55\u751f\u6210\u51e0\u4e2a\u6587\u4ef6\uff0c\u5176\u4e2d\u540e\u7f00\u662f.deb\u7684\u4e09\u4e2a\u5305\u5c31\u662f\u6211\u4eec\u9700\u8981\u7684\u3002\u8fd9\u4e09\u4e2a\u6587\u4ef6\u590d\u5236\u5230\u5176\u4ed6\u7684Ubuntu\u7cfb\u7edf\u4e0a\uff0c\u76f4\u63a5\u5168\u90e8\u5b89\u88c5\u5c31\u53ef\u4ee5\u4e86\uff1aapt install .\/linux*.deb -y<\/code>
\n\"\"
\n\u8fd9\u4e2a\u662f\u6211\u7f16\u8bd1\u7684\u9002\u7528\u4e8edebian11\/ubuntu\u7684Linux kernel6.1\u7684deb\u5b89\u88c5\u5305\uff0chttps:\/\/www.123pan.com\/s\/8KbDVv-eC4JA \u3002\u76f4\u63a5\u5b89\u88c5\u91cd\u542f\u5c31\u53ef\u4ee5\u4f7f\u7528\u3002\u4e0d\u505a\u4efb\u4f55\u53ef\u9760\u6027\u4fdd\u8bc1\uff0c\u8bf7\u907f\u514d\u5728\u751f\u4ea7\u673a\u5668\u4e0a\u4f7f\u7528\u3002<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"

sudo apt update -y && sudo apt install make gcc […]<\/p>\n","protected":false},"author":362,"featured_media":256510,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-256225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/256225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=256225"}],"version-history":[{"count":34,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/256225\/revisions"}],"predecessor-version":[{"id":256861,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/256225\/revisions\/256861"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/256510"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=256225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=256225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=256225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}