{"id":531,"date":"2024-01-17T08:00:56","date_gmt":"2024-01-17T00:00:56","guid":{"rendered":"https:\/\/www.zhoubin.asia\/?p=531"},"modified":"2024-01-26T10:39:57","modified_gmt":"2024-01-26T02:39:57","slug":"hailort_rockchi_driver","status":"publish","type":"post","link":"https:\/\/www.zhoubin.asia\/index.php\/2024\/01\/17\/hailort_rockchi_driver\/","title":{"rendered":"[HailoRT]\u5982\u4f55\u5728Rockchip\u82af\u7247\u4e0a\u5b89\u88c5Hailort\u9a71\u52a8"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h1>Step 1: \u6784\u5efa Hailort Driver \u9a71\u52a8ko\u6587\u4ef6<\/h1>\n<p>\u56de\u5230RK\u7684 SDK \u5e76\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u6784\u5efa Hailo PCI \u9a71\u52a8\u7a0b\u5e8f\uff1a<\/p>\n<pre><code>cd SDK\/kernel\/driver\r\ngit clone https:\/\/github.com\/hailo-ai\/hailort-drivers.git\r\n# \u6307\u5b9a\u8981\u4e0b\u8f7d\u7684\u7248\u672c\r\ngit clone --depth 1 -b v4.xx.x https:\/\/github.com\/hailo-ai\/hailort-drivers.git\r\n# \u786e\u8ba4\u4e0b\u8f7d\u7684 Hailort-Driver \u7248\u672c\r\ngit -C hailort-drivers\/ log -1  # tag: v4.xx.0 \r\n\r\necho \"obj-y       += hailort-drivers\/linux\/pcie\/\" &gt;&gt; Makefile\r\ncd ..\/..\/\r\n.\/build.sh kernel<\/code><\/pre>\n<p>\u68c0\u67e5\u662f\u5426\u6784\u5efa\u4e86 hailo_pci.ko\uff1a<\/p>\n<pre><code># \u786e\u8ba4\u6784\u5efa\u7684\u6587\u4ef6\u662f\u5426\u5b58\u5728\r\nfile kernel\/drivers\/hailort-drivers\/linux\/pcie\/hailo_pci.ko<\/code><\/pre>\n<p>\u4e0b\u8f7d Hailo8 \u56fa\u4ef6\uff1a<\/p>\n<pre><code>.\/kernel\/drivers\/hailort-drivers\/download_firmware.sh<\/code><\/pre>\n<h1>Step 2: \u51c6\u5907\u6240\u6709\u5fc5\u8981\u7684\u6587\u4ef6<\/h1>\n<p>hailo_pci.ko\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \uff08SDK\/kernel\/drivers\/hailort-drivers\/linux\/pcie\/hailo_pci.ko\uff09<\/p>\n<p>51-hailo-udev.rules\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\uff08SDK\/kernel\/drivers\/hailort-drivers\/linux\/pcie\/51-hailo-udev.rules\uff09<\/p>\n<p>hailo8_fw.4.xx.x.bin\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\uff08.\/kernel\/drivers\/hailort-drivers\/download_firmware.sh\uff09<\/p>\n<p>modules.builtin\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \uff08SDK\/kernel\/modules.builtin\uff09<\/p>\n<p>modules.order\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\uff08SDK\/kernel\/modules.order\uff09<\/p>\n<h1>Step 3: \u5c06\u6587\u4ef6\u63a8\u9001\u5230\u8bbe\u5907\u5e76\u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f<\/h1>\n<pre><code>sudo mkdir \u2013p \/usr\/lib\/modules\/&lt;kernel_version&gt;\/kernel\/drivers\/hailo\r\nsudo cp hailo_pci.ko \/usr\/lib\/modules\/&lt;kernel_version&gt;\/kernel\/drivers\/hailo\r\nsudo cp modules.builtin \/usr\/lib\/modules\/&lt;kernel_version&gt;\/\r\nsudo cp modules.order \/usr\/lib\/modules\/&lt;kernel_version&gt;\/\r\nsudo mkdir \u2013p \/lib\/firmware\/hailo\r\nsudo mv hailo8_fw.4.xx.0.bin \/lib\/firmware\/hailo\/hailo8_fw.bin \r\nsudo cp 51-hailo-udev.rules \/etc\/udev\/rules.d\/\r\nsudo depmod -a\r\nsudo modprobe hailo_pci\r\nsudo echo hailo_pci &gt;&gt; \/etc\/modules\r\nsudo reboot<\/code><\/pre>\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\u7528\u60a8\u7cfb\u7edf\u4e0a\u5b9e\u9645\u7684\u5185\u6838\u7248\u672c\u66ff\u6362 &lt;kernel_version&gt;\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Step 1: \u6784\u5efa Hailort Driver \u9a71\u52a8ko\u6587\u4ef6 \u56de\u5230RK\u7684 SDK \u5e76\u6267\u884c\u4ee5\u4e0b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[5,1],"tags":[],"class_list":["post-531","post","type-post","status-publish","format-standard","hentry","category-hailort","category-tech"],"_links":{"self":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/comments?post=531"}],"version-history":[{"count":1,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/531\/revisions"}],"predecessor-version":[{"id":532,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/531\/revisions\/532"}],"wp:attachment":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/media?parent=531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/categories?post=531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/tags?post=531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}