Porting to a custom i.MX6 Hardware

  • Dear LibreELEC community,

    I have a custom board based on i.MX6 microprocessor (the same one used in the Cubox-i platform) and I am looking forward to port LibreELEC to this new hardware.

    I have a custom u-boot and kernel git repositories for that board, which I would like to integrate to the build system.

    I have successfully built it for the Cubox-i, but the hardwares are a bit different, so the my board could not boot (it was expected, but I am not sure if Cubox-i is still supported/maintained).

    I did not find any hardware porting guide in the Wiki, so I tryied to dig into the source code. It seems that I need to create a new "project" for my board and new "packages" for its custom u-boot and kernel. Is that correct?

    I have seen that LibreELEC uses a SquashFS system image. Perhaps I will have to do some sort of modifications in u-boot and enable some additional kernel drivers, but I need some help getting started:

    1) How is the boot process? Is there any boot variables that I must pass to the kernel that LibreELEC needs?

    2) What is the memory layout of the final image generated (the one I flash to the uSD Card)?

    3) How can I integrate a custom kernel and u-boot to the build system?

    Thank you for your attention.

  • No need to duplicate project. Currently imx6 projects already covers 3 different devices. With same linux version (3.14) and two different u-boot versions.

    Would be easier to just adapt u-boot and linux packages if you need different bootloader and linux version. Linux you probably don't need different - just a new device tree for your device.

    Boot process depends on your u-boot version. Usually text config file uEnv.txt or some binary script is used. SPL can also be used (depends on your version).

    SD card has 2 partitions: on first is kernel/system/device tree files and second is used as storage.

    Would be easier to discuss this on IRC.

  • Actually, I would rather have a custom Linux package, because there are some patches that I have made to adapt some device drivers to this custom hardware that are not mainlined.

    U-boot does not use a uEnv.txt file, as all variables are defined in the binary itself. And it does make use of SPL.

    Would you mind pointing me out the files I should be looking at the LE source code?

    Thank you!