{"id":295536,"date":"2025-01-13T04:04:43","date_gmt":"2025-01-12T20:04:43","guid":{"rendered":"https:\/\/lrxjmw.cn\/xjrhjmkwjbyd.html"},"modified":"2025-01-13T04:04:43","modified_gmt":"2025-01-12T20:04:43","slug":"xjrhjmkwjbyd","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/xjrhjmkwjbyd.html","title":{"rendered":"\u8be6\u89e3\u5982\u4f55\u5c06\u6a21\u5757\u6587\u4ef6\u7f16\u8bd1\u5230Linux\u5185\u6838\u6216\u72ec\u7acb\u7f16\u8bd1\u6210ko\u6587\u4ef6"},"content":{"rendered":"

\n

linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1
<\/p><\/pre>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p><\/pre>\n


<\/span><\/p><\/span><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/section><\/h1><\/pre>\n<\/p>\n

\u597d\u591a\u7c89\u4e1d\u63d0\u95ee\uff0c\u600e\u6837\u628a\u4e00\u4e2a\u6a21\u5757\u6587\u4ef6\u7f16\u8bd1\u5230\u5185\u6838\u4e2d\u6216\u5219\u72ec\u7acb\u53d8\u5f02\u6210ko\u6587\u4ef6\u3002\u672c\u6587\u7ed9\u4f60\u4eec\u89e3\u8bfb\u8bb2\u89e3\u3002<\/p>\n

1.\u5185\u6838\u76ee\u5f55<\/p>\n

Linux<\/a>\u5185\u6838\u6e90\u4ee3\u7801\u5341\u5206\u5e9e\u5927\uff0c\u968f\u7740\u7248\u672c\u7684\u53d1\u5c55\u4e0d\u65ad\u964d\u4f4e\u3002\u5b83\u4f7f\u7528\u76ee\u5f55\u6811\u7ed3\u6784\uff0c\u4f46\u662f\u4f7f\u7528Makefile\u7ec4\u7ec7\u914d\u7f6e\u3001\u7f16\u8bd1\u3002<\/p>\n

\u521d\u6b21\u63a5\u89e6Linux\u5185\u6838<\/a>\u7ea2\u65d7linux6.0\uff0c\u597d\u4ed4\u7ec6\u9605\u8bfb\u9876\u697c\u76ee\u5f55\u7684readme\u6587\u4ef6\uff0c\u5b83\u662fLinux\u5185\u6838\u7684\u6982\u8ff0\u548c\u7f16\u8bd1\u547d\u4ee4<\/a>\u8bf4\u660e\u3002readme\u7684\u8bf4\u660e\u7740\u91cd\u4e8eX86\u7b49\u901a\u7528\u7684\u5e73\u53f0\uff0c\u5bf9\u4e8e\u4e2a\u522b\u7279\u6b8a\u7684\u4f53\u7cfb\u7ed3\u6784\uff0c\u53ef\u80fd\u6709\u4e9b\u7279\u6b8a\u7684\u8bf4\u660e\u3002<\/p>\n

\u9876\u697c\u76ee\u5f55\u7684Makefile\u662f\u6574\u4e2a\u5185\u6838\u914d\u7f6e\u7f16\u8bd1\u7684\u6838\u5fc3\u6587\u4ef6\uff0c\u8d1f\u8d23\u7ec4\u7ec7\u76ee\u5f55\u6811\u4e2d\u5b50\u76ee\u5f55\u7684\u7f16\u8bd1\u7ba1\u7406\uff0c\u8fd8\u53ef\u4ee5\u8bbe\u7f6e\u4f53\u7cfb\u7ed3\u6784\u548c\u7248\u672c\u53f7\u7b49\u3002<\/p>\n

\u5185\u6838\u6e90\u7801\u7684\u9876\u697c\u6709\u8bb8\u591a\u5b50\u76ee\u5f55\uff0c\u5206\u522b\u7ec4\u7ec7\u50a8\u5b58\u5404\u7c7b\u5185\u6838\u5b50\u7cfb\u7edf\u6216\u5219\u6587\u4ef6\u3002\u5177\u4f53\u7684\u76ee\u5f55\u8bf4\u660e\u5982\u4e0b\u8868\u6240\u793a\u3002<\/p>\n

\u76ee\u5f55\u5185\u5bb9<\/p>\n

arch\/<\/p>\n

\u4f53\u7cfb\u7ed3\u6784\u76f8\u5173\u7684\u4ee3\u7801\uff0c\u5982arch\/i386\u3001arch\/arm\u3001arch\/ppc<\/p>\n

crypto<\/p>\n

\u5e38\u7528\u52a0\u5bc6\u548c\u6563\u5217\u7b97\u6cd5\uff08\u5982AES\u3001SHA\u7b49\uff09\uff0c\u4ee5\u53ca\u4e00\u4e9b\u538b\u7f29\u548cCRC\u6821\u9a8c\u7b97\u6cd5<\/p>\n

drivers\/<\/p>\n

\u5404\u7c7b\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\uff0c\u5982drivers\/char\u3001drivers\/block\u2026\u2026<\/p>\n

documentation\/<\/p>\n

\u5185\u6838\u6587\u6863<\/p>\n

fs\/<\/p>\n

\u6587\u4ef6\u7cfb\u7edf\uff0c\u5982fs\/ext3\u3001fs\/jffs2\u2026\u2026<\/p>\n

include\/<\/p>\n

\u5185\u6838\u5934\u6587\u4ef6\uff1ainclude\/asm\u662f\u4f53\u7cfb\u7ed3\u6784\u76f8\u5173\u7684\u5934\u6587\u4ef6\uff0c\u5b83\u662finclude\/asm-arm\u3001include\/asm-i386\u7b49\u76ee\u5f55\u7684\u94fe\u63a5\uff1binclude\/linux\u662fLinux\u5185\u6838\u57fa\u672c\u7684\u5934\u6587\u4ef6<\/p>\n

init\/<\/p>\n

Linux\u521d\u59cb\u5316linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/strong>\uff0c\u5982main.c<\/p>\n

ipc\/<\/p>\n

\u8fdb\u7a0b\u95f4\u901a\u8baf\u7684\u4ee3\u7801<\/p>\n

kernel\/<\/p>\n

Linux\u5185\u6838\u6838\u5fc3\u4ee3\u7801\uff08\u8fd9\u90e8\u4efd\u6bd4\u8f83\u5c0f\uff09<\/p>\n

lib\/<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

\u5404\u7c7b\u5e93\u5b50\u7a0b\u5e8f\uff0c\u5982zlib\u3001crc32<\/p>\n

mm\/<\/p>\n

\u663e\u5b58\u7ba1\u7406\u4ee3\u7801<\/p>\n

net\/<\/p>\n

\u7f51\u8def\u652f\u6301\u4ee3\u7801\uff0c\u4e3b\u8981\u662f\u7f51\u8def\u5408\u540c<\/p>\n

sound<\/p>\n

\u58f0\u97f3\u9a71\u52a8\u7684\u652f\u6301<\/p>\n

scripts\/<\/p>\n

\u5185\u90e8\u6216\u5219\u5916\u90e8\u4f7f\u7528\u7684\u811a\u672c<\/p>\n

usr\/<\/p>\n

\u7528\u6237\u7684\u4ee3\u7801<\/p>\n

2.\u7f16\u8bd1\u5de5\u5177<\/p>\n

makemrproper:\u6d88\u9664\u5185\u6838\u751f\u6210\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u76ee\u6807\u6587\u4ef6\u7b49\uff0c\u901a\u5e38\u5728\u7b2c\u4e00\u6b21\u7f16\u8bd1\u65f6\u4f7f\u7528<\/p>\n

\u5bfc\u51fa\u9ed8\u8ba4\u914d\u7f6e\u4fe1\u606f(\u5728\u5185\u6838\u6839\u76ee\u5f55\u4e2d)<\/p>\n

\n

<\/span>a)\u00a0make\u00a0xxx_deconfig
b)\u00a0cp\u00a0arch\/arm\/configs\/xx_deconfig\u00a0\u00a0.config
\u751f\u6210\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6
<\/code><\/pre>\n<\/p>\n

