{"id":4095,"date":"2023-04-29T18:33:45","date_gmt":"2023-04-29T10:33:45","guid":{"rendered":"http:\/\/www.hellofpga.com\/?p=4095"},"modified":"2025-02-28T21:31:02","modified_gmt":"2025-02-28T13:31:02","slug":"petalinux_usb_host_test","status":"publish","type":"post","link":"http:\/\/www.hellofpga.com\/index.php\/2023\/04\/29\/petalinux_usb_host_test\/","title":{"rendered":"\u57fa\u4e8eSmart Zynq\u4e0eLemon Zynq \u7684Petalinux\u5f00\u53d1 \u7ae0\u8282\u4e5d USB HOST\u5b9e\u9a8c"},"content":{"rendered":"\n<p>\u672c\u6587\u4ecb\u7ecd\u5728Petalinux \u4e0b\u8c03\u7528\u6211\u4eec\u7684USB \u8d44\u6e90\u5b9e\u73b0USB HOST\u7684\u529f\u80fd,\u5e76\u6700\u7ec8\u5b9e\u73b0U\u76d8\u7684\u8bc6\u522b\u548c\u8bfb\u53d6<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b64\u7ae0\u8282\u5185\u5bb9\u9002\u7528\u4e8e\u4e0b\u5217\u4e3b\u677f<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Lemon ZYNQ \uff08CLG400\u5c01\u88c5\u76847020\uff09<\/strong><\/li>\n\n\n\n<li><strong>Smart ZYNQ SP \/ SP2 \uff08CLG484\u5c01\u88c5\u76847020\uff09<\/strong><\/li>\n\n\n\n<li><strong>Smart ZYNQ \u6807\u51c6\u7248\uff08\u505c\u4ea7\uff09 (CLG400\u5c01\u88c57010\/7020 \uff09<\/strong><\/li>\n\n\n\n<li class=\"has-vivid-red-color has-text-color has-link-color wp-elements-58029011f310c8d4788cbf3d0ba06067\"><strong>Smart ZYNQ SL\u7248\u56e0\u4e3a\u6ca1\u6709USB\u7684\u8d44\u6e90\uff0c\u6240\u4ee5\u5e76\u4e0d\u9002\u7528\u6b64\u5de5\u7a0b<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u672c\u6587\u5728 vivado2018.3 \u4ee5\u53ca Petalinux2018.3 \u7248\u672c\u4e0a\u8fdb\u884c\u6f14\u793a<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u5173\u4e8eUSB \u90e8\u5206\uff0c\u8bbe\u5907\u6811\u548c\u5185\u6838\u9a71\u52a8\u90e8\u5206xilinx \u5b98\u65b9\u5728wiki\u4e0a\u4e5f\u6709\u8d44\u6599 \u8be6\u7ec6\u53ef\u4ee5\u770b\u4e0b\u9762\u94fe\u63a5<a href=\"http:\/\/www.wiki.xilinx.com\/Zynq+Linux+USB+Device+Driver\">http:\/\/www.wiki.xilinx.com\/Zynq+Linux+USB+Device+Driver<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001VIVADO\u5de5\u7a0b\u90e8\u5206<\/strong>&nbsp;<strong>\uff08\u4e4b\u524d\u7ae0\u8282\u5236\u4f5c\u7684\u955c\u50cf\u5df2\u7ecf\u5e26USB\u7684\u90e8\u5206\uff0c\u8fd9\u91cc\u53ea\u505a\u4ecb\u7ecd\uff09<\/strong><\/h2>\n\n\n\n<p>\u6211\u4eec\u4e4b\u524d\u5236\u4f5c\u7684\u955c\u50cf\u4e2d\u5df2\u7ecf\u5305\u542b\u4e86USB\u90e8\u5206\u7684\u5185\u5bb9\u4e86\uff0c\u6240\u4ee5<strong>\u672c\u6b21\u5b9e\u9a8c\u4e0d\u9700\u8981\u91cd\u65b0\u5236\u4f5cVIVADO\u5de5\u7a0b\u4ee5\u53caPetalinux \u7cfb\u7edf\u7684\u91cd\u65b0\u7f16\u8bd1\u64cd\u4f5c<\/strong>\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>USB\u6dfb\u52a0\u7684\u8fc7\u7a0b\u7684\u5185\u5bb9\u53ef\u4ee5\u56de\u987e\u4e0b\u5217\u7ae0\u8282\uff1a\n<ul class=\"wp-block-list\">\n<li>Smart Zynq \uff1a <a href=\"http:\/\/www.hellofpga.com\/index.php\/2025\/02\/23\/smart_zynq_petalinux_01\/\">\u57fa\u4e8eSmart Zynq \u7684Petalinux\u5f00\u53d1 \u7ae0\u8282\u4e00 Vivado \u57fa\u7840\u786c\u4ef6\u5de5\u7a0b\u642d\u5efa<\/a><\/li>\n\n\n\n<li>Lemon Zynq \uff1a<a href=\"http:\/\/www.hellofpga.com\/index.php\/2024\/10\/24\/lemon_zynq_petalinux_01\/\">\u57fa\u4e8eLemon Zynq \u7684Petalinux\u5f00\u53d1 \u7ae0\u8282\u4e00 Vivado \u57fa\u7840\u786c\u4ef6\u5de5\u7a0b\u642d\u5efa<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u4e5f\u53ef\u4ee5\u7b80\u5355\u56de\u987e\u4e0b\uff1a<\/p>\n\n\n\n<p>1\uff09\u5728Block Design\u7684ZYNQ\u8bbe\u7f6e\u9875\u9762\u91cc\u4f7f\u80fdUSB 0\u8d44\u6e90<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"679\" height=\"169\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-1.png\" alt=\"\" class=\"wp-image-3345\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-1.png 679w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-1-300x75.png 300w\" sizes=\"auto, (max-width: 679px) 100vw, 679px\" \/><\/figure>\n\n\n\n<p>\u56e0\u4e3a\u6211\u4eec\u7684USB Phy\u7684\u590d\u4f4d\u90e8\u5206\u662f\u63a5\u5728MIO46\u7ba1\u811a\u4e0a\u7684\uff0c\u6240\u4ee5\u8fd9\u91cc\u8fd8\u9700\u8981\u4f7f\u80fdZYNQ\u7684MIO\u529f\u80fd\uff0c\u5e76\u4e14\u5728\u4e0b\u65b9\u7684USB 0 RESET\u9009\u9879\u91cc\u52fe\u9009 MIO46 \u590d\u4f4d\u65b9\u5f0f\u9009\u62e9\u4f4e\u7535\u5e73\u590d\u4f4d\u3002 \uff08\u56e0\u4e3a\u6211\u4eec\u6ca1\u6709\u7528\u5230I2C\u529f\u80fd\uff0c\u6240\u4ee5I2C\u590d\u4f4d\u7684\u9009\u9879\u53bb\u9664\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-2-1024x342.png\" alt=\"\" class=\"wp-image-3346\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-2-1024x342.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-2-300x100.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-2-768x256.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-2.png 1141w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>\u8fd9\u91cc\u8981\u6ce8\u610f\uff0cUSB \u8d44\u6e90\u6302\u8f7d\u5728BANK501\u4e0a\uff0cLemon Zynq \u548cSmart Zynq \u7684BANK501\u662f\u4e0d\u540c\u7684\uff0c\u6240\u4ee5\u8fd9\u91cc\u8bbe\u7f6e\u4e0d\u540c\uff08\u4f1a\u5f71\u54cdSD,USB,\u548c\u7f51\u7edc\u529f\u80fd\uff09\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Lemon ZYNQ \u7684\u4e3b\u677f \uff08BANK501\u7535\u538b\u662f1.8V\uff09\uff0c\u8fd9\u91cc\u7535\u538b\u62101.8V<\/strong><\/li>\n\n\n\n<li><strong>Smart ZYNQ  \u7684\u4e3b\u677f \uff08BANK501\u7535\u538b\u662f1.8V\uff09\uff0c\u8fd9\u91cc\u7535\u538b\u62103.3V<\/strong><\/li>\n\n\n\n<li>\u4e0b\u56fe\u4ee5Smart ZYNQ\u4e3a\u4f8b<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"343\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-70-1024x343.png\" alt=\"\" class=\"wp-image-9554\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-70-1024x343.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-70-300x101.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-70-768x257.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-70.png 1158w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u4e0a\u9762\u662f\u548cUSB\u76f8\u5173\u90e8\u5206\u7684\u6dfb\u52a0\u91cd\u70b9\uff0c \u5f53\u7136\u8981\u60f3\u8ba9PETALINUX \u6b63\u5e38\u8dd1\u8d77\u6765\uff0c\u6211\u4eec\u8fd8\u662f\u9700\u8981\u6309\u5de5\u7a0b\u4e00\u90a3\u6837\uff0c\u5c06DDR\u578b\u53f7\uff0cDDR\u4f4d\u5bbd\uff0cUART\uff0cSD\u7b49\u8d44\u6e90\u6dfb\u52a0\u8d77\u6765\u7684\u3002<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001PETALINUX\u7684\u7f16\u8bd1\u548c\u70e7\u5f55\uff08\u4e4b\u524d\u7ae0\u8282\u5236\u4f5c\u7684\u955c\u50cf\u5df2\u7ecf\u5e26USB\u7684\u90e8\u5206\uff0c\u8fd9\u91cc\u53ea\u505a\u56de\u987e\uff09<\/strong><\/h2>\n\n\n\n<p><strong>\u5982\u679c\u8981\u56de\u987e\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u4e0b\u9762\u90e8\u5206\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PETALINUX \u7684\u7cfb\u7edf\u7684\u7f16\u8bd1\u53ca\u955c\u50cf\u7684\u751f\u6210\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Smart ZYNQ:<\/strong><a href=\"http:\/\/www.hellofpga.com\/index.php\/2025\/02\/23\/smart_zynq_building_petalinux\/\">\u57fa\u4e8eSmart Zynq \u7684Petalinux\u5f00\u53d1 \u7ae0\u8282\u4e8c \u5728 Ubuntu \u4e0a\u5b8c\u6210 Petalinux \u7684\u5de5\u7a0b\u521b\u5efa\u53ca\u7f16\u8bd1\u5168\u8fc7\u7a0b(TF\u5361\u542f\u52a8)<\/a><\/li>\n\n\n\n<li><strong>Lemon ZYNQ:<\/strong><a href=\"http:\/\/www.hellofpga.com\/index.php\/2024\/10\/25\/lemon_zynq_building_petalinux\/\">\u57fa\u4e8eLemon Zynq \u7684Petalinux\u5f00\u53d1 \u7ae0\u8282\u4e8c \u5728 Ubuntu \u4e0a\u5b8c\u6210 Petalinux \u7684\u5de5\u7a0b\u521b\u5efa\u53ca\u7f16\u8bd1\u5168\u8fc7\u7a0b(TF\u5361\u542f\u52a8)<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>PETALINUX \u955c\u50cf\u7684\u70e7\u5f55\uff1a<\/strong><a href=\"http:\/\/www.hellofpga.com\/index.php\/2025\/02\/23\/zynq_creating_sd_card\/\">\u57fa\u4e8eSmart Zynq\u4e0eLemon Zynq \u7684Petalinux\u5f00\u53d1 \u7ae0\u8282\u4e09 \u521b\u5efa\u53ef\u7528\u4e8ePetalinux \u7cfb\u7edf\u542f\u52a8\u7684SD\u5361\uff08\u5305\u542bboot\u548crootfs\u5206\u533a\uff09<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4e0eUSB\u76f8\u5173\u7684\u90e8\u5206\u5982\u4e0b\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1) \u5728Kernel\u4e2d\u589e\u52a0 USB\u9a71\u52a8\u90e8\u5206<\/strong><\/h3>\n\n\n\n<p><strong>\uff08\u6211\u4eec\u548cWIKI\u7f51\u7ad9\u4e0a\u7684\u5185\u5bb9\u4f5c\u5bf9\u6bd4\uff0cKernel\u7684\u914d\u7f6e\u9875\u9ed8\u8ba4\u5df2\u7ecf\u5305\u542b\u4e86USB HOST\u7684\u6240\u6709\u5fc5\u987b\u7684\u5185\u5bb9\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u989d\u5916\u518d\u5355\u72ec\u914d\u7f6e\u4e86\uff09<\/strong>\uff08\u5982\u679c\u9700\u8981\u4fee\u6539Kernel\u914d\u7f6e\u9875\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4e0b\u5217\u6307\u4ee4 petalinux-config -c kernel\uff09<\/p>\n\n\n\n<p>\u6839\u636e\u521a\u624dwiki \u7f51\u7ad9\u4e0a\u7684\u4ecb\u7ecd\uff0c\u5982\u679c\u9700\u8981\u914d\u7f6e\u6210USB HOST\u6a21\u5f0f\u5219\u9700\u8981 \u5c06kernel\u6309\u7167\u4e0b\u56fe\u8fd9\u6837\u8bbe\u7f6e<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"352\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-6.png\" alt=\"\" class=\"wp-image-3357\" style=\"width:421px;height:auto\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-6.png 497w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-6-300x212.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2) \u8bbe\u5907\u6811\u7684\u4fee\u6539<\/strong><\/h3>\n\n\n\n<p>\u4e3a\u4e86\u8ba9USB\u529f\u80fd\u6b63\u5e38\u4f7f\u7528\uff0c\u6211\u4eec\u9700\u8981\u5728\u8bbe\u5907\u6811\u4e0a\u589e\u52a0USB\u7684\u76f8\u5173\u5185\u5bb9\uff0c\u8def\u5f84\u5728 \u6211\u4eec\u521b\u5efa\u7684\u5de5\u7a0b<strong>PetalinuxSystem<\/strong>\u8def\u5f84\u4e0b\u7684 \/project-spec\/meta-user\/recipes-bsp\/device-tree\/files \u5185\u7684 system-user.dtsi\u6587\u4ef6\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"946\" height=\"239\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-135.png\" alt=\"\" class=\"wp-image-8483\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-135.png 946w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-135-300x76.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-135-768x194.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>\u53cc\u51fb\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5e76\u6309\u4e0b\u56fe\u6240\u793a\uff0c\u5728<strong>\u539f\u5148\u7684\u4ee3\u7801\u540e\u9762\u589e\u52a0<\/strong>\u5982\u4e0b\u5185\u5bb9\uff0c\u4e4b\u540e\u518d<strong>\u4fdd\u5b58\u4e0e\u9000\u51fa<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/include\/ \"system-conf.dtsi\"<br>\/ {<br>};<br><br>\/{<br>    usb_phy0: usb_phy@0 {<br>    compatible = \"ulpi-phy\";<br>    #phy-cells = &lt;0&gt;;<br>    reg = &lt;0xe0002000 0x1000&gt;;<br>    view-port = &lt;0x0170&gt;;<br>    drv-vbus;<br>    };<br>};<br>&amp;usb0 {<br>    dr_mode = \"host\";<br>    usb-phy = &lt;&amp;usb_phy0&gt;;<br>};<\/pre>\n\n\n\n<p>\u4e0a\u8ff0\u5185\u5bb9\u4e2d\u5305\u542b\u4e86USB \u7684\u8bbe\u5907\u6811\u5185\u5bb9\u3002\u4e4b\u540e\u4fdd\u5b58\u5e76\u5173\u95ed\u5373\u53ef\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"522\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-152-1024x522.png\" alt=\"\" class=\"wp-image-8525\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-152-1024x522.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-152-300x153.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-152-768x392.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2024\/10\/image-152.png 1102w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>\u5907\u6ce8\uff1a\u7f51\u4e0a\u90e8\u5206\u6559\u7a0b\u5728\u8bbe\u5907\u6811\u91cc\u9700\u8981\u624b\u52a8\u6dfb\u52a0\u7f51\u7edc\u90e8\u5206\u7684\u8bbe\u5907\u6811\uff0c\u4f46\u662f\u7ecf\u8fc7\u5b9e\u9645\u8c03\u8bd5\uff0c2018.3\u7684petalinux\u4e0d\u9700\u8981\u81ea\u5df1\u624b\u52a8\u521b\u5efa\u7f51\u7edc\u7684\u8bbe\u5907\u6811\uff0c<strong>\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5e2e\u6211\u4eec\u5728\u8bbe\u5907\u6811\u91cc\u6dfb\u52a0\u7f51\u7edc\uff0c\u800c\u4e0d\u9700\u8981\u624b\u52a8\u6dfb\u52a0<\/strong>\uff08\u5728\u6ca1\u6709\u7f16\u8bd1\u524d\u770b\u4e0d\u5230\u8bbe\u5907\u6811\uff0c\u6574\u4e2a\u5de5\u7a0b\u7f16\u8bd1\u540e\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5728&nbsp;\/components\/plnx_workspace\/device-tree\/device-tree\u4e0b\u7684pcw.dtsi\u6587\u4ef6\u548c\u548czynq-7000.dtsi\u6587\u4ef6\u4e2d\u81ea\u52a8\u6dfb\u52a0\u4e0a\u7f51\u7edc\u90e8\u5206\u7684\u4e2d\u4e3a\u6211\u4eec\u6dfb\u52a0\u7f51\u7edc\u90e8\u5206\u7684\u8bbe\u5907\u6811\u5185\u5bb9\uff09\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u542f\u52a8\u4e3b\u677f\u5e76\u8fdb\u5165PETALINUX\u7cfb\u7edf<\/strong><\/h2>\n\n\n\n<p>\u5c06\u677f\u5b50\u7684\u542f\u52a8\u65b9\u5f0f\u8c03\u6574\u6210SD\u542f\u52a8\uff0c\u5982\u4e0b\u56fe\u6240\u793a(\u56fe\u7247\u4ee5Smart ZYNQ\u4e3a\u4f8b)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"381\" height=\"383\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/10\/image-27.png\" alt=\"\" class=\"wp-image-5207\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/10\/image-27.png 381w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/10\/image-27-298x300.png 298w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/10\/image-27-150x150.png 150w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/10\/image-27-100x100.png 100w\" sizes=\"auto, (max-width: 381px) 100vw, 381px\" \/><\/figure>\n\n\n\n<p>\u63a5\u4e0b\u6765\u53ef\u4ee5\u5bf9\u4e3b\u677f\u8fdb\u884c\u4e0a\u7535(\u5df2\u7ecf\u4e0a\u7535\u7684\u5c31\u6309\u4e0b\u7535\u8111\u7684POR\u590d\u4f4d\u952e)\u3002 \u4e0a\u7535\u4e4b\u540e\u677f\u5b50\u4e0a\u7684POWER\u706f\u4ee5\u53caDONE\u706f\u5c06\u4f1a\u4eae\u8d77\uff0c\u5982\u679c\u6211\u4eec\u7684UART\u548c\u7535\u8111\u8fde\u63a5\u4e86\uff0c\u6b64\u65f6\u7528putty\u7b49\u4e13\u4e1a\u8f6f\u4ef6\u67e5\u770b\u4e32\u53e3\u4fe1\u606f\uff08<strong>\u6ce2\u7279\u7387115200<\/strong>\uff09\uff0c\u53ef\u4ee5\u770b\u5230\u7cfb\u7edf\u5df2\u7ecf\u542f\u52a8\uff0c\u4e32\u53e3\u6b63\u5728\u53d1\u9001\u542f\u52a8\u7684\u65e5\u5fd7\u4fe1\u606f\u3002<strong>\uff08\u5f53\u7136\u8fd9\u91cc\u4e5f\u53ef\u4ee5\u7528 SSH\u65b9\u5f0f\u901a\u8fc7\u7f51\u7edc\u8fdb\u884c\u8fde\u63a5\uff09<\/strong><\/p>\n\n\n\n<p>\u5f53\u7cfb\u7edf\u51fa\u73b0root@localhost:~# \u5c31\u4ee3\u8868\u7cfb\u7edf\u5df2\u7ecf\u6210\u529f\u542f\u52a8\u4e86\uff0c\u7cfb\u7edf\u6b64\u65f6\u505c\u7559\u5728\u7b49\u5f85\u8f93\u5165\u8d26\u53f7\u5bc6\u7801\u7684\u72b6\u6001<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"285\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2025\/02\/image-11.png\" alt=\"\" class=\"wp-image-9423\" style=\"width:564px;height:auto\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2025\/02\/image-11.png 672w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2025\/02\/image-11-300x127.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<p>\u6b64\u65f6\u8f93\u5165<strong>\u7528\u6237\u540d root \u5bc6\u7801 root<\/strong>\uff0c\u4e4b\u540e\u5c31\u6b63\u5f0f\u767b\u5f55 petalinux \u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"162\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2025\/02\/image-12.png\" alt=\"\" class=\"wp-image-9424\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2025\/02\/image-12.png 558w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2025\/02\/image-12-300x87.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/figure>\n\n\n\n<p>\u4e4b\u540e\u5c31\u6b63\u5f0f\u767b\u5f55 petalinux \u4e86<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001USB\u529f\u80fd\u9a8c\u8bc1<\/strong><\/h2>\n\n\n\n<p>\u6b64\u65f6\u5728USB \u63a5\u53e3\u63d2\u5165 \u6211\u4eec\u63d0\u524d\u51c6\u5907\u597d\u7684 U\u76d8\uff08<strong>\u5fc5\u987b\u662ffat32\u683c\u5f0f<\/strong>\uff09\u5e76\u4e14 \u8fd9\u4e2aU\u76d8\u5728\u7535\u8111\u4e0a\u521b\u5efa\u4e86 \u4e24\u4e2a\u6587\u672c\u6587\u6863 \u5206\u522b\u547d\u540d\u4e3aa\u548cb\uff08\u65e0\u5185\u5bb9\uff0c\u4ec5\u6700\u540e\u8bbf\u95ee\u9a8c\u8bc1\u7528\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"428\" height=\"232\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-10.png\" alt=\"\" class=\"wp-image-3368\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-10.png 428w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-10-300x163.png 300w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/figure>\n\n\n\n<p>\u63a5\u5165U\u76d8\u540e \u4f1a\u770b\u5230\u547d\u4ee4\u884c\u6709\u4e0b\u5217\u4fe1\u606f \uff0c\u6709\u4e9bU\u76d8\u4f1a\u63d0\u793asome date may be corrupt \u8fd9\u4e2a\u4ee3\u8868\u63a5\u5165\u7684U\u76d8 \u9700\u8981\u9519\u8bef\u68c0\u67e5 \u8fd9\u4e2a\u662f\u6b63\u5e38\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"257\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-13.png\" alt=\"\" class=\"wp-image-3372\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-13.png 660w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-13-300x117.png 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<p>\u8f93\u5165 fdisk -l \u53ef\u4ee5\u67e5\u770bU\u76d8\u7684\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> fdisk -l <\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"288\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-14.png\" alt=\"\" class=\"wp-image-3373\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-14.png 649w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-14-300x133.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/figure>\n\n\n\n<p>\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165 df -h \u67e5\u770bU\u76d8\/dev\/sda1 \u6302\u8f7d\u7684\u76ee\u5f55\u4e3a\/run\/media\/sda1<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">df -h<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"157\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-15.png\" alt=\"\" class=\"wp-image-3374\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-15.png 650w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-15-300x72.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<p>\u6309\u7167\u4e0a\u9762\u7684\u56fe\u4e0aU\u76d8\u7684\u4f4d\u7f6e\uff0c\u8f93\u5165 cd \/run\/media\/sda1 \u8fdb\u5165U\u76d8 \u6216\u8005cd \/dev\/sda1 \u4e5f\u53ef\u4ee5 \u662f\u4e00\u6837<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd  \/run\/media\/sda1<\/pre>\n\n\n\n<p>\u7136\u540e\u8f93\u5165ls\u68c0\u7d22\u6587\u4ef6\u5939\u4e0b\u7684\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"89\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-16.png\" alt=\"\" class=\"wp-image-3375\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-16.png 668w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-16-300x40.png 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230 \u6587\u4ef6\u5939\u4e0b\u6709 a.txt \u548c b.txt\u4e24\u4e2a\u6587\u4ef6 \u8ddf\u6211\u4eec\u4e4b\u524d\u590d\u5236\u5230U\u76d8\u7684\u6587\u4ef6\u4e00\u81f4<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u7b80\u5355\u4ecb\u7ecd\u6302\u8f7d\u7684\u64cd\u4f5c<\/strong><\/h2>\n\n\n\n<p>1\uff09\u5728mnt\u6587\u4ef6\u5939\u4e0b\u521b\u5efa\u4e00\u4e2aUSB \u76ee\u5f55<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir -p \/mnt\/USB<\/pre>\n\n\n\n<p>2\uff09\u5c06\/dev\/sda1 \u4e5f\u5c31\u662fU\u76d8 \u6302\u8f7d\u5230 \/mnt\/USB \u6587\u4ef6\u5939\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mount \/dev\/sda1 \/mnt\/USB<\/pre>\n\n\n\n<p>3\uff09\u7528ls\u68c0\u7d22\u6211\u4eec\u6302\u8f7d\u7684\u76ee\u5f55 \uff0c\u53ef\u4ee5\u770b\u5230 \u76ee\u5f55\u4e0b \u5b58\u5728a.txt\u548cb.txt \u8bc1\u660e\u6302\u8f7d\u6210\u529f\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls \/mnt\/USB<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"97\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-17.png\" alt=\"\" class=\"wp-image-3378\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-17.png 633w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-17-300x46.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/figure>\n\n\n\n<p>4\uff09 \u89e3\u6302\u8f7d \u7528umount\u6307\u4ee4\u89e3\u9664\u4e4b\u524d\u7684\u6302\u8f7d<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">umount \/mnt\/USB <\/pre>\n\n\n\n<p>\u4e4b\u540e\u518d\u7528ls\u547d\u4ee4 \u5df2\u7ecf\u770b\u4e0d\u5230U\u76d8\u4e0b\u7684\u6587\u4ef6\u4e86 \uff0c\u8bf4\u660e\u89e3\u9664\u6302\u8f7d\u6210\u529f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"489\" height=\"75\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-18.png\" alt=\"\" class=\"wp-image-3379\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-18.png 489w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-18-300x46.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4ee5\u4e0a\u662f\u672c\u6b21\u7528U\u76d8\u6765\u9a8c\u8bc1\u6211\u4eec\u7684USB \u529f\u80fd\uff0c\u5b9e\u9645\u4e0aUSB HOST \u8fd8\u53ef\u4ee5\u63a5\u9f20\u6807\u548c\u952e\u76d8\u4e4b\u7c7b\u7684\u5916\u8bbe\uff0c\u5927\u5bb6\u53ef\u4ee5\u81ea\u884c\u6478\u7d22<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\u5728Petalinux \u4e0b\u8c03\u7528\u6211\u4eec\u7684USB \u8d44\u6e90\u5b9e\u73b0USB HOST\u7684\u529f\u80fd,\u5e76\u6700\u7ec8\u5b9e\u73b0U\u76d8\u7684\u8bc6\u522b\u548c\u8bfb\u53d6<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-4095","post","type-post","status-publish","format-standard","hentry","category-smart-zynq-spsl"],"views":1234,"_links":{"self":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/4095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/comments?post=4095"}],"version-history":[{"count":18,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/4095\/revisions"}],"predecessor-version":[{"id":9555,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/4095\/revisions\/9555"}],"wp:attachment":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/media?parent=4095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/categories?post=4095"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/tags?post=4095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}