{"id":294401,"date":"2024-11-17T04:03:59","date_gmt":"2024-11-16T20:03:59","guid":{"rendered":"https:\/\/lrxjmw.cn\/byqdcxqwhyxb.html"},"modified":"2024-11-17T04:03:59","modified_gmt":"2024-11-16T20:03:59","slug":"byqdcxqwhyxb","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/byqdcxqwhyxb.html","title":{"rendered":"\u7f16\u8bd1\u9a71\u52a8\u7a0b\u5e8f\u524d\u4e3a\u4f55\u8981\u5148\u7f16\u8bd1\u5185\u6838\uff1f\u89e3\u6790\u539f\u56e0\u53ca\u64cd\u4f5c\u6b65\u9aa4"},"content":{"rendered":"

10.1\u524d\u63d0<\/p>\n

\u8bf7\u6309\u4e0a\u9762\u7b2c\u516b\u7ae0\u4f7f\u7528GIT\u4e0b\u8f7d\u6e90\u7801\u3001\u4f7f\u7528repo\u4e0b\u8f7d\u5de5\u5177\u94fe\uff0c\u5e76\u914d\u7f6e\u4e86\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\u3002<\/p>\n

\u4e3a\u4f55\u7f16\u8bd1\u9a71\u52a8\u7a0b\u5e8f\u4e4b\u524d\u8981\u5148\u7f16\u8bd1\u5185\u6838\uff1f<\/p>\n

\u2460\u9a71\u52a8\u7a0b\u5e8f\u8981\u7528\u5230\u5185\u6838\u6587\u4ef6\uff1a\u4f8b\u5982\u9a71\u52a8\u7a0b\u5e8f\u4e2d\u8fd9\u6837\u5305\u542b\u5934\u6587\u4ef6\uff1a#include\uff0c\u5176\u4e2d\u7684asm\u662f\u4e00\u4e2a\u94fe\u63a5\u6587\u4ef6\uff0c\u6307\u5411asm-arm\u6216asm-mips\uff0c\u8fd9\u987b\u8981\u5148\u914d\u7f6e\u3001\u7f16\u8bd1\u5185\u6838\u5c31\u4f1a\u751f\u6210asm\u8fd9\u4e2a\u94fe\u63a5\u6587\u4ef6\u3002<\/p>\n

\u2461\u7f16\u8bd1\u9a71\u52a8\u65f6\u7528\u7684\u5185\u6838\u3001\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5230\u5185\u6838\uff0c\u8981\u4e00\u81f4\uff1a\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5230\u5185\u6838\u662f\u51fa\u5382\u65f6\u70e7\u5199\u7684\uff0c\u4f60\u7f16\u8bd1\u9a71\u52a8\u65f6\u7528\u5230\u5185\u6838\u662f\u4f60\u81ea\u5df1\u7f16\u8bd1\u7684\uff0c\u8fd9\u4e24\u4e2a\u5185\u6838\u4e0d\u4e00\u81f4\u65f6\u4f1a\u9020\u6210\u4e00\u4e9b\u95ee\u9898\u3002\u6240\u4ee5\u6211\u4eec\u7f16\u8bd1\u9a71\u52a8\u7a0b\u5e8f\u524dubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f<\/strong>\uff0c\u8981\u628a\u81ea\u5df1\u7f16\u8bd1\u4e0b\u6765\u5230\u5185\u6838\u653e\u5728\u677f\u5b50\u8d77\u6765\uff0c\u53d6\u4ee3\u539f\u5148\u7684\u5185\u6838\u3002<\/p>\n

\u2462\u66f4\u6362\u677f\u5b50\u4e0a\u7684\u5185\u6838\u540e\uff0c\u677f\u5b50\u4e0a\u7684\u5176\u4ed6\u9a71\u52a8\u4e5f\u8981\u66f4\u6362\uff1a\u677f\u5b50\u4f7f\u7528\u65b0\u7f16\u8bd1\u4e0b\u6765\u7684\u5185\u6838\u65f6\uff0c\u677f\u5b50\u4e0a\u539f\u6765\u7684\u5176\u4ed6\u9a71\u52a8\u4e5f\u8981\u66f4\u6362\u4e3a\u65b0\u7f16\u8bd1\u4e0b\u6765\u7684\u3002<\/p>\n

\u6240\u4ee5\u5728\u7f16\u8bd1\u6211\u4eec\u81ea\u5df1\u7684\u7b2c1\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u4e4b\u524d\uff0c\u8981\u5148\u7f16\u8bd1\u5185\u6838\u3001\u6a21\u5757\uff0c\u4f46\u662f\u653e\u5728\u677f\u5b50\u8d77\u6765\u3002<\/p>\n

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

10.2.1STM32MP157\u5f00\u53d1\u677f<\/p>\n

\u5728ubuntu\u4e0a\u8bbe\u7f6e\u4ea4\u53c9\u7f16\u8bd1\uff0c\u5e76\u6267\u884c\u7f16\u8bd1\u547d\u4ee4<\/a>\u3002<\/p>\n

\n

book@100ask:~$ export ARCH=arm<\/span><\/code>book@100ask:~$ export CROSS_COMPILE=arm-buildroot-linux-gnueabihf-<\/span><\/code>book@100ask:~$\u00a0export\u00a0PATH=$PATH:\/home\/book\/100ask_stm32mp157_pro-sdk\/ToolChain\/arm-buildroot-linux-gnueabihf_sdk-buildroot\/bin<\/span><\/code><\/pre>\n<\/p>\n

STM32MP157\u5168\u529f\u80fd\u7248<\/p>\n

kernel\u7684\u7f16\u8bd1\u8fc7\u7a0b\u5982\u4e0b\uff08\u7f16\u8bd1\u5185\u6838\u524d\u987b\u8981\u5148\u914d\u7f6e\u597d\u5de5\u5177\u94fe\u7b49\u4e00\u4e9b\u73af\u5883\u53d8\u91cf\uff09\uff1a<\/p>\n

\n

book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$ make 100ask_stm32mp157_pro_defconfig<\/span><\/code>book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$ make uImage LOADADDR=0xC2000040 <\/span><\/code>book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$ make dtbs<\/span><\/code><\/pre>\n<\/p>\n

\u7f16\u8bd1\u6b65\u9aa4\u53c2\u8003\u5982\u4e0b\uff0c\u7f16\u8bd1\u5b8c\u6210uImage\u540e\u624d\u53ef\u7f16\u8bd1\u8bbe\u5907\u6811\u6587\u4ef6,\u5047\u5982\u4f60\u8ba4\u4e3a\u7f16\u8bd1\u901f\u7387\u5f88\u6162\u53ef\u4ee5\u52a0-j\u6765\u4f7f\u7528\u5e76\u884c\u4efb\u52a1\u7f16\u8bd1\uff0c\u5982\u53f3\u56fe\u52a0-j8\u53c2\u6570\u4f7f\u75288\u4e2a\u5e76\u884c\u4efb\u52a1\u6765\u7f16\u8bd1\u5185\u6838\uff0c\u7f16\u8bd1\u901f\u7387\u89c6\u6027\u80fd\u800c\u8a00\uff0ci79700F\u663e\u5b583Ghz\u53cc\u68388G\u663e\u5b58\u5168\u901f\u7f16\u8bd1\u53ef\u80fd\u987b\u89815\u5206\u949f\u5de6\u53f3\u3002<\/p>\n

ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_linux\u5f00\u53d1\u677f\u6302\u8f7dnfs_windows\u6302\u8f7dnfs<\/p>\n

linux\u5f00\u53d1\u677f\u6302\u8f7dnfs_ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs<\/p>\n

\u7f16\u8bd1\u5b8c\u6210\u540e\u751f\u6210\u7684\u6587\u4ef6\u5982\u53f3\u56fe\u6240\u793a<\/p>\n

ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs_linux\u5f00\u53d1\u677f\u6302\u8f7dnfs<\/p>\n

\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u5728arch\/arm\/boot\u76ee\u5f55\u4e0b\u751f\u6210uImage\u5185\u6838\u6587\u4ef6,\u5728arch\/arm\/boot\/dts\u76ee\u5f55\u4e0b\u751f\u6210\u8bbe\u5907\u6811\u7684\u4e8c\u8865\u7801\u6587\u4ef6stm32mp157c-100ask-512d-lcd-v1.dtb\u3002<\/p>\n

\u628a\u8fd92\u4e2a\u6587\u4ef6\u590d\u5236\u5230\/home\/book\/nfs_rootfs\u76ee\u5f55\u4e0b\u5907\u7528\uff0c\u5982\u53f3\u56fe\uff1a<\/p>\n

\n

book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$ cp arch\/arm\/boot\/uImage ~\/nfs_rootfs\/<\/span><\/code>book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$\u00a0cp\u00a0arch\/arm\/boot\/dts\/stm32mp157c-100ask-512d-v1.dtb\u00a0~\/nfs_rootfs\/<\/span><\/code><\/pre>\n<\/p>\n

10.2.2\u7f16\u8bd1\u5185\u6838\u6a21\u5757<\/p>\n

\u65e0\u8bba\u662f\u90a3\u4e2a\u7248\u672c\u7684STM32MP157\u5f00\u53d1\u677fubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f<\/strong>linux\u591a\u7ebf\u7a0b\uff0c\u7f16\u8bd1\u5185\u6838\u6a21\u5757\u7684\u547d\u4ee4\u662f\u4e00\u6837\u7684\u3002STM32MP157\u5168\u529f\u80fd\u7248<\/p>\n

\u6b65\u5165\u5185\u6838\u6e90\u7801\u76ee\u5f55\u540e\uff0c\u5c31\u53ef\u4ee5\u7f16\u8bd1\u5185\u6838\u6a21\u5757\u4e86\uff1a<\/p>\n

\n

book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$ make ARCH=arm CROSS_COMPILE=arm-buildroot-linux-gnueabihf- modules -j8<\/span><\/code><\/pre>\n<\/p>\n

linux\u5f00\u53d1\u677f\u6302\u8f7dnfs_ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs<\/p>\n

\u5185\u6838\u6a21\u5757\u7f16\u8bd1\u547d\u4ee4\u6267\u884c\u622a\u56fe\u793a\u4f8b<\/p>\n

ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs_linux\u5f00\u53d1\u677f\u6302\u8f7dnfs<\/p>\n

10.2.3\u5b89\u88c5\u5185\u6838\u6a21\u5757\u5230Ubuntu\u67d0\u4e2a\u76ee\u5f55\u4e0b\u5907\u7528<\/p>\n

\u53ef\u4ee5\u5148\u628a\u5185\u6838\u6a21\u5757\u5b89\u88c5\u5230nfs\u6839\u6587\u4ef6\u7cfb\u7edf(\/home\/book\/nfs_rootfs\u4e3a\u5b89\u88c5\u76ee\u5f55)\u3002\u6ce8\u610f\uff1a\u4e0b\u8fb9\u4f1a\u6267\u884ctree\u547d\u4ee4\uff0c\u5047\u5982\u63d0\u793a\u6ca1\u6709\u8be5\u547d\u4ee4\uff0c\u987b\u8981\u6267\u884c\u201csudoaptinstalltree\u201d\u547d\u4ee4\u5b89\u88c5tree\u5de5\u5177\uff08\u524d\u63d0\u662fUbuntu\u80fd\u4e0a\u7f51\uff09\u3002<\/p>\n

STM32MP157\u5168\u529f\u80fd\u7248<\/p>\n

\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

book@100ask:~\/100ask_stm32mp157_pro-sdk\/Linux-5.4$\u00a0make\u00a0ARCH=arm\u00a0INSTALL_MOD_PATH=\/home\/book\/nfs_rootfs\u00a0modules_install<\/span><\/code><\/pre>\n<\/p>\n

\u5982\u53f3\u56fe\uff0c\u628a\u6a21\u5757\u5b89\u88c5\u5728nfs\u6240\u5728\u76ee\u5f55\/home\/book\/nfs_rootfs\/\u76ee\u5f55\u4e0b\uff1a<\/p>\n

\u5b89\u88c5\u540e\u7684\u7684\/home\/book\/nfs_rootfs\/\u76ee\u5f55\u7ed3\u6784\u5982\u53f3\u56fe\u6240\u793a\uff1a<\/p>\n

\u56e0\u4e3a\u6a21\u5757\u7f16\u8bd1\u5b89\u88c5\u5b8c\u6210\u540e\u4f1a\u624b\u52a8\u751f\u6210\u4e24\u4e2a\u94fe\u63a5\u5230\u5185\u6838\u6e90\u7801\u76ee\u5f55\u7684\u94fe\u63a5\u6587\u4ef6\uff0c\u987b\u8981\u81ea\u52a8\u5220\u6389\u8fd9\u4e24\u4e2a\u94fe\u63a5\u6587\u4ef6\u624d\u53ef\u4ee5\u7ee7\u7eed\u6267\u884c\u62f7\u8d1d\u5185\u6838\u6a21\u5757\u5230\u5f00\u53d1\u677f\u6b65\u9aa4\uff0c\u5426\u5219\u4f1a\u63d0\u793a\u7a7a\u95f4\u4e0d\u8db3\u7b49\u95ee\u9898\uff0c\u5982\u4e0b\u6240\u793a\uff0c\u6267\u884crmbuildsource\u5220\u6389\u4e24\u4e2a\u7ea2\u6846\u6240\u793a\u7684\u94fe\u63a5\u6587\u4ef6\u3002<\/p>\n

\n

book@virtual-machine:~\/nfs_rootfs\/lib\/modules\/5.4.31-g04363cb64$ rm build source<\/span><\/code><\/pre>\n<\/p>\n

linux\u5f00\u53d1\u677f\u6302\u8f7dnfs_ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs<\/p>\n

ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs_linux\u5f00\u53d1\u677f\u6302\u8f7dnfs<\/p>\n

\u4ee5\u540e\u53ef\u4ee5\u7ee7\u7eed\u6267\u884c\u62f7\u8d1d\u6a21\u5757\u5230\u5f00\u53d1\u677f\u64cd\u4f5c\u3002<\/p>\n

10.3\u5b89\u88c5\u5185\u6838\u548c\u6a21\u5757\u5230\u5f00\u53d1\u677f\u4e0a<\/p>\n

\u5047\u5b9a\uff1a\u6267\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0c\u5728Ubuntu\u7684\/home\/book\/nfs_rootfs\u76ee\u5f55\u4e0b\u65e9\u5df2\u6709\u4e86zImage\u6216uImage\u3001dtb\u6587\u4ef6\uff0c\u800c\u4e14\u6709lib\/modules\u5b50\u76ee\u5f55(\u4e0a\u9762\u5bcc\u542b\u5404\u7c7b\u6a21\u5757)\u3002<\/p>\n

\u4e0b\u8fb9\uff0c\u8981\u628a\u90a3\u4e9b\u6587\u4ef6\u590d\u5236\u5230\u5f00\u53d1\u677f\u4e0a\u3002<\/p>\n

\u5047\u5982\u4f60\u4f7f\u7528\u7684\u662fVMwareNAT\u5f62\u5f0f\uff0c\u5047\u5b9aWindowsIP\u4e3a192.168.1.100\uff0c\u5728\u5f00\u53d1\u677f\u542f\u52a8\u6b65\u5165Linux<\/a>\u540e\uff0c\u8f93\u5165root\u767b\u9646\uff0c\u4e4b\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4(\u6ce8\u610f\uff1a\u5fc5\u987b\u6307\u5b9aport\u4e3a2049\u3001mountport\u4e3a9999)\uff1a<\/p>\n

\n

mount -t nfs -o nolock,vers=3,port=2049,mountport=9999 192.168.1.100:\/home\/book\/nfs_rootfs \/mnt<\/span><\/code>cp \/mnt\/zImage \/boot \u6216 cp \/mnt\/uImage \/boot <\/span><\/code>cp \/mnt\/*.dtb \/boot<\/span><\/code>cp \/mnt\/lib\/modules \/lib -rfd<\/span><\/code>sync<\/span><\/code>reboot<\/span><\/code><\/pre>\n<\/p>\n

\u5047\u5982\u4f60\u4f7f\u7528\u7684\u662fVMware\u6865\u63a5\u65b9\u6cd5\uff0c\u5047\u5b9aUbuntuIP\u4e3a192.168.1.100\uff0c\u5728\u5f00\u53d1\u677f\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

mount -t nfs -o nolock,vers=3 192.168.1.100:\/home\/book\/nfs_rootfs \/mnt<\/span><\/code>cp \/mnt\/zImage \/boot \u6216 cp \/mnt\/uImage \/boot <\/span><\/code>cp \/mnt\/*.dtb \/boot<\/span><\/code>cp \/mnt\/lib\/modules \/lib -rfd<\/span><\/code>sync<\/span><\/code>reboot<\/span><\/code><\/pre>\n<\/p>\n

\u6700\u540e\u91cd\u542f\u5f00\u53d1\u677f\uff0c\u5b83\u5c31\u4f7f\u7528\u65b0\u7684zImage\u6216uImage\u3001dtb\u3001\u6a21\u5757\u4e86\u3002<\/p>\n

10.5\u4f53\u9a8c\u7b2c1\u4e2a\u9a71\u52a8\u7a0b\u5e8f<\/p>\n

10.5.1\u66f4\u6539Makefile\u6307\u5b9a\u5185\u6838\u76ee\u5f55<\/p>\n

\u628a\u7b2c1\u4e2a\u9a71\u52a8\u7a0b\u5e8f01_hello_drv\u4e0a\u4f20\u5230Ubuntu\u540e\uff0c\u4f7f\u7528vim\u66f4\u6539\u5b83\u7684Makefile\uff0c\u8bbe\u7f6e\u5176\u4e2d\u7684KERN_DIR\u53d8\u91cf\u4e3a\u5185\u6838\u7684\u6e90\u7801\u76ee\u5f55\uff0c\u4ee5STM32MP157\u4e3a\u4f8b\uff0c\u5982\u4e0b\uff1a<\/p>\n

\n

KERN_DIR = 100ask_stm32mp157_pro-sdk\/Linux-5.4\/<\/span><\/code><\/pre>\n<\/p>\n

10.5.2\u7f16\u8bd1<\/p>\n

\u8bbe\u7f6e\u597d\u5de5\u5177\u94fe\u3001\u914d\u7f6e\u3001\u7f16\u8bd1\u8fc7\u5185\u6838\u4ee5\u540e\uff0c\u572801_hello_drv\u76ee\u5f55\u4e0b\u6267\u884cmake\u547d\u4ee4\u5373\u53ef\u7f16\u8bd1\u9a71\u52a8\u7a0b\u5e8f\u53ca\u6d4b\u8bd5\u7a0b\u5e8f\uff0c\u5982\u4e0b\uff1a<\/p>\n

linux\u5f00\u53d1\u677f\u6302\u8f7dnfs_ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs<\/p>\n

10.5.3\u5728\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c<\/p>\n

\u5f00\u53d1\u677f\u542f\u52a8\u540e\u901a\u8fc7nfs\u6302\u8f7dUbuntu\u76ee\u5f55\u7684\u65b9\u6cd5\uff0c\u5c06\u76f8\u5e94\u7684\u6587\u4ef6\u62f7\u8d1d\u5230\u5f00\u53d1\u677f\u4e0a\u3002\u5047\u5982\u4f60\u4f7f\u7528\u7684\u662fVMwareNAT\u5f62\u5f0f\uff0c\u5047\u5b9aWindowsIP\u4e3a192.168.1.100\uff0c\u5728\u5f00\u53d1\u677f\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4(\u6ce8\u610f\uff1a\u5fc5\u987b\u6307\u5b9aport\u4e3a2049\u3001mountport\u4e3a9999)\uff1a<\/p>\n

\n

[root@board:~]# mount -t nfs -o nolock,vers=3,port=2049,mountport=9999 192.168.1.100:\/home\/book\/nfs_rootfs \/mnt<\/span><\/code><\/pre>\n<\/p>\n

\u5047\u5982\u4f60\u4f7f\u7528\u7684\u662fVMware\u6865\u63a5\u65b9\u6cd5\uff0c\u5047\u5b9aUbuntuIP\u4e3a192.168.1.100\uff0c\u5728\u5f00\u53d1\u677f\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

[root@board:~]# mount -t nfs -o nolock,vers=3 192.168.1.100:\/home\/book\/nfs_rootfs \/mnt<\/span><\/code><\/pre>\n<\/p>\n

\u6302\u8f7dNFS\u6210\u529f\u540e\uff0c\u628a\u9a71\u52a8\u548c\u6d4b\u8bd5\u7a0b\u5e8f\u590d\u5236\u5230\u5f00\u53d1\u677f\u4e0a\uff1a<\/p>\n

\n

[root@board:~]# cp \/mnt\/hello_drv.ko .\/<\/span><\/code>[root@board:~]#\u00a0cp\u00a0\/mnt\/hello_drv_test\u00a0.\/<\/span><\/code><\/pre>\n<\/p>\n

\u4e4b\u540e\u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f\u5e76\u9a8c\u8bc1\u662f\u5426\u6210\u529f\uff1a<\/p>\n

\n

[root@board:~]# insmod hello_drv.ko<\/span><\/code><\/pre>\n<\/p>\n

\u6267\u884c\u201clsmod\u201d\u53ef\u4ee5\u770b\u89c1hello_drv\u9a71\u52a8\uff0c\u5982\u4e0b\uff1a<\/p>\n

windows\u6302\u8f7dnfs_ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_linux\u5f00\u53d1\u677f\u6302\u8f7dnfs<\/p>\n

\u6267\u884c\u201ccat\/proc\/devices\u201d\uff1a<\/p>\n

ubuntu nfs\u6302\u8f7d\u5f00\u53d1\u677f_windows\u6302\u8f7dnfs_linux\u5f00\u53d1\u677f\u6302\u8f7dnfs<\/p>\n

\u6267\u884c\u201cls-l\/dev\/hello\u201d\uff0c\u53ef\u4ee5\u53d1\u89c9\u6709\u8fd9\u4e2a\u8bbe\u5907\u8282\u70b9\uff0c\u4f46\u662f\u5b83\u7684\u4e3b\u8bbe\u5907\u53f7\u8ddf\u4e0a\u56fe\u4e00\u6837\uff1a<\/p>\n

\u6700\u540e\u6267\u884c\u6d4b\u8bd5\u7a0b\u5e8f\uff1a<\/p>\n

\n

.\/hello_drv_test -w www.100ask.net<\/span><\/code>.\/hello_drv_test -r<\/span><\/code><\/pre>\n<\/p>\n

\u5018\u82e5\u4e0d\u60f3\u89c1\u5230\u9a71\u52a8\u8c03\u8bd5\u4fe1\u606flinux\u64cd\u4f5c\u7cfb\u7edf\u8bba\u6587\uff0c\u53ef\u4ee5\u5148\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u62ff\u6765\u5173\u6389\u5185\u6838\u7684\u590d\u5370\u4fe1\u606f\uff1a<\/p>\n

\n

echo \"1 4 1 7\" > \/proc\/sys\/kernel\/printk<\/span><\/code><\/pre>\n<\/p>\n

10.6\u5e38\u89c1\u95ee\u9898<\/p>\n

\u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f\u65f6\uff0c\u5047\u82e5\u6709\u4ee5\u4e0b\u63d0\u793a\u4fe1\u606f\uff0c\u7f18\u7531\u5c31\u662f\u677f\u5b50\u4e0a\u8fd0\u884c\u7684\u5185\u6838\u592a\u8001\u4e86\uff0c\u89e3\u51b3\u65b9\u5f0f\u5c31\u662f\u5148\u7f16\u8bd1\u5185\u6838\u3001\u66ff\u6362\u677f\u80fd\u4e0a\u7684\u5185\u6838\uff0c\u518d\u91cd\u65b0\u7f16\u8bd1\u3001\u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f\uff1a<\/p>\n

\n

disagrees about version of symbol device_create<\/span><\/code>[ 2098.200219] hello_drv: Unknown symbol device_create (err -22)<\/span><\/code>[ 2098.208445] hello_drv: disagrees about version of symbol device_destroy<\/span><\/code>[ 2098.215871] hello_drv: Unknown symbol device_destroy (err -22)<\/span><\/code>insmod: ERROR: could not insert module hello_drv.ko: Invalid parameters<\/span><\/code><\/pre>\n<\/p>\n

\u5168\u6587\u4e0b\u8f7d\uff1a<\/p>\n","protected":false},"excerpt":{"rendered":"

\u7f16\u8bd1\u9a71\u52a8\u65f6\u7528\u7684\u5185\u6838\u3001\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5230\u5185\u6838\uff0c\u8981\u4e00\u81f4\uff1a\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5230\u5185\u6838\u662f\u51fa\u5382\u65f6\u70e7\u5f55\u7684\uff0c\u4f60\u7f16\u8bd1\u9a71\u52a8\u65f6\u7528\u5230\u5185\u6838\u662f\u4f60\u81ea\u5df1\u7f16\u8bd1\u7684\uff0c\u8fd9\u4e24\u4e2a\u5185\u6838\u4e0d\u4e00\u81f4\u65f6\u4f1a\u5bfc\u81f4\u4e00\u4e9b\u95ee\u9898\u3002\u65e0\u8bba\u662f\u54ea\u4e2a\u7248\u672c\u7684STM32MP157\u5f00\u53d1\u677f\uff0c\u7f16\u8bd1\u5185\u6838\u6a21\u5757\u7684\u547d\u4ee4\u662f\u4e00\u6837\u7684\u3002\u5b89\u88c5\u5185\u6838\u548c\u6a21\u5757\u5230\u5f00\u53d1\u677f\u4e0a\u76ee\u5f55\u7684\u65b9\u5f0f\uff0c\u5c06\u76f8\u5e94\u7684\u6587\u4ef6\u62f7\u8d1d\u5230\u5f00\u53d1\u677f\u4e0a\u3002<\/p>\n","protected":false},"author":1,"featured_media":294402,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[4304],"class_list":["post-294401","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-snhmkbybbml"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294401","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=294401"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294401\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/294402"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=294401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=294401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=294401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}