\u914d\u7f6e\u547d\u4ee4<\/p>\n

\n

<\/span>make\u00a0xxxxconfig\u00a0\u00a0\u4fee\u6539\u914d\u7f6e\u6587\u4ef6
make\u00a0xconfig\u00a0(\u56fe\u5f62\u754c\u9762\u00a0qt\u5e93)
make\u00a0menuconfig\u00a0(\u5e38\u7528\u00a0libncurses\u5e93)
sudo\u00a0apt-get\u00a0install\u00a0libncurses5-dev
make\u00a0config\u00a0(\u7cbe\u7b80)
<\/code><\/pre>\n<\/p>\n

\u7f16\u8bd1\u5185\u6838<\/p>\n

\n

<\/span>make\u00a0uImage\u00a0---\u751f\u6210\u5185\u6838\u955c\u50cf\u00a0\u00a0\/arch\/arm\/boot\/uImage
<\/code><\/pre>\n<\/p>\n

\u7f16\u8bd1\u8bbe\u5907\u6811<\/p>\n

\n

<\/span>make\u00a0dtbs\u00a0---\u751f\u6210\u8bbe\u5907\u6811\u6587\u4ef6\u00a0\u00a0\/arch\/arm\/boot\/dtb\/xxxxxx.dtb
<\/code><\/pre>\n<\/p>\n

\u7f16\u8bd1\u751f\u6210\u6a21\u5757\u6587\u4ef6<\/p>\n

\n

<\/span>make modules ---\u628a\u914d\u7f6e\u503c\u9009\u6210M\u7684\u4ee3\u7801\u7f16\u8bd1\u751f\u6210\u6a21\u5757\u6587\u4ef6\u3002\uff08.ko)\u00a0\u00a0\u653e\u5728\u5bf9\u5e94\u7684\u6e90\u7801\u76ee\u5f55\u4e0b\u3002
<\/code><\/pre>\n<\/p>\n

3.\u5185\u6838\u7f16\u8bd1<\/p>\n

\u5982\u4eca\u597d\u591a\u57fa\u4e8eLinux\u7684\u4ea7\u54c1\u5f00\u53d1\uff0c\u4e00\u822c\u5382\u5bb6\u5c31\u4f1a\u63d0\u4f9b\u96c6\u6210\u5f00\u53d1\u73af\u5883SDK\u3002builroot\u4f7f\u6211\u4eec\u642d\u5efa\u73af\u5883\u663e\u5f97\u6108\u53d1\u4fbf\u6377\uff0c\u5e76\u4e14\u4f5c\u4e3a\u521d\u5b66\u8005\u6211\u4eec\u8fd8\u662f\u8981\u628a\u63e1\u600e\u4e48\u72ec\u7acb\u7f16\u8bd1\u5185\u6838\u6e90\u7801\u3002<\/p>\n

