{"id":1266,"date":"2023-03-30T13:23:00","date_gmt":"2023-03-30T13:23:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=1266"},"modified":"2023-03-30T13:23:00","modified_gmt":"2023-03-30T13:23:00","slug":"1266","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2023\/03\/30\/1266\/","title":{"rendered":"BearPi-HM_Nano\u5f00\u53d1\u642d\u5efa\u73af\u5883"},"content":{"rendered":"<h2>riscv_learn <a href=\"https:\/\/github.com\/hongwenjun\/riscv_learn\">\u6700\u4fbf\u5b9cRiscV\u5355\u7247\u673a\u5f00\u53d1\u677f\u5b66RISCV\u6c47\u7f16\u6307\u4ee4<\/a><\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2023\/03\/4102201498.webp\" alt=\"BearPi-HM_Nano.webp\" title=\"BearPi-HM_Nano.webp\"><\/p>\n<h1>BearPi-HM_Nano\u5f00\u53d1\u642d\u5efa\u73af\u5883<\/h1>\n<h2>\u5c0f\u718a\u6d3e\u5f00\u6e90\u793e\u533a \/ BearPi-HM_Nano <a href=\"https:\/\/gitee.com\/bearpi\/bearpi-hm_nano\">https:\/\/gitee.com\/bearpi\/bearpi-hm_nano<\/a><\/h2>\n<pre><code>## \u4ece\u5c0f\u718a\u6d3e\u5f00\u6e90\u793e\u533a\u4e0b\u8f7d\u6e90\u7801\uff0c\u7136\u540e\u4f7f\u7528\u4e0b\u884c\u547d\u4ee4\u7f16\u8bd1\npython3 build.py BearPi-HM_Nano\n\n## \u5982\u679c\u63d0\u793a\u9519\u8bef\uff0c\u9700\u8981\u628a python \u94fe\u63a5\u5230 python3\ncd \/usr\/bin\/ &amp;&amp; ln -s python3 python<\/code><\/pre>\n<h2>\u5b89\u88c5Python\u73af\u5883pip3\u5305\u7ba1\u7406\u5de5\u5177 \u548c wget tmux vim \u7b49\u5e38\u7528\u8f6f\u4ef6<\/h2>\n<pre><code>apt update -y \\r\n  &amp;&amp; apt install --no-install-recommends --no-install-suggests -y python3 python3-distutils \\r\n  &amp;&amp; apt install --no-install-recommends --no-install-suggests -y wget tmux vim \\r\n  &amp;&amp; wget https:\/\/bootstrap.pypa.io\/get-pip.py  --no-check-certificate  \\r\n  &amp;&amp; python3 get-pip.py<\/code><\/pre>\n<h2>Python pip3 \u4f7f\u7528\u56fd\u5185\u955c\u50cf\u6e90\u6765\u63d0\u9ad8\u4e0b\u8f7d\u901f\u5ea6<\/h2>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b pip \u4f7f\u7528\u7684\u662f\u56fd\u5916\u7684\u955c\u50cf\uff0c\u5728\u4e0b\u8f7d\u7684\u65f6\u5019\u901f\u5ea6\u975e\u5e38\u6162\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u56fd\u5185\u955c\u50cf\u6e90\u6765\u63d0\u9ad8\u4e0b\u8f7d\u901f\u5ea6\uff0c\u4f8b\u5982\u4f7f\u7528\u56fd\u5185\u6e05\u534e\u5927\u5b66\u7684\u6e90\uff0c\u5730\u5740\u5982\u4e0b\uff1a<\/p>\n<pre><code>-i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u5728 pip \u547d\u4ee4\u4e2d\u4f7f\u7528-i\u53c2\u6570\u6765\u6307\u5b9a\u955c\u50cf\u5730\u5740<\/p>\n<pre><code>pip3 install kconfiglib  -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\npip3 install setuptools\npip3 install pycryptodome\npip3 install six --upgrade --ignore-installed six\npip3 install ecdsa\n<\/code><\/pre>\n<h2>\u5b89\u88c5Scons<\/h2>\n<pre><code>apt install scons -y\n<\/code><\/pre>\n<h2>\u5b89\u88c5\u548c\u8bbe\u7f6e samba<\/h2>\n<pre><code>apt install samba\n\nmkdir -p \/home\/BearPi\nchown -R nobody:nogroup \/home\/BearPi\/\n\nvim \/etc\/samba\/smb.conf\nsystemctl restart smbd.service<\/code><\/pre>\n<h3>\u8bbe\u7f6e<code>smb.conf<\/code><\/h3>\n<pre><code>[global]\n   workgroup = WORKGROUP\n   max log size = 1000\n   logging = file\n   panic action = \/usr\/share\/samba\/panic-action %d\n   server role = standalone server\n   obey pam restrictions = yes\n   unix password sync = yes\n\n   passwd program = \/usr\/bin\/passwd %u\n   passwd chat = *Entersnews*spassword:* %n\n *Retypesnews*spassword:* %n\n *passwordsupdatedssuccessfully* .\n\n   pam password change = yes\n   map to guest = bad user\n   usershare allow guests = yes\n\n[homes]\n   comment = Home Directories\n   browseable = no\n   read only = yes\n   create mask = 0700\n   directory mask = 0700\n   valid users = %S\n\n[BearPi]\n   comment = Network Logon Service\n   path = \/home\/BearPi\/\n   guest ok = yes\n   read only = no<\/code><\/pre>\n<h2>\u5b89\u88c5\u7f16\u8bd1\u5de5\u5177\u73af\u5883 <a href=\"https:\/\/pan.baidu.com\/s\/1bp2ypAfH2HaNPTY2KwEhEA\">\u4e0b\u8f7d<\/a> \u63d0\u53d6\u7801\uff1a1234<\/h2>\n<ul>\n<li>\n<p>\u7f51\u7edc\u5171\u4eab\u8def\u5f84\u6253\u5f00 <code>\\192.168.1.111BearPi<\/code> \u628a\u4e0b\u8f7d\u7684 <code>BearPi-HM_Nano<\/code> \u5f00\u53d1\u677f\u8d44\u6599\u4e2d\u7f16\u8bd1\u5668\u4e09\u4e2a\u6587\u4ef6\u590d\u5236\u5230\u5171\u4eab\u8def\u5f84<\/p>\n<pre><code>gcc_riscv32-linux-7.3.0.tar.gz\ngn.1523.tar\nninja.1.9.0.tar<\/code><\/pre>\n<h3>\u5b89\u88c5gn \u5b89\u88c5ninja \u548c \u5b89\u88c5gcc_riscv32\uff08WLAN\u6a21\u7ec4\u7c7b\u7f16\u8bd1\u5de5\u5177\u94fe\uff09<\/h3>\n<pre><code>cd \/home\/BearPi\/\ntar -xvf gn.1523.tar -C ~\/\ntar -xvf ninja.1.9.0.tar -C ~\/\ntar -xvf gcc_riscv32-linux-7.3.0.tar.gz -C ~\/<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<code>vim ~\/.bashrc<\/code>   \u751f\u6548\u73af\u5883\u53d8\u91cf\uff1a<code>source ~\/.bashrc<\/code><\/h3>\n<pre><code>export PATH=~\/gn:$PATH\nexport PATH=~\/ninja:$PATH\nexport PATH=~\/gcc_riscv32\/bin:$PATH\nalias rvcc=riscv32-unknown-elf-gcc<\/code><\/pre>\n<h2><code>rvcc -S swap.c<\/code><\/h2>\n<h3>\u4f7f\u7528 riscv-gcc \u628a\u7b80\u5355\u7684C\u4ee3\u7801\uff0c\u8f6c\u6362\u6210\u6c47\u7f16\u6307\u4ee4\uff0c\u65b9\u4fbf\u5b66\u4e60<\/h3>\n<h2>\u6e90\u7801\u76ee\u5f55\u7b80\u4ecb<\/h2>\n<h3>\u5c0f\u718a\u6d3e\u7684\u6e90\u7801\u76ee\u5f55\u5ef6\u7eedOpenHarmony\u5b98\u65b9\u76ee\u5f55\u7ed3\u6784\uff0c\u4ee5\u4e0b\u662f\u6e90\u7801\u76ee\u5f55\u7684\u8bf4\u660e\uff1a<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u76ee\u5f55\u540d<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>applications<\/td>\n<td>BearPi-HM_Nano\u5e94\u7528\u7a0b\u5e8f\u6837\u4f8b<\/td>\n<\/tr>\n<tr>\n<td>base<\/td>\n<td>\u57fa\u7840\u8f6f\u4ef6\u670d\u52a1\u5b50\u7cfb\u7edf\u96c6&\u786c\u4ef6\u670d\u52a1\u5b50\u7cfb\u7edf\u96c6<\/td>\n<\/tr>\n<tr>\n<td>build<\/td>\n<td>\u7ec4\u4ef6\u5316\u7f16\u8bd1\u3001\u6784\u5efa\u548c\u914d\u7f6e\u811a\u672c<\/td>\n<\/tr>\n<tr>\n<td>domains<\/td>\n<td>\u589e\u5f3a\u8f6f\u4ef6\u670d\u52a1\u5b50\u7cfb\u7edf\u96c6<\/td>\n<\/tr>\n<tr>\n<td>drivers<\/td>\n<td>\u9a71\u52a8\u5b50\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>foundation<\/td>\n<td>\u7cfb\u7edf\u57fa\u7840\u80fd\u529b\u5b50\u7cfb\u7edf\u96c6<\/td>\n<\/tr>\n<tr>\n<td>kernel<\/td>\n<td>\u5185\u6838\u5b50\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>prebuilts<\/td>\n<td>\u7f16\u8bd1\u5668\u53ca\u5de5\u5177\u94fe\u5b50\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>test<\/td>\n<td>\u6d4b\u8bd5\u5b50\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>third_party<\/td>\n<td>\u5f00\u6e90\u7b2c\u4e09\u65b9\u7ec4\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>utils<\/td>\n<td>\u5e38\u7528\u7684\u5de5\u5177\u96c6<\/td>\n<\/tr>\n<tr>\n<td>vendor<\/td>\n<td>\u5382\u5546\u63d0\u4f9b\u7684\u8f6f\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>build.py<\/td>\n<td>\u7f16\u8bd1\u811a\u672c\u6587\u4ef6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>riscv_learn \u6700\u4fbf\u5b9cRiscV\u5355\u7247\u673a\u5f00\u53d1\u677f\u5b66RISCV\u6c47\u7f16\u6307\u4ee4 BearPi-HM_Nan [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11,12],"tags":[23,72],"class_list":["post-1266","post","type-post","status-publish","format-standard","hentry","category-linux","category-mcu","category-learn","tag-linux","tag-riscv"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=1266"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1266\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=1266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=1266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=1266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}