﻿{"id":2159,"date":"2021-11-13T19:35:38","date_gmt":"2021-11-13T11:35:38","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=2159"},"modified":"2021-11-23T18:13:45","modified_gmt":"2021-11-23T10:13:45","slug":"%e6%a0%91%e8%8e%93%e6%b4%be%e8%a3%85%e7%b3%bb%e7%bb%9f%e5%8e%86%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/nick.txtcc.com\/index.php\/linux\/2159","title":{"rendered":"\u6811\u8393\u6d3e\u88c5\u7cfb\u7edf\u5386\u7a0b"},"content":{"rendered":"<p>\u4fee\u6539wifi<\/p>\n<p>\/boot\/network-config<\/p>\n<pre><code class=\"lang-auto\">\nwifis:\n  wlan0:\n    dhcp4: true\n    optional: true\n    access-points:\n      &quot;home network&quot;:\n        password: &quot;123456789&quot;\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u52a0\u591a\u4e00\u5f20\u7f51\u5361\u4f18\u5148\u7ea7\u548c\u81ea\u52a8\u542f\u7528\u8bbe\u7f6e, 200\u4e3a\u4f4e\u4f18\u5148\u7ea7, \u9ed8\u8ba4\u4e3a100<\/p>\n<p>eth1:\ndhcp4: true\ndhcp4-overrides:\nroute-metric: 200<\/p>\n<p>&nbsp;<\/p>\n<p>\u4fee\u6539\u5206\u8fa8\u7387\n7\u5bf8hdmi<a class=\"relatedlink\" href=\"https:\/\/www.hqchip.com\/app\/964\" target=\"_blank\" rel=\"noopener\">\u663e\u793a\u5668<\/a>\u63d2\u7535\u8111\u4e0a\u76f4\u63a5\u80fd\u7528~\u5982\u679c\u63a5<a class=\"relatedlink\" href=\"https:\/\/bbs.elecfans.com\/group_709\/\" target=\"_blank\" rel=\"noopener\">\u6811\u8393\u6d3e<\/a>\u7684\u8bdd\u5c31\u5f97\u5148\u5728\u7535\u8111\u4e0a\u4fee\u6539\u4e00\u4e0b\u914d\u7f6e\u6587\u4ef6\u4e86\u3002\u6ca1\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u524d\uff0c\u76f4\u63a5\u63a5\u663e\u793a\u5668\u4f1a\u51fa\u73b0\u4e0d\u6ee1\u5c4f\u73b0\u8c61<\/p>\n<p>\u6253\u5f00\u6444\u50cf\u5934\uff0cI2C\u548cSPI\uff0c\u5173\u95ed\u4f4e\u7535\u538b\u62a5\u8b66<\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,;\">\u5728\u6811\u8393\u6d3e\u5b98\u7f51\u4e0b\u8f7dRaspbian \u955c\u50cf\uff0c\u5c06\u955c\u50cf\u70e7\u5230TF\u5361\u4e2d\uff0c\u6253\u5f00TF\u5361\u6839\u76ee\u5f55\u4e0b\u7684config.txt\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u6700\u540e\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/span><\/p>\n<ul class=\"litype_1\" type=\"1\">\n    <li>max_usb_current=1<\/li>\n    <li>hdmi_group=2<\/li>\n    <li>hdmi_mode=1<\/li>\n    <li>hdmi_mode=87<\/li>\n    <li>hdmi_cvt 800 480 60 6 0 0 0\nconfig_hdmi_boost=4\navoid_warnings=1\ndtparam=i2c_arm=on\ncamera_auto_detect=1\ndtparam=spi=on\nstart_x<span style=\"font-family: Consolas, Monaco, monospace;\">=<\/span>\n<span class=\"hljs-number\" style=\"font-family: Consolas, Monaco, monospace;\">1<\/span> <span class=\"hljs-comment\" style=\"font-family: Consolas, Monaco, monospace;\"># essential\n<\/span>gpu_mem<span style=\"font-family: Consolas, Monaco, monospace;\">=<\/span>\n<span class=\"hljs-number\" style=\"font-family: Consolas, Monaco, monospace;\">128<\/span> <span class=\"hljs-comment\" style=\"font-family: Consolas, Monaco, monospace;\"># at least, or maybe more if you wish\n<\/span>disable_camera_led<span style=\"font-family: Consolas, Monaco, monospace;\">=<\/span>\n<span class=\"hljs-number\" style=\"font-family: Consolas, Monaco, monospace;\">1<\/span> <span class=\"hljs-comment\" style=\"font-family: Consolas, Monaco, monospace;\"># optional, if you don&#8217;t want the led to glow<\/span>\n<p class=\"p1\"><span class=\"s1\">\u00a0<\/span><\/p>\n<\/li>\n<\/ul>\n<p>\u5c31\u662f\u8fd9\u6837\uff0c\u5c31\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u3002<\/p>\n<p>dtparam\u5de5\u5177\u5b89\u88c5\uff0c\u7f16\u8bd1\u4e0b\u9762\u6e90\u7801\u540e\uff0c\u6267\u884c<\/p>\n<p class=\"p1\"><span class=\"s1\">echo &#8220;<\/span>\n<span class=\"s1\">\/opt\/vc\/lib<\/span>\n<span class=\"s1\">&#8221; >> \/etc\/ld.so.conf.d\/libc.conf<\/span><\/p>\n<p>sudo ln -s <span class=\"s1\">\/boot\/firmware\/overlays\u00a0<\/span>\n<span class=\"s1\">\/boot\/overlays<\/span><\/p>\n<p><a class=\"postlink\" href=\"https:\/\/github.com\/raspberrypi\/userland\/tree\/master\/opensrc\/helpers\/libfdt\"><a href=\"https:\/\/github.com\/raspberrypi\/userland\">https:\/\/github.com\/raspberrypi\/userland<\/a> &#8230; ers\/libfdt<\/a>\n<a class=\"postlink\" href=\"https:\/\/github.com\/raspberrypi\/userland\/tree\/master\/host_applications\/linux\/apps\/dtoverlay\"><a href=\"https:\/\/github.com\/raspberrypi\/userland\">https:\/\/github.com\/raspberrypi\/userland<\/a> &#8230; \/dtoverlay<\/a>\nClone the repo and run .\/buildme is the easiest way to build everything there.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5220\u9664\u6ca1\u7528\u7684\u670d\u52a1\nsystemctl <span class=\"hljs-keyword\">disable <\/span>\n<span class=\"hljs-keyword\">cloud-init-local <\/span>\n<span class=\"hljs-keyword\">cloud-init <\/span>\n<span class=\"hljs-keyword\">cloud-config <\/span>\n<span class=\"hljs-keyword\">cloud-final <\/span>\n<span class=\"s1\">ufw unattended-upgrades rsync multipath-tools\n<\/span>systemctl stop <span class=\"hljs-keyword\">cloud-init-local <\/span>\n<span class=\"hljs-keyword\">cloud-init <\/span>\n<span class=\"hljs-keyword\">cloud-config <\/span>\n<span class=\"hljs-keyword\">cloud-final ufw unattended-upgrades rsync multipath-tools<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>sudo apt-get install -y tmux software-properties-common autossh build-essential yasm <span class=\"s1\">libtool automake gettext <\/span>\n<span class=\"s1\">libz3-dev libbz2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev <\/span>cmake-curses-gui <span class=\"s1\">ca-certificates <\/span>\n<span class=\"s1\">libmp3lame-dev <\/span>\n<span class=\"s1\">libv4l-dev libsoup2.4-dev\u00a0<\/span><\/p>\n<pre><code class=\"language-console\">sudo UPDATE_SELF=0 rpi-update<\/code><\/pre>\n<h2>\u3010\u7a76\u6781\u65b9\u6cd5\u3011\u672c\u5730\u66f4\u65b0<\/h2>\n<p data-pid=\"bTqQEB7y\">\u5373\u4f7f\u8df3\u8fc7\u81ea\u66f4\u65b0\uff0c\u4e0b\u8f7d\u901f\u5ea6\u4e5f\u592a\u6162\uff0c\u8fd8\u7ecf\u5e38\u65ad\u6d41\u3002\u53ef\u4ee5\u8003\u8651\u672c\u5730\u66f4\u65b0\uff1a<\/p>\n<p data-pid=\"flyqi6sQ\">\u5148\u5728PC\u4e0a\u4e0b\u8f7d\u56fa\u4ef6\uff08\u53ef\u4ee5\u7528\u4e00\u4e0b\u9b54\u6cd5\u4e0a\u7f51\uff09\uff1a<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-console\">curl -L https:\/\/github.com\/Hexxeh\/rpi-firmware\/archive\/master.tar.gz -o master.tar.gz<\/code><\/pre>\n<\/div>\n<p data-pid=\"2DiRUhIw\">\u7136\u540e\u7528scp\u4f20\u5230\u6811\u8393\u6d3e\u4e0a\u7684<code>\/root<\/code>\u76ee\u5f55\u4e0b\uff0c\u4e4b\u540essh\u8fde\u4e0a\u6811\u8393\u6d3e\uff1a<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-console\"># \u5207\u6362\u5230root\u7528\u6237\uff08\u7b2c\u4e00\u6b21\u5207\u5230root\u8bb0\u5f97\u7528sudo passwd root\u6fc0\u6d3b\uff09\nsu\n\n# \u8fdb\u5165.rpi-firmware\u76ee\u5f55\u5e76\u89e3\u538b(\u5982\u679c\u6ca1\u6709\u8be5\u76ee\u5f55\uff0c\u5c31\u521b\u5efa\u4e00\u4e2a)\nmkdir \/root\/.rpi-firmware\ncd \/root\/.rpi-firmware &amp;&amp; tar -xvzf \/root\/master.tar.gz\n\n# \u3010\u6ce8\u3011\u8fd9\u4e00\u6b65\u662f\u6211\u81ea\u5df1\u52a0\u7684\uff0c\u53ef\u80fd\u662f\u9047\u5230\u4e86\u7279\u6b8a\u60c5\u51b5\u3002\n# \u68c0\u67e5\u4e00\u4e0b\u5f53\u524d\u76ee\u5f55\u4e2d\u662f\u5426\u6709*.elf\u6587\u4ef6\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5c31\u8bf4\u660e\u90a3\u4e9b\u6587\u4ef6\n# \u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u4e00\u4e2a\u53ebrpi-firmware-master\u7684\u5b50\u76ee\u5f55\u4e0b\n# \u628a\u91cc\u9762\u7684\u6587\u4ef6\u5168\u62f7\u8d1d\u5230\u5f53\u524d\u76ee\u5f55\u4e2d\uff08\/root\/.rpi-firmware\uff09\ncp -r .\/rpi-firmware-master\/* .\/\n\n# \u6267\u884c\u672c\u5730\u66f4\u65b0\nUPDATE_SELF=0 SKIP_DOWNLOAD=1 rpi-update\n\n# \u91cd\u542f\nreboot<\/code><\/pre>\n<\/div>\n<h2>4 \u68c0\u67e5<\/h2>\n<p data-pid=\"5gsZZi5y\">\u5bf9\u4e8e\u6811\u8393\u6d3e4\u7684\u4e00\u4e2a\u68c0\u67e5\u65b9\u6cd5\uff1a<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-console\">ls -la \/opt\/vc\/lib<\/code><\/pre>\n<\/div>\n<p data-pid=\"qhUyuV4I\">\u770b\u8be5\u76ee\u5f55\u4e0b\u662f\u5426\u6709<code>libEGL.so<\/code>\u548c<code>libGLESv2.so<\/code>\u8fd9\u4e24\u4e2a\u5e93\uff0c\u66f4\u65b0\u524d\u8fd9\u4e24\u4e2a\u5e93\u90fd\u662f\u6ca1\u6709\u7684\u3002<\/p>\n<p data-pid=\"zUpLSdDi\">\u5982\u679c\u8fd9\u4e24\u4e2a\u5e93\u51fa\u73b0\u4e86\uff0c\u5e76\u4e14\u662f\u771f\u6b63\u7684\u5e93\u800c\u4e0d\u662f\u8f6f\u94fe\u63a5\uff0c\u5c31\u8bf4\u660e\u66f4\u65b0\u5927\u6982\u53ef\u80fd\u4e5f\u8bb8\u6210\u529f\u4e86\u5427\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u4fee\u6539wifi \/boot\/network-config wifis: wlan0: dhcp4: true optional: true access-points: &#8220;home netwo&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,39],"tags":[],"class_list":["post-2159","post","type-post","status-publish","format-standard","hentry","category-linux","category-scm"],"_links":{"self":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=2159"}],"version-history":[{"count":17,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2159\/revisions"}],"predecessor-version":[{"id":2261,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2159\/revisions\/2261"}],"wp:attachment":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=2159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=2159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=2159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}