0\uff09\u524d\u63d0\u6761\u4ef6<\/p>\n

linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

\u5fc5\u987b\u5148\u5b89\u88c5\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\uff0c\u5173\u4e8e\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\u7684\u5b89\u88c5\u53ef\u4ee5\u53c2\u8003\u300alinux\u73af\u5883\u642d\u5efa-ubuntu16.04\u5b89\u88c5\u300b<\/p>\n

\u5728\u8fd9\u513f\u6211\u4eec\u4f7f\u7528\u7684\u662farm-none-linux-gnueabi-gcc\u3002<\/p>\n

1\uff09\u4e0b\u8f7d\u5185\u6838\u6e90\u7801<\/p>\n

\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n

\u6211\u4eec\u4e0b\u8f7dLinux-3.14\u5185\u6838\uff08\u53ef\u4ee5\u662f\u66f4\u9ad8\u7684\u7248\u672c\uff09\u81f3\/home\/peng\u76ee\u5f55\u3002<\/p>\n

\u6216\u5219\u76f4\u63a5\u70b9\u51fb\u4e0b\u8fb9\u94fe\u63a5<\/p>\n

\u89e3\u5f00\u538b\u7f29\u5305\uff0c\u5e76\u6b65\u5165\u5185\u6838\u6e90\u7801\u76ee\u5f55\uff0c\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n

\n

<\/span>$\u00a0tar\u00a0\u00a0xvf\u00a0\u00a0linux-3.14.tar.xz
$\u00a0cd<\/span>\u00a0\u00a0linux-3.14
<\/code><\/pre>\n<\/p>\n

2\uff09\u66f4\u6539\u5185\u6838\u76ee\u5f55\u6811\u679d\u4e0b\u7684Makefile\uff0c\u6307\u660e\u4ea4\u53c9\u7f16\u8bd1\u5668\uff1a<\/p>\n

\n

<\/span>\u00a0\u00a0\u00a0$\u00a0vim\u00a0Makefile
<\/code><\/pre>\n<\/p>\n

\u627e\u5230ARCH\u548cCROSS_COMPILE\uff0c\u66f4\u6539\uff1a<\/p>\n

\n

