{"id":3028,"date":"2020-04-01T08:36:47","date_gmt":"2020-04-01T08:36:47","guid":{"rendered":""},"modified":"2020-04-01T16:37:06","modified_gmt":"2020-04-01T08:37:06","slug":"u-boot%e6%9e%b6%e6%9e%84%e6%b5%85%e6%9e%90%e4%b9%8bu-boot%e6%9e%b6%e6%9e%84%e7%9a%84%e7%89%b9%e7%82%b9%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=3028","title":{"rendered":"U-Boot\u67b6\u6784\u6d45\u6790\u4e4bu-boot\u67b6\u6784\u7684\u7279\u70b9\u5206\u6790"},"content":{"rendered":"
\n\t\u3000\u5bfc\u8bfb\uff1a\u5d4c\u5165\u5f0fLinux<\/u>\u7cfb\u7edf\u642d\u5efa\uff0cbootloader\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\uff0c\u800cU-Boot\u5df2\u6210\u5d4c\u5165\u5f0fLinux\u4e8b\u5b9e\u6807\u51c6\u3002\u6240\u4ee5\u8f83\u4e3a\u6df1\u5165\u7684\u5206\u6790U-Boot\u7684\u8bbe\u8ba1\uff0c\u5bf9\u4e8e\u66f4\u597d\u7684\u7406\u89e3U-Boot\u7684\u5de5\u4f5c\u539f\u7406\u6709\u7740\u91cd\u8981\u610f\u4e49\u3002<\/p>\n
\n\t\u3000\u30001. U-Boot\u7b80\u4ecb<\/strong><\/p>\n \n\t\u3000\u3000Das U-Boot \u662f\u4e00\u4e2a\u4e3b\u8981\u7528\u4e8e\u5d4c\u5165\u5f0f\u7cfb\u7edf\u7684\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u652f\u6301\u591a\u79cd\u4e0d\u540c\u7684\u8ba1\u7b97\u673a<\/u>\u7cfb\u7edf\u7ed3\u6784\uff0c\u5305\u62ecPPC\u3001ARM<\/u>\u3001AVR<\/u>32\u3001MI<\/u>PS\u3001x86\u300168k\u3001Nios<\/u>\u4e0eMicroBlaze\u3002\u8fd9\u4e5f\u662f\u4e00\u5957\u5728GNU\u901a\u7528\u516c\u5171\u8bb8\u53ef\u8bc1\u4e4b\u4e0b\u53d1\u5e03\u7684\u81ea\u7531\u8f6f\u4ef6\u3002\u300a\u767e\u5ea6\u767e\u79d1\u300b<\/p>\n \n\t\u3000\u3000\u89c1http:\/\/www.denx.de\/wiki\/U-Boot<\/p>\n \n\t\u3000\u3000\u5982\u5176\u5b98\u7f51\u4e0a\u6240\u8ff0\uff0c\u5177\u6709\u5341\u5927\u9ec4\u91d1\u6cd5\u5219\uff1a\u5c0f\u5de7\u3001\u5feb\u901f\u3001\u7b80\u5355\u3001\u53ef\u79fb\u690d\u3001\u53ef\u914d\u7f6e\u3001\u53ef\u8c03\u8bd5\u3001\u6613\u7528\u3001\u53ef\u7ef4\u62a4\u3001\u4f18\u96c5\u3001\u5f00\u6e90\u3002<\/p>\n \n\t\u3000\u3000\uff081. Keep it Small\uff0c2. Keep it Fast\uff0c3. Keep it Simple\uff0c4. Keep it Portable;5. Keep it Configurable;6. Keep it Debuggable;7. Keep it Usable;8. Keep it Mai<\/u>ntainable;9. Keep it Beautif<\/u>ul;10. Keep it Open\uff09<\/p>\n \n\t\u3000\u3000\u6240\u4ee5\u672c\u6587\u8bd5\u56fe\u4ece\u5176\u8bbe\u8ba1\u7684\u89d2\u5ea6\u8fdb\u884c\u5206\u6790\u8fd9\u4e9b\u9ec4\u91d1\u6cd5\u5219\uff0c\u4ee5\u671f\u81ea\u5df1\u5728\u8f6f\u4ef6\u5de5\u7a0b\u601d\u60f3\u7684\u89d2\u5ea6\u80fd\u6709\u6240\u83b7\uff0c\u540c\u65f6\u4e5f\u5c06\u81ea\u5df1\u7b14\u8bb0\u5206\u4eab\uff08Keep it open\uff09\uff0c\u65b9\u4fbf\u4e0e\u4eba\u4ea4\u6d41\uff0c\u4ee5\u671f\u83b7\u5f97\u66f4\u4e3a\u6df1\u5165\u7684\u7406\u89e3\u4e0e\u4f53\u609f\u3002<\/p>\n \n\t\u3000\u3000\u5e9f\u8bdd\u8bf4\u4e86\u86ee\u591a\uff0cLet‘s go\uff1a<\/p>\n \n\t\u3000\u30002. U-Boot\u6587\u4ef6\u5939\u62d3\u6251\u7ed3\u6784<\/strong><\/p>\n \n\t\u3000\u3000\u57fa\u4e8eu-boot-u-boot-2016.09.y\u7684\u6587\u4ef6\u5939\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n \n\t\u3000\u3000<\/p>\n \n\t\u3000\u3000arch \u4f53\u7cfb\u67b6\u6784\u4f9d\u8d56<\/p>\n \n\t\u3000\u3000api<\/u> \u673a\u5668\u67b6\u6784\u72ec\u7acbAPI\uff0c\u5916\u90e8\u8c03\u7528\u63a5\u53e3<\/u><\/p>\n \n\t\u3000\u3000\u5b9e\u73b0I\/O<\/u>\uff0c\u5982\u6807\u51c6\u5316\u8f93\u5165\u8f93\u51fa\uff0c\u663e\u793a\uff0c\u7f51\u7edcAPI\u3001\u5b58\u50a8<\/u>API\u7b49\uff0c\u4e3acmd\u63d0\u4f9b\u652f\u6301<\/p>\n \n\t\u3000\u3000board \u677f\u7ea7\u4f9d\u8d56\u5b9e\u73b0\u3002<\/p>\n \n\t\u3000\u3000cmd shell\u547d\u4ee4\u5b9e\u73b0<\/p>\n \n\t\u3000\u3000common \u4e0e\u67b6\u6784\u65e0\u5173\u7684\u6742\u9879\u72ec\u7acb\u529f\u80fd<\/p>\n \n\t\u3000\u3000configs \u677f\u7ea7\u914d\u7f6e\u6587\u4ef6<\/p>\n \n\t\u3000\u3000disk \u78c1\u76d8\u5206\u533a\u5b9e\u73b0<\/p>\n \n\t\u3000\u3000doc \u6587\u6863<\/p>\n \n\t\u3000\u3000drivers<\/u> \u901a\u7528\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f<\/p>\n \n\t\u3000\u3000examples \u5e94\u7528\u793a\u4f8b\u4ee3\u7801<\/p>\n \n\t\u3000\u3000fs \u6587\u4ef6\u7cfb\u7edf\u5b9e\u73b0\uff08cram<\/u>fs\uff0cext2\uff0cjffs\u7b49\uff09<\/p>\n \n\t\u3000\u3000include \u5934\u6587\u4ef6<\/p>\n \n\t\u3000\u3000lib \u901a\u7528\u5e93<\/p>\n \n\t\u3000\u3000license<\/p>\n \n\t\u3000\u3000net \u7f51\u7edc\u901a\u8baf\u5b9e\u73b0<\/p>\n \n\t\u3000\u3000post \u4e0a\u7535\u81ea\u68c0\u662f\u5b9e\u73b0<\/p>\n \n\t\u3000\u3000scripts \u6784\u5efa\u811a\u672c\u4ee5\u53caMakefile<\/p>\n \n\t\u3000\u3000te<\/u>sts \u5404\u79cd\u5355\u5143\u6d4b\u8bd5<\/u><\/p>\n \n\t\u3000\u3000tools \u751f\u6210S-Record\u6216U-Boot\u6620\u50cf\u7684\u5de5\u5177\u7b49\u3002<\/p>\n \n\t\u3000\u30003. \u9879\u76ee\u7ba1\u7406<\/strong><\/p>\n \n\t\u3000\u3000U-Boot\u91c7\u7528Kconfig\u8fdb\u884c\u9879\u76ee\u7ba1\u7406\uff0c\u5b9e\u73b0\u53ef\u88c1\u526a\u53ef\u914d\u7f6e\uff0c\u65b0\u7248U-Boot\u5df2\u652f\u6301make menuconfig\u529f\u80fd\uff0c\u5b9e\u73b0\u4e86\u6613\u7528\u7684\u8bbe\u8ba1\u76ee\u6807\u3002\u5176\u914d\u7f6e\u754c\u9762\u4e0e\u5185\u6838\u4e00\u6837\u3002<\/p>\n \n\t\u3000\u3000<\/p>\n \n\t\u3000\u30004. \u6a21\u5757\u5c42\u6b21\u67b6\u6784\u5206\u6790<\/strong><\/p>\n \n\t\u3000\u3000<\/p>\n \n\t\u3000\u3000arch \u5b9e\u73b0\u4e86\u4e0d\u540c\u4f53\u7cfb\u7ed3\u6784\u7684CPU<\/u>\uff0c\u6307\u4ee4\u96c6\u3001\u8bbe\u5907\u6811\u5e95\u5c42\u62bd\u8c61\uff0c\u5229\u7528\u94fe\u63a5\u7ed1\u5b9a\u5b9e\u73b0\u4e86\u7b26\u53f7\u5165\u53e3\u76f8\u5bf9\u4f4d\u7f6e\u4fdd\u6301\u4e0d\u53d8\uff0c\u6545\u624d\u80fd\u5b9e\u73b0\u5c06\u5185\u6838\u955c\u50cf\u62f7\u8d1d\u5230\u5185\u5b58\u7136\u540e\u8fdb\u884c\u5f15\u5bfc\u7684\u529f\u80fd\u3002lib\u5b9e\u73b0\u4e86\u521d\u59cb\u5316C\u8fd0\u884c\u65f6\u73af\u5883\uff08\u6808\/\u5806\u6307\u9488\u7b49\u7684\u521d\u59cb\u5316\uff09\uff0cdts\u5b9e\u73b0\u4e86\u8bbe\u5907\u6811\u7684\u5e95\u5c42\u4f53\u7cfb\u67b6\u6784\u4f9d\u8d56\u7684\u5177\u4f53\u62bd\u8c61\u5265\u79bb<\/u>\u3002<\/p>\n \n\t\u3000\u3000machine \uff0c\u7531\u4e8e\u540c\u6837\u7684\u5185\u6838\u76f8\u540c\uff0c\u5404\u5bb6\u82af\u7247\u5916\u8bbe\u90fd\u4e0d\u5c3d\u76f8\u540c\uff0c\u6240\u4ee5\u5c06\u5404\u81ea\u4e2a\u6027\u5b9e\u73b0\u5265\u79bb\u5b9e\u73b0\u4e8e\u6b64\uff0c\u8fd9\u4e3b\u8981\u4f53\u7cfb\u5728ARM\u4f53\u7cfb\u7684\u82af\u7247\uff0c\u7531\u4e8eARM\u516c\u53f8\u552e\u5356IP\uff0c\u5404\u5bb6\u82af\u7247\u5382\u5546\u5728\u5185\u6838\u7684\u57fa\u7840\u4e0a\u5ef6\u4f38\u51fa\u5404\u81ea\u4e0d\u540c\u7684\u82af\u7247\uff0c\u6240\u4ee5\u9700\u8981\u5c06\u5dee\u5f02\u6027\u5265\u79bb\u5b9e\u73b0\u3002<\/p>\n \n\t\u3000\u3000board\uff0c \u5b9e\u73b0\u4e86\u4ea7\u4e1a\u94fe\u4e0b\u6e38\uff0c\u8bbe\u5907\u5382\u5546\u7684\u5dee\u5f02\u6027\uff0c\u5bf9\u4e8e\u4ea7\u54c1\u8bbe\u8ba1\u800c\u8a00\uff0c\u9700\u8981\u5c06\u5404\u81ea\u5728boot\u9636\u6bb5\u9700\u8981\u4e25\u683c\u521d\u59cb\u5316\u7684\u5b9e\u73b0\u653e\u5728\u8fd9\u91cc\uff0c\u6bd4\u5982IO\u53e3\u7684\u521d\u59cb\u5316\uff0c\u4ea7\u54c1\u4e2d\u5927\u90e8\u5206IO\u53e3\u5fc5\u987b\u663e\u5f0f\u8bbe\u7f6e\u5176\u521d\u59cb\u72b6\u6001\u3002<\/p>\n \n\t\u3000\u3000driver \u8fd9\u91cc\u5b9e\u73b0\u4e86boot\u9636\u6bb5\u5fc5\u8981\u7684\u8bbe\u5907\u9a71\u52a8\uff0c\u5982\u7f51\u53e3\u3001\u663e\u793a\u7b49\u3002<\/p>\n \n\t\u3000\u3000dts \u5b9e\u73b0\u4e86\u8bbe\u5907\u6811<\/p>\n \n\t\u3000\u3000api \u5b9e\u73b0\u4e86\u57fa\u672c\u7684IO\uff0c\u5982\u6807\u51c6\u5316\u8f93\u5165\u8f93\u51fa\uff0c\u663e\u793a\uff0c\u7f51\u7edcAPI\u3001\u5b58\u50a8API\u7b49\uff0c\u4e3acmd\u63d0\u4f9b\u652f\u6301\u3002<\/p>\n \n\t\u3000\u3000disk \u5b9e\u73b0\u4e86\u8f7b\u91cf\u7ea7\u78c1\u76d8\u7ba1\u7406<\/p>\n \n\t\u3000\u3000fs \u6587\u4ef6\u7cfb\u7edf\u5b9e\u73b0\uff08cramfs\uff0cext2\uff0cjffs\u7b49\uff09<\/p>\n \n\t\u3000\u3000lib \u901a\u7528\u5e93\uff0c\u6bd4\u5982CRC\u7b97\u6cd5\uff0c\u52a0\u5bc6\u7b97\u6cd5\uff0c\u538b\u7f29\u7b97\u6cd5\uff0c\u5b57\u7b26<\/u>\u4e32\u64cd\u4f5c\u7b49<\/p>\n \n\t\u3000\u3000cmd \u5b9e\u73b0\u4e86U-Boot\u547d\u4ee4\u96c6\u3002<\/p>\n \n\t\u3000\u3000net \u5b9e\u73b0\u7f51\u7edc\u534f\u8bae\u5c42<\/p>\n \n\t\u3000\u3000cmd shell\u547d\u4ee4\u96c6\uff0c\u8c03\u7528\u4e0b\u5c42\u5b9e\u73b0\u7528\u6237\u63a5\u53e3\u529f\u80fd\uff0c\u5982\u4e0b\u8f7d\uff0c\u5f15\u5bfc\uff0c\u5b58\u50a8\u73af\u5883\u53d8\u91cf\uff0c\u6253\u5370\u4fe1\u606f\u7b49\u3002<\/p>\n \n\t\u3000\u3000common \u662fU-Boot \u4e3b\u4f53\uff0c\u5982\u7cfb\u7edf\u505c\u7559\u5728U-Boot\u9636\u6bb5\uff0cCPU\u59cb\u7ec8\u5728\u6267\u884c\u4e00\u4e2a\u6b7b\u5faa\u73af\uff0crun_main_loop\uff08\uff09\u3002<\/p>\n \n\t\u3000\u30005.\u57fa\u4e8earmv8\u65e0SPL\u7684\u542f\u52a8\u6d41\u7a0b\u5206\u6790<\/p>\n \n\t\u3000\u30005.1 \u6c47\u7f16\u7a0b\u5e8f\u6267\u884c\u9636\u6bb5<\/strong><\/p>\n \n\t\u3000\u3000<\/p>\n \n\t\u3000\u30005.2 C\u6267\u884c\u9636\u6bb5<\/strong><\/p>\n \n\t\u3000\u3000board_init_r\u7684\u8c03\u7528\uff0c\u8fdb\u5165C\u6267\u884c\u9636\u6bb5\uff0c\u5982\u4e0b\uff1a<\/p>\n \n\t\u3000\u3000<\/p>\n \n\t\u3000\u3000\u81f3\u6b64\uff0c\u7c97\u6d45\u7684\u5c06U-Boot\u7684\u67b6\u6784\u8bbe\u8ba1\u5206\u6790\u4e86\u4e00\u4e0b\u3002\u8fd8\u6709\u5f88\u591a\u8bbe\u8ba1\u7ec6\u8282\u6709\u5f85\u6df1\u6316\u3002\u6587\u4e2d\u4ec5\u4ee3\u8868\u4e2a\u4eba\u7406\u89e3\u89c2\u70b9\uff0c\u9519\u8bef\u5728\u6240\u96be\u514d\uff0c\u6b22\u8fce\u4ea4\u6d41\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5bfc\u8bfb\uff1a\u5d4c\u5165\u5f0f Linux \u7cfb\u7edf\u642d\u5efa\uff0cbootloader\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\uff0c\u800cU-Boot\u5df2\u6210\u5d4c\u5165\u5f0fLinux\u4e8b\u5b9e\u6807\u51c6\u3002\u6240\u4ee5\u8f83\u4e3a\u6df1\u5165\u7684\u5206\u6790U-Boot\u7684\u8bbe\u8ba1\uff0c\u5bf9\u4e8e\u66f4\u597d\u7684\u7406\u89e3U-Boot\u7684\u5de5\u4f5c\u539f\u7406\u6709\u7740\u91cd\u8981\u610f\u4e49\u3002 1. U-Boot\u7b80<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/3028"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3028"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/3028\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3028"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}