Buildroot and Toradex Easy Installer for Apalis iMX6

Hi Toradex,

I expect to flash whole Apalis iMX6 image generated by Buildroot to the eMMC memory. From other threads, I think that using Toradex Easy Installer is the most convenient way for flashing new image. With Open Embedded, necessary artifacts like image.json is automatically generated. In the case of Buildroot, I plan I have to edit this file myself, so I’d like to know if you could give me some instructions for this purpose by modifying existing image.json :

{
    "config_format": 1,
    "autoinstall": false,
    "name": "Toradex Embedded Linux Qt4 Demo With X11",
    "description": "Toradex Embedded Linux Qt4 Demo With X11.",
    "version": "2.7b6",
    "release_date": "2019-05-16",
    "prepare_script": "prepare.sh",
    "wrapup_script": "wrapup.sh",
    "marketing": "marketing.tar",
    "icon": "toradexlinux.png",
    "supported_product_ids": [
        "0027",
        "0028",
        "0029",
        "0035"
    ],
    "blockdevs": [
        {
            "name": "mmcblk0",
            "partitions": [
                {
                    "partition_size_nominal": 16,
                    "want_maximised": false,
                    "content": {
                        "label": "BOOT",
                        "filesystem_type": "FAT",
                        "mkfs_options": "",
                        "filename": "Apalis-iMX6_Qt4-X11-Image.bootfs.tar.xz",
                        "uncompressed_size": 5.22265625
                    }
                },
                {
                    "partition_size_nominal": 512,
                    "want_maximised": true,
                    "content": {
                        "label": "RFS",
                        "filesystem_type": "ext4",
                        "mkfs_options": "-E nodiscard",
                        "filename": "Apalis-iMX6_Qt4-X11-Image.rootfs.tar.xz",
                        "uncompressed_size": 737.98046875
                    }
                }
            ]
        },
        {
            "name": "mmcblk0boot0",
            "content": {
                "filesystem_type": "raw",
                "rawfiles": [
                    {
                        "filename": "SPL",
                        "dd_options": "seek=2"
                    },
                    {
                        "filename": "u-boot.imx",
                        "dd_options": "seek=138"
                    }
                ]
            }
        }
    ]
}

With the output folder of Buildroot looks like :

drwxr-xr-x 2 toto toto      4096 Thg 3 25 11:10 ./
drwxrwxr-x 6 toto toto      4096 Thg 5 24 11:53 ../
-rw-r--r-- 1 toto toto     54397 Thg 3 25 11:10 imx6q-apalis-eval.dtb
-rw-r--r-- 1 toto toto     54096 Thg 3 25 11:10 imx6q-apalis-ixora.dtb
-rw-r--r-- 1 toto toto 125829120 Thg 3 25 11:10 rootfs.ext2
lrwxrwxrwx 1 toto toto        11 Thg 3 25 11:10 rootfs.ext4 -> rootfs.ext2
-rw-r--r-- 1 toto toto  99307520 Thg 3 25 11:10 rootfs.tar
-rw-r--r-- 1 toto toto 125829632 Thg 3 25 11:11 sdcard.img
-rw-r--r-- 1 toto toto     48128 Thg 3 24 21:29 SPL
-rwxr-xr-x 1 toto toto    368992 Thg 3 24 21:29 u-boot.bin*
-rw-r--r-- 1 toto toto    369056 Thg 3 24 21:29 u-boot.img
-rw-r--r-- 1 toto toto       430 Thg 3 25 11:11 uEnv.txt
-rw-r--r-- 1 toto toto   4994576 Thg 3 25 11:10 uImage

Currently, I can flash the Buildroot’s image into SD card and make it run from this storage.

Thanks and regards,
Khang

HI @khangpxr

so I’d like to know if you could give me some instructions for this purpose by modifying existing image.json :

What exactly do you want to know? You can find here all the Information about the image.json file.

Best regards,
Jaski

Hello jaski,

What I’d like to do is using Toradex Easy Installer for flashing a custom image generated from Buildroot into Apalis iMX6 eMMC memory. For this purpose, I have some questions :

  1. How do I correctly configure the partitions (BOOT, RFS), especially the uncompressed_size of each within the image.json ?

  2. Beside the image.json, what should I need more to be able to flash the custom image using Toradex Easy Installer ? As I can see, there’s also scripts such as prepare.sh, wrapup.sh, … in the image.json file.

  3. Anything else to take into account ?

Thanks in advance,
Khang

Hi khangpxr,

  1. The uncompressed_size variable is only needed for the progress bar during the installation. You can use an approximate number. The boot partition should contain the kernel as a zImage and the device trees, which we provide in the xxx.bootfs.tar.xz file. The RFS should contain the root filesystem.
  2. You don’t need anything else besides the image.json. The prepare.sh and wrapup.sh scripts are optional and will only be executed if they are present.
  3. If you didn’t modify U-Boot from the original image then this should work.

Thanks Gerard for information. That encourage me to use the Tezi for Buildroot’s image.

Best regards,
Khang

You are welcome. Thanks for your feedback.