{"id":269873,"date":"2023-04-20T04:10:51","date_gmt":"2023-04-19T20:10:51","guid":{"rendered":"https:\/\/lrxjmw.cn\/txyfwqczxxgf.html"},"modified":"2023-04-20T04:10:51","modified_gmt":"2023-04-19T20:10:51","slug":"txyfwqczxxgf","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/txyfwqczxxgf.html","title":{"rendered":"\u817e\u8baf\u4e91\u670d\u52a1\u5668\uff1aCentos7.6\u81ea\u884c\u4fee\u6539\u65b9\u62ec\u53f7\u91cc\u7684\u5185\u6838\u7248\u672c\u53f7"},"content":{"rendered":"

\u672c\u7ae0\u4e3b\u8981\u8bb2\u89e3\u5b9e\u9645\u64cd\u4f5c\u6b65\u9aa4\uff0c\u5177\u4f53\u7406\u8bba\u77e5\u8bc6\u53ef\u4ee5\u81ea\u884c\u767e\u5ea6<\/p>\n

linux\u5185\u6838\u5b98\u7f51\u4e0b\u8f7d\uff1a<\/p>\n

\uff08\u5982\u56fe\uff09<\/p>\n

\u672c\u4eba\u63d2\u4e00\u6bb5\uff1a\u7f51\u7ad9\u7684\u5185\u6838\u90fd\u771f\u6700\u65b0\u7684\uff0c\u4f60\u8981\u5c31\u5185\u6838\uff0c\u53ea\u80fd\u7528\u94fe\u63a5\u7684\u65b9\u5f0f\uff1a<\/p>\n

\u3010x.x\u3011\/linux-\u3010x.x.x\u3011.tar.xz<\/p>\n

\u81ea\u884c\u66f4\u6539\u65b9\u62ec\u5f27\u91cc\u7684\u5185\u6838\u7248\u672c\u53f7\uff0c\u6539\u540e\u9664\u53bb\u65b9\u62ec\u5f27\uff0c\u53ea\u8981\u6709\u5c31\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u3002<\/p>\n

\u4f9d\u7167\u5b98\u7f51\u53d1\u5e03\u7684\u4fe1\u606f\u5256\u6790\uff0c\u76ee\u524d\u6700\u65b0\u7684\u662f2020-12-27\u51fa\u76845.11\u7248\u672c\uff0c\u4f46\u4e0d\u662f\u7a33\u5b9a\u7248\u672clinux\u5185\u6838\u5f00\u53d1\u5305<\/strong>\uff0c\u7a33\u70b9\u7248\u672c\u662f5.10.3\u548c5.9.16\uff1b\u4f9d\u7167\u56fe\u4e0a\u53ef\u4ee5\u770b\u51fa\uff0c5.9.16\u65e9\u5df2\u4e0d\u652f\u6301\u4e86\uff08\u505c\u6b62\u66f4\u65b0\u4e86\uff09\uff0c\u76ee\u524d\u6700\u65b0\u800c\u4e14\u7a33\u5b9a\u7684\u53ea\u67095.10.3\u3002<\/p>\n

\u672c\u7ae0-\u535a\u4e3b\u5c06\u4e0b\u8f7dlinux-4.19.163\u8fdb\u884c\u64cd\u4f5c\u7f16\u8bd1\uff08\u4e0d\u5efa\u8bae\u76f4\u63a5\u4f7f\u7528\u6700\u65b0\u7684\uff0c\u7a33\u5b9a\u4e14\u5e94\u7528\u5e7f\u6cdb\u7684\u5e94\u5f53\u662f\u6700\u9002\u5b9c\u7684\uff09<\/p>\n

\u8fd9\u513f\u6211\u4f7f\u7528\u7684\u662f\u817e\u8baf\u4e91\u670d\u52a1\u5668\uff1aCentos7.6\uff08\u4e5f\u53ef\u4ee5\u4f7f\u7528VM\u5f00\u4e00\u53f0\u865a\u62df\u673a,c\u76d8\u6700\u597d\u662f40G\u4ee5\u4e0a\u7a7a\u95f4[0.0\u5185\u6838\u8d8a\u6765\u8d8a\u9ad8\uff0c\u7a7a\u95f4\u5360\u6bd4\u4e5f\u8d8a\u6765\u8d8a\u91cd!]\uff09<\/p>\n

\u6b65\u5165\u7cfb\u7edf<\/a>\u540e\uff0c\u5148\u4e0b\u8f7d4.19.163\u7684\u6e90\u7801\u5305<\/p>\n

\n

#wget https:\/\/cdn.kernel.org\/pub\/linux\/kernel\/v4.x\/linux-4.19.163.tar.xz\n<\/code><\/pre>\n<\/p>\n

\u4e0b\u8f7d\u5b8c\u6bd5\u540e\uff0c\u5c06\u5305\u89e3\u538b\u5230\/usr\/src\/\u4e0b\uff08\u8fd9\u513f\u89e3\u538b\u5230\u90a3\u91cc\u90fd\u884c\uff0c\u4e2a\u4eba\u4e60\u60ef\u89e3\u538b\u5230\u6b64\u4f4d\u7f6e\uff09<\/p>\n

linux\u5185\u6838\u5f00\u53d1\u6559\u7a0b_linux\u5185\u6838\u5f00\u53d1\u5305_\u5b89\u5353\u5185\u6838\u548clinux\u5185\u6838<\/p>\n

\n

#tar xvf linux-4.19.163.tar.xz -C \/usr\/src\/\n<\/code><\/pre>\n<\/p>\n

cd\u5230\u89e3\u538b\u76ee\u5f55\u4e0b\uff0c\u6b65\u5165\u89e3\u538b\u51fa\u7684\u76ee\u5f55\u91cc<\/p>\n

\n

#cd \/usr\/src\/linux-4.19.163\n<\/code><\/pre>\n<\/p>\n

\u56fe\u5f62\u5316\u754c\u9762\u67e5\u770b\u7f16\u8bd1\u5185\u5bb9\uff0c\u53ef\u8c03\u8bd5<\/p>\n

\n

# make menuconfig\n<\/code><\/pre>\n<\/p>\n

\u8fd9\u79cd\u90fd\u662f\u5185\u6838\u4e2d\u7684\u6a21\u5757\uff0c\u6211\u4eec\u968f\u610f\u9009\u4e00\u9879\u8fdb\u884c\u89e3\u6790\uff1a\u9009DeviceDrivers\uff08\u8bbe\u5907\u9a71\u52a8\uff09<\/p>\n

\u4f1a\u89c1\u5230\u56fe\u4e0a<\/p>\n

1.\u5e26*\u53f7\u7684\u884c\uff0c\u662f\u9009\u4e2d\u7684\u610f\u601d\uff0c\u4e5f\u5c31\u662flinux\u7cfb\u7edf\u7f16\u7a0b\uff0c\u6211\u4eec\u5c06\u628a\u8fd9\u4e2a\u9a71\u52a8\u6a21\u5757\u7f16\u8bd1\u5230\u5185\u6838\u4e2d\u53bb\u3002<\/p>\n

2.\u5e26M\u53f7\u7684\u610f\u8bc6\u662f\uff0c\u5b83\u5c06\u4ee5\u4e00\u4e2a\u6a21\u5757\u5f62\u5f0f\u5b58\u5728\u3002<\/p>\n

\u5b89\u5353\u5185\u6838\u548clinux\u5185\u6838_linux\u5185\u6838\u5f00\u53d1\u5305_linux\u5185\u6838\u5f00\u53d1\u6559\u7a0b<\/p>\n

3.\u4e3a\u7a7a[]\u7684\uff0c\u610f\u601d\u662f\u6ca1\u6709\u4f7f\u7528\u6b64\u529f\u80fd\u3002<\/p>\n

\uff08\u5b9e\u9645\u5728\u4e00\u4e9b\u505a\u5d4c\u5165\u5f0f\u7cfb\u7edf\u5de5\u4f5c\u4e2d\uff0c\u4f1a\u4f9d\u7167\u987b\u8981\uff0c\u9009\u62e9\u6781\u5c11\u7684\u529f\u80fd\uff0c\u9009\u7684\u8d8a\u5c11\uff0c\u542f\u52a8\u8d8a\u5feb\uff0c\u4e5f\u4f1a\u76f8\u5bf9\u7a33\u5b9a\uff09<\/p>\n

\u8fd9\u513f\u6211\u4eec\u4e0d\u505a\u6539\u52a8linux\u5185\u6838\u5f00\u53d1\u5305<\/strong>\uff0c\u9ed8\u8ba4\u5373\u53ef\uff0c\u9000\u51fa\u540e\u7ea2\u65d7linux\u4e0b\u8f7d\uff0c\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u5f00\u59cb\u7f16\u8bd1<\/p>\n

\n

#make &&  make bzImage         (\u65f6\u95f4\u8f83\u957f\u53ef\u4ee5\uff0c\u6839\u636e\u81ea\u5df1\u7cfb\u7edf\u914d\u7f6e\u60c5\u51b5\u53ef\u4ee5\u9009\u7528 # make  -j4)           #\u7f16\u8bd1\u5b89\u88c5\n#make modules_install               #\u52a0\u8f7d\u6a21\u5757\n#make install                                #\u6700\u540e\u4e00\u6b65\u5b89\u88c5kernel\n<\/code><\/pre>\n<\/p>\n

\u8fd9\u513f\u5b8c\u6210\u540e\uff0c\u4f1a\u624b\u52a8\u5e2e\u6211\u4eec\u66f4\u6539\u597dgrub\u6587\u4ef6\u4fe1\u606f\uff0c\u4e0d\u7528\u81ea\u5df1\u518d\u505a\u66f4\u6539\u4e86<\/p>\n

\n

#reboot\n<\/code><\/pre>\n<\/p>\n

\u91cd\u542f\u673a\u5668\u5373\u53ef<\/p>\n

===============================================<\/p>\n

\u5982\u9700\u5236\u505aRPM\u5185\u6838\u5b89\u88c5\u5305\uff0c\u5c31\u4e0d\u987b\u8981\u8fd0\u884c\u4ee5\u4e0aMake\u6b65\u9aa4\uff0c\u89e3\u538b\u540e\u6b65\u5165\u76ee\u5f55<\/p>\n

\n

# make rpm \uff08\u65f6\u95f4\u8f83\u957f\uff09\n<\/code><\/pre>\n<\/p>\n

\u5b8c\u6210\u540e\uff0crpm\u5305\u751f\u6210\u4f4d\u7f6e\uff08\u901a\u5e38\u4f1a\u5728\/root\/\u4e0b\uff09\uff1a<\/p>\n

\n

#  cd  \/root\/rpmbuild\/\n<\/code><\/pre>\n<\/p>\n

\u4e0d\u662f\u672c\u7ae0\u5185\u5bb9\uff0c\u8ffd\u5fc6\u8865\u5145\uff1a\u5de5\u4f5c\u4e2d\u987b\u8981\u5feb\u901f\u5e03\u7f72\uff0c\u4f46\u662f\u5f04\u6210rpm\u5305\uff0c\u4f7f\u7528fpm\u6765\u5f04\u6210rpm\u5305<\/p>\n

##fpm-sdir-trpm-n\u5305\u540d-v1.16.1-d\u2018\u90e8\u7f72\u987b\u8981\u7684\u4f9d\u8d56\u5305\uff0c\u4ee5\u201c,\u201d\u53f7\u9694\u5f00\u6dfb\u5165\u2019-f--post-install\u914d\u7f6e\u811a\u672c\u542f\u52a8\u811a\u672c<\/p>\n

\u6ca1\u6709\u5904\u7406\u4e0d\u4e86\u7684\u95ee\u9898\uff0c\u53ea\u6709\u4e0d\u80fd\u5904\u7406\u7684\u4eba<\/p>\n","protected":false},"excerpt":{"rendered":"

linux\u5185\u6838\u5b98\u7f51\u4e0b\u8f7d\uff1a\u81ea\u884c\u4fee\u6539\u65b9\u62ec\u53f7\u91cc\u7684\u5185\u6838\u7248\u672c\u53f7\uff0c\u6539\u540e\u53bb\u6389\u65b9\u62ec\u53f7\uff0c\u53ea\u8981\u6709\u5c31\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u3002163\u7684\u6e90\u7801\u5305\u56fe\u5f62\u5316\u754c\u9762\u67e5\u770b\u7f16\u8bd1\u5185\u5bb9\uff0c\u53ef\u8c03\u8bd5\u5e26*\u53f7\u7684\u884c\uff0c\u662f\u9009\u4e2d\u7684\u610f\u601d\uff0c\u4e5f\u5c31\u662f\uff0c\u6211\u4eec\u5c06\u628a\u8fd9\u4e2a\u9a71\u52a8\u6a21\u5757\u7f16\u8bd1\u5230\u5185\u6838\u4e2d\u53bb\u3002\u8fd9\u91cc\u6211\u4eec\u4e0d\u505a\u6539\u52a8\uff0c\u9ed8\u8ba4\u5373\u53ef\uff0c\u9000\u51fa\u540e\uff0c\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u5f00\u59cb\u7f16\u8bd1\u5982\u9700\u5236\u4f5cRPM\u5185\u6838\u5b89\u88c5\u5305\uff0c\u5c31\u4e0d\u9700\u8981\u8fd0\u884c\u4ee5\u4e0aMake\u6b65\u9aa4\uff0c\u89e3\u538b\u540e\u8fdb\u5165\u76ee\u5f55\u5b8c\u6210\u540e\uff0crpm\u5305\u751f\u6210\u4f4d\u7f6e\uff08\u4e00\u822c\u4f1a\u5728\/root\/\u4e0b\uff09\uff1a<\/p>\n","protected":false},"author":1,"featured_media":269874,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-269873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/269873","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=269873"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/269873\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/269874"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=269873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=269873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=269873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}