OpenEmbedded/Yocto for UDOO Boards

Discussion in 'Yocto' started by graugans, Nov 7, 2015.

  1. Retasor

    Retasor New Member

    Joined:
    Dec 26, 2016
    Messages:
    11
    Likes Received:
    4
    Hello @graugans that sounds great. Can you tell something about the LVDS output or is that connected to the Morty branch?
     
  2. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Hi Retasor, about the lvds output, i didn't work on it for the moment (i'm on goodix touchscreen adaptation for the moment ...). On a62 quad it work fine but i don't know why it didn't work on solo/dual ! I think it's a problem with kernel (device tree ?) but saw nothing that can resolve it for the moment. I have a yocto image with krogoth branch that have qt5.7 working. For that you need to use master branch of meta-qt5, add font (ttf-dejavu to your local.conf) in your layer and this var
    Code:
    export QT_QPA_FONTDIR=/usr/share/fonts/truetype
    on qt5env.sh. You can look my repo (forked from Graugans) to see how i did this. But the best way is to wait Graugans update for this ...
     
  3. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    Today I made good progress on Morty, everything is pushed to github already. It compiles for the Quad. I'll give it a try tomorrow. There are some things different with Morty the build instructions need an update.

    Gesendet von meinem FP2 mit Tapatalk
     
    cyrilf and modjo like this.
  4. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    Maybe this could be the right opportunity to move forward to the last version of the kernel?

    Here are the SPI/CAN patches for the UDOO Quad (tested):

    0001-Add-FlexCAN-support.patch
    Code:
    From fddf66db35210b3e131a4e69c34ecb77a24bf91e Mon Sep 17 00:00:00 2001
    From: Cyril Franceschini <cyril.franceschini@eeproperty.ch>
    Date: Fri, 16 Dec 2016 11:34:52 +0100
    Subject: [meta-udoo][PATCH] Add FlexCAN support
    
    Signed-off-by: Cyril Franceschini <cyril.franceschini@eeproperty.ch>
    ---
     arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi b/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi
    index b45b5eb..34b5a3b 100644
    --- a/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi
    +++ b/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi
    @@ -66,8 +66,8 @@
                 MX6QDL_PAD_EIM_CS1__GPIO2_IO24       0x80000000  // {{external-gpio-51}}
                 MX6QDL_PAD_EIM_CS0__GPIO2_IO23       0x80000000  // {{external-gpio-52}}
                 MX6QDL_PAD_EIM_D24__GPIO3_IO24       0x80000000  // {{external-gpio-53}}
    -            MX6QDL_PAD_GPIO_8__GPIO1_IO08        0x80000000  // {{external-gpio-54}}
    -            MX6QDL_PAD_GPIO_7__GPIO1_IO07        0x80000000  // {{external-gpio-55}}
    +            //MX6QDL_PAD_GPIO_8__GPIO1_IO08        0x80000000  // {{external-gpio-54}}
    +            //MX6QDL_PAD_GPIO_7__GPIO1_IO07        0x80000000  // {{external-gpio-55}}
                 >;
             };
    @@ -161,7 +161,7 @@
     &flexcan1 {
         pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_flexcan1>;
    -    status = "disabled";
    +    status = "okay";
     };
     
     &usdhc1 {
    --
    2.7.4
    0002-Add-ECSPI1-and-ECSPI2-support.patch
    Code:
    From af288ce3e0a891d5ddbd7b245c8c662af198d47d Mon Sep 17 00:00:00 2001
    From: Cyril Franceschini <cyril.franceschini@eeproperty.ch>
    Date: Fri, 16 Dec 2016 11:55:53 +0100
    Subject: [meta-udoo][PATCH] Add ECSPI1 and ECSPI2 support
    
    Signed-off-by: Cyril Franceschini <cyril.franceschini@eeproperty.ch>
    ---
     arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi | 20 ++++++++++----------
     1 file changed, 10 insertions(+), 10 deletions(-)
    
    diff --git a/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi b/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi
    index 34b5a3b..cb9b1f4 100644
    --- a/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi
    +++ b/arch/arm/boot/dts/imx6qdl-udoo-externalpins.dtsi
    @@ -46,10 +46,10 @@
                 MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09   0x80000000  // {{external-gpio-31}}
                 MX6QDL_PAD_DISP0_DAT16__GPIO5_IO10   0x80000000  // {{external-gpio-32}}
                 MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11   0x80000000  // {{external-gpio-33}}
    -            MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12   0x80000000  // {{external-gpio-34}}
    +            //MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12   0x80000000  // {{external-gpio-34}}
                 MX6QDL_PAD_DISP0_DAT19__GPIO5_IO13   0x80000000  // {{external-gpio-35}}
    -            MX6QDL_PAD_DISP0_DAT20__GPIO5_IO14   0x80000000  // {{external-gpio-36}}
    -            MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15   0x80000000  // {{external-gpio-37}}
    +            //MX6QDL_PAD_DISP0_DAT20__GPIO5_IO14   0x80000000  // {{external-gpio-36}}
    +            //MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15   0x80000000  // {{external-gpio-37}}
                 MX6QDL_PAD_EIM_A16__GPIO2_IO22       0x80000000  // {{external-gpio-38}}
                 MX6QDL_PAD_GPIO_18__GPIO7_IO13       0x80000000  // {{external-gpio-39}} (KEY_VOL_UP)
                 MX6QDL_PAD_NANDF_D0__GPIO2_IO00      0x80000000  // {{external-gpio-40}} (HOME)
    @@ -57,14 +57,14 @@
                 MX6QDL_PAD_NANDF_D2__GPIO2_IO02      0x80000000  // {{external-gpio-42}} (BACK)
                 MX6QDL_PAD_NANDF_D1__GPIO2_IO01      0x80000000  // {{external-gpio-43}} (MENU)
                 MX6QDL_PAD_GPIO_19__GPIO4_IO05       0x80000000  // {{external-gpio-44}} (KEY_VOL_DOWN)
    -            MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16   0x80000000  // {{external-gpio-45}}
    -            MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17   0x80000000  // {{external-gpio-46}}
    +            //MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16   0x80000000  // {{external-gpio-45}}
    +            //MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17   0x80000000  // {{external-gpio-46}}
                 MX6QDL_PAD_EIM_D25__GPIO3_IO25       0x80000000  // {{external-gpio-47}}
                 MX6QDL_PAD_KEY_ROW1__GPIO4_IO09      0x80000000  // {{external-gpio-48}}
                 MX6QDL_PAD_KEY_COL1__GPIO4_IO08      0x80000000  // {{external-gpio-49}}
    -            MX6QDL_PAD_EIM_OE__GPIO2_IO25        0x80000000  // {{external-gpio-50}}
    -            MX6QDL_PAD_EIM_CS1__GPIO2_IO24       0x80000000  // {{external-gpio-51}}
    -            MX6QDL_PAD_EIM_CS0__GPIO2_IO23       0x80000000  // {{external-gpio-52}}
    +            //MX6QDL_PAD_EIM_OE__GPIO2_IO25        0x80000000  // {{external-gpio-50}}
    +            //MX6QDL_PAD_EIM_CS1__GPIO2_IO24       0x80000000  // {{external-gpio-51}}
    +            //MX6QDL_PAD_EIM_CS0__GPIO2_IO23       0x80000000  // {{external-gpio-52}}
                 MX6QDL_PAD_EIM_D24__GPIO3_IO24       0x80000000  // {{external-gpio-53}}
                 //MX6QDL_PAD_GPIO_8__GPIO1_IO08        0x80000000  // {{external-gpio-54}}
                 //MX6QDL_PAD_GPIO_7__GPIO1_IO07        0x80000000  // {{external-gpio-55}}
    @@ -228,7 +228,7 @@
         cs-gpios = <&gpio5 17 0>;
         pinctrl-0 = <&pinctrl_ecspi1>;
         pinctrl-names = "default";
    -   status = "disabled";
    +   status = "okay";
         spidev0: spi@0 {
             compatible = "spidev";
    @@ -242,7 +242,7 @@
         cs-gpios = <&gpio5 12 0>;
         pinctrl-0 = <&pinctrl_ecspi2>;
         pinctrl-names = "default";
    -   status = "disabled";
    +   status = "okay";
         spidev1: spi@0 {
             compatible = "spidev";
    --
    2.7.4
    You must enable :
    Code:
    CONFIG_SPI_SPIDEV=m
    in your defconfig file.

    linux-udooboard_3.14.56.bb
    Code:
    ...
    SRC_URI_append_udooqdl = "file://0010-default-bpp-to-16.patch \
        ${@base_conditional("ENABLE_CAN_BUS", "1", "file://0001-Add-FlexCAN-support.patch", "", d)} \
        ${@base_conditional("ENABLE_SPI_BUS", "1", "file://0002-Add-ECSPI1-and-ECSPI2-support.patch", "", d)} \
    "
    ...
     
    graugans and modjo like this.
  5. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    @graugans , if i understand, with dts overlay we can use the same image (same sd card) for all the card (neo, quad, sa62) ?
     
  6. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    The Device-Tree Overlay provides an mechanism to patch the device-tree during boottime (runtime). My focus is primary for easier selection of CAN / SPI etc. With the U-Boot used in morty it is already possible to use device-tree overlays.
     
    modjo likes this.
  7. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    There is an issue with the touchscreen driver. The touchscreen isn't recognized by tslib. When I start a calibration
    Code:
    TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event1 ts_calibrate
    I get this error:
    All the JavaScript touch events such as "touchend" aren't fired in QWebKit.
     
  8. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Hi cyrilf, normaly you don't need TSLIB see here
     
    cyrilf and graugans like this.
  9. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    @modjo OK thanks, I didn't notice that.

    With the morty branch, I have troubles to install de uEnv.txt file correctly in /boot. Here is my bb file:

    u-boot-fslc_%.bbappend
    Code:
    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
    
    SRC_URI += " \
                file://0001-UDOO-Quad-Dual-support.patch \
                file://0002-Added-UDOO-Neo-support.patch \
                file://0003-Added-Seco-A62-support.patch \
                file://0004-Added-device-tree-overlay-support.patch \
                file://uEnv.txt \
    "
    
    do_install_append() {
        install -d ${D}/boot
        install -m 0755 ${WORKDIR}/uEnv.txt ${D}/boot
    }
    
    FILES_${PN} += "/boot/uEnv.txt"
    
    COMPATIBLE_MACHINE = "(udooqdl|udooneo|secosbca62)"
    The rootfs resize utility also doesn't work anymore:
     
    Last edited: Mar 24, 2017
  10. Retasor

    Retasor New Member

    Joined:
    Dec 26, 2016
    Messages:
    11
    Likes Received:
    4
    I'm trying to use the Yocto Krogoth build on a SECO-A62. It's working except for the LVDS output, I did some research and I think that the only resolution that is supported is 1366x768. My screen has a 1024x768 resolution. Is this resolution supported in this build or can I add it somewhere. I think this is related to the device tree. But I'm not familiar with the device tree. I can use some help to add this.
     
  11. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Yes you can change the resolution of your lvds screen. For that go to your seco-build folder, for example for me it's :
    A62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-udooboard/3.14.56-r0/git/arch/arm/boot/dts/imx6q-seco_A62-lvds15.dts
    for a 15 inch lvds. Change that you need (resolution, trimming ...), see an example here
    then go to
    A62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-udooboard/3.14.56-r0/git/

    make git diff > /myYoctoFolder/sources/meta-udoo/recipes-kernel/linux/linux-udooboard/secosbca62/myPatch.patch

    then add this patch to linux-udooboard.inc (in sources/meta-udoo/recipes-kernel/linux)
     
    Retasor likes this.
  12. Retasor

    Retasor New Member

    Joined:
    Dec 26, 2016
    Messages:
    11
    Likes Received:
    4
    @modjo Thanks for the detailed reply.
    I'm doing something wrong. Because building results in error on applying the created patch. So somehow it can't apply the patch.
    About the changes you have made in your example. What doe the mode_str means, is it just a string or does it need to match to something.
     
    graugans likes this.
  13. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    See here , here ... for explanation :
     
    graugans likes this.
  14. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    @Retasor May I recommend the Yocto documentation? There is a small utility called quilt it simplifies generating patches:
    Using Quilt in Your Workflow

    You can post our patch here so I can take a look at it and give some advice
     
    Retasor likes this.
  15. Retasor

    Retasor New Member

    Joined:
    Dec 26, 2016
    Messages:
    11
    Likes Received:
    4
    Of course you may recommend the Yocto documentation and I will study the part you mentioned soon. I was able to get the screen working with patching in the way that @modjo described although I had to change the diff a little so that it only generates a diff on the file I changed personally.
    When I have studied and the quilt way I will post my patch for the screen in the quilt way.
     
    graugans likes this.
  16. Retasor

    Retasor New Member

    Joined:
    Dec 26, 2016
    Messages:
    11
    Likes Received:
    4
    It did take some time but here is my patch. Although I didn't use the Quilt workflow
    Code:
    diff --git a/arch/arm/boot/dts/imx6dl-seco_A62-lvds15.dts b/arch/arm/boot/dts/imx6dl-seco_A62-lvds15.dts
    index c8d928d..7579f6e 100644
    --- a/arch/arm/boot/dts/imx6dl-seco_A62-lvds15.dts
    +++ b/arch/arm/boot/dts/imx6dl-seco_A62-lvds15.dts
    @@ -31,8 +31,11 @@
     };
    
     &mxcfb1 {
    -       interface_pix_fmt = "RGB24";
    -       mode_str ="LDB-1366x768";
    +//     interface_pix_fmt = "RGB24";
    +       interface_pix_fmt = "RGB666";
    +       mode_str ="LDB-XGA";
    +//     mode_str ="LDB-1366x768";
    +       default_bpp = <16>;     // Should it be 24Bits? 16.7m
           status = "okay";
     };
    
    @@ -44,25 +47,35 @@
           status = "okay";
           lvds-channel@0 {    
                   status = "okay";
    -               fsl,data-width = <24>;
    -               crtc = "ipu2-di0";
    +               fsl,data-width = <18>;  // Don't know this value  (fsl,data-width : should be <18> or <24>)
    +               // DualLite has one ipu!!!
    +//             crtc = "ipu2-di0";
    +               crtc = "ipu1-di0";
                   display-timings {
                           native-mode = <&timing0>;
    -                       timing0: LDB-1366x768 {
    -                               clock-frequency = <72000000>;
    -                               hactive = <1368>;
    +                       timing0: LDB-XGA {
    +                               clock-frequency = <65000000>;
    +                               hactive = <1024>;
                                   vactive = <768>;
    -                               hback-porch = <93>;
    +                               hback-porch = <155>;
    +                               hfront-porch = <155>;
    +                               vback-porch = <15>;
    +                               vfront-porch = <15>;
    +                               hsync-len = <10>;//<320>;//<10>;
    +                               vsync-len = <8>;//<38>;//<8>;
    +/*                             hback-porch = <93>;
                                   hfront-porch = <33>;
                                   vback-porch = <22>;
                                   vfront-porch = <7>;
                                   hsync-len = <40>;
                                   vsync-len = <4>;
    +*/
                           };
                   };
           };
    
           lvds-channel@1 {
    -               crtc = "ipu2-di1";
    +//             crtc = "ipu2-di1";
    +               crtc = "ipu1-di1";
           };
     };
    
    One of the most import changes was the change at the IPU (Image Processing Unit) the duallite board I am using has only one IPU instead of 2 on the Quad version.
     
    modjo likes this.
  17. Berk

    Berk New Member

    Joined:
    Nov 22, 2016
    Messages:
    17
    Likes Received:
    5
    Good work! I will try as soon as possible.
     
  18. oxoocoffee

    oxoocoffee Member

    Joined:
    Sep 13, 2016
    Messages:
    57
    Likes Received:
    6
    Does anyone knows if Joystick driver is included. Original Uddo Neo image does not have Joystick enabled
     
  19. dmtaukhua123

    dmtaukhua123 New Member

    Joined:
    Jul 3, 2017
    Messages:
    1
    Likes Received:
    0
    That would be great. You have given very detailed information. Thanks so much!
     
  20. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    Adding the joystickdriver is achieved by editing one file the defconfig file in the kernel configuration for your board. The provided Yocto is just a demo ther are high chances you'll need to create a own image
     

Share This Page