Posts by bkeohane

    Hello,


    I've built a core-image-minimal-initramfs image to test its deployment in RAM, and I changed the image type to:

    Code
    1. IMAGE_FSTYPES += "cpio.gz.u-boot"


    I changed the fdt variable to:


    Code
    1. fdt=nand read 12000000 FDT; bootm 11000000 13000000 12000000


    I have created a NAND partition "RamDisk", I download and store the initramfs image to RAM address 0x13000000, and I write it to this partition.

    I have also changed the variable:


    Code
    1. rootfs root=/dev/ram0


    When I boot, I run into the following:



    But when the actual rootfs shall be mounted, there is an issue:



    If I set the rootfs variable back to default:


    Code
    1. rootfs=rootfstype=ubifs ubi.mtd=TargetFS root=ubi0:rootfs


    The ramdisk image is still successfully read, bit this time, the boot sequence runs into:



    I assume, there is a problem with handing over from the initramfs to the actual rootfs. Any suggestions?


    Thanks!

    Bjørn

    I changed


    Code
    1. fdt=nand read 12000000 FDT; bootm 11000000 - 12000000

    to


    Code
    1. fdt=nand read 13000000 FDT; bootm 11000000 - 13000000

    which works.


    I realized, when creating the rootfs on TargetFS partition, the size is not set correctly. A reboot after setting the partitions solved this issue.


    The topic can be regarded as closed,

    Hello,


    thank you for your answer.


    I have setup the partition table accordingly, using the mtdparts env variable:

    Code
    1. mtdparts=mtdparts=gpmi-nand:256k(NBoot)ro,768k(UserDef),256k(Refresh)ro,768k(UBoot)ro,256k(UBootEnv)ro,24m(Kernel)ro,1792k(FDT)ro,-(TargetFS)


    and I changed fdtaddr to 0x13000000:



    However, after installing the new Kernel image, and reinstalling FDT and rootfs image, I run into an error:



    It is weird, that it seems to still look for a FDT at 0x12000000:

    Code
    1. ## Flattened Device Tree blob at 12000000


    May this be the issue? I used the command:


    Code
    1. nand write $loadaddr FDT $filesize


    to install the FDT. It seems counterintuitive, since the $loadaddr variable holds the address 0x11000000, but the output of writing to NAND was:


    Code
    1. efusA9r2 # nand write . FDT $filesize
    2. NAND write: device 0 offset 0x1a40000, size 0xbe16
    3. 48662 bytes written: OK


    So, it did write to the correct offset, as it seems.

    Is there any other address I need to change, or maybe I should use the command:


    Code
    1. nand write 0x13000000 FDT $filesize


    Thanks again for your support.

    Hello,


    I have built an Kernel image with a bundled initramfs, to show a bootscreen very early using Plymouth. The Kernel image is about 20 MB in size. The default partition size for the Kernel (address $Kernel in U-Boot) is 7 MB in size.


    I have repartitioned the Kernel partition using mkpart in U-Boot, by taking some memory space from the TargetFS. I made sure, the offsets and sizes of all partitions fit. When downloading and installing the Kernel image incl. initramfs to my Kernel partition, I boot into a kernel panic.


    Is there any reason behind this? I asked myself, can I not modify the partitions and its sizes inside a Yocto layer, by e.g., patching the u-boot configuration file (fsimx6.h)?


    Any hint on partitioning and making the bundled kernel image run would be helpful!


    Thank you.

    Hi,


    thank you for the detailed answer. I now see the problem is of bigger concern.


    However, I could successfully build an initramfs, bundled with the Kernel in a single image. I use this recipe in my custom layer, and I use Plymouth for bootscreen.


    The init file is a simple bash script.

    Shell-Script
    1. #!/bin/sh
    2. /sbin/plymouthd --attach-to-session
    3. /sbin/plymouth --show-splash

    The spinner theme and all its coresponding files were already located on the Fedora VM.


    Of course, one needs to activate the initramfs support in the Kernel configuration.

    This page also gives some hints: 12 Building — The Yocto Project ® 5.1.999 documentation


    Thanks.

    Hello,


    thank you for your answer.


    I made the experience, that fbsplash and plymouth both do not start as early in the boot process as the penguins logos used to show up.


    I use a systemd service to start the fbsplash.sh script very early:

    Shell-Script
    1. #!/bin/sh
    2. IMGFILE="/usr/share/splashscreen/splashscreen.ppm"
    3. /usr/local/bin/fbsplash -s "$IMGFILE"


    It works, but there are several seconds of black screen until the ppm file appears.


    ----


    The same if true for Plymouth, but here, it completely fails to run at boot.


    Plymouth-start.service:

    Code
    1. [Unit]
    2. Description=Show Plymouth Boot Screen
    3. DefaultDependencies=no
    4. Wants=systemd-ask-password-plymouth.path systemd-vconsole-setup.service
    5. After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
    6. Before=systemd-ask-password-plymouth.service basic.target
    7. ConditionKernelCommandLine=!plymouth.enable=0
    8. ConditionVirtualization=!container
    9. IgnoreOnIsolate=true

    I also set the UBoot bootargs to:

    Code
    1. setenv bootargs 'console=ttymxc3,115200 vt.global_cursor_default=0 quiet splash'

    and I changed the plymouth.conf file to:


    Code
    1. [Daemon]
    2. Theme=spinner
    3. Device=/dev/fb0


    Once the eFus has fully booted, I can manually run the plymouth splashscreen by restarting the plymouth.start.service, but it fails to appear directly after UBoot exited and the Kernel boot sequence is running.


    Is there a configuration I am missing?

    What file format shall one use to load an image from RAM to the bootloader using splashprepare/splashimage?

    I use a 8bit Bitmap, and it is not shown in original colors. I compressed it to RLE, but UBoot says:

    Error: compression type 1 not supported

    Thank you.


    My display is working without the patch, but I will test it.


    Is there also a way to replace the penguins with a custom image?

    Hi,


    than ks for the answer, I could resolve the issue by defining the relevant pins as LED GPIOs in the efusa9qdl.dtsi file, which I can then toggle via sysfs:

    and then assigning the pin control:



    This works good. The issue can be regarded as resolved, but I will consider and try using gpiohog, to have them in /sys/class/gpio rather than /sys/class/led. Thanks!

    Hello,


    I have overseen the part in the docs, where the mapping between the J1 pins and the GPIOs is done. This works fine now.

    Quote

    Example

    On PicoCoreMX8MP, use pin GPIO_1_54 on feature connector as output pin. This is pin 54

    on the PicoCoreBBDSI connector J1, also available on pin 8 of the feature connector J11 on

    the PicoCoreBBDSI SKIT. The “GPIO Reference Card” for PicoCoreMX8MP in the row GPIO

    the GPIO1_IO1 which means that this GPIO is on gpiochip1 the IO number 1.

    However, setting GPIOs HIGH or LOW is not working with the libgpiod toolI have installed. I checked the version, and it is v1.6.3.


    With what version of the libgpiod tool has the eFusA9R2Q been tested?


    Tah!

    Hi,


    the issue is resolved by using the package libgpiod by libgpiod in Yocto (interelectronix.com).

    Here, it is decreibed how to install the package in y Yocto build.


    My goal is, to use the GPIOs 65 (SD_B_DAT2), 67 (SD_B_DAT3), 77 (SD_B_DAT0), and 79 (SD_B_DAT1) for controlling the shutdown control, mute control and gain signals for an external audio channel (on a custom baseboard, not the SINTF), which shall output audio files to an exciter.


    The GPIOs numbered earlier are being used by the SD_B SD card port, hence, I have commendted out the defines in the device tree source file, by using a patch:


    Code
    1. /*
    2. * SD_B - External SD port with Card Detect (CD) and Write Protect (WP)
    3. * On efus SKIT: external port is normal-sized SD card slot with CD and WP
    4. */
    5. //#define CONFIG_EFUSA9_SD_B
    6. //#define CONFIG_EFUSA9_SD_B_CD
    7. //#define CONFIG_EFUSA9_SD_B_WP

    Using /sys/class/gpio, to manually set the GPIOs did not do the trick, I believe, because it is deprecated in kernel versions 5.15.


    However, the GPIO reference card (for both, efusa9 and efusa9r2) do not provide the mapping between the gpiochip# numbers and lines printed by

    Code
    1. $ gpioinfo

    and the actual GPIO pins on the board, rather only the mapping for using /sys/class/gpio.


    I have attached the output of my gpioinfo command to this post.


    How is the mapping between the GPIOs and the gpiochip# numbers and lines done for this package, e.g., what J1 pin corresponds to which gpiochip and line?

    Hi,


    I am using fsimx6-Y2024.04 Release, which should have kernel version 5.15.


    I want to use the GPIOs, as shown in the documentation "Linux on FS Boards", page 134.


    The way of using /sys/class/gpio is marked as deprecated for kernel version 5.15, and I am told to use libgpio-tools and gpiodetect instead.


    But this package and the command are not available in my built image.


    Do I need to install it when building the image with yocto?


    Thanks!

    Good morning,


    yes, I have set up the Kit (Qt Version, compiler, debugger, cmake) as stated in the documentary, pointing to the SDK in /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/.


    I could get rid of the errors I posted before, by setting the CMAKE_SYSROOT variable.

    Code
    1. set(CMAKE_SYSROOT /opt/fus-imx-wayland/5.15-kirkstone/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi)

    Furthermore, I explicitly set the target architecture and FPU (floating point unit), since I experienced errors stating, that the FPU for the target was not set:

    Code
    1. set(CMAKE_C_FLAGS "--sysroot=${CMAKE_SYSROOT} -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard")
    2. set(CMAKE_CXX_FLAGS "--sysroot=${CMAKE_SYSROOT} -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard")

    Just to make sure, I also specified the installation directory on the target conditionally, just as it is suggested to do in a .pro-file, if qmake is used

    Code
    1. # Set installation directory conditionally
    2. if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
    3. set(INSTALL_DIRECTORY /home/root)#
    4. endif()
    5. # Install the target
    6. install(TARGETS appqt6-cmake-test DESTINATION ${INSTALL_DIRECTORY})

    However, the error I see after adjusting these settings in my CMakeLists.txt file, are now of a nature of missing dependencies, I assume. I have attached the error output to this post.


    The line, the error message points to in CMakeLists.txt:10, reads:

    Code
    1. find_package(Qt6 6.2 COMPONENTS Quick REQUIRED)


    In the attached cmake error output, the lines


    • Line 40: CMake Warning at /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
      Found package configuration file:
      /opt/fus-imx-wayland/5.15-kirkstone/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
      but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be NOT FOUND.
    • Line 55: CMake Warning at /opt/fus-imx-wayland/5.15-kirkstone/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/cmake/Qt6/Qt6Config.cmake:223 (find_package):
      Found package configuration file:
      /opt/fus-imx-wayland/5.15-kirkstone/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake
      but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to be NOT FOUND.

    make me suspecting, there is some sort of misconfiguration of CMake, not finding the QtCore and QtQuick packages.


    I checked, the Qt6CoreConfig.cmake and Qt6QuickConfig.cmake files are located at the correct path.


    I checked the Qt6Config.cmake at line 223 (first error in call stacks), and it failes at the find_package command.


    I will investigate further today, but any hints, tips or black magic will be helpful!


    Cheers.

    Hiya,


    I have built a core-image-base image, and included the following lines to my conf/local.conf file:

    Code
    1. # Add opennssh to the build
    2. EXTRA_IMAGE_FEATURES ?= "debug-tweaks ssh-server-openssh"
    3. # Install Qt Base and Wayland, if necessary (e.g., when building core-image-base)
    4. DISTRO_FEATURES:append = "wayland"
    5. IMAGE_INSTALL:append = " qtbase qtwayland"
    6. CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
    7. # Remove X11 from Build (e.g., if Wayland is to be used)
    8. DISTRO_FEATURES:remove = "x11"


    This works just fine, now. I can deploy and run Qt Widgets and Qt Quick applications via SSH on the target!


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


    The two applications I tested successfully were built with qmake. However, if I try to deploy and run an application which is being built by CMake, it fails with the following errors:

    Code
    1. /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62: error: The C++ compiler "/opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-g++" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/developer/Stash/build-qt6-toolchain-test-FS_Cross_Compile_Kit-Debug/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_a17b9/fast && /usr/bin/gmake -f CMakeFiles/cmTC_a17b9.dir/build.make CMakeFiles/cmTC_a17b9.dir/build gmake[1]: Entering directory '/home/developer/Stash/build-qt6-toolchain-test-FS_Cross_Compile_Kit-Debug/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_a17b9.dir/testCXXCompiler.cxx.o /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-g++ -o CMakeFiles/cmTC_a17b9.dir/testCXXCompiler.cxx.o -c /home/developer/Stash/build-qt6-toolchain-test-FS_Cross_Compile_Kit-Debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_a17b9 /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a17b9.dir/link.txt --verbose=1 /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-g++ CMakeFiles/cmTC_a17b9.dir/testCXXCompiler.cxx.o -o cmTC_a17b9 /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find Scrt1.o: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find crti.o: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find crtbeginS.o: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lstdc++: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lm: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lgcc_s: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lgcc: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lc: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lgcc_s: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find -lgcc: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find crtendS.o: No such file or directory /opt/fus-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_a17b9.dir/build.make:99: cmTC_a17b9] Error 1 gmake[1]: Leaving directory '/home/developer/Stash/build-qt6-toolchain-test-FS_Cross_Compile_Kit-Debug/CMakeFiles/CMakeTmp' gmake: *** [Makefile:127: cmTC_a17b9/fast] Error 2
    Code
    1. :-1: error: CMake process exited with exit code 1.
    Code
    1. :-1: error: No CMake configuration found!


    Is there a way to also run and debug CMake-built applications using the Kit described in the Documentation via SSH?



    Hi,


    thank you for your quick response.


    So, I followed the steps in the doc, and I successfully deployed two Qt applications on the board, one QtQUick and one QtWidgets application. The board runs on the fus-image-qt6 example image.


    I indeed did install an additional library in the VM (QSerialPort), but it is not used for the example applications I try to test the remote debugging with.


    However, when running it (either from the VM via SSH, or directly on the board), the program crashes with the error:


    Code
    1. /home/root/qt-widgets-test: error while loading shared libraries: libQt6Widgets.so.6: cannot open shared object file: No such file or directory

    The same with the QtQuick app:

    Code
    1. /home/root/qt-quick-test: error while loading shared libraries: libQt6Quick.so.6: cannot open shared object file: No such file or directory


    I guess, this is due to missing libraries on the board, which I assumed were present after building and deploying the fus-image-qt6 example image.

    Hi,


    I just came across this post, and I'd like to point out, that the commands also did not work for me (as it is still written in the Doc-File F&S Introduction to QT Debugging an Application v.1.11).

    Code
    1. $ source ./../sources/poky/oe-init-build-env
    2. $ bitbake meta-toolchain-qt6

    Instead, I did:

    Code
    1. $ cd fsimx6-Y2024.04/build/yocto-fus
    2. $ source ./setup-environment build-fsimx6-fus-imx-wayland/
    3. $ bitbake meta-toolchain-qt6

    This seems to work fine (Qt and all Qt packages were built).


    ------


    I'd kindly like to ask another question, related to the documentary pointed out earlier.

    After building the toolkit and running the bash script in /tmp/deploy/sdk, the documentation guides me to do:


    "After that you have to install the new root filesystem on your remote target system." (p. 10)


    I am unsure, what it means. I have built a fus-image-qt6 earlier and flashed it to my efusa9r2q.

    After running the bash script, the toolchain was installed to /opt/fus-imx-wayland/5.15-kirkstone. However, the images and build files in /tmp/deploy/images/fsimx6/ remained untouched.


    Should I bitbake the qt6-image again, after installation of the toolchain?


    Thanks!

    Dear F&S Team,


    I am working with the SINTF board and an eFus a9(r2) and a LVDS Display from a third party manufacturer. One of your collegues has provided me a patch, which patches the device tree once I build an image via Yocto to fit the display.

    My issue is, that once I build an image including this patch, flash it to my board and run it, the display does not work. I have another eFus a9(r2) which has been prepared by F&S, which is working with the display. So, the display itself is ok.


    These are the steps I followed:


    To include the patch into the build, I have copied it to the location:

    Code
    1. cp /media/0001-Add-display-for-efusA9r2.patch fsimx6-Y2024.04/build/yocto-fus/sources/meta-fus/recipes-kernel/linux/files/


    In the recipe fsimx6-Y2024.04/build/yocto-fus/sources/meta-fus/recipes-kernel/linux/linux-fus.bb, I have added the following lines at the bottom of the recipe:

    Code
    1. FILESEXTRAPATHS:prepend:="${THISDIR}/files:"
    2. SRC_URI +="file://0001-Add-display-for-efusA9r2.patch"


    I then started to build the image:

    Code
    1. bitbake fus-image-std


    The build finished after some hours without errors. In the output directory fsimx6-Y2024.04/build/yocto-fus/build-fsimx6-fus-imx-wayland/tmp/deploy/images/fsimx6/, I can see, that the build has provided me with the zImage file, the rootfs.ubifs file, the .dts file and more (see attached image file).




    Earlier I have succesfully deployed a UBoot bootloader and the image from fsimx6-Y2024.04/sdcard to my boad. My goal is, to simply replace the kernel image and the device tree on my board.

    Thus, I have copied the files zImage and efusa9dl.dtb to /tftpboot directory, to perform an installation of these files to my board via TFTP. This worked fine, and after that, I could restart my board and the image loaded.


    However, as a result, the display is not showing the typical weston desktop, as I would have expected. Using systemctl, I can see the weston service is running, restarting it did not do the trick.


    I have also replaced the bootloader and the rootfs by the ones provided by the Yocto build (uboot.nb0; fus-image-std-fsimx6.ubifs).


    I repeated everything by running:

    Code
    1. bitbake -c clean linux-fus
    2. bitbake -c clean fus-image-std
    3. bitbake fus-image-std


    I erased the NAND flash and re-deployed the UBoot bootloader. I tried installing the image, device tree and rootfs using a USB stick and the install.scr file.

    The installation was as successful as the one using TFTP. However, the display remains dark.


    I also installed the device tree file efusa9r2dl.dtb:


    Code
    1. tftp efusa9r2dl.dtb
    2. nand erase.part FDT
    3. nand write $loadaddr FDT $filesize

    The installation worked, however, I do not think this is the right way, since

    Code
    1. tftp $bootfdt
    2. nand erase.part FDT
    3. nand write $loadaddr FDT $filesize

    will expect the file efusa9dl.dtb and will throw an error, if it is not located in /tftpboot.


    I have attached the output from PuTTY when I boot my board as a text file.


    Looking at my steps, can you see any mistakes I did, for that the patch does not seem to actually patch the device tree to support my display?


    Thank you very much in advance!


    Best regards,

    Bjørn Keohane

    Files

    • boot.txt

      (29.76 kB, downloaded 127 times, last: )