NXP i.MX6 DL - Ubuntu 20.04 LTS

Hi all,

Thanks in advance for the reply.

I am using i.mx6 processor in my gateway, Using Ubuntu 20.04 LTS OS, booting from eMMC of 8GB, and also possible to boot from memory card supporting upto 32 GB.
I partitioned the memory into 4 parts. one FAT16 partition and three EXT4 partition. I installed the mender client and after that i installed mender artifact also,
Then now i am able to do the application update to the device. But my aim is to do the system update, so can you help me to do the complete system update.

The commands i used are writing below for the application update.

wget https://downloads.mender.io/2.5.0/dist-packages/debian/armhf/mender-client_2.5.0-1_armhf.deb --no-check-certificate
sudo ln -s /usr/lib/arm-linux-gnueabihf/libffi.so.7 /usr/lib/arm-linux-gnueabihf/libffi.so.6
sudo dpkg -i mender-client_2.5.0-1_armhf.deb
wget http://downloads.mender.io/mender-artifact/3.5.0/linux/mender-artifact
sudo chmod +x mender-artifact
sudo cp mender-artifact /usr/local/bin/
curl -fLsS https://get.mender.io -o get-mender.sh
sudo sh get-mender.sh

So, for system update, from where i can start,(expecting the reply for changes in Uboot and kernel level also if there any)

Have you had a look at the integration checklist ?

And since you are running Ubuntu, you will also need this link.
Drew

Compatibility with mender- Integration steps i have done, can u look on it.

root@CAS-IIoT:/etc# fw_printenv
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev {devnum}; then devtype=host; run scan_dev_for_boot_part; fi sata_boot=if sata dev {devnum}; then devtype=sata; run scan_dev_for_boot_part; fi
scsi_init=if {scsi_need_init}; then scsi_need_init=false; scsi scan; fi scsi_boot=run scsi_init; if scsi dev {devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev {devnum}; then devtype=virtio; run scan_dev_for_boot_part; fi boot_prefixes=/ /boot/ boot_scripts=boot.scr.uimg boot.scr boot_script_dhcp=boot.scr.uimg boot_targets=host1 host0 boot_syslinux_conf=extlinux/extlinux.conf boot_extlinux=sysboot {devtype} {devnum}:{distro_bootpart} any {scriptaddr} {prefix}{boot_syslinux_conf} scan_dev_for_extlinux=if test -e {devtype} {devnum}:{distro_bootpart} {prefix}{boot_syslinux_conf}; then echo Found {prefix}{boot_syslinux_conf}; run boot_extlinux
; echo SCRIPT FAILED: continuing…; fi
boot_a_script=load {devtype} {devnum}:{distro_bootpart} {scriptaddr} {prefix}{script}; source {scriptaddr} scan_dev_for_scripts=for script in {boot_scripts}; do if test -e {devtype} {devnum}:{distro_bootpart} {prefix}{script}; then echo Found U-Boot script {prefix}{scr ipt}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done scan_dev_for_boot=echo Scanning {devtype} {devnum}:{distro_bootpart}…; for prefix in {boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done; scan_dev_for_boot_part=part list {devtype} {devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in {devplist}; do if fstype {dev type} {devnum}:{distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist bootcmd_host1=devnum=1; run host_boot bootcmd_host0=devnum=0; run host_boot distro_bootcmd=scsi_need_init=; for target in {boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
mender_boot_part=2
upgrade_available=1
bootcount=0

This is the output for fw_printenv.

nano /etc/fw_env.config output is
/dev/mmcblk0p2 0x800000 0x20000
/dev/mmcblk0p2 0x1000000 0x20000

Partition A - mmcblk0p2 where rootfs
Partition B - mmcblk0p3

In integration steps, step 7 didnt work for me

Can u have a look on it

It’s not just the steps in the integration checklist. You need to run the mender-convert utility to ensure that your bootloader has the proper environment variables setup.

Drew

root@CAS-IIoT:/etc/mendersw# sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘docker-ce’ has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn’t find any package by glob ‘containerd.io
E: Couldn’t find any package by regex ‘containerd.io

I couldn’t install docker engine, why?

I think it’s because the packages on Ubuntu are differently named and maintained. See this link.

E: The repository ‘https://download.docker.com/linux/debian focal Release’ does not have a Release file.

An error message is showing when i am trying to install docker engine, Are you sure that, docker engine debian focal release is available for 20.04 LTS version ?

It’s possible that it is not. You’ll need to check with Docker on that.

Finally successfully i installed Docker engine on my device, I installed bionic version docker engine, then updated. So then i copied the disk image into my workstation PC, then i saw the instruction that " Generate a Mender Artifact and disk image from this golden image using mender-convert (continue reading for details)" , so exactly where i have to install docker engine ? in workstation or device. I know it is a foolish question, even please help.

For running the mender-convert utility, it should be installed on your workstation PC. If you need docker containers running on the client, then you need to install it there.

Thank you,

MENDER_ARTIFACT_NAME=release-1 ./mender-convert \
  --disk-image input/<image-to-convert.img> \
  --config configs/raspberrypi3_config \
  --config configs/custom_config

I am using i.mx6 DL, by adding a custom config only, it will create mender artifact ?, The script i am giving below.

MENDER_ARTIFACT_NAME=release-1 ./mender-convert
–disk-image input/<image-to-convert.img>
–config configs/custom_config

i am not giving in the place of raspberri pi_config

mender_create_artifact() {
local -r device_type="{1}" local -r artifact_name="{2}"
mender_artifact=deploy/{device_type}-{artifact_name}.mender
log_info “Running custom implementation of the ‘mender_create_artifact’ hook”
log_info “Writing Mender artifact to: {mender_artifact}" log_info "This can take up to 20 minutes depending on which compression method is used" run_and_log_cmd "mender-artifact --compression {MENDER_ARTIFACT_COMPRESSION}
write rootfs-image
–file work/rootfs.img
–output-path {mender_artifact} \ --artifact-name {artifact_name}
–device-type ${device_type}
–script my-state-scripts/ArtifactInstall_Enter_00”

}

Can you tell me, it will create .mender artifact file?

Yes, the output of mender-convert is both an SDIMG file and a Mender artifact.