在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            博客專欄

            EEPW首頁 > 博客 > 通過Ycoto Project定制嵌入式Y(jié)coto Linux鏡像

            通過Ycoto Project定制嵌入式Y(jié)coto Linux鏡像

            發(fā)布人:toradex 時間:2022-06-23 來源:工程師 發(fā)布文章

            By Toradex秦海

            1). 簡介

            嵌入式設(shè)備采用Embedded Linux操作系統(tǒng)進(jìn)行開發(fā)已經(jīng)越來越成為主流,但是如何將開發(fā)完成的Linux uboot/kernel配置,以及應(yīng)用程序整合到Embedded Linux鏡像中以便在量產(chǎn)的時候更方便的更新到嵌入式設(shè)備中可能是很多嵌入式開發(fā)者面臨的挑戰(zhàn)之一,而本文就以在Embedded Linux中使用比較廣泛的Yocto project 為例,基于Openembedded開發(fā)框架定制嵌入式 Linux鏡像。

             

            本文所演示的平臺來自于Toradex Colibri iMX8x嵌入式平臺,這個平臺是基于近年發(fā)布的NXP iMX8x系列ARM處理器,核心為Cortex-A35。同時Toradex也提供了基于Ycoto project/Poky 編譯發(fā)布的嵌入式Ycoto Linux Demo鏡像,這樣就無需完全從頭開始配置自己的layer,只需要修改添加需要的部分即可。

             

            2. 準(zhǔn)備

            a). Colibri iMX8x ARM核心版配合Colibri Eva Board 載板,并連接7inch Display,用于測試編譯好的Ycoto Linux image

            b). 配置Ycoto Project/Openembedded開發(fā)環(huán)境,請參考這里說明,本文測試使用目前最新的分支dunfell-5.x.y。

            c). 參考這里說明下載Toradex Ycoto Linux BSP 5.x.y版本KernelUboot源代碼,用于產(chǎn)生相應(yīng)的patch文件。

            c). 本文演示的定制Ycoto Linux鏡像主要添加修改以下內(nèi)容,下面會按照這個內(nèi)容逐一說明:

            ./ 修改Uboot默認(rèn)環(huán)境變量,適配Splash開機(jī)啟動畫面,關(guān)于Splash啟動畫面的詳細(xì)修改說明可以參考這里說明;修改后續(xù)要默認(rèn)啟動加載的定制化device tree命名 imx8qxp-colibri-customer-v1.dtb

            ./ 修改Linux Kernel增加并使能定制化Splash開機(jī)啟動畫面圖片;同時修改Linux device tree文件,使能Colibri iMX8x自帶的兩路FlexCAN驅(qū)動并關(guān)閉默認(rèn)打開的載板SPI CAN驅(qū)動,并保存為定制化device tree文件imx8qxp-colibri-customer-v1.dtb;最后配置默認(rèn)啟動適配7inch DisplayDevice Tree Overlay文件

            ./ 將演示Qt應(yīng)用程序集成到Image,并配置為開機(jī)自動啟動

             

             

            3). 創(chuàng)建定制Ycoto Linux 相關(guān)配置Layer

            a). 在配置下載好的OpenEmbedded環(huán)境Layer目錄下,由于Toradex默認(rèn)已經(jīng)包含meta-toradex-demos layer用于Toradex Ycoto Linux Demo Image編譯,我們這里直接基于這個layer創(chuàng)建用于定制化的Layer  meta-customer-demos.

            --------------------------------

            ### create customer layer meat-customer-demos ###

            $ cd cd .../oe-core/layer

            $ cp -r meta-toradex-demos/ meta-customer-demos

            --------------------------------

             

            b). 修改meta-customer-demos目錄下 conf/layer.conf文件,適配新的layer命名,同時include machine配置文件

            --------------------------------

            diff --git a/conf/layer.conf b/conf/layer.conf

            index 954e4f8..ab8afb6 100644

            --- a/conf/layer.conf

            +++ b/conf/layer.conf

            @@ -1,12 +1,15 @@

            +# Include extra machine setting

            +include conf/machine/${MACHINE}-extra.conf

            +

             # We have a conf and classes directory, append to BBPATH

             BBPATH .= ":${LAYERDIR}"

             

             # We have recipes-* directories, add to BBFILES

             BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"

             

            -BBFILE_COLLECTIONS += "toradex-demos"

            -BBFILE_PATTERN_toradex-demos = "^${LAYERDIR}/"

            -BBFILE_PRIORITY_toradex-demos = "24"

            +BBFILE_COLLECTIONS += "customer-demos"

            +BBFILE_PATTERN_customer-demos = "^${LAYERDIR}/"

            +BBFILE_PRIORITY_customer-demos = "24"

             

             # Let us add layer-specific bbappends which are only applied when that

             # layer is included in our configuration

            @@ -16,11 +19,11 @@ BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \

             BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bb' % layer \

                            for layer in BBFILE_COLLECTIONS.split())}"

             

            -LAYERDEPENDS_toradex-demos = " \

            +LAYERDEPENDS_customer-demos = " \

                 core \

                 yocto \

                 openembedded-layer gnome-layer multimedia-layer networking-layer \

                 freescale-layer \

                 freescale-distro \

             "

            -LAYERSERIES_COMPAT_toradex-demos = "zeus dunfell"

            +LAYERSERIES_COMPAT_customer-demos = "zeus dunfell"

            --------------------------------

             

            c). meta-customer-demos/conf 目錄下創(chuàng)建 machine/colibri-imx8x-extra.conf文件,為設(shè)備增加新的定制化設(shè)備樹文件

            --------------------------------

            $ mkdir -p .../oe-core/layers/meta-customer-demos/conf/machine

            $ vi .../oe-core/layers/meta-customer-demos/conf/machine/colibri-imx8x-extra.conf

            KERNEL_DEVICETREE_append = " \

                freescale/imx8qxp-colibri-customer-v1.dtb \

            "

            --------------------------------

             

             

            4). OpenEmbeddedUboot修改示例

            a). 為了后續(xù)配置Splash開機(jī)畫面正常顯示,需要修改 U-boot 環(huán)境變量去除顯示輸出的 console 打印輸出。

             

            b). 首先進(jìn)入下載的Uboot源代碼對 include/configs/colibri_imx6.h 文件進(jìn)行修改,產(chǎn)生相應(yīng)的patch文件

            0001-uboot-env-update.patch

            --------------------------------

            diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h

            index 2c6a88de80..e2c1b28e31 100644

            --- a/include/configs/colibri-imx8x.h

            +++ b/include/configs/colibri-imx8x.h

            @@ -94,7 +94,7 @@

                    "console=ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200\0" \

                    "fdt_addr=0x83000000\0" \

                    "fdt_high=\0" \

            -       "fdt_board=eval-v3\0" \

            +       "fdt_board=customer-v1\0" \

                    "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \

                    "image=Image\0" \

                    "initrd_addr=0x83800000\0" \

            @@ -109,6 +109,7 @@

                            "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

                            "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \

                            "${blkcnt}; fi\0" \

            +       "setupargs=vt.global_cursor_default=0 consoleblank=0 console=${console}\0" \

                    "vidargs=video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off\0"

             

             /* Link Definitions */

            --------------------------------

             

            c). meta-customer-demos layer目錄下創(chuàng)建 recipes-bsp/u-boot/files目錄,并對Colibri iMX8x默認(rèn)使用的 u-boot-toradex_2020.04.bb 文件進(jìn)行append,集成上面生成的patch

            --------------------------------

            ### prepare patch file ###

            $ mkdir -p recipes-bsp/u-boot/files

            $ cd .../recipes-bsp/u-boot/

            $ cp .../0001-uboot-env-update.patch files/

            ### crteate bbappend file ###

            $ vi u-boot-toradex_2020.04.bbappend

            FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

             

            SRC_URI_append = " \

                file://0001-uboot-env-update.patch \

            "

            --------------------------------

             

            d). 另外這里也提示下,U-boot環(huán)境變量的修改也可以通過修改Ycoto編譯生成的Image壓縮包文件里面的  u-boot-initial-env-sd  文件來更改,這樣通過Toradex Easy Installer更新到模塊后就是修改后的變量配置了,對于某些場景可能更方便一些,不一定需要上述在Ycoto編譯環(huán)境通過修改源碼的方式進(jìn)行修改。

             

             

            5). OpenEmbeddedLinux kernel device tree 修改示例

            a). 參考上述 準(zhǔn)備 章節(jié)提到的Splash啟動畫面文章生成Logo文件 “l(fā)ogo_custom_clut224.ppm  menuconfig修改后的Kernel 配置文件 .config,并重命名為 defconfig

            --------------------------------

            Device Drivers Graphics support Bootup logo

            <*>   Custom 224-color Linux logo

            --------------------------------

             

            b). 創(chuàng)建定制化Device Tree文件 ”imx8x-colibri-customer-v1.dtsi”  “imx8qxp-colibri-customer-v1.dts” ,用于關(guān)閉Colibri iMX8x默認(rèn)使能的Colibri Eva Board的板載MCP2515 CAN控制器,同時使能Imx8x芯片自帶的兩路FlexCAN接口。

            ./ “imx8x-colibri-customer-v1.dtsi” 相對于默認(rèn)的 “imx8x-colibri-eval-v3.dtsi” 文件改動如下

            --------------------------------

            --- arch/arm64/boot/dts/freescale/imx8x-colibri-eval-v3.dtsi 2022-06-16 17:38:34.293724009 +0800

            +++ arch/arm64/boot/dts/freescale/imx8x-colibri-customer-v1.dtsi 2022-06-20 17:49:30.735567256 +0800

            @@ -88,7 +88,7 @@

               interrupt-parent = <&lsio_gpio3>;

               interrupts = <13 IRQ_TYPE_EDGE_FALLING>;

               spi-max-frequency = <10000000>;

            -  status = "okay";

            +  status = "disabled";

              };

              /* To keep the CAN controller enabled by default,

               * disable conflicting spidev. This spidev device

            @@ -182,3 +182,24 @@

             &vpu_lpcg {

              status = "okay";

             };

            +

            +&flexcan1 {

            +        status = "okay";

            +};

            +

            +&flexcan2 {

            +        status = "okay";

            +};

            +

            +&iomuxc {

            +        //pinctrl-names = "default";

            +        //pinctrl-0 = <&pinctrl_lpuart0>;

            +        colibri-imx8qxp {

            +        pinctrl_lpuart0: lpuart0grp {

            +                        fsl,pins = <

            +                                IMX8QXP_UART0_RX_ADMA_UART0_RX                  0x06000020      /* SODIMM  36 */

            +                                IMX8QXP_UART0_TX_ADMA_UART0_TX                  0x06000020      /* SODIMM  38 */

            +                        >;

            +                };

            +        };

            +};

            --------------------------------

            ./ “imx8qxp-colibri-customer-v1.dts” 相對于默認(rèn)的 “imx8qxp-colibri-eval-v3.dts” 文件改動如下:

            --------------------------------

            --- arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dts 2022-06-16 17:38:34.289723980 +0800

            +++ arch/arm64/boot/dts/freescale/imx8qxp-colibri-customer-v1.dts 2022-06-20 17:45:04.354142165 +0800

            @@ -6,11 +6,11 @@

             /dts-v1/;

             

             #include "imx8qxp-colibri.dtsi"

            -#include "imx8x-colibri-eval-v3.dtsi"

            +#include "imx8x-colibri-customer-v1.dtsi"

             

             / {

            - model = "Toradex Colibri iMX8QXP on Colibri Evaluation Board V3";

            - compatible = "toradex,colibri-imx8x-eval-v3",

            + model = "Toradex Colibri iMX8QXP on Customer Carrier Board V1";

            + compatible = "toradex,colibri-imx8x-customer-v1",

                    "toradex,colibri-imx8x",

                    "fsl,imx8qxp";

             };

            --------------------------------

            ./ 修改 Makefile 文件,增加新的定制化Device Tree文件

            --------------------------------

            --- a/arch/arm64/boot/dts/freescale/Makefile

            +++ b/arch/arm64/boot/dts/freescale/Makefile

            @@ -174,6 +174,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb imx8qxp-mek-dsp.dtb imx8qxp-mek-ov5640

                                      imx8dx-colibri-aster.dtb \

                                      imx8qxp-colibri-eval-v3.dtb \

                                      imx8dx-colibri-eval-v3.dtb \

            +                         imx8qxp-colibri-customer-v1.dtb \

            +                          imx8dx-colibri-customer-v1.dtb \

                                      imx8qxp-colibri-iris.dtb \

                                      imx8dx-colibri-iris.dtb \

                                      imx8dx-colibri-iris-v2.dtb \

            --------------------------------

             

            ./ 創(chuàng)建完成后,通過 git add 命令添加兩個新文件,然后通過 git diff 命令可以生成用于Ycoto編譯集成的patch文件,命名為 ”0001-imx8qxp-colibri-customer-v1.patch”

             

             

            c). meta-customer-demos layer目錄下創(chuàng)建 recipes-kernel/linux目錄,并對 linux-toradex_5.4-2.3.x.bb 文件進(jìn)行append同時創(chuàng)建files目錄,存入defconfig、0001-imx8qxp-colibri-customer-v1.patch logo_custom_clut224.ppm三個文件以適配Splash圖片和Device Tree的修改

            --------------------------------

            ### prepare patch file ###

            $ mkdir -p recipes-kernel/linux/files

            $ cd .../recipes-kernel/linux/

            $ cp .../defconfig files/

            $ cp .../logo_custom_clut224.ppm files/

            $ cp .../0001-imx8qxp-colibri-customer-v1.patch files/

            ### crteate bbappend file ###

            $ vi linux-toradex_5.4-2.3.x.bbappend

            FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

             

            SRC_URI_append = " \

                file://0001-imx8qxp-colibri-customer-v1.patch \

                file://defconfig \

                file://logo_custom_clut224.ppm \

            "

             

            do_configure_prepend() {

                # logo support, if you supply logo_custom_clut224.ppm in SRC_URI, then it's going to be used

                if [ -e ${WORKDIR}/logo_custom_clut224.ppm ]; then

                    install -m 0644 ${WORKDIR}/logo_custom_clut224.ppm ${S}/drivers/video/logo/logo_custom_clut224.ppm

                fi

            }

            --------------------------------

             

            d). 這里提示下在OpenEmbedded環(huán)境下,也可以通過下面命令在編譯系統(tǒng)中直接修改Kernel 配置,不過由于不如上述patch方式維護(hù)方便,只應(yīng)臨時測試使用,不建議實(shí)際部署編譯時候用這樣的方式修改。

            --------------------------------

            $ bitbake -c menuconfig virtual/kernel

            --------------------------------

             

             

            6). OpenEmbeddedLinux rootfs 文件系統(tǒng)中配置文件修改示例

            a). meta-customer-demos/recipes-kernel/linux目錄下創(chuàng)建device-tree-overlays_git.bbappend文件,以完成Splash開機(jī)畫面文章中章節(jié)7中對于顯示分辨率的適配

            --------------------------------

            $ cd meta-customer-demos/recipes-kernel/linux/

            $ vi device-tree-overlays_git.bbappend

            TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = " \

                    colibri-imx8x_parallel-rgb_overlay.dtbo \

                    display-lt161010_overlay.dtbo \

            "

            --------------------------------

             

            b). meta-customer-demos layer目錄下創(chuàng)建 recipes-graphics/wayland 目錄,并對 weston-init.bb 文件進(jìn)行append同時創(chuàng)建files目錄,存入如下Patch文件以完成Splash開機(jī)畫面文章中章節(jié)9.a中對Weston桌面顯示的修改配置

            --------------------------------

            ### create bbappend file ###

            $ cd meta-customer-demos

            $ mkdir -p recipes-graphics/wayland/

            $ cd recipes-graphics/wayland/

            $ vi weston-init.bbappend

            FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

             

            SRC_URI_append = " \

                file://0001-weston-env.patch  \

            "

            ### create patch file ###

            $ mkdir files

            $ cd files

            $ vi 0001-weston-env.patch

            --- a/weston.ini        2022-04-29 13:28:14.445478543 +0800

            +++ b/weston.ini        2022-06-21 16:47:00.794980329 +0800

            @@ -4,8 +4,10 @@

             #use-g2d=1

             #xwayland=true

             

            -#[shell]

            +[shell]

             #size=1920x1080

            +panel-position=none

            +background-color=0x00FFFFFF

             

             #[output]

             #name=HDMI-A-1

            --------------------------------

             

             

            7). OpenEmbedded下部署Qt應(yīng)用示例

            a). 本文所使用的Qt 應(yīng)用demo說明請參考下面文章:

            http://blog.sina.com.cn/s/blog_d733e5170102wyay.html 

             

            b). Ycoto Linux Multimedia Demo ImageColibri iMX8x模塊上面默認(rèn)啟動的是Qt Cinema示例應(yīng)用

            ./ Qt Cinema 示例應(yīng)用bb文件,包括編譯應(yīng)用源碼以及安裝啟動腳本

            --------------------------------

            .../oe-core/layers/meta-qt5/recipes-qt/examples/cinematicexperience_1.0.bb

            --------------------------------

            ./ wayland app launch bb文件,通過設(shè)定wayland-app-launch systemd服務(wù)啟動項(xiàng)目,來達(dá)到開機(jī)自動啟動的目的

            --------------------------------

            .../oe-core/layers/meta-toradex-demos/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-cinematicexperience_1.0.bb

            --------------------------------

             

            c). 基于上面示例,我們同樣方法配置Qt HelloworldUI 示例demo的編譯、安裝和自動啟動

            ./ meta-customer-demos layer目錄下創(chuàng)建 qt5-layer/recipes-qt/qtdemo目錄,并創(chuàng)建如下 helloworldUI_0.1.bb 文件用于從Qt 應(yīng)用的git地址下載應(yīng)用并編譯部署

            --------------------------------

            $ mkdir -p .../oe-core/layers/meta-customer-demos/qt5-layer/recipes-qt/qtdemo

            $ cd .../oe-core/layers/meta-customer-demos/qt5-layer/recipes-qt/qtdemo/

            $ vi helloworldUI_0.1.bb

            SUMMARY = "Qt5 demo application deployment"

            DESCRIPTION = "Qt5 GPIO widget demo applicaiton"

            LICENSE = "MIT"

            LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

            PR = "r0"

             

            SRC_URI = "git://github.com/simonqin09/QtGPIOProject.git;protocol=git;branch=master"

            SRCREV = "efac8dfeb878f104dfcfcf54188b25d024f2f16b"

             

            S = "${WORKDIR}/git/helloworldUI"

             

            DEPENDS = "qtbase"

            RDEPENDS_${PN} = "qtbase-plugins"

             

            require recipes-qt/qt5/qt5.inc

             

            do_install() {

                install -d ${D}${datadir}/${P}

                install -m 0755 ${B}helloworldUI ${D}${datadir}/${P}

            }

             

            FILES_${PN} += "${datadir}"

            --------------------------------

            ./ 創(chuàng)建對應(yīng)的wayland app launch bb文件

            --------------------------------

            $ vi .../oe-core/layers/meta-toradex-demos/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-helloworldUI_1.0.bb

            # set the following variable to your one and only application which should

            # be launched right after weston started

             

            INITIAL_APP_PKGS ?= "helloworldUI qtwayland"

            INITIAL_PATH ?= ""

            APPLICATION_ENVIRONMENT ?= '\"QT_QPA_PLATFORM=wayland-egl\"'

            WAYLAND_APPLICATION ?= "/usr/share/helloworldUI-1.0/helloworldUI --fullscreen"

             

            require wayland-app-launch.inc

            --------------------------------

             

             

            8). OpenEmbedded下設(shè)置自定義image鏡像編譯

            a). meta-customer-demos/recipes-images/images/ 目錄下創(chuàng)建定制化Ycoto Linux Image BB文件,基于Toradex默認(rèn)的Multimeida Demo Image。如果需要修改Image里面包含的組件也可以直接在這個文件里面修改。

            --------------------------------

            ### create bbfile ###

            $ cd .../oe-core/layers/meta-customer-demos/recipes-images/images

            $ cp tdx-reference-multimedia-image.bb customer-multimedia-image.bb

            #### modify bbfile ###

            --- recipes-images/images/tdx-reference-multimedia-image.bb     2022-06-16 16:48:23.435865928 +0800

            +++ recipes-images/images/customer-multimedia-image.bb  2022-06-22 17:31:12.938956311 +0800

            @@ -1,12 +1,12 @@

             require tdx-reference-minimal-image.bb

             

            -SUMMARY = "Toradex Embedded Linux Reference Multimedia Image"

            +SUMMARY = "Customer Embedded Linux Reference Multimedia Image"

             DESCRIPTION = "Image for BSP verification with QT and multimedia features"

             

             inherit populate_sdk_qt5

             

             #Prefix to the resulting deployable tarball name

            -export IMAGE_BASENAME = "Reference-Multimedia-Image"

            +export IMAGE_BASENAME = "Customer-Multimedia-Image"

             

             SYSTEMD_DEFAULT_TARGET = "graphical.target"

             

            @@ -16,7 +16,7 @@

                                                                    '', d), d)} \

             "

             

            -APP_LAUNCH_WAYLAND ?= "wayland-qtdemo-launch-cinematicexperience"

            +APP_LAUNCH_WAYLAND ?= "wayland-qtdemo-launch-helloworldui"

             APP_LAUNCH_WAYLAND_colibri-imx6ull ?= "wayland-qtdemo-launch-analogclock"

             APP_LAUNCH_WAYLAND_colibri-imx6ull-emmc ?= "wayland-qtdemo-launch-analogclock"

             APP_LAUNCH_WAYLAND_colibri-imx7 ?= "wayland-qtdemo-launch-analogclock"

            --------------------------------

             

            b). 至此,meta-customer-demos layer 的所有修改都已經(jīng)完成,下面我們進(jìn)入 OpenEmbedded編譯環(huán)境下 build/conf 目錄, 對下面兩個文件進(jìn)行修改:

            ./ bblayers.conf  用定制化的meta-customer-demos layer替換默認(rèn)的meta-toradex-demos layer

            --------------------------------

            --- a/build/conf/bblayers.conf  2022-06-22 18:00:46.163360544 +0800

            +++ b/build/conf/bblayers.conf  2022-06-16 16:51:46.159966787 +0800

            @@ -23,7 +23,7 @@

               ${TOPDIR}/../layers/meta-openembedded/meta-multimedia \

               ${TOPDIR}/../layers/meta-openembedded/meta-python \

               ${TOPDIR}/../layers/meta-freescale-distro \

            -  ${TOPDIR}/../layers/meta-toradex-demos \

            +  ${TOPDIR}/../layers/meta-customer-demos \

               ${TOPDIR}/../layers/meta-qt5 \

               \

               \

            --------------------------------

             

            ./ local.conf  將默認(rèn)的machine 修改為 colibri-imx8x, 同樣也include設(shè)備額外的conf文件,最后增加了License聲明,如果需要一些額外的和修改也可以在這個文件下修改

            --------------------------------

            --- a/build/conf/local.conf     2022-06-22 18:04:33.959385766 +0800

            +++ b/build/conf/local.conf     2022-06-22 18:05:55.091394476 +0800

            @@ -27,7 +27,7 @@

             #MACHINE ?= "colibri-imx6ull-emmc"

             #MACHINE ?= "colibri-imx7"

             #MACHINE ?= "colibri-imx7-emmc"

            -#MACHINE ?= "colibri-imx8x"

            +MACHINE ?= "colibri-imx8x"

             #

             #MACHINE ?= "verdin-imx8mm"

             #MACHINE ?= "verdin-imx8mp"

            @@ -277,3 +277,9 @@

             include conf/machine/include/${MACHINE}.inc

             

             # DO NOT SET THE MACHINE AFTER THE ABOVE INCLUDE

            +

            +# Include extra machine setting

            +include conf/machine/${MACHINE}-extra.conf

            +

            +# Freescale EULA

            +ACCEPT_FSL_EULA = "1"

            --------------------------------

             

            f). build目錄下執(zhí)行下面命令進(jìn)行編譯,編譯成功后, 可以在 deploy/images/colibri-imx8x 目錄下找到編譯好的 image 壓縮包。

            --------------------------------

            $ bitbake customer-mutimedia-image

            --------------------------------

             

             

            9). Colibri imx6模塊上面更新image并測試

            a). 將上述生成好的image壓縮文件 Colibri-iMX8X_Customer-Multimedia-Image-Tezi_5.6.0-devel-20220623030838+build.0.tar 按照這里的說明更新到 Colibri iMX8x 模塊上面去。

             

            c). image 更新好后,我們可以逐項(xiàng)去測試上面每一個配置

            ./ Uboot

            如下可見默認(rèn)環(huán)境變量的修改已經(jīng)生效

            --------------------------------

            Colibri iMX8X # printenv

            fdt_board=customer-v1

            ...

            setupargs=vt.global_cursor_default=0 consoleblank=0 console=${console}

            --------------------------------

             

            ./ Kernel Config 修改

            如下可見kernel增加的驅(qū)動也已經(jīng)編譯進(jìn)去了,同時設(shè)備啟動后Splash開機(jī)畫面也正常顯示了

            --------------------------------

            root@colibri-imx8x-06748681:~# zcat /proc/config.gz |grep CONFIG_LOGO_CUSTOM

            CONFIG_LOGO_CUSTOM_CLUT224=y

            --------------------------------

            通過Ycoto Project定制嵌入式Y(jié)coto Linux鏡像18103.png 

             

            ./ Device Tree 修改

            如下可見,兩路FlexCAN都以及正常使能

            --------------------------------

            root@colibri-imx8x-06748681:~# ip link show       

            ...

            3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10

                link/can

            4: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10

                link/can

            ...

            --------------------------------

             

            ./ Rootfs修改

            如下可見,weston.ini文件修改已經(jīng)生效

            --------------------------------

            root@colibri-imx8x-06748681:~# vi /etc/xdg/weston/weston.ini

            ...

            [shell]

            #size=1920x1080

            panel-position=none

            background-color=0x00FFFFFF

            ...

            --------------------------------

             

            ./ Qt 程序自啟動

            如下圖片

            通過Ycoto Project定制嵌入式Y(jié)coto Linux鏡像18733.png 

             

            10). 總結(jié)

            本文只是簡單演示了利用 Ycoto/OpenEmbedded 可以非常方便的生成定制化 Embedded Linux,另外配合git,還可以很好的實(shí)現(xiàn)不同版本的管理。但是 OpenEmbedded 架構(gòu)本身也是比較復(fù)雜的,要想靈活使用還需要對其做一些深入的學(xué)習(xí)才能得心應(yīng)手,更多文檔可以參考如下OpenEmbedded官方網(wǎng)站。

            https://www.openembedded.org/wiki/Main_Page


            *博客內(nèi)容為網(wǎng)友個人發(fā)布,僅代表博主個人觀點(diǎn),如有侵權(quán)請聯(lián)系工作人員刪除。




            相關(guān)推薦

            技術(shù)專區(qū)

            關(guān)閉