{"id":53497,"date":"2023-06-10T02:05:12","date_gmt":"2023-06-09T18:05:12","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=53497"},"modified":"2023-06-10T02:05:12","modified_gmt":"2023-06-09T18:05:12","slug":"ubuntu-yocto-linux","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ubuntu-yocto-linux.html","title":{"rendered":"\u597d\u5b9e\u7528\uff01\u7528 Yocto \u5728 Ubuntu \u4e0a\u521b\u5efa\u6700\u5c0f\u5316 Linux \u53d1\u884c\u7248"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u672c\u6587\u4e3b\u8981\u805a\u7126\u5728\u5982\u4f55\u4f7f\u7528 Yocto \u5728 Ubuntu \u4e0a\u521b\u5efa\u4e00\u4e2a\u6700\u5c0f\u5316\u7684 Linux \u53d1\u884c\u7248\u3002Yocto \u9879\u76ee\u5728\u5d4c\u5165\u5f0f Linux \u7684\u4e16\u754c\u975e\u5e38\u8457\u540d\uff0c\u8fd9\u662f\u56e0\u4e3a\u5b83\u7528\u8d77\u6765\u975e\u5e38\u7075\u6d3b\u3001\u65b9\u4fbf\u3002Yocto \u7684\u76ee\u6807\u662f\u4e3a\u5d4c\u5165\u5f0f\u8f6f\u786c\u4ef6\u5f00\u53d1\u5546\u521b\u5efa\u81ea\u5df1\u7684 Linux \u53d1\u884c\u7248\u3002\u672c\u6587\u6211\u4eec\u5c06\u4f1a\u521b\u5efa\u4e00\u4e2a\u53ef\u4ee5\u8fd0\u884c\u5728 QEMU \u4e0a\u7684\u6700\u5c0f\u5316\u7684 Linux\uff0c\u5e76\u4e14\u5728 QEMU \u4e0a\u5b9e\u9645\u8fd0\u884c\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u5f00\u53d1\u673a\u7684\u57fa\u672c\u6761\u4ef6<\/strong><\/div>\n
  • \u6700\u5c11 4-6 GB \u5185\u5b58<\/li>\n
  • \u6700\u65b0\u7248\u7684 Ubuntu \u7cfb\u7edf\uff08\u672c\u6587\u4f7f\u7528\u4e86 16.04 LTS\uff09<\/li>\n
  • \u78c1\u76d8\u5269\u4f59\u7a7a\u95f4\u81f3\u5c11 60-80 GB<\/li>\n
  • \u5728\u521b\u5efa Linux \u53d1\u884c\u7248\u4e4b\u524d\u5148\u5b89\u88c5\u4e0b\u9762\u7684\u8f6f\u4ef6\u5305<\/li>\n
  • \u4e0b\u8f7d\u6700\u65b0\u7684 Yocto\uff08Poky \u662f\u5176\u6700\u5c0f\u5f00\u53d1\u73af\u5883\uff09\u7a33\u5b9a\u5206\u652f<\/li>\n
    apt-get update<\/pre>\n
    apt-get install wget git-core unzip make gcc g++ build-essential subversion sed autoconf automake texi2html texinfo coreutils diffstat python-pysqlite2 docbook-utils libsdl1.2-dev libxml-parser-perl libgl1-mesa-dev libglu1-mesa-dev xsltproc desktop-file-utils chrpath groff libtool xterm gawk fop<\/pre>\n

    \n<\/p>\n

    \u5982\u4e0b\u6240\u793a\uff0c\u5f00\u53d1\u73af\u5883\u8981\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u5c06\u8fd1 1GB \u5927\u5c0f\u3002<\/p>\n

    <\/p>\n

    \u5728\u8fd9\u4e2a\u6559\u7a0b\u4e2d\uff0c\u7cfb\u7edf\u4e0a\u514b\u9686\u7684\u662f poky \u7684 morty<\/span>\u7a33\u5b9a\u5206\u652f\u3002<\/p>\n

    git clone -b morty git:\/\/git.yoctoproject.org\/poky.git<\/pre>\n

    <\/p>\n

    \u8fdb\u5165 poky<\/span>\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u4e3a Yocto \u5f00\u53d1\u73af\u5883\u8bbe\u7f6e\uff08\u8bbe\u7f6e\/\u5bfc\u51fa\uff09\u4e00\u4e9b\u73af\u5883\u53d8\u91cf\u3002<\/p>\n

    source oe-init-build-env<\/pre>\n

    \u5982\u4e0b\u6240\u793a\uff0c\u5728\u8fd0\u884c\u4e86 open embedded (oe) \u7684\u6784\u5efa\u73af\u5883\u811a\u672c\u4e4b\u540e\uff0c\u7ec8\u7aef\u91cc\u7684\u8def\u5f84\u4f1a\u81ea\u52a8\u5207\u6362\u5230 build<\/span> \u76ee\u5f55\uff0c\u4ee5\u4fbf\u8fdb\u884c\u4e4b\u540e\u884c\u53d1\u884c\u7248\u7684\u7684\u914d\u7f6e\u548c\u6784\u5efa\u3002<\/p>\n

    <\/p>\n

    \u4e0a\u9762\u7684\u622a\u5c4f\u5c55\u793a\u4e86\u5728 conf<\/span>\u76ee\u5f55\u4e0b\u521b\u5efa\u7684\u6587\u4ef6 local.conf<\/span>\u3002\u8fd9\u662f Yocto \u7528\u6765\u8bbe\u7f6e\u76ee\u6807\u673a\u5668\u7ec6\u8282\u548c SDK \u7684\u76ee\u6807\u67b6\u6784\u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n

    \u5982\u4e0b\u6240\u793a\uff0c\u8fd9\u91cc\u8bbe\u7f6e\u7684\u76ee\u6807\u673a\u5668\u662f qemux86-64<\/span>\u3002<\/p>\n

    <\/p>\n

    \u5982\u4e0b\u9762\u622a\u56fe\u6240\u793a\uff0c\u5728 local.conf<\/span>\u4e2d\u53d6\u6d88\u4e0b\u9762\u53c2\u6570\u7684\u6ce8\u91ca\u7b26\u53f7\u3002<\/p>\n

    DL_DIR ?= \"${TOPDIR}\/downloads\"<\/pre>\n

    <\/p>\n

    SSTATE_DIR ?= \"${TOPDIR}\/sstate-cache\"<\/pre>\n

    <\/p>\n

    TMPDIR ?= \"${TOPDIR}\/tmp\"<\/pre>\n

    <\/p>\n

    PACKAGE_CLASSES ?= \"package_rpm\"\r\nSDKMACHINE ?= \"i686\"<\/pre>\n

    <\/p>\n

    \u5982\u4e0b\u6240\u793a\uff0c\u5728 local.conf<\/span>\u4e2d\u4e3a\u57fa\u4e8e Yocto \u7684 Linux \u8bbe\u7f6e\u7a7a\u5bc6\u7801\u548c\u540e\u7eed\u7684\u4e00\u4e9b\u53c2\u6570\u3002\u5426\u5219\u7684\u8bdd\u7528\u6237\u5c31\u4e0d\u80fd\u767b\u5f55\u8fdb\u65b0\u7684\u53d1\u884c\u7248\u3002<\/p>\n

    EXTRA_IMAGE_FEATURES ?= \"debug-tweaks\"<\/pre>\n

    \"\u5982\u4f55\u5728<\/p>\n

    \u6211\u4eec\u5e76\u4e0d\u51c6\u5907\u4f7f\u7528\u4efb\u4f55\u56fe\u5f62\u5316\u5de5\u5177\u6765\u521b\u5efa Linux OS\uff0c\u6bd4\u5982 toaster<\/span> \uff08hob<\/span> \u5df2\u7ecf\u4e0d\u518d\u652f\u6301\u4e86\uff09\u3002<\/p>\n

    Yocto \u7f16\u8bd1\u6784\u5efa\u8fc7\u7a0b<\/strong><\/div>\n

    \u73b0\u5728\u8fd0\u884c\u4e0b\u9762\u7684 bitbake<\/span>\u5de5\u5177\u547d\u4ee4\u5f00\u59cb\u4e3a\u9009\u5b9a\u7684\u76ee\u6807\u673a\u5668\u4e0b\u8f7d\u548c\u7f16\u8bd1\u8f6f\u4ef6\u5305\u3002<\/p>\n

    bitbake core-image-minimal<\/pre>\n

    <\/p>\n

    \u975e\u5e38\u91cd\u8981\u7684\u662f\u8981\u5728\u666e\u901a Linux \u7528\u6237\u4e0b\u8fd0\u884c\u4e0a\u9762\u7684\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u4f7f\u7528 root \u7528\u6237<\/strong>\u3002\u5982\u4e0b\u9762\u622a\u56fe\u6240\u793a\uff0c\u5f53\u4f60\u5728 root \u7528\u6237\u4e0b\u8fd0\u884c bitbake \u547d\u4ee4\u4f1a\u4ea7\u751f\u4e0b\u9762\u6240\u793a\u7684\u9519\u8bef\u3002<\/p>\n

    \n<\/p>\n

    \u518d\u4e00\u6b21\u8fd0\u884c\u5bfc\u51fa\u73af\u5883\u53d8\u91cf\u7684\u811a\u672c\uff08oe-init-build-env<\/span>\uff09\uff0c\u91cd\u65b0\u6267\u884c\u76f8\u540c\u7684\u547d\u4ee4\u6765\u542f\u52a8\u4e0b\u8f7d\u548c\u7f16\u8bd1\u8fc7\u7a0b\u3002<\/p>\n

    <\/p>\n

    \u5982\u4e0b\u6240\u793a\uff0c\u6784\u5efa\u811a\u672c\u7ec4\u4ef6\u7684\u7b2c\u4e00\u6b65\u5de5\u4f5c\u662f\u89e3\u6790\u914d\u7f6e\uff08recipe<\/span>\uff09\u3002<\/p>\n

    <\/p>\n

    \u4e0b\u9762\u7684\u622a\u56fe\u5c55\u793a\u4e86\u6784\u5efa\u811a\u672c\u7684\u89e3\u6790\u8fc7\u7a0b\u3002\u540c\u65f6\u4e5f\u663e\u793a\u4e86\u7528\u6765\u6784\u5efa\u4f60\u7684\u65b0\u7684\u57fa\u4e8e yocto \u7684\u53d1\u884c\u7248\u7684\u6784\u5efa\u7cfb\u7edf\u7684\u7ec6\u8282\u3002<\/p>\n

    <\/p>\n

    \u5728\u4e0b\u8f7d\u4e86 SDK \u548c\u5fc5\u8981\u7684\u5e93\u4e4b\u540e\uff0c\u4e0b\u4e00\u6b65\u5de5\u4f5c\u662f\u4e0b\u8f7d\u5e76\u7f16\u8bd1\u8f6f\u4ef6\u5305\u3002\u5982\u4e0b\u622a\u56fe\u5c55\u793a\u4e86\u4e3a\u6784\u5efa\u65b0\u53d1\u884c\u7248\u800c\u6267\u884c\u7684\u4efb\u52a1\u3002\u8fd9\u4e00\u6b65\u5c06\u4f1a\u6267\u884c 2-3 \u5c0f\u65f6\uff0c\u56e0\u4e3a\u9996\u5148\u8981\u4e0b\u8f7d\u9700\u8981\u7684\u8f6f\u4ef6\u5305\uff0c\u7136\u540e\u8fd8\u8981\u4e3a\u65b0\u7684 Linux \u53d1\u884c\u7248\u7f16\u8bd1\u8fd9\u4e9b\u8f6f\u4ef6\u5305\u3002<\/p>\n

    <\/p>\n

    \u4e0b\u9762\u7684\u622a\u56fe\u8868\u660e\u4e86\u4efb\u52a1\u5217\u8868\u6267\u884c\u5b8c\u6bd5\u3002<\/p>\n

    <\/p>\n

    \u4e3a\u76ee\u6807\u673a\u5668\u7c7b\u578b qemux86-64<\/span> \u7f16\u8bd1\u597d\u7684\u65b0\u955c\u50cf\u4f4d\u4e8e build\/tmp\/deploy\/images\/qemux86-64<\/span>\uff1a<\/p>\n

    <\/p>\n

    \u5982\u4e0b\u6240\u793a\uff0c\u4e0a\u9762\u7684\u547d\u4ee4\u5982\u679c\u8fd0\u884c\u5728 Putty<\/span>\u4e0a\u4f1a\u4ea7\u751f\u4e00\u4e2a\u9519\u8bef\u3002<\/p>\n

    <\/p>\n

    \u901a\u8fc7 rdp<\/span> \u5728 Ubuntu \u5e73\u53f0\u4e0a\u518d\u6b21\u8fd0\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u3002<\/p>\n

    <\/p>\n

    \u4e3a\u8fd0\u884c\u65b0\u7684\u57fa\u4e8e Yocto \u7684 Linux \u53d1\u884c\u7248\u7684 qemu \u6253\u5f00\u4e00\u4e2a\u65b0\u5c4f\u5e55\u3002<\/p>\n

    <\/p>\n

    \u4e0b\u9762\u5c55\u793a\u4e86\u65b0\u53d1\u884c\u7248\u7684\u767b\u5f55\u754c\u9762\uff0c\u540c\u65f6\u4e5f\u663e\u793a\u4e86\u4f7f\u7528\u7684 yocto \u9879\u76ee\u7684\u7248\u672c\u53f7\u3002\u9ed8\u8ba4\u7684\u7528\u6237\u540d\u662f root<\/span>\uff0c\u5bc6\u7801\u4e3a\u7a7a\u3002<\/p>\n

    <\/p>\n

    \u6700\u540e\u4f7f\u7528 root<\/span>\u7528\u6237\u540d\u548c\u7a7a\u5bc6\u7801\u767b\u5f55\u65b0\u53d1\u884c\u7248\u3002\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff0c\u5728\u8fd9\u4e2a\u6700\u5c0f\u7248\u672c\u7684 Linux \u4e0a\u8fd0\u884c\u4e86\u57fa\u672c\u7684\u547d\u4ee4\uff08data<\/span>\u3001ifconfig<\/span>\u548cuname<\/span>\uff09\u3002<\/p>\n

    <\/p>\n

    \u672c\u6587\u7684\u76ee\u6807\u662f\u7406\u89e3\u4f7f\u7528 Yocto \u521b\u5efa\u65b0\u7684 Linux \u53d1\u884c\u7248\u7684\u8fc7\u7a0b\u3002<\/p>\n


    \n

    via: https:\/\/www.howtoforge.com\/tutorial\/how-to-create-your-own-linux-distribution-with-yocto-on-ubuntu\/<\/a><\/p>\n

    \u4f5c\u8005\uff1aAhmad<\/a> \u8bd1\u8005\uff1aEzio<\/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-8268-1.html<\/a><\/p>\n

    \u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/ubuntu-yocto-linux.html<\/a>\u7f16\u8f91\u5458\uff1a\u5f20@\u5b87\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

    \u672c\u6587\u4e3b\u8981\u805a\u7126\u5728\u5982\u4f55\u4f7f\u7528 Yocto \u5728 Ubuntu \u4e0a\u521b\u5efa\u4e00\u4e2a\u6700\u5c0f\u5316\u7684 Linux \u53d1\u884c\u7248\u3002Yocto \u9879\u76ee\u5728\u5d4c\u5165\u5f0f Linux \u7684\u4e16\u754c\u975e\u5e38\u8457\u540d\uff0c\u8fd9\u662f\u56e0\u4e3a\u5b83\u7528\u8d77\u6765\u975e\u5e38\u7075\u6d3b\u3001\u65b9\u4fbf\u3002Yocto \u7684\u76ee\u6807\u662f\u4e3a\u5d4c\u5165\u5f0f\u8f6f\u786c\u4ef6\u5f00\u53d1\u5546\u521b\u5efa\u81ea\u5df1\u7684 Linux \u53d1\u884c\u7248\u3002\u672c\u6587\u6211\u4eec\u5c06\u4f1a\u521b\u5efa\u4e00\u4e2a\u53ef\u4ee5\u8fd0\u884c\u5728 QEMU \u4e0a\u7684\u6700\u5c0f\u5316\u7684 Linux\uff0c\u5e76\u4e14\u5728 QEMU \u4e0a\u5b9e\u9645\u8fd0\u884c\u3002<\/p>\n","protected":false},"author":310,"featured_media":53654,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-53497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/53497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=53497"}],"version-history":[{"count":13,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/53497\/revisions"}],"predecessor-version":[{"id":274642,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/53497\/revisions\/274642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/53654"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=53497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=53497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=53497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}