{"id":831,"date":"2012-07-02T20:39:14","date_gmt":"2012-07-02T12:39:14","guid":{"rendered":"http:\/\/www.dogeye.net\/?p=831"},"modified":"2012-07-02T20:39:14","modified_gmt":"2012-07-02T12:39:14","slug":"barebox%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=831","title":{"rendered":"Barebox\u4ecb\u7ecd"},"content":{"rendered":"<p>\u4ece\u88f8\u673a\u4e0a\u7535\u5f00\u59cb\u542f\u52a8\u8ba1\u7b97\u673a\u7684\u8fc7\u7a0b\u542c\u8d77\u6765\u662f\u76f8\u5f53\u590d\u6742\u7684\u3002\u5728PC\u7684\u4e16\u754c\u91cc\uff0cBIOS\u7edf\u6cbb\u8fd9\u4e2a\u9886\u57df\u5df2\u7ecf\u51e0\u5341\u5e74\u4e86\u3002\u4e0d\u8fc7\uff0c\u54f2\u5b66\u4e0a\u8bb2\u4efb\u4f55\u4e16\u754c\u90fd\u662f\u4ece\u51fa\u751f\uff0c\u5230\u7e41\u8363\uff0c\u518d\u540e\u5230\u6b7b\u4ea1\u7684\u8fc7\u7a0b\u3002BIOS\u7684\u5bff\u547d\u4e5f\u5373\u5c06\u8fce\u6765\u7ec8\u7ed3\u3002BIOS\u7684\u6398\u5893\u8005\u5373\u662fEFI\u3002\u5bf9\u4e8eMAC\u7528\u6237\u6765\u8bf4\uff0cEFI\u7684\u4f7f\u7528\u5df2\u7ecf\u6709\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\u4e86\u3002\u800c\u5728\u5d4c\u5165\u5f0fLinux\u7684\u4e16\u754c\u91cc\uff0cu-boot\u5219\u5728\u957f\u65f6\u95f4\u91cc\u626e\u6f14\u7740\u8001\u5927\u54e5\u7684\u89d2\u8272\u3002<\/p>\n<p>U-boot\uff0c\u6216\u8005\u6765\u81eaDENX\u7684das U-boot\u63d0\u4f9b\u4e86\u975e\u5e38\u4e30\u5bcc\u7684\u529f\u80fd\u3002\u5982\uff1a\u7f51\u7edc\uff0c\u811a\u672c\uff0c\u652f\u6301FLASH(\u8fd9\u91cc\u7684flash\u662f\u5b58\u50a8\u65b9\u9762\u7684flash\uff0c\u800c\u4e0d\u662fadobe\u7684\u90a3\u4e2aflash)\u3002\u4e00\u822c\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u5de5\u7a0b\u5e8f\u5e08\u9700\u8981\u7684\u5de5\u5177\uff0c\u90fd\u63d0\u4f9b\u597d\u4e86\u3002<\/p>\n<p>\u8fd8\u662f\u90a3\u53e5\u8bdd\uff0c\u5bf9\u4e8e\u4e07\u4e8b\u4e07\u7269\uff0c\u90fd\u662f\u751f\u751f\u6b7b\u6b7b\u7684\u8fc7\u7a0b\u554a\u3002u-boot\u7684\u529f\u80fd\u8d8a\u6765\u8d8a\u5f3a\u5927\u3002\u50ac\u751f\u4e86\u65b0\u7684\u4e8b\u7269\u7684\u8bde\u751f\u3002\u5b83\u7684\u540d\u5b57\u5c31\u662f\uff1aBarebox\u3002<\/p>\n<p>\tBarebox\u6700\u5f00\u59cb\u88ab\u79f0\u4e4b\u4e3a\uff1au-boot-v2\uff0c\u5b83\u662f\u4e00\u4e2a\u50cfu-boot\u4e00\u6837\u91ce\u5fc3\u52c3\u52c3\u7684bootloader\u3002\u4e0d\u8fc7Barebox\u66f4\u6709Linux\u7684\u5473\u9053\u4e00\u4e9b\u3002\u5b83\u7684\u53d1\u5c55\u629b\u5f03\u4e86u-boot\u800c\u8d8a\u6765\u8d8a\u50cfLinux\u3002\u5b83\u6709\u6587\u4ef6\u7cfb\u7edf\uff0c\u6709\u57fa\u672c\u7684shell\uff0c\u751a\u81f3\u8fd8\u6709\u4e0eLinux\u8fd1\u4f3c\u7684\u9a71\u52a8\u6a21\u5757\u3002<\/p>\n<p>\tBarebox\u7684\u53e6\u4e00\u4e2a\u521b\u65b0\u5373\u662f\uff0cbootloader\u53ef\u4ee5\u88ab\u6784\u5efa\u6210\u4e00\u4e2a\u7528\u6237\u7a7a\u95f4\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u8fd9\u6837\u7684\u597d\u5904\u662f\u663e\u800c\u6613\u8fd1\u7684\uff0c\u4f60\u53ef\u4ee5\u66f4\u65b9\u4fbf\u7684\u5f00\u65b9\u548c\u8c03\u8bd5Barebox\u3002<\/p>\n<p>\t\u8bf4\u4e86\u8fd9\u4e48\u591a\uff0c\u770b\u770bBarebox\u662f\u4e2a\u4ec0\u4e48\u6837\u5b50\u5462\uff1f<\/p>\n<p>\n\tuboot:\/<\/p>\n<p>\tuboot:\/ ls<br \/>\n\t. .. dev env<br \/>\n\t&nbsp;<\/p>\n<p>\u548cLinux\u4e00\u6837\uff0cdev\u76ee\u5f55\u5939\u4e0b\u9762\u653e\u4e86\u7cfb\u7edf\u7684\u8bbe\u5907\u6587\u4ef6\u3002\u6bd4\u5982\uff0cmem\u8bbe\u5907\u6587\u4ef6\u63cf\u8ff0\u4e86\u8ba1\u7b97\u673a\u7684\u5185\u5b58\u3002<\/p>\n<p>\u518d\u56de\u5230u-boot\uff0c\u5b83\u6709\u4e00\u4e2a\u7279\u6b8a\u7684\u547d\u4ee4\uff1amd\u3002md\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5185\u5b58\u7684\u5185\u5bb9\u3002\u5bf9\u4e8eBarebox\uff0c\u63d0\u4f9b\u4e86\u540c\u6837\u7684\u5de5\u5177\u3002\u4e0d\u8fc7\u8fd9\u4e2a\u5de5\u5177\u662f\u4ee5\u4e00\u79cdPOSIX\u7684\u65b9\u5f0f\u5b9e\u73b0\u7684\uff1a\u6253\u5f00\/dev\/mem\u8bbe\u5907\uff0clseek\u79fb\u52a8\u6587\u4ef6\u6307\u9488\uff0cread\u8bfb\u51fa\u6587\u4ef6\u5185\u5bb9\u3002\u8fd9\u6837\u7684\u5b9e\u73b0\u65b9\u5f0f\u4e0d\u4ec5\u4ec5\u63d0\u5347\u4e86\u4ee3\u7801\u7ed3\u6784\uff0c\u5b83\u8fd8\u4f7f\u5f97md\u547d\u4ee4\u53ef\u4ee5\u4e0d\u9700\u4fee\u6539\u5c31\u5e94\u7528\u5230\u5176\u5b83\u8bbe\u5907\u4e0a\uff0c\u6bd4\u5982flash\u5b58\u8bf8\u5668\u3002<\/p>\n<p>\t\u5982\u679c\u4f60\u60f3\u6d4b\u8bd5\u4e00\u4e0bBarebox\u5230\u5e95\u5982\u4f55\u3002\u4f60\u53ef\u4ee5\u6709\u4e24\u79cd\u65b9\u6cd5\u3002<\/p>\n<ul>\n<li>\u7b2c\u4e00\uff1a\u4f60\u53ef\u4ee5\u4e0b\u8f7dBarebox\u7684\u6c99\u76d2\u529f\u80fd\u5373\u628a\u5b83\u6784\u5efa\u6210\u4e00\u4e2aLinux\u7684\u7528\u6237\u7a7a\u95f4\u7684\u5e94\u7528\u3002\u6765\u81eaBarebox\u5b98\u65b9\u7684\u89e3\u91ca\u662f\uff1a<\/li>\n<\/ul>\n<p>Sandbox:<br \/>\n\tIf you develop features for Barebox, you can use the &#39;sandbox&#39; target which compiles Barebox as a POSIX application in the Linux userspace: it can be started like a normal command and even has network access (tun\/tap). Files from the local filesytem can be used to simulate devices. &nbsp; \u5982\u679c\u4f60\u8981\u4e3aBarebox\u5f00\u53d1\u529f\u80fd\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528&#39;\u6c99\u76d2&#39;\u3002\u8fd9\u79cd\u65b9\u5f0f\u628aBarebox\u6784\u5efa\u6210\u4e00\u4e2aLinux\u7684\u7528\u6237\u7a7a\u95f4\u7a0b\u5e8f\u3002\u5b83\u50cf\u4e00\u822c\u7684\u547d\u4ee4\u4e00\u6837\uff0c\u800c\u4e14\u8fd8\u6709\u7f51\u7edc\u529f\u80fd\u3002\u6765\u81ea\u6587\u4ef6\u7cfb\u7edf\u7684\u6587\u4ef6\u53ef\u4ee5\u88ab\u7528\u6765\u6a21\u62df\u8bbe\u5907\u3002<\/p>\n<ul>\n<li>\u7b2c\u4e8c\uff1a\u4e0d\u8bf4\u4f60\u4e5f\u77e5\u9053\uff0c\u628aBarebox\u5b89\u88c5\u5230\u771f\u771f\u6b63\u6b63\u7684\u786c\u4ef6\u4e0a\u5427\uff01\u5bf9\u4e8e\u6211\uff0c\u6211\u5c31\u5c1d\u8bd5\u8fc7\u5728PC\u673a\u7684\u4e00\u5757\u65e7\u5f0f\u7684\u4e3b\u677f\u4e0a\u5b89\u88c5Barebox\u3002&nbsp;<\/li>\n<\/ul>\n<p>\u6700\u540e\uff0cBarebox\u7684\u5b98\u65b9\u7f51\u7ad9\u662f\uff1a&nbsp;<a href=\"http:\/\/barebox.org\/\" target=\"_blank\" rel=\"noopener\">http:\/\/barebox.org\/<\/a><\/p>\n<p>copyright ykyi.net<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u88f8\u673a\u4e0a\u7535\u5f00\u59cb\u542f\u52a8\u8ba1\u7b97\u673a\u7684\u8fc7\u7a0b\u542c\u8d77\u6765\u662f\u76f8\u5f53\u590d\u6742\u7684\u3002\u5728PC\u7684\u4e16\u754c\u91cc\uff0cBIOS\u7edf\u6cbb\u8fd9\u4e2a\u9886\u57df\u5df2\u7ecf\u51e0\u5341\u5e74\u4e86\u3002\u4e0d\u8fc7\uff0c\u54f2\u5b66\u4e0a\u8bb2\u4efb\u4f55\u4e16\u754c\u90fd\u662f\u4ece\u51fa\u751f\uff0c\u5230\u7e41\u8363\uff0c\u518d\u540e\u5230\u6b7b\u4ea1\u7684\u8fc7\u7a0b\u3002BIOS\u7684\u5bff\u547d\u4e5f\u5373\u5c06\u8fce\u6765\u7ec8\u7ed3\u3002BIOS\u7684\u6398\u5893\u8005\u5373\u662fEFI\u3002\u5bf9\u4e8eMAC\u7528\u6237\u6765\u8bf4\uff0cEFI\u7684\u4f7f\u7528\u5df2\u7ecf\u6709\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\u4e86\u3002\u800c\u5728\u5d4c\u5165\u5f0fLinux\u7684\u4e16\u754c\u91cc\uff0cu-boot\u5219\u5728\u957f\u65f6\u95f4\u91cc\u626e\u6f14\u7740\u8001\u5927\u54e5\u7684\u89d2\u8272\u3002 U-boot\uff0c\u6216\u8005\u6765\u81eaDENX\u7684das U-boot\u63d0\u4f9b\u4e86\u975e\u5e38\u4e30\u5bcc\u7684\u529f\u80fd\u3002\u5982\uff1a\u7f51\u7edc\uff0c\u811a\u672c\uff0c\u652f\u6301FLASH(\u8fd9\u91cc\u7684flash\u662f\u5b58\u50a8\u65b9\u9762\u7684flash\uff0c\u800c\u4e0d\u662fadobe\u7684\u90a3\u4e2aflash)\u3002\u4e00\u822c\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u5de5\u7a0b\u5e8f\u5e08\u9700\u8981\u7684\u5de5\u5177\uff0c\u90fd\u63d0\u4f9b\u597d\u4e86\u3002 \u8fd8\u662f\u90a3\u53e5\u8bdd\uff0c\u5bf9\u4e8e\u4e07\u4e8b\u4e07\u7269\uff0c\u90fd\u662f\u751f\u751f\u6b7b\u6b7b\u7684\u8fc7\u7a0b\u554a\u3002u-boot\u7684\u529f\u80fd\u8d8a\u6765\u8d8a\u5f3a\u5927\u3002\u50ac\u751f\u4e86\u65b0\u7684\u4e8b\u7269\u7684\u8bde\u751f\u3002\u5b83\u7684\u540d\u5b57\u5c31\u662f\uff1aBarebox\u3002 Barebox\u6700\u5f00\u59cb\u88ab\u79f0\u4e4b\u4e3a\uff1au-boot-v2\uff0c\u5b83\u662f\u4e00\u4e2a\u50cfu-boot\u4e00\u6837\u91ce\u5fc3\u52c3\u52c3\u7684bootloader\u3002\u4e0d\u8fc7Barebox\u66f4\u6709Linux\u7684\u5473\u9053\u4e00\u4e9b\u3002\u5b83\u7684\u53d1\u5c55\u629b\u5f03\u4e86u-boot\u800c\u8d8a\u6765\u8d8a\u50cfLinux\u3002\u5b83\u6709\u6587\u4ef6\u7cfb\u7edf\uff0c\u6709\u57fa\u672c\u7684shell\uff0c\u751a\u81f3\u8fd8\u6709\u4e0eLinux\u8fd1\u4f3c\u7684\u9a71\u52a8\u6a21\u5757\u3002 Barebox\u7684\u53e6\u4e00\u4e2a\u521b\u65b0\u5373\u662f\uff0cbootloader\u53ef\u4ee5\u88ab\u6784\u5efa\u6210\u4e00\u4e2a\u7528\u6237\u7a7a\u95f4\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u8fd9\u6837\u7684\u597d\u5904\u662f\u663e\u800c\u6613\u8fd1\u7684\uff0c\u4f60\u53ef\u4ee5\u66f4\u65b9\u4fbf\u7684\u5f00\u65b9\u548c\u8c03\u8bd5Barebox\u3002 \u8bf4\u4e86\u8fd9\u4e48\u591a\uff0c\u770b\u770bBarebox\u662f\u4e2a\u4ec0\u4e48\u6837\u5b50\u5462\uff1f uboot:\/ uboot:\/ ls . .. dev env &nbsp; \u548cLinux\u4e00\u6837\uff0cdev\u76ee\u5f55\u5939\u4e0b\u9762\u653e\u4e86\u7cfb\u7edf\u7684\u8bbe\u5907\u6587\u4ef6\u3002\u6bd4\u5982\uff0cmem\u8bbe\u5907\u6587\u4ef6\u63cf\u8ff0\u4e86\u8ba1\u7b97\u673a\u7684\u5185\u5b58\u3002 \u518d\u56de\u5230u-boot\uff0c\u5b83\u6709\u4e00\u4e2a\u7279\u6b8a\u7684\u547d\u4ee4\uff1amd\u3002md\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5185\u5b58\u7684\u5185\u5bb9\u3002\u5bf9\u4e8eBarebox\uff0c\u63d0\u4f9b\u4e86\u540c\u6837\u7684\u5de5\u5177\u3002\u4e0d\u8fc7\u8fd9\u4e2a\u5de5\u5177\u662f\u4ee5\u4e00\u79cdPOSIX\u7684\u65b9\u5f0f\u5b9e\u73b0\u7684\uff1a\u6253\u5f00\/dev\/mem\u8bbe\u5907\uff0clseek\u79fb\u52a8\u6587\u4ef6\u6307\u9488\uff0cread\u8bfb\u51fa\u6587\u4ef6\u5185\u5bb9\u3002\u8fd9\u6837\u7684\u5b9e\u73b0\u65b9\u5f0f\u4e0d\u4ec5\u4ec5\u63d0\u5347\u4e86\u4ee3\u7801\u7ed3\u6784\uff0c\u5b83\u8fd8\u4f7f\u5f97md\u547d\u4ee4\u53ef\u4ee5\u4e0d\u9700\u4fee\u6539\u5c31\u5e94\u7528\u5230\u5176\u5b83\u8bbe\u5907\u4e0a\uff0c\u6bd4\u5982flash\u5b58\u8bf8\u5668\u3002 \u5982\u679c\u4f60\u60f3\u6d4b\u8bd5\u4e00\u4e0bBarebox\u5230\u5e95\u5982\u4f55\u3002\u4f60\u53ef\u4ee5\u6709\u4e24\u79cd\u65b9\u6cd5\u3002 \u7b2c\u4e00\uff1a\u4f60\u53ef\u4ee5\u4e0b\u8f7dBarebox\u7684\u6c99\u76d2\u529f\u80fd\u5373\u628a\u5b83\u6784\u5efa\u6210\u4e00\u4e2aLinux\u7684\u7528\u6237\u7a7a\u95f4\u7684\u5e94\u7528\u3002\u6765\u81eaBarebox\u5b98\u65b9\u7684\u89e3\u91ca\u662f\uff1a Sandbox: If you develop features for Barebox, you can use the &#39;sandbox&#39; target which compiles Barebox as a POSIX application in the Linux userspace: it can be started like a normal command and even has network &hellip; <a href=\"https:\/\/ykyi.net\/?p=831\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Barebox\u4ecb\u7ecd&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[51,98],"class_list":["post-831","post","type-post","status-publish","format-standard","hentry","category-tech_articles","category-unix_linux","tag-linux-2","tag-98"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=831"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/831\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}