Update Apalix imx6 image with UMS procedure

Hello,

I had an Apalis imx6 board (with an Eagle board) that I had images of (bootfs.tar.gz and rootfs.tar.gz) by using the UMS procedure.

Now that Apalis imx6 board is not available for me anymore. I have bought new Apalis imx6 boards on which I’d like to put my old images. When I plug the board to my PC using OTG (Eagle board procedure), the file I see are boot.scr and tezi.itb (with my previous boards I would have seen bootfs and rootfs).

How can I update this new board with my old images bootfs.tar.gz and rootfs.tar.gz?

Best regards,

Jennifer

Hi @JG2 !

Could you please specify the versions of the Apalis modules (“old” and “new”) and the versions of the BSP version that you used to install (the one with rootfs.tar.gz and bootfs.tar.gz)?

Best regards,

Hi @henrique.tx,

Versions:

  • “old”: V1.1B
  • “new”: V1.1C

For my old board:
uname -a info: Linux apalis-imx6 3.14.52-00009-g786c368 #20 SMP Sat Jun 17 11:27:18 IST 2017 armv7l GNU/Linux

hardware: The board I’m working with is EGL-MX6-Q2G-XT from Diamond System. It’s an ARM SBC using Toradex Apalis iMX6.

Best regards,

Jennifer

Hi @JG2 !

Please check the revision history for Apalis iMX6 module: Apalis iMX6 | Toradex Developer Center

Since version V1.1C, this module is shipped with Toradex Easy Installer, which explains the boot.scr and the tezi.itb.

Also, your Linux Kernel version (3.14.x) is from a BSP that is not supported anymore. So we highly recommend you upgrade to the newest BSP possible (which would be the BSP 5).

You can check out Embedded Linux Release Matrix | Toradex Developer Center to know the BSP versions.

But, if you are willing to continue with the unsupported BSP, you can simply try to replace the files on the module with your rootfs.tar.gz and bootfs.tar.gz and test it. Be aware that you might face some incompatibility that can lead to an unbootable system. But you can recover it by Loading Toradex Easy Installer | Toradex Developer Center :slight_smile: .

Best regards,

Hello @henrique.tx ,

For the moment, I can’t do anything on the previous board because I don’t have access to it.

I tried to put the boot and rootfs on the new one, however I have several questions:

  • Previously with the UMS feature and my old board, when I connected the USB device, I would see sdb: sdb1 and sdb2. sdb1 would have boot in it and sdb2 would have rootfs in it. The size of boot is 4.7MB and the size of rootfs is 352MB.

  • Now when I plug in the new board, I only see sdb: sdb1 which has boot.scr and tezi.itb. It is a 34MB Volume.

  • So the only place I see on the new board is sdb: sdb1 which is a 34MB Volume. Where should I put boot and rootfs? There is no room for them both on the 34MB Volume.

I am not familiar with Toradex Easy Installer. Is there a way I could prepare the correct image using my boot.tar.gz and rootfs.tar.gz files?

Best regards,

Jennifer

Hi @JG2 ,

The 34MB volume you’re seeing is the pre-installed Toradex Easy Installer. When you start the module normally you should see the Toradex Easy Installer on any screen you have connected to the board. If you’re not having a screen connected you can also access it by using vnc.

Yes there is. Toradex has an article stating the steps you should follow to Build U-Boot and Kernel from Source Code

Further down the article, you can see the steps to make a Toradex Easy Installer compatible Image.

Deploying Kernel into Image

Maybe these steps can help you achieve your goal. Let me know if it worked.

Best Regards
Kevin

Hi @kevin.tx,

So far, I’ve managed to update the new board with the image “Apalis-iMX6_Console-Image-Tezi_3.0b4.254” using Toradex Easy Installer.

I tried replacing Console-Image-apalis-imx6.tar.gz with my rootfs.tar.gz and Console-Image-apalis-imx6.bootfs.tar.gz with my bootfs.tar.gz… but it didn’t work. I’d also changed image.json

Is that what I should be doing? Or is there a different image I should be working with? Or other steps I should be doing?
Best regards,

Jennifer

Hi @JG2 !

Could you please share the files that you are trying to use?

I want to try to boot it (even though I do not have the carrier board).

Best regards,

Hi @henrique.tx,

Maybe could you check out my image.json file please? If you don’t think the image.json file is the problem, then I will ask my company if they’re OK with me sending the files.

Here is the file:

{
    "config_format": 2,
    "autoinstall": false,
    "name": "HUB",
    "description": "HUB",
    "version": "3.0b4.254",
    "release_date": "2021-09-28",
    "u_boot_env": "uEnv.txt",
    "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": "bootfs.tar.xz",
                        "uncompressed_size": 6.18359375
                    }
                },
                {
                    "partition_size_nominal": 512,
                    "want_maximised": true,
                    "content": {
                        "label": "RFS",
                        "filesystem_type": "ext4",
                        "mkfs_options": "-E nodiscard",
                        "filename": "rootfs.tar.xz",
                        "uncompressed_size": 299.66015625
                    }
                }
            ]
        },
        {
            "name": "mmcblk0boot0",
            "erase": true,
            "content": {
                "filesystem_type": "raw",
                "rawfiles": [
                    {
                        "filename": "SPL",
                        "dd_options": "seek=2"
                    },
                    {
                        "filename": "u-boot.img",
                        "dd_options": "seek=138"
                    }
                ]
            }
        }
    ]
}

Best regards,

Jennifer

Hi @JG2 !

Thanks for sharing the files.

After analysing your rootfs and bootfs, it is indeed a pretty old OS:

The main problem is that your OS (older than the oldest BSP 2.8b8, which is still supported) uses uImage (BSP 2.8b1 and older) instead of zImage (BSP 2.8b2 and newer). Reference: Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center

We were able to make it boot (although with several issues) by doing the following:

  1. Create a Toradex Easy Installer image just like you did, but replacing the rootfs and bootfs
    1.1. Please follow this Configuration Files | Toradex Developer Center article to understand what each variable means in image.json
  2. Install it on the module using Toradex Easy Installer
    2.1. This Load Toradex Easy Installer article is useful here.
    2.2. After flashing, the image won’t boot, but it is expected.
  3. You will need to stop the boot process and change U-Boot variables (reference: U-Boot | Toradex Developer Center)
    3.1. Change the boot_file from zImage to uImage
    3.2. In the emmcboot variable, change the bootz (used for zImage) command to bootm.

After those steps, you should see the module booting (and showing several errors). If you want to keep these changes permanent, execute a saveenv and U-Boot will keep the modifications.

But, the best approach would be to use a supported BSP.

Best regards,

Hi @henrique.tx,

Could you please send me the image.json file you used? so that I try and use the exact same conditions as you and see if it also works for me?

Hi @JG2 !

There you go:

{
    "config_format": 2,
    "autoinstall": false,
    "name": "Toradex Embedded Linux Console Demo",
    "description": "Image without graphical interface",
    "version": "3.0b3.118",
    "release_date": "2019-12-31",
    "u_boot_env": "uEnv.txt",
    "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": "bootfs.tar.xz",
                        "uncompressed_size": 5.1328125
                    }
                },
                {
                    "partition_size_nominal": 512,
                    "want_maximised": true,
                    "content": {
                        "label": "RFS",
                        "filesystem_type": "ext4",
                        "mkfs_options": "-E nodiscard",
                        "filename": "rootfs.tar.xz",
                        "uncompressed_size": 1339.953125
                    }
                }
            ]
        },
        {
            "name": "mmcblk0boot0",
            "content": {
                "filesystem_type": "raw",
                "rawfiles": [
                    {
                        "filename": "SPL",
                        "dd_options": "seek=2"
                    },
                    {
                        "filename": "u-boot.img",
                        "dd_options": "seek=138"
                    }
                ]
            }
        }
    ]
}

This is exactly what was used and it “worked” as described in my last message. I didn’t modify any metadata (description, version, release, etc). You might want to do that, so the information are not misleading.

Best regards,

Hi @henrique.tx,

Seems like it works! Youhou!! Many thanks.

Best regards,

Jennifer

1 Like

Awesome! :smiley:

You are welcome :slight_smile:

Best regards,