{"id":82509,"date":"2023-11-01T02:22:03","date_gmt":"2023-10-31T18:22:03","guid":{"rendered":"http:\/\/gulass.cn\/?p=82509"},"modified":"2023-11-01T02:22:03","modified_gmt":"2023-10-31T18:22:03","slug":"raspberry-pi-perl","status":"publish","type":"post","link":"https:\/\/gulass.cn\/raspberry-pi-perl.html","title":{"rendered":"\u6811\u8393\u6d3e\u7684Perl \u9068\u6e38\u4e4b\u65c5"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u6211\u5728 SVPerl \u548c\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u8fd8\u60f3\u8bb2\u7b2c\u4e8c\u70b9\uff0c\u5c31\u662f\u4ecb\u7ecd\u6211\u7684 \u201cPiFlash\u201d \u811a\u672c\u3002\u867d\u7136\u5b83\u662f\u7528 Perl \u5199\u7684\uff0c\u4f46\u662f\u4e0d\u9700\u8981\u4f60\u6709\u591a\u4e86\u89e3 Perl \u5c31\u53ef\u4ee5\u5728 Linux \u4e0b\u5c06\u6811\u8393\u6d3e\u7cfb\u7edf\u81ea\u52a8\u5316\u70e7\u5f55\u5230 SD \u5361\u3002\u8fd9\u6837\u5bf9\u521d\u5b66\u8005\u5c31\u6bd4\u8f83\u53cb\u597d\uff0c\u907f\u514d\u4ed6\u4eec\u5728\u70e7\u5f55 SD \u5361\u65f6\u5019\uff0c\u5076\u7136\u64e6\u9664\u4e86\u6574\u4e2a\u786c\u76d8\u3002\u5373\u4f7f\u662f\u9ad8\u7ea7\u7528\u6237\u4e5f\u53ef\u4ee5\u4ece\u5b83\u7684\u81ea\u52a8\u5316\u5de5\u4f5c\u4e2d\u53d7\u76ca\u3002
\n<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u4e0b\u8f7d\u7cfb\u7edf\u955c\u50cf<\/strong><\/div>\n

\u60f3\u8981\u5f00\u542f\u6811\u8393\u6d3e\u4e4b\u65c5\uff0c\u4f60\u9996\u5148\u9700\u8981\u4e3a\u5b83\u4e0b\u8f7d\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u3002\u6211\u4eec\u79f0\u4e4b\u4e3a\u201c\u7cfb\u7edf\u955c\u50cf\u201d\u6587\u4ef6\u3002\u4e00\u65e6\u4f60\u628a\u5b83\u4e0b\u8f7d\u5230\u4f60\u7684\u684c\u9762\u3001\u624b\u63d0\u7535\u8111\uff0c\u6216\u8005\u751a\u81f3\u662f\u53e6\u4e00\u4e2a\u6811\u8393\u6d3e\u4e2d\uff0c\u6211\u5c31\u9700\u8981\u5199\u5165\u6216\u8005\u79f0\u4e4b\u4e3a\u201c\u70e7\u5f55\u201d\u8fdb\u4f60\u7684 SD\u5361\u3002\u8be6\u7ec6\u60c5\u51b5\u53ef\u4ee5\u770b\u5728\u7ebf\u6587\u4ef6\u3002\u624b\u52a8\u505a\u8fd9\u4ef6\u4e8b\u60c5\u9700\u8981\u4e00\u4e9b\u529f\u5e95\uff0c\u4f60\u8981\u628a\u7cfb\u7edf\u955c\u50cf\u70e7\u5f55\u5230\u6574\u4e2a SD\u5361\uff0c\u800c\u4e0d\u662f\u5176\u4e2d\u4e00\u5757\u5206\u533a\u3002\u7cfb\u7edf\u955c\u50cf\u5fc5\u987b\u72ec\u81ea\u5305\u542b\u81f3\u5c11\u4e00\u4e2a\u5206\u533a\uff0c\u56e0\u4e3a\u6811\u8393\u6d3e\u5f15\u5bfc\u9700\u8981\u4e00\u4e2a FAT32\u6587\u4ef6\u7cfb\u7edf\u5206\u533a\uff0c\u7cfb\u7edf\u5f15\u5bfc\u8fd9\u91cc\u5f00\u59cb\u3002\u9664\u4e86\u5f15\u5bfc\u5206\u533a\uff0c\u5176\u4ed6\u5206\u533a\u53ef\u4ee5\u662f\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u652f\u6301\u7684\u4efb\u4f55\u5206\u533a\u7c7b\u578b\u3002<\/p>\n

\u5728\u5927\u90e8\u5206\u6811\u8393\u6d3e\u4e2d\uff0c\u6211\u4eec\u90fd\u8fd0\u884c\u7684\u662f\u67d0\u4e9b\u4f7f\u7528 Linux \u5185\u6838\u7684\u53d1\u884c\u7248\u3002\u5df2\u7ecf\u6709\u4e00\u7cfb\u5217\u6811\u8393\u6d3e\u4e2d\u5e38\u7528\u7684\u7cfb\u7edf\u955c\u50cf\u4f60\u53ef\u4ee5\u4e0b\u8f7d\u4f7f\u7528\u3002\uff08\u5f53\u7136\uff0c\u6ca1\u4ec0\u4e48\u80fd\u963b\u6b62\u4f60\u81ea\u5df1\u9020\u8f6e\u5b50\uff09<\/p>\n

\u6811\u8393\u6d3e\u57fa\u91d1\u4f1a\u5411\u65b0\u624b\u63a8\u8350\u7684\u662f\u201cNOOBS\u201d\u7cfb\u7edf\u3002\u5b83\u4ee3\u8868\u4e86 \u201cNew Out of the Box System\u201d\uff08\u65b0\u9c9c\u51fa\u7089\u5373\u5f00\u5373\u7528\u7cfb\u7edf\uff09\uff0c\u663e\u7136\u5b83\u597d\u50cf\u542c\u8d77\u6765\u50cf\u672f\u8bed \u201cnoob\"\u201d\uff08\u5c0f\u767d\uff09\uff0c\u901a\u4fd7\u70b9\u8bf4\u5c31\u662f \u201cnewbie\u201d\uff08\u83dc\u9e1f\uff09\u3002NOOBS \u662f\u4e00\u4e2a\u57fa\u4e8e\u6811\u8393\u6d3e\u7684 Linux \u7cfb\u7edf\uff0c\u5b83\u4f1a\u7ed9\u4f60\u4e00\u4e2a\u83dc\u5355\u53ef\u4ee5\u5728\u4f60\u7684\u6811\u8393\u6d3e\u4e0a\u81ea\u52a8\u4e0b\u8f7d\u5b89\u88c5\u51e0\u4e2a\u5176\u5b83\u7684\u7cfb\u7edf\u955c\u50cf\u3002<\/p>\n

Raspbian Linux \u662f Debian Linux \u53d1\u884c\u7248\u7684\u6811\u8393\u6d3e\u5b9a\u5236\u7248\u3002\u5b83\u662f\u4e3a\u6811\u8393\u6d3e\u5f00\u53d1\u7684\u6b63\u5f0f Linux \u53d1\u884c\u7248\uff0c\u5e76\u4e14\u7531\u6811\u8393\u6d3e\u57fa\u91d1\u4f1a\u7ef4\u62a4\u3002\u51e0\u4e4e\u6240\u6709\u6811\u8393\u6d3e\u9a71\u52a8\u548c\u8f6f\u4ef6\u90fd\u4f1a\u5728 Raspbian \u4e0a\u5148\u8bd5\u7528\uff0c\u7136\u540e\u624d\u4f1a\u653e\u5230\u5176\u5b83\u53d1\u884c\u7248\u4e0a\u3002\u5176\u9ed8\u8ba4\u5b89\u88c5\u535a\u5ba2 Perl\u3002<\/p>\n

Ubuntu Linux \uff08\u8fd8\u6709\u5176\u793e\u533a\u7248\u7684 Ubuntu MATE\uff09\u4e5f\u5c06\u6811\u8393\u6d3e\u4f5c\u4e3a\u5176\u652f\u6301 ARM \uff08Advanced RISC Machines\uff09\u5904\u7406\u5668\u7684\u5e73\u53f0\u4e4b\u4e00\u3002RISC\uff08Reduced Instruction Set Computer\uff09Ubuntu \u662f\u4e00\u4e2a Debian Linux \u7684\u5546\u4e1a\u5316\u652f\u6301\u7684\u5f00\u6e90\u5206\u652f\uff0c\u5b83\u4e5f\u4f7f\u7528 DEB \u5305\u7ba1\u7406\u5668\u3002Perl \u4e5f\u5728\u5176\u4e2d\u3002\u5b83\u4ec5\u4ec5\u652f\u6301 32 \u4f4d ARM7 \u6216\u8005 64 \u4f4d ARM8 \u5904\u7406\u5668\u7684\u6811\u8393\u6d3e 2 \u548c 3\u3002ARM6 \u7684\u6811\u8393\u6d3e 1 \u548c Zero \u4ece\u672a\u88ab Ubuntu \u6784\u5efa\u8fc7\u7a0b\u652f\u6301\u3002<\/p>\n

Fedora Linux \u652f\u6301\u6811\u8393\u6d3e2 \uff0c\u800c Fedora 25 \u652f\u6301 3\u3002 Fedora \u662f\u4e00\u4e2a\u96b6\u5c5e\u4e8e\u7ea2\u5e3d\uff08Red Hat\uff09\u7684\u5f00\u6e90\u9879\u76ee\u3002Fedora \u662f\u4e2a\u57fa\u7840\uff0c\u5546\u4e1a\u7248\u7684 RHEL\uff08Red Hat Enterprise Linux\uff09\u5728\u5176\u4e0a\u589e\u52a0\u4e86\u5546\u4e1a\u8f6f\u4ef6\u5305\u548c\u652f\u6301\uff0c\u6240\u4ee5\u5176\u8f6f\u4ef6\u50cf\u6240\u6709\u7684\u517c\u5bb9\u7ea2\u5e3d\u7684\u53d1\u884c\u7248\u4e00\u6837\u6765\u81ea RPM\uff08Red Hat Package Manager\uff09 \u8f6f\u4ef6\u5305\u3002\u5c31\u50cf\u5176\u5b83\u53d1\u884c\u7248\u4e00\u6837\uff0c\u4e5f\u5305\u62ec Perl\u3002<\/p>\n

RISC OS \u662f\u4e00\u4e2a\u7279\u522b\u9488\u5bf9 ARM \u5904\u7406\u5668\u7684\u5355\u7528\u6237\u64cd\u4f5c\u7cfb\u7edf\u3002\u5982\u679c\u4f60\u60f3\u8981\u4e00\u4e2a\u6bd4 Linux \u7cfb\u7edf\u66f4\u52a0\u7b80\u6d01\u7684\u5c0f\u578b\u684c\u9762\uff08\u529f\u80fd\u66f4\u5c11\uff09\uff0c\u4f60\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b\u3002\u5b83\u540c\u6837\u652f\u6301 Perl\u3002<\/p>\n

RaspBSD \u662f\u4e00\u4e2a FreeBSD \u7684\u6811\u8393\u6d3e\u53d1\u884c\u7248\u3002\u5b83\u662f\u4e00\u4e2a\u57fa\u4e8e Unix \u7684\u7cfb\u7edf\uff0c\u800c\u4e0d\u662f Linux\u3002\u4f5c\u4e3a\u5f00\u6e90 Unix \u7684\u4e00\u5458\uff0c\u5b83\u5ef6\u7eed\u4e86 Unix \u7684\u529f\u80fd\uff0c\u800c\u4e14\u548c Linux \u6709\u7740\u4f17\u591a\u76f8\u4f3c\u4e4b\u5904\u3002\u5305\u62ec\u6709\u7c7b\u4f3c\u7684\u5f00\u6e90\u8f6f\u4ef6\u5e26\u6765\u7684\u76f8\u4f3c\u7684\u7cfb\u7edf\u73af\u5883\uff0c\u5305\u62ec Perl\u3002<\/p>\n

OSMC\uff0c\u5373\u5f00\u6e90\u591a\u5a92\u4f53\u4e2d\u5fc3\uff0c\u4ee5\u53ca LibreElec \u7535\u89c6\u5a31\u4e50\u4e2d\u5fc3\uff0c\u5b83\u4eec\u90fd\u57fa\u4e8e\u8fd0\u884c Linux \u5185\u6838\u4e4b\u4e0a\u7684 Kodi \u5a31\u4e50\u4e2d\u5fc3\u3002\u5b83\u662f\u4e00\u4e2a\u5c0f\u5de7\u3001\u7279\u5316\u7684 Linux \u7cfb\u7edf\uff0c\u6240\u4ee5\u4e0d\u8981\u671f\u671b\u5b83\u80fd\u652f\u6301 Perl\u3002<\/p>\n

Microsoft Windows IoT Core \u662f\u4ec5\u8fd0\u884c\u5728\u6811\u8393\u6d3e\uff13\u4e0a\u7684\u65b0\u6210\u5458\u3002\u4f60\u9700\u8981\u5fae\u8f6f\u5f00\u53d1\u8005\u8eab\u4efd\u624d\u80fd\u4e0b\u8f7d\u3002\u800c\u4f5c\u4e3a\u4e00\u4e2a Linux \u6781\u5ba2\uff0c\u6211\u6839\u672c\u4e0d\u770b\u5b83\u3002\u6211\u7684 PiFlash \u811a\u672c\u8fd8\u4e0d\u652f\u6301\u5b83\uff0c\u4f46\u5982\u679c\u4f60\u627e\u7684\u662f\u5b83\uff0c\u4f60\u53ef\u4ee5\u53bb\u770b\u770b\u3002<\/p>\n

PiFlash \u811a\u672c<\/strong><\/div>\n

\u5982\u679c\u4f60\u60f3\u770b\u770b\u6811\u8393\u6d3e SD \u5361\u70e7\u5f55\u6307\u5bfc\uff0c\u4f60\u53ef\u4ee5\u627e\u5230\u5728 Windows \u6216\u8005 Mac \u7cfb\u7edf\u4e0b\u9700\u8981\u4e0b\u8f7d\u7684\u5de5\u5177\u6765\u5b8c\u6210\u70e7\u5f55\u4efb\u52a1\u3002\u4f46\u662f\u5bf9\u4e8e Linux \u7cfb\u7edf\uff0c\u53ea\u6709\u4e00\u7cfb\u5217\u624b\u5de5\u64cd\u4f5c\u5efa\u8bae\u3002\u6211\u5df2\u7ecf\u624b\u5de5\u505a\u8fc7\u8fd9\u4e2a\u592a\u591a\u6b21\uff0c\u8fd9\u5f88\u5bb9\u6613\u5f15\u53d1\u4e00\u4e2a\u5f00\u53d1\u8005\u7684\u672c\u80fd\u53bb\u81ea\u52a8\u5316\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u8fd9\u5c31\u662f PiFlash \u811a\u672c\u7684\u8d77\u6e90\u3002\u8fd9\u6709\u70b9\u96be\uff0c\u56e0\u4e3a Linux \u6709\u592a\u591a\u65b9\u6cd5\u53ef\u4ee5\u914d\u7f6e\uff0c\u4f46\u662f\u5b83\u4eec\u90fd\u662f\u57fa\u4e8e Linux \u5185\u6838\u7684\u3002<\/p>\n

\u6211\u603b\u662f\u89c9\u5f97\uff0c\u624b\u5de5\u64cd\u4f5c\u6f5c\u5728\u6700\u5927\u7684\u5931\u8bef\u6050\u6015\u5c31\u662f\u5076\u7136\u9519\u8bef\u5730\u64e6\u9664\u4e86\u67d0\u4e2a\u8bbe\u5907\uff0c\u800c\u4e0d\u662f\u64e6\u9664\u4e86 SD \u5361\uff0c\u7136\u540e\u5f7b\u5e95\u6e05\u9664\u4e86\u6211\u672c\u60f3\u4fdd\u7559\u5728\u786c\u76d8\u7684\u4e1c\u897f\u3002\u6211\u5728 SVPerl \u6f14\u8bb2\u4e2d\u4e5f\u8bf4\u4e86\uff0c\u6211\u5f88\u60ca\u8bb6\u5730\u53d1\u73b0\u5728\u542c\u4f17\u4e2d\u6709\u72af\u4e86\u8fd9\u79cd\u9519\u8bef\uff08\u800c\u4e14\u4e0d\u5bb3\u6015\u627f\u8ba4\uff09\u7684\u4eba\u3002\u56e0\u6b64\uff0cPiFlash \u5176\u4e2d\u4e00\u4e2a\u76ee\u7684\u5c31\u662f\u4fdd\u62a4\u65b0\u624b\u7684\u5b89\u5168\uff0c\u4e0d\u4f1a\u64e6\u9664 SD \u5361\u4e4b\u5916\u7684\u8bbe\u5907\u3002PiFlash \u811a\u672c\u8fd8\u4f1a\u62d2\u7edd\u8986\u5199\u5305\u542b\u4e86\u5df2\u7ecf\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u8bbe\u5907\u3002<\/p>\n

\u5bf9\u4e8e\u6709\u7ecf\u9a8c\u7684\u7528\u6237\uff0c\u5305\u62ec\u6211\uff0cPiFlash \u811a\u672c\u8fd8\u63d0\u4f9b\u63d0\u4f9b\u4e00\u4e2a\u7b80\u4fbf\u7684\u81ea\u52a8\u5316\u670d\u52a1\u3002\u4e0b\u8f7d\u5b8c\u7cfb\u7edf\u955c\u50cf\u4e4b\u540e\uff0c\u6211\u4e0d\u9700\u8981\u5fc5\u987b\u4ece zip\u683c\u5f0f\u4e2d\u89e3\u538b\u7f29\u6216\u8005\u63d0\u53d6\u51fa\u7cfb\u7edf\u955c\u50cf\u3002PiFlash \u53ef\u4ee5\u76f4\u63a5\u63d0\u53d6\u5b83\uff0c\u4e0d\u7ba1\u662f\u54ea\u79cd\u683c\u5f0f\uff0c\u5e76\u4e14\u76f4\u63a5\u70e7\u5f55\u5230 SD \u5361\u4e2d\u3002<\/p>\n

\u6211\u628a PiFlash \u53ca\u5176\u6307\u5bfc\u53d1\u5e03\u5728\u4e86 GitHub \u4e0a\u3002<\/p>\n

\u547d\u4ee4\u884c\u7528\u6cd5\u5982\u4e0b\uff1a<\/p>\n

piflash [--verbose] input-file output-device\r\npiflash [--verbose] --SDsearch\r\n<\/pre>\n

input-file \u53c2\u6570\u662f\u4f60\u8981\u5199\u5165\u7684\u7cfb\u7edf\u955c\u50cf\u6587\u4ef6\uff0c\u53ea\u8981\u662f\u4f60\u4ece\u6811\u8393\u6d3e\u53d1\u884c\u7248\u7f51\u7ad9\u4e0b\u8f7d\u7684\u955c\u50cf\u90fd\u884c\u3002output-device \u53c2\u6570\u662f\u4f60\u8981\u5199\u5165\u7684 SD \u5361\u7684\u5757\u8bbe\u5907\u8def\u5f84\u3002<\/p>\n

\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 --SDsearch \u53c2\u6570\u5217\u51fa\u6302\u8f7d\u5728\u7cfb\u7edf\u4e2d SD \u5361\u8bbe\u5907\u540d\u79f0\u3002<\/p>\n

\u53ef\u9009\u9879 --verbose \u53ef\u4ee5\u8f93\u51fa\u6240\u6709\u7684\u7a0b\u5e8f\u72b6\u6001\u6570\u636e\uff0c\u5b83\u5728\u4f60\u9700\u8981\u5e2e\u52a9\u65f6\u6216\u8005\u9012\u9001 bug \u62a5\u544a\u548c\u81ea\u884c\u6392\u9519\u65f6\u5f88\u6709\u7528\u3002\u5b83\u5c31\u662f\u6211\u5f00\u53d1\u65f6\u7528\u7684\u3002<\/p>\n

\u4e0b\u9762\u7684\u4f8b\u5b50\u662f\u6211\u4f7f\u7528\u8be5\u811a\u672c\u5199\u5165\u4ecd\u662f zip \u5b58\u6863\u7684 Raspbian \u955c\u50cf\u5230\u4f4d\u4e8e \/dev\/mmcblk0 \u7684 SD \u5361\uff1a<\/p>\n

piflash 2016-11-25-raspbian-jessie.img.zip \/dev\/mmcblk0\r\n<\/pre>\n

\u5982\u679c\u4f60\u5df2\u7ecf\u6307\u5b9a\u4e86 \/dev\/mmcblk0p1 \uff08SD \u5361\u7684\u7b2c\u4e00\u5206\u533a\uff09\uff0c\u5b83\u4f1a\u8bc6\u522b\u5230\u8fd9\u4e2a\u5206\u533a\u4e0d\u662f\u4e00\u4e2a\u6b63\u786e\u7684\u4f4d\u7f6e\uff0c\u5e76\u62d2\u7edd\u5199\u5165\u3002<\/p>\n

\u5728\u4e0d\u540c\u7684 Linux \u7cfb\u7edf\u4e2d\u600e\u6837\u53bb\u8bc6\u522b\u54ea\u4e2a\u8bbe\u5907\u662f SD \u5361\u662f\u4e00\u4e2a\u6280\u672f\u6d3b\u3002\u50cf mmcblk0 \u8fd9\u79cd\u5728\u6211\u7684\u7b14\u8bb0\u672c\u4e0a\u662f\u57fa\u4e8e PCI \u7684 SD\u5361\u63a5\u53e3\u3002\u5982\u679c\u6211\u4f7f\u7528\u4e86 USB SD \u5361\u63a5\u53e3\uff0c\u5b83\u5c31\u662f \/dev\/sdb\uff0c\u8fd9\u5728\u591a\u786c\u76d8\u7684\u7cfb\u7edf\u4e2d\u4e0d\u597d\u533a\u5206\u3002\u7136\u800c\uff0c\u53ea\u6709\u5c11\u91cf\u7684 Linux \u5757\u8bbe\u5907\u652f\u6301 SD \u5361\u3002PiFlash \u5728\u8fd9\u4e24\u79cd\u60c5\u51b5\u4e0b\u90fd\u4f1a\u68c0\u67e5\u5757\u8bbe\u5907\u7684\u53c2\u6570\u3002\u5982\u679c\u5168\u90e8\u5931\u8d25\uff0c\u5b83\u4f1a\u8ba4\u4e3a\u53ef\u5199\u5165\u3001\u53ef\u79fb\u52a8\u7684\uff0c\u5e76\u6709\u7740\u6b63\u786e\u7269\u7406\u6247\u533a\u6570\u91cf\u7684 USB \u9a71\u52a8\u5668\u662f SD \u5361\u3002<\/p>\n

\u6211\u60f3\u8fd9\u5e94\u8be5\u80fd\u6db5\u76d6\u5927\u90e8\u5206\u60c5\u51b5\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u4f7f\u7528\u4e86\u6211\u4e0d\u77e5\u9053\u7684 SD \u5361\u63a5\u53e3\u5462\uff1f\u6211\u4e50\u610f\u770b\u5230\u4f60\u7684\u6765\u4fe1\u3002\u8bf7\u5728\u8f93\u51fa\u4fe1\u606f\u4e2d\u52a0\u4e0a<\/p>\n

 --verbos --SDsearch <\/pre>\n

\u53c2\u6570\uff0c\u4ee5\u4fbf\u8ba9\u6211\u53ef\u4ee5\u77e5\u9053\u4f60\u7cfb\u7edf\u76ee\u524d\u7684\u73af\u5883\u3002\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u5982\u679c PiFlash \u811a\u672c\u53ef\u4ee5\u88ab\u5e7f\u6cdb\u5229\u7528\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5f00\u6e90\u793e\u533a\u53bb\u5c3d\u53ef\u80fd\u7684\u5e2e\u52a9\u66f4\u591a\u7684\u6811\u8393\u6d3e\u7528\u6237\u3002<\/p>\n

\u6811\u8393\u6d3e\u7684 CPAN \u6a21\u5757<\/strong><\/div>\n

CPAN\uff08Comprehensive Perl Archive Network\uff09\u662f\u4e00\u4e2a\u4e16\u754c\u8303\u56f4\u5185\u5305\u542b\u5404\u79cd Perl \u6a21\u5757\u7684\u7684\u4e0b\u8f7d\u955c\u50cf\u3002\u5b83\u4eec\u90fd\u662f\u5f00\u6e90\u7684\u3002\u5927\u91cf CPAN \u4e2d\u7684\u6a21\u5757\u90fd\u662f\u5386\u4e45\u5f25\u575a\u3002\u5bf9\u4e8e\u6210\u5343\u4e0a\u767e\u7684\u4efb\u52a1\uff0c\u4f60\u4e0d\u9700\u8981\u91cd\u590d\u9020\u8f6e\u5b50\uff0c\u53ea\u8981\u5229\u7528\u522b\u4eba\u5df2\u7ecf\u53d1\u5e03\u7684\u4ee3\u7801\u5c31\u53ef\u4ee5\u4e86\u3002\u7136\u540e\uff0c\u4f60\u8fd8\u53ef\u4ee5\u63d0\u4ea4\u4f60\u7684\u65b0\u529f\u80fd\u3002<\/p>\n

\u5c3d\u7ba1\u6811\u8393\u6d3e\u662f\u4e2a\u4e94\u810f\u4ff1\u5168\u7684 Linux \u7cfb\u7edf\uff0c\u652f\u6301\u5927\u90e8\u5206 CPAN \u6a21\u5757\uff0c\u4f46\u662f\u8fd9\u91cc\u6211\u60f3\u5f3a\u8c03\u4e00\u4e0b\u4e13\u4e3a\u6811\u8393\u6d3e\u786c\u4ef6\u5f00\u53d1\u7684\u4e1c\u897f\u3002\u4e00\u822c\u6765\u8bf4\u5b83\u4eec\u90fd\u7528\u5728\u6d4b\u91cf\u3001\u63a7\u5236\u3001\u673a\u5668\u4eba\u65b9\u9762\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7 GPIO \uff08General-Purpose Input\/Output\uff09\u9488\u811a\u5c06\u4f60\u7684\u6811\u8393\u6d3e\u8fde\u63a5\u5230\u5916\u90e8\u7535\u5b50\u8bbe\u5907\u3002<\/p>\n

\u53ef\u4ee5\u4f7f\u7528\u6811\u8393\u6d3e GPIO \u9488\u811a\u7684\u6a21\u5757\u5982\u4e0b\uff1aDevice::SMBus<\/a>\u3001Device::I2C<\/a>\u3001Rpi::PIGPIO<\/a>\u3001Rpi::SPI<\/a>\u3001Rpi::WiringPi<\/a>\u3001Device::WebIO::RaspberryPI<\/a>\u548c Device::PiGlow<\/a>\u3002\u6811\u8393\u6d3e\u652f\u6301\u7684\u5d4c\u5165\u5f0f\u6a21\u5757\u5982\u4e0b\uff1aUAV::Pilot::Wumpus::Server::Backend::RaspberryPiI2C<\/a>\u3001RPI::DHT11<\/a>\uff08\u6e29\u5ea6\/\u6e7f\u5ea6\uff09\u3001RPI::HCSR04<\/a>\uff08\u8d85\u58f0\u6ce2\uff09\u3001App::RPI::EnvUI<\/a>\u3001RPi::DigiPot::MCP4XXXX<\/a>\u3001RPI::ADC::ADS<\/a>\u3001Device::PaPiRus<\/a> \u548cDevice::BCM2835::Timer<\/a>\u3002<\/p>\n

\u4f8b\u5b50<\/strong><\/div>\n

\u672c\u4f8b\u4e2d\uff0c\u4f60\u5c06\u7ec3\u4e60\u5982\u4f55\u8bbe\u7f6e\u5e76\u8fd0\u884c\u4f7f\u7528 OSMC \u64cd\u4f5c\u7cfb\u7edf\u7684\u6811\u8393\u6d3e\u3002
\n\u5230 RaspberryPi.Org \u4e0b\u8f7d\u533a\uff0c\u4e0b\u8f7d\u6700\u65b0\u7684 OSMC \u7248\u672c\u3002
\n\u5c06\u7a7a SD \u5361\u63d2\u5165\u4f60\u7684 Linux \u7535\u8111\u6216\u8005\u7b14\u8bb0\u672c\u3002\u6811\u8393\u6d3e\u7b2c\u4e00\u4ee3\u662f\u5168\u5c3a\u5bf8\u7684 SD \u5361\uff0c\u9664\u6b64\u4ee5\u5916\u90fd\u5728\u4f7f\u7528 microSD\uff0c\u4f60\u4e5f\u8bb8\u9700\u8981\u4e00\u4e2a\u901a\u7528\u9002\u914d\u5668\u624d\u80fd\u63d2\u5165\u5b83\u3002
\n\u5728\u63d2\u5165\u524d\u540e\u5206\u522b\u8fd0\u884c cat \/proc\/partitions \u547d\u4ee4\u6765\u770b\u770b\u7cfb\u7edf\u5206\u7ed9\u786c\u4ef6\u7684\u8bbe\u5907\u540d\u79f0\u3002\u5b83\u53ef\u80fd\u50cf\u8fd9\u6837 \/dev\/mmcblk0 \u6216\u8005 \/dev\/sdb\uff0c \u7528\u5982\u4e0b\u547d\u4ee4\u5c06\u6b63\u786e\u7684\u7cfb\u7edf\u955c\u50cf\u70e7\u5f55\u5230 SD \u5361\uff1a<\/p>\n

piflash OSMC_TGT_rbp2_20170210.img.gz \/dev\/mmcblk0<\/pre>\n

\u5f39\u51fa SD \u5361\uff0c\u5c06\u5b83\u63d2\u5165\u6811\u8393\u6d3e\u4e2d\uff0c\u63a5\u4e0a HDMI \u663e\u793a\u5668\uff0c\u5f00\u673a\u3002
\n\u5f53 OSMC \u8bbe\u7f6e\u5b8c\u6bd5\uff0c\u63d2\u5165\u4e00\u4e2a USB \u8bbe\u5907\uff0c\u5728\u91cc\u9762\u653e\u70b9\u89c6\u9891\u3002\u51fa\u4e8e\u793a\u8303\u76ee\u7684\uff0c\u6211\u5c06\u4f7f\u7528 youtube-dl \u7a0b\u5e8f\u4e0b\u8f7d\u4e24\u4e2a\u89c6\u9891\u3002\u8fd0\u884c <\/p>\n

youtube-dl OHF2xDrq8dY <\/pre>\n

\uff08\u5f6d\u535a\u5173\u4e8e\u82f1\u56fd\u9ad8\u65b0\u4ea7\u4e1a\uff0c\u5305\u62ec\u6811\u8393\u6d3e\u7684\u4ecb\u7ecd\uff09\u8fd8\u6709 <\/p>\n

youtube-dl nAvZMgXbE9c<\/pre>\n

\uff08CNet \u53d1\u8868\u7684\u201c\u6392\u540d\u524d\u4e94\u7684\u6811\u8393\u6d3e\u9879\u76ee\u201d) \u3002
\n\u5c06\u5b83\u4eec\u4e0b\u8f7d\u5230 USB \u4e2d\uff0c\u7136\u540e\u5378\u8f7d\u79fb\u9664\u8bbe\u5907\u3002 \u5c06 USB \u8bbe\u5907\u63d2\u5165\u5230 OSMC \u6811\u8393\u6d3e\u3002\u70b9\u51fb\u89c6\u9891\u9009\u9879\u8fdb\u5165\u5230\u5916\u90e8\u8bbe\u5907\u3002
\n\u53ea\u8981\u4f60\u80fd\u5728\u6811\u8393\u6d3e\u4e2d\u64ad\u653e\u89c6\u9891\uff0c\u90a3\u4e48\u606d\u559c\u4f60\uff0c\u4f60\u5df2\u7ecf\u5b8c\u6210\u4e86\u672c\u6b21\u7ec3\u4e60\u3002\u73a9\u7684\u6109\u5feb\u3002<\/p>\n

\u4f8b\u4e8c\uff1a\u968f\u673a\u64ad\u653e\u76ee\u5f55\u4e2d\u7684\u89c6\u9891\u7684\u811a\u672c<\/strong><\/span><\/div>\n

\u8fd9\u4e2a\u4f8b\u5b50\u5c06\u4f7f\u7528\u4e00\u4e2a\u811a\u672c\u5728\u6811\u8393\u6d3e\u4e0a\u7684\u76ee\u5f55\u4e2d\u4e71\u5e8f\u64ad\u653e\u89c6\u9891\u3002\u6839\u636e\u89c6\u9891\u7684\u4e0d\u540c\u548c\u8bbe\u5907\u7684\u6446\u653e\u4f4d\u7f6e\uff0c\u8fd9\u53ef\u4ee5\u7528\u4f5c\u4fe1\u606f\u4ead\u663e\u793a\u7684\u7528\u9014\u3002\u6211\u5199\u8fd9\u4e2a\u811a\u672c\u7528\u6765\u5c55\u793a\u5ba4\u5185\u4f53\u9a8c\u89c6\u9891\u3002
\n\u8bbe\u7f6e\u6811\u8393\u6d3e\u5f15\u5bfc Raspbian Linux\u3002\u8fde\u63a5\u5230 HDMI \u76d1\u89c6\u5668\u3002
\n\u4ece GitHub \u4e0a\u4e0b\u8f7d do-video \u811a\u672c\u3002\u628a\u5b83\u653e\u5230\u6811\u8393\u6d3e\u4e2d\u3002
\n\u8ddf\u968f\u8be5\u9875\u9762\u7684\u5b89\u88c5\u6307\u5bfc\u3002\u6700\u4e3b\u8981\u7684\u4e8b\u60c5\u5c31\u662f\u5b89\u88c5 omxplayer \u5305\uff0c\u5b83\u53ef\u4ee5\u4f7f\u7528\u6811\u8393\u6d3e\u786c\u4ef6\u89c6\u9891\u52a0\u901f\u529f\u80fd\u5e73\u6ed1\u5730\u64ad\u653e\u89c6\u9891\u3002
\n\u5728\u5bb6\u76ee\u5f55\u7684 Videos \u76ee\u5f55\u4e0b\u653e\u4e00\u4e9b\u89c6\u9891\u3002
\n\u8fd0\u884c do-video \uff0c\u8fd9\u6837\uff0c\u5e94\u8be5\u5c31\u53ef\u4ee5\u64ad\u653e\u89c6\u9891\u4e86<\/p>\n

\u4f8b\u4e09\uff1a\u8bfb\u53d6 GPS \u6570\u636e\u7684\u811a\u672c<\/strong><\/span><\/div>\n

\u8fd9\u4e2a\u4f8b\u5b50\u66f4\u52a0\u6df1\u5165\uff0c\u66f4\u6709\u9488\u5bf9\u6027\u3002\u5b83\u5c55\u793a\u4e86 Perl \u600e\u4e48\u4ece\u5916\u90e8\u8bbe\u5907\u4e2d\u8bfb\u53d6\u6570\u636e\u3002\u5728\u5148\u524d\u4f8b\u5b50\u4e2d\u51fa\u73b0\u7684\u6211\u7684 GitHub\u4e0a \u6709\u4e00\u4e2a gps-read.pl \u811a\u672c\u3002\u5b83\u53ef\u4ee5\u901a\u8fc7\u4e00\u7cfb\u5217\u7aef\u53e3\u4ece GPS \u8bfb\u53d6 NMEA\uff08\u56fd\u5bb6\u6d77\u6d0b\u7535\u5b50\u534f\u4f1a\uff09\u7684\u6570\u636e\u3002\u9875\u9762\u8fd8\u6709\u6559\u7a0b\uff0c\u5305\u62ec\u6784\u5efa\u5b83\u6240\u4f7f\u7528\u7684 AdaFruit Industries \u90e8\u5206\uff0c\u4f46\u662f\u4f60\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u80fd\u8f93\u51fa NMEA \u6570\u636e\u7684 GPS\u3002<\/p>\n

\u901a\u8fc7\u8fd9\u4e9b\u4efb\u52a1\uff0c\u6211\u60f3\u4f60\u5e94\u8be5\u53ef\u4ee5\u5728\u6811\u8393\u6d3e\u4e0a\u50cf\u4f7f\u7528\u5176\u4ed6\u8bed\u8a00\u4e00\u6837\u4f7f\u7528 Perl\u4e86\u3002\u5e0c\u671b\u4f60\u559c\u6b22\u3002<\/p>\n


\n

via: https:\/\/opensource.com\/article\/17\/3\/perl-raspberry-pi<\/a><\/p>\n

\u4f5c\u8005\uff1aIan Kluft<\/a> \u8bd1\u8005\uff1aTaylor1024<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n

\u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8829-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/gulass.cn\/raspberry-pi-perl.html<\/a>\u7f16\u8f91\uff1a\u90d1\u5e05\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb \u6211\u5728 SVPerl \u548c\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u8fd8\u60f3\u8bb2\u7b2c\u4e8c\u70b9\uff0c\u5c31\u662f\u4ecb\u7ecd\u6211\u7684 \u201cPiFlash\u201d \u811a\u672c\u3002\u867d\u7136\u5b83\u662f\u7528 Per […]<\/p>\n","protected":false},"author":63,"featured_media":82515,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-82509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/82509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=82509"}],"version-history":[{"count":12,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/82509\/revisions"}],"predecessor-version":[{"id":286350,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/82509\/revisions\/286350"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/82515"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=82509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=82509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=82509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}