<\/span>ARCH\u00a0\u00a0?=\u00a0$(SUBARCH)
CROSS_COMPILE\u00a0?=\u00a0$(CONFIG_CROSS_COMPILE:\"%\"<\/span>=%)
<\/code><\/pre>\n<\/p>\n

\u4e3a<\/p>\n

\n

<\/span>ARCH\u00a0\u00a0?=\u00a0arm
CROSS_COMPILE\u00a0?=\u00a0arm-none-linux-gnueabi-
<\/code><\/pre>\n<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

4\uff09\u914d\u7f6e\u5185\u6838\u5f62\u6210.config\u6587\u4ef6\uff1a<\/p>\n

\u5bfc\u51fa\u9ed8\u8ba4\u914d\u7f6e<\/p>\n

\n

<\/span>$\u00a0make\u00a0\u00a0exynos_defconfig
<\/code><\/pre>\n<\/p>\n

\u8fd9\u513f\u6211\u4eec\u5047\u8bbe\u8981\u7f16\u8bd1\u7684\u5185\u6838\u6700\u7ec8\u5728\u4e09\u661f\u7684\u677f\u5b50\u4e0a\u8fd0\u884cubuntu linux\uff0csoc\u540d\u5b50\u662fexynos\uff0c\u4e09\u661f\u516c\u53f8\u867d\u7136\u65e9\u5df2\u5c06\u81ea\u5df1\u7684\u914d\u7f6e\u6587\u4ef6\u653e\u7f6e\u5728.\/arch\/arm\/configs\/exynos_defconfig<\/p>\n

\u6267\u884c\u8fd9\u4e2a\u547d\u4ee4\uff0c\u6700\u7ec8\u4f1a\u5728\u5185\u6838\u6839\u76ee\u5f55\u4e0b\u751f\u6210.config\u6587\u4ef6\uff0c<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

\u6211\u4eec\u7f16\u8bd1\u5185\u6838\u5c31\u5b8c\u5168\u4f9d\u8d56\u8fd9\u4e2a\u6587\u4ef6\u3002\u8be5\u6587\u4ef6\u662fexynos\u5f00\u53d1\u677f\u6240\u987b\u8981\u7684\u4e00\u4e9b\u5185\u6838\u6a21\u5757\u5b8f\u5b9a\u4e49\u548c\u53c2\u6570\u8bbe\u7f6e\uff0c\u8fd9\u79cd\u503c\u662f\u5382\u5546\u7ed9\u7684\u4e00\u4e2a\u521d\u59cb\u914d\u7f6e\u3002\u5b9e\u9645\u9879\u76ee\u5f00\u53d1\u4e2d\uff0c\u987b\u8981\u5728\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u57fa\u7840\u4e4b\u4e0a\u518d\u91cd\u65b0\u79fb\u690d\u81ea\u5df1\u987b\u8981\u7684\u5bf9\u5e94\u7684\u9a71\u52a8\u6a21\u5757\u3002<\/p>\n

5\uff09\u914d\u7f6e\u5185\u6838\u6a21\u5757<\/p>\n

\u8f93\u5165\u5185\u6838\u914d\u7f6e\u547d\u4ee4\uff0c\u8fdb\u884c\u5185\u6838\u9009\u9879\u7684\u9009\u62e9\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n

\n

<\/span>$\u00a0make\u00a0menuconfig
<\/code><\/pre>\n<\/p>\n

\u547d\u4ee4\u6267\u884c\u6210\u529f\u4e4b\u540e\uff0c\u4f1a\u542c\u5230\u5982\u53f3\u56fe\u6240\u793a\u7684\u754c\u9762\u3002\u867d\u7136\u6211\u4eec\u5728\u56fe1.5\u4e2d\u89c1\u5230\u8fc7\u540c\u6837\u529f\u80fd\u7684\u754c\u9762\uff0c\u90a3\u79cd\u56fe\u4e5f\u662f\u5185\u6838\u9009\u9879\u914d\u7f6e\u754c\u9762\uff0c\u53ea\u4e0d\u8fc7\u90a3\u79cd\u754c\u9762\u5728X-window\u4e0b\u624d\u4f1a\u6267\u884c\u3002<\/p>\n

linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

\u5176\u4e2d\uff1a<\/p>\n

\u5b50\u83dc\u5355---><\/p>\n

\u8868\u793a\u6709\u5b50\u83dc\u5355\uff0c\u6309\u4e0b\u56de\u8f66\u53ef\u4ee5\u6b65\u5165\u5b50\u83dc\u5355\u3002<\/p>\n

\u4e2d\u62ec\u5f27[]\u5728\u6bcf\u4e00\u4e2a\u9009\u9879\u524d\u90fd\u6709\u4e2a\u62ec\u5f27\uff0c\u6709\u7684\u662f\u4e2d\u62ec\u5f27\uff0c\u6709\u7684\u662f\u5c16\u62ec\u5f27\uff0c\u8fd8\u6709\u7684\u662f\u5706\u62ec\u5f27\u3002<\/p>\n

[]\u8868\u793a\u8be5\u9009\u9879\u53ea\u6709\u4e24\u79cd\u9009\u9879\uff0c\u4e2d\u62ec\u5f27\u4e2d\u8981\u4e48\u662f\u7a7a\uff0c\u8981\u4e48\u662f\u201c*\u201d\uff1b<\/p>\n

\u7528\u7a7a\u683c\u952e\u53ef\u4ee5\u4f5c\u51fa\u9009\u62e9\u3002<\/p>\n

\u5c16\u62ec\u5f27<\/p>\n

\u9009\u62e9\u76f8\u5e94\u7684\u914d\u7f6e\u65f6\uff0c\u67093\u79cd\u9009\u62e9\uff0c\u5b83\u4eec\u4ee3\u8868\u7684\u6db5\u4e49\u5206\u522b\u5982\u4e0b\u3002<\/p>\n

\n

<\/span>\u25cf\u00a0*\uff1a\u5c06\u8be5\u529f\u80fd\u7f16\u8bd1\u8fdb\u5185\u6838\u3002
\u25cf\u00a0\u7a7a\uff1a\u4e0d\u5c06\u8be5\u529f\u80fd\u7f16\u8bd1\u8fdb\u5185\u6838\u3002
\u25cf M\uff1a\u5c06\u8be5\u529f\u80fd\u7f16\u8bd1\u6210\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u52a8\u6001\u63d2\u5165\u5230\u5185\u6838\u4e2d\u7684\u6a21\u5757\u3002
<\/code><\/pre>\n<\/p>\n

\u6a21\u5757\u914d\u7f6e\u5706\u62ec\u5f27()\u800c\u5706\u62ec\u5f27\u7684\u5185\u5bb9\u662f\u8981\u4f60\u5728\u6240\u63d0\u4f9b\u7684\u51e0\u4e2a\u9009\u9879\u4e2d\u9009\u62e9\u4e00\u9879\u3002<\/p>\n

\u5047\u5982\u4f7f\u7528\u7684\u662fmakexconfig\uff0c\u4f7f\u7528\u952e\u76d8\u5c31\u53ef\u4ee5\u9009\u62e9\u5bf9\u5e94\u7684\u9009\u9879\u3002\u5047\u5982\u4f7f\u7528\u7684\u662fmakemenuconfig\uff0c\u5219\u987b\u8981\u4f7f\u7528\u56de\u8f66\u952e\u8fdb\u884c\u9009\u5b9a\u3002<\/p>\n

\u5728\u7f16\u8bd1\u5185\u6838\u7684\u8fc7\u7a0b\u4e2dlinux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/strong>\uff0c\u9ebb\u70e6\u7684\u4e8b\u60c5\u5c31\u662f\u914d\u7f6e\u8fd9\u6b65\u5de5\u4f5c\u4e86\u3002\u521d\u6b21\u63a5\u89e6Linux\u5185\u6838\u7684\u5f00\u53d1\u8005\u5e38\u5e38\u5f04\u4e0d\u6e05\u695a\u8be5\u600e\u4e48\u9009\u5b9a\u8fd9\u79cd\u9009\u9879\u3002<\/p>\n

\u5b9e\u9645\u4e0a\uff0c\u5728\u914d\u7f6e\u65f6\uff0c\u5927\u90e8\u4efd\u9009\u9879\u53ef\u4ee5\u4f7f\u7528\u5176\u9ed8\u8ba4\u503c\uff0c\u53ea\u6709\u5c0f\u90e8\u4efd\u987b\u8981\u4f9d\u7167\u7528\u6237\u4e0d\u540c\u7684\u987b\u8981\u9009\u62e9\u3002<\/p>\n

\u9009\u62e9\u7684\u539f\u5219\u662f\u5c06\u4e0e\u5185\u6838\u5176\u4ed6\u90e8\u4efd\u5173\u7cfb\u8f83\u8fdc\u4e14\u4e0d\u65f6\u5e38\u4f7f\u7528\u7684\u90e8\u4efd\u529f\u80fd\u4ee3\u7801\u7f16\u8bd1\u6210\u4e3a\u53ef\u52a0\u8f7d\u6a21\u5757\uff0c\u8fd9\u6709\u5229\u4e8e\u964d\u4f4e\u5185\u6838\u7684\u5bbd\u5ea6\uff0c\u964d\u4f4e\u5185\u6838\u6d88\u8017\u7684\u663e\u5b58\uff0c\u7b80\u5316\u8be5\u529f\u80fd\u76f8\u5e94\u7684\u73af\u5883\u6539\u53d8\u65f6\u5bf9\u5185\u6838\u7684\u5f71\u54cd\uff1b\u4e0d\u987b\u8981\u7684\u529f\u80fd\u5c31\u4e0d\u8981\u9009\uff1b\u4e0e\u5185\u6838\u5173\u7cfb\u7d27\u5bc6\u5e76\u4e14\u5e38\u5e38\u4f7f\u7528\u7684\u90e8\u4efd\u529f\u80fd\u4ee3\u7801\u76f4\u63a5\u7f16\u8bd1\u5230\u5185\u6838\u4e2d\u3002<\/p>\n

6\uff09\u7f16\u8bd1\u5185\u6838\uff1a<\/p>\n

\n

<\/span>root@ubuntu:\/home\/peng\/linux-3.14<\/span>#\u00a0make\u00a0uImage<\/span>
<\/code><\/pre>\n<\/p>\n

uImage<\/p>\n

\u5018\u82e5\u4f9d\u7167\u9ed8\u8ba4\u7684\u914d\u7f6e\uff0c\u6ca1\u6709\u6539\u52a8\u7684\u8bdd\uff0c\u7f16\u8bd1\u540e\u7cfb\u7edf\u4f1a\u5728arch\/arm\/boot\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2auImage\u6587\u4ef6\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5c31\u662f\u521a\u624d\u751f\u6210\u7684\u3002<\/p>\n

7\uff09\u4e0b\u8f7dLinux\u5185\u6838<\/p>\n

linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

\u7531\u4e8e\u4e0d\u540c\u7684\u677f\u5b50\u5bf9\u5e94\u7684uboot\u7248\u672c\u90fd\u4e0d\u4e00\u6837\uff0c\u6240\u4ee5\u4e0b\u8f7d\u7a0b\u5e8f\u7684uboot\u547d\u4ee4\u4e5f\u4f1a\u6709\u6240\u5dee\u522b\uff0c\u5173\u4e8e\u9a8c\u8bc1\uff0c\u672c\u6587\u6682\u4e0d\u8ba8\u8bba\u3002<\/p>\n

4.\u72ec\u7acb\u9a71\u52a8\u7a0b\u5e8f\u7684\u7f16\u8bd11.\u7f16\u8bd1\u6210\u72ec\u7acb\u6a21\u5757<\/p>\n

\u5047\u8bbe\u6211\u4eec\u6709\u4ee5\u4e0b\u9a71\u52a8\u7a0b\u5e8f,\u8981\u7f16\u8bd1\u6210\u53ef\u4ee5\u52a0\u8f7d\u5230\u5f00\u53d1\u677f\u7684\u72ec\u7acbko\u6587\u4ef6<\/p>\n

hello.c<\/p>\n

\n

<\/span>#include<\/span>\u00a0<\/span><\/span>
#include<\/span>\u00a0<\/span><\/span>
#include<\/span>\u00a0<\/span><\/span>
#include<\/span>\u00a0<\/span><\/span>
#include<\/span>\u00a0<\/span><\/span>
\/\/#include\u00a0<\/span>
#include<\/span>\u00a0<\/span><\/span>
#include<\/span>\u00a0<\/a><\/span><\/span>
#include<\/span>\u00a0
<\/a><\/span><\/span>

static<\/span>\u00a0int<\/span>\u00a0major\u00a0=\u00a0237<\/span>;
static<\/span>\u00a0int<\/span>\u00a0minor\u00a0=\u00a00<\/span>;
static<\/span>\u00a0dev_t<\/span>\u00a0devno;
struct<\/span>\u00a0device<\/span>\u00a0*class_dev<\/span>\u00a0=\u00a0NULL<\/span>;<\/span>
struct<\/span>\u00a0class<\/span>\u00a0*cls<\/span>;<\/span>


static<\/span>\u00a0int<\/span>\u00a0hello_open<\/span>\u00a0(struct\u00a0inode\u00a0*inode,\u00a0struct\u00a0file\u00a0*filep)<\/span>
<\/span>{
\u00a0printk(\"hello_open()n\"<\/span>);
\u00a0return<\/span>\u00a00<\/span>;
}
static<\/span>\u00a0int<\/span>\u00a0hello_release<\/span>\u00a0(struct\u00a0inode\u00a0*inode,\u00a0struct\u00a0file\u00a0*filep)<\/span>
<\/span>{
\u00a0printk(\"hello_release()n\"<\/span>);

\u00a0return<\/span>\u00a00<\/span>;
}

#define<\/span>\u00a0KMAX_LEN\u00a032<\/span>
char<\/span>\u00a0kbuf[KMAX_LEN+1<\/span>]\u00a0=\u00a0\"kernel\"<\/span>;


\/\/read(fd,buff,40);<\/span>

static<\/span>\u00a0ssize_t<\/span>\u00a0hello_read<\/span>\u00a0(struct\u00a0file\u00a0*filep,\u00a0char<\/span>\u00a0__user\u00a0*buf,\u00a0size_t<\/span>\u00a0size,\u00a0loff_t<\/span>\u00a0*pos)<\/span>
<\/span>{
\u00a0int<\/span>\u00a0error;

\u00a0
\u00a0if<\/span>(size\u00a0>\u00a0strlen<\/span>(kbuf))
\u00a0{
\u00a0\u00a0size\u00a0=\u00a0strlen<\/span>(kbuf);
\u00a0}

\u00a0if<\/span>(copy_to_user(buf,kbuf,\u00a0size))
\u00a0{
\u00a0\u00a0error\u00a0=\u00a0-EFAULT;
\u00a0\u00a0return<\/span>\u00a0error;
\u00a0}

\u00a0return<\/span>\u00a0size;
}
\/\/write(fd,buff,40);<\/span>
static<\/span>\u00a0ssize_t<\/span>\u00a0hello_write<\/span>\u00a0(struct\u00a0file\u00a0*filep,\u00a0const<\/span>\u00a0char<\/span>\u00a0__user\u00a0*buf,\u00a0size_t<\/span>\u00a0size,\u00a0loff_t<\/span>\u00a0*pos)<\/span>
<\/span>{
\u00a0int<\/span>\u00a0error;

\u00a0if<\/span>(size\u00a0>\u00a0KMAX_LEN)
\u00a0{
\u00a0\u00a0size\u00a0=\u00a0KMAX_LEN;
\u00a0}
\u00a0memset<\/span>(kbuf,0<\/span>,sizeof<\/span>(kbuf));
\u00a0if<\/span>(copy_from_user(kbuf,\u00a0buf,\u00a0size))
\u00a0{
\u00a0\u00a0error\u00a0=\u00a0-EFAULT;
\u00a0\u00a0return<\/span>\u00a0error;
\u00a0}
\u00a0printk(\"%sn\"<\/span>,kbuf);
\u00a0return<\/span>\u00a0size;
}


static<\/span>\u00a0struct<\/span>\u00a0file_operations<\/span>\u00a0hello_ops<\/span>\u00a0=\u00a0
{<\/span>
\u00a0.open\u00a0=\u00a0hello_open,
\u00a0.release\u00a0=\u00a0hello_release,
\u00a0.read\u00a0=\u00a0hello_read,
\u00a0.write\u00a0=\u00a0hello_write,
};
static<\/span>\u00a0int<\/span>\u00a0hello_init<\/span>(void<\/span>)<\/span>
<\/span>{
\u00a0int<\/span>\u00a0result;
\u00a0
\u00a0printk(\"hello_init\u00a0n\"<\/span>);
\u00a0result\u00a0=\u00a0register_chrdev(\u00a0major,\u00a0\"hello\"<\/span>,\u00a0&hello_ops);
\u00a0if<\/span>(result\u00a0<\u00a00<\/span>)
\u00a0{
\u00a0\u00a0printk(\"register_chrdev\u00a0fail\u00a0n\"<\/span>);
\u00a0\u00a0return<\/span>\u00a0result;
\u00a0}
\u00a0cls\u00a0=\u00a0class_create(THIS_MODULE,\u00a0\"hellocls\"<\/span>);
\u00a0if<\/span>\u00a0(IS_ERR(cls))\u00a0{
\u00a0\u00a0printk(KERN_ERR\u00a0\"class_create()\u00a0failed\u00a0for\u00a0clsn\"<\/span>);
\u00a0\u00a0result\u00a0=\u00a0PTR_ERR(cls);
\u00a0\u00a0goto<\/span>\u00a0out_err_1;
\u00a0}
\u00a0devno\u00a0=\u00a0MKDEV(major,\u00a0minor);
\u00a0
\u00a0class_dev\u00a0=\u00a0device_create(cls,\u00a0NULL<\/span>,\u00a0devno,\u00a0NULL<\/span>,\u00a0\"hellodev\"<\/span>);
\u00a0if<\/span>\u00a0(IS_ERR(class_dev))\u00a0{
\u00a0\u00a0result\u00a0=\u00a0PTR_ERR(class_dev);
\u00a0\u00a0goto<\/span>\u00a0out_err_2;
\u00a0}
\u00a0
\u00a0return<\/span>\u00a00<\/span>;

out_err_2:
\u00a0class_destroy(cls);
out_err_1:
\u00a0unregister_chrdev(major,\"hello\"<\/span>);
\u00a0return<\/span>\u00a0\u00a0result;
}
static<\/span>\u00a0void<\/span>\u00a0hello_exit<\/span>(void<\/span>)<\/span>
<\/span>{
\u00a0printk(\"hello_exit\u00a0n\"<\/span>);
\u00a0device_destroy(cls,\u00a0devno);
\u00a0class_destroy(cls);
\u00a0unregister_chrdev(major,\"hello\"<\/span>);
\u00a0return<\/span>;
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE(\"GPL\"<\/span>);
\/\/proc\/devices<\/span>

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

\u6ce8\u610f\u6211\u4eec\u987b\u8981\u7f16\u64b0Makefile\u5982\u4e0b\uff1a<\/p>\n

\n

<\/span>ifneq\u00a0($(KERNELRELEASE),)
obj-m:=hello.o
else<\/span>
KDIR\u00a0:=\/home\/peng\/linux-3.14<\/span>
PWD\u00a0\u00a0:=$(shell\u00a0pwd)
all:
\u00a0make\u00a0-C\u00a0$(KDIR)\u00a0M=$(PWD)\u00a0modules
clean:
\u00a0rm\u00a0-f\u00a0*.ko\u00a0*.o\u00a0*.mod.o\u00a0*.symvers\u00a0*.cmd\u00a0\u00a0*.mod.c\u00a0*.order
endif
<\/code><\/pre>\n<\/p>\n

\u5173\u4e8eMakefile\u7684\u89e3\u8bfb\uff0c\u4f60\u4eec\u53ef\u4ee5\u53c2\u8003\u6211\u4eec\u4e4b\u524d\u7684\u6587\u7ae0\u300a\u624b\u628a\u624b\u6559Linux\u9a71\u52a81-\u6a21\u5757\u5316\u7f16\u7a0b\u300b\u5176\u4e2d\u5185\u6838\u8def\u5f84\uff1a<\/p>\n

\n

<\/span>KDIR\u00a0:=\/home\/peng\/linux-3.14<\/span>
<\/code><\/pre>\n<\/p>\n

\u5fc5\u987b\u662f\u6211\u4eec\u521a\u521a\u7f16\u8bd1\u8fc7\u7684\u5185\u6838\u6e90\u7801\u6839\u76ee\u5f55\u3002<\/p>\n

\u7f16\u8bd1\u65f6\uff0c\u7a0b\u5e8f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u76ee\u5f55\u4e0b\uff1a<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

\u7528file\u547d\u4ee4\u67e5\u770b\u6587\u4ef6\u5c5e\u6027\uff0c\u662f\u57fa\u4e8eARM\u7684\u3002\u8be5\u6a21\u5757\u6587\u4ef6\u5c31\u662f\u4e0e\u4e0a\u9762\u7f16\u8bd1\u7684\u5185\u6838\u914d\u5957\u7684\u9a71\u52a8\u6a21\u5757\uff0c\u5047\u5982\u5f00\u53d1\u677f\u7684\u5185\u6838\u7248\u672c\u4e0e\u524d\u9762\u7f16\u8bd1\u7684\u7248\u672c\u53f7\u4e00\u81f4\uff0c\u8fd9\u4e48\u8be5\u6a21\u5757\u6587\u4ef6\u5c31\u53ef\u4ee5\u5728\u5f00\u53d1\u677f\u4e0ainsmod\u3002<\/p>\n

2.\u7f16\u8bd1\u5230\u5185\u6838<\/p>\n

\u6b65\u9aa4\uff1a<\/p>\n

\u5b57\u7b26\u8bbe\u5907\u53ef\u4ee5\u8003\u8651\u653e\u5728\u4ee5\u4e0b\u76ee\u5f55\uff1a<\/p>\n

\n

<\/span>linux-3.14<\/span>\/drivers\/char<\/span>
<\/code><\/pre>\n<\/p>\n

\n

<\/span>root@ubuntu:\/home\/peng\/linux-3.14<\/span>\/drivers\/char<\/span>#\u00a0vim\u00a0Makefile\u00a0<\/span>
<\/code><\/pre>\n<\/p>\n

\u66f4\u6539\u5982\u4e0b\uff1a<\/p>\n

\u8be5\u884c\u5185\u5bb9\u662f\u4f9d\u636e\u5b8fCONFIG_HELLO\u6765\u51b3\u5b9a\u662f\u5426\u7f16\u8bd1hello.c\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

7HELLO\u53d6\u4e0a\u9762\u6b65\u9aa4CONFIG_HELLO\u987f\u53f7\u524d\u9762\u7684\u5b57\u7b26\u4e328tristate\u8868\u793a\u8be5\u6a21\u5757\u6700\u7ec8\u67093\u4e2a\u9009\u9879\u7a7a*M9\u8868\u793a\u8be5\u6a21\u5757\u4f9d\u8d56\u7684\u6a21\u5757\uff0c\u5047\u5982ARCH_EXYNOS4\u6a21\u5757\u6ca1\u6709\u88ab\u9009\u4e2d\uff0c\u8fd9\u4e48HELLO\u6a21\u5757\u4e5f\u4e0d\u4f1a\u88ab\u7f16\u8bd1\u5230\u5185\u683810\u5e2e\u52a9\u4fe1\u606f<\/p>\n

\n

<\/span>make\u00a0menuconfig
<\/code><\/pre>\n<\/p>\n

\u6b65\u5165\u914d\u7f6e\u9875\u9762\uff0c<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

\u8f93\u5165\/\u53ef\u4ee5\u6309\u7167\u5173\u952e\u5b57\u67e5\u627e\u6a21\u5757\u6240\u5728\u4f4d\u7f6e\u3002<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

\u6211\u4eec\u6dfb\u52a0\u7684\u6a21\u5757\u6587\u4ef6\u7684\u4f4d\u7f6e\uff1a<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

\u6309\u7167\u8def\u5f84<\/p>\n

\n

<\/span>->\u00a0Device\u00a0Drivers\u00a0
\u00a0\u00a0\u00a0->\u00a0Character\u00a0devices
<\/code><\/pre>\n<\/p>\n

\u627e\u5230\u6211\u4eec\u6628\u5929\u7684\u6a21\u5757\u914d\u7f6e\u8def\u5f84<\/p>\n

linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

\u6b64\u5904\u662f\u5c16\u62ec\u5f27\uff0c\u7531\u4e8e\u6211\u4eec\u8bbe\u7f6e\u7684\u5c5e\u6027\u662ftristate<\/p>\n

\u8054\u901a\u5230Help\u5904\uff0c\u53ef\u4ee5\u89c1\u5230\u4e0a\u9762\u6211\u4eec\u586b\u5145\u7684\u5e2e\u52a9\u4fe1\u606f<\/p>\n

\u6211\u4eec\u53ef\u4ee5\u6309\u4e0b\u7a7a\u683c\u952e\u8bbe\u7f6e\u4e3a*\uff0c\u7f16\u8bd1\u5230\u5185\u6838\u4e2d\u3002<\/p>\n

\u9009\u62e9Save\uff0c<\/p>\n

linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

\u4e4b\u540e\u518d\u70b9\u51fb2\u6b21Exit\uff0c\u5c31\u53ef\u4ee5\u9000\u51fa\u3002<\/p>\n

\n

<\/span>root@ubuntu:\/home\/peng\/linux-3.14<\/span>#\u00a0make\u00a0uImage<\/span>
<\/code><\/pre>\n<\/p>\n

\u8fd9\u6837\uff0c\u6211\u4eec\u7684\u6a21\u5757\u7f16\u8bd1\u5230\u4e86\u65b0\u751f\u6210\u7684\u5185\u6838\u6a21\u5757\u6587\u4ef6\u4e2d\u3002<\/p>\n

3.\u8865\u5145<\/p>\n

\u540e\u9762\u4e00\u8282\u867d\u7136\u6700\u7ec8\u76ee\u7684\u662f\u751f\u6210CONFIG_HELLO=y\u8fd9\u4e2a\u5b9a\u4e49\u4fe1\u606f\uff0c\u5e76\u628a\u8be5\u4fe1\u606f\u4fdd\u5b58\u5230\u5185\u6838\u6839\u76ee\u5f55\u7684.config\u6587\u4ef6\u4e2d\u3002<\/p>\n

linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u5f00\u53d1_linux\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u6b65\u9aa4<\/p>\n

\u867d\u7136\u6211\u4eec\u5018\u82e5\u4e0d\u66f4\u6539Kconfig\uff0c\u76f4\u63a5\u5728.config\u4e2d\u964d\u4f4e\u8fd9\u4e2a\u5b8f\u5b9a\u4e49\u4e5f\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n

\u660e\u5929\u5185\u5bb9\u5c31\u5230\u8fd9\u513f\uff0c\u8fd8\u7b49\u54ea\u4e9b\uff1f\u6293\u7d27\u64cd\u7ec3\u4e0a\u53bb\u5427\u3002<\/p>\n

\u6587\u4e2d\u7528\u5230\u7684\u865a\u62df\u673a\uff0c\u53eb\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\uff0c\u8fd8\u6709\u6e90\u4ee3\u7801\uff0c<\/p>\n

\u826f\u8bb8\u4e2a\u4eba\u964c\u964c<\/p>\n

\u672c\u516c\u4f17\u53f7\u5168\u90e8\u535a\u6587\u5df2\u6574\u7406\u6210\u4e00\u4e2a\u76ee\u5f55\uff0c\u8bf7\u5728\u516c\u4f17\u53f7\u91cc\u56de\u590d\u300cm\u300d\u83b7\u53d6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5047\u5b9a\u6211\u4eec\u6709\u4ee5\u4e0b\u9a71\u52a8\u7a0b\u5e8f,\u8981\u7f16\u8bd1\u6210\u53ef\u4ee5\u52a0\u8f7d\u5230\u5f00\u53d1\u677f\u7684\u72ec\u7acbko\u6587\u4ef6\u8be5\u6a21\u5757\u6587\u4ef6\u5c31\u662f\u4e0e\u524d\u9762\u7f16\u8bd1\u7684\u5185\u6838\u914d\u5957\u7684\u9a71\u52a8\u6a21\u5757\uff0c\u5982\u679c\u5f00\u53d1\u677f\u7684\u5185\u6838\u7248\u672c\u4e0e\u4e0a\u9762\u7f16\u8bd1\u7684\u7248\u672c\u53f7\u4e00\u81f4\uff0c\u90a3\u4e48\u8be5\u6a21\u5757\u6587\u4ef6\u5c31\u53ef\u4ee5\u5728\u5f00\u53d1\u677f\u4e0ainsmod\u3002\u8fd9\u6837\uff0c\u6211\u4eec\u7684\u6a21\u5757\u7f16\u8bd1\u5230\u4e86\u65b0\u751f\u6210\u7684\u5185\u6838\u6a21\u5757\u6587\u4ef6\u4e2d\u3002<\/p>\n","protected":false},"author":1,"featured_media":295537,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[763,5594,2456,3908,5593],"class_list":["post-295536","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-linux","tag-lcsh","tag-m-16","tag-sbqdcx","tag-dcml"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295536","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=295536"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295536\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/295537"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=295536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=295536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=295536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}