Supporting for a board based on NXP i.MX 8M MINILPD4-EVK?

Hi all,

I have an i.MX8 MINI EVK coming in to evaluate for a custom board variant we are designing.

I see there are some i.MX8 boards supported (Compulab MX8M, Variscite Dart MX8M).

I also see there is support for the i.MX8 Mini in meta-freescale.

Where would you recommend I start to take existing configurations to add i.MX8 MINI EVK support as as a stepping stone to supporting our TBD custom board.

Maybe https://github.com/balena-os/balena-variscite-mx8 ?

Thanks,

Alex

Hey Alex,

https://github.com/balena-os/balena-variscite imx8m-var-dart should be a good starting point for supporting this board. The machine definition is created in the balena layers (https://github.com/balena-os/balena-variscite/blob/master/layers/meta-resin-imx6ul-var-dart/conf/machine/imx8m-var-dart.conf) so that could be an additional useful bit or figuring out if fsl upstream has support for your board.

Regards,
Andrei

Checking again the repo you pointed to, it seems like it is probably a better starting point. I was confused by the fact that master only had a README file and I though it got moved in the repo Iā€™m mentioning above. So yes, https://github.com/balena-os/balena-variscite-mx8/tree/mx8_reintegration_sumo might be a good starting point for your board.

1 Like

Yeah I was a bit confused by that.

Thanks for that @agherzan - itā€™s been a while - hope youā€™re well?

We were talking about Balena.io the other day in the office. Still very keen to get you guys up to speak at IoT Liverpool if the team are up for it!

Iā€™m alright. Waiting for the summer as we seem to skip the spring this year. Hope everything is fine on your side too.

Iā€™m not sure what are the plans in regards to attending that event but Iā€™ll reach internally and see if we have any plans.

1 Like

Thanks Andrei

I am revisiting this to try to get the EVK up and running as we need support for a project. Any thoughts appreciated as the current i.MX8MM board images donā€™t run up on the i.MX8MM EVK

@ajlennon indeed, the current images use customized BSPs provided by Boundary Devices, Compulab, Variscite, etc. I recommend dropping an eye on the GitHub - balena-os/balena-fsl-arm: Balena support for Freescale boards repository, the Nitrogen8MM device-type should be very similar to the one you are interested in adding support for.

1 Like

Weā€™ve forked and extended the balena-fs-arm layer and built for the i.MX8MM EVK LPDRR4 board.

Weā€™re waiting for the build to finish and will test tomorrow. Wish us luck!

2 Likes

Hummm

ERROR: balena-image-1.0-r0 do_resin_boot_dirgen_and_deploy: /work/build/tmp/deploy/images/imx8mm-lpddr4-evk/extra_uEnv.txt is an invalid path referenced in BALENA_BOOT_PARTITION_FILES.
ERROR: balena-image-1.0-r0 do_resin_boot_dirgen_and_deploy: ExecutionError('/work/build/tmp/work/imx8mm_lpddr4_evk-poky-linux/balena-image/1.0-r0/temp/run.do_resin_boot_dirgen_and_deploy.3846', 1, None, None)
ERROR: Logfile of failure stored in: /work/build/tmp/work/imx8mm_lpddr4_evk-poky-linux/balena-image/1.0-r0/temp/log.do_resin_boot_dirgen_and_deploy.3846
NOTE: recipe balena-image-1.0-r0: task do_resin_boot_dirgen_and_deploy: Failed

Bugger. Forgot all the machine specific overrides :cry:

Weā€™ve got a really weird problem trying to bring up the i.MX8MM EVK here.

  • u-boot is booting
  • kernel is booting to initramfs
  • systemd services start up

Then it just resets and starts u-boot. No warning. No errors. No kernel panic. Just a reset.

Weā€™ve found that we can set the init level on the kernel command line to 1 and we can boot to the recovery shell and everything is fine. However as soon as we go to init 2 the services start and it resets.

Itā€™s really strange we donā€™t get any kind of error or warning. Weā€™ve added debugging into the systemd log which Iā€™ve attached but this is a bit baffling.

One of the differences I was wondering about was whether init 1 is single core and 2 is multi-core.

Weā€™re baffled. Any advice would be appreciated !!! @mpous

Thanks, Alex

log.txt (340.2 KB)

Hi,

Your log ends with

systemd-journald.service: Got notification message from PID 753 (WATCHDOG=1)
systemd-udevd.service: Got notification message from PID 782 (WATCHDOG=1)

Could it be related to the watchdog?
In a different thread there was a link to the watchdog configuration; maybe increasing the timeout might help? Are you certain the hardware (not software) watchdog is properly cleared?
The original thread was about a raspberry pi; you may need to look around and twiddle some things to handle the i.MX hardware watchdog.

This is very interesting thanks. I should have thought of the watchdog. Iā€™ll do some investigating!

I think/hope that weā€™re away from the Raspberry Pi now as weā€™re basing on the i.MX8MM board support in balena-fsl-arm. tbh I am surprised I am having so many issues as I expected one of those images to just ā€œrun upā€.

Thanks again - I will go and have a look. Itā€™s odd that it is happy in init 1 but not in init 2 and above

Cheers!

Alex

1 Like

OK I have a PR now which builds, boots, and onboards to the cloud. Iā€™ve run up the simple python hello world server successfully.

Could somebody review please @mpous ?

2 Likes

Hey @ajlennon, Iā€™ve pinged Alexandru for a review in GitHub. :+1:

1 Like

Only took me 4 1/2 years @the-real-kenna !!! :astonished:

Hi,

glad to hear you got something working.
Out of curiosity (and future reference): how did you solve your issue?

I had a range of issues. Including building u-boot appropriately for the i.MX8MM. You can see the changes I made above. The issue that took ages to identify was that it was rebooting without warning as the kernel for to the command line. This turned out to be because it was writing to the wrong console device at /dev/ttymxc0 instead of /dev/ttymxc1. This shouldnā€™t have been a major problem excepting that for some reason writes to that device cause the board to reboot without warningā€¦

2 Likes

Looking forward to test this @ajlennon

1 Like