Variscite DART-6UL

The official Mender documentation explains how Mender works. This is simply a board-specific complement to the official documentation.

Board description

Measuring only 50mm x 25mm, the DART-6UL is a highly flexible System-on-Module (SoM) based on NXP/Freescale’s i.MX 6UltraLite or i.MX 6ULL ARM Cortex-A7™ processor, up to 900MHz CPU Clock. The DART-6UL provides a variety of interfaces and connectivity options – all packaged at an optimized power, size and cost. The DART-6UL highly integrated connectivity includes a certified dual-band Wi-Fi 802.11ac/a/b/g/n, Bluetooth/BLE, dual Ethernet, dual USB, audio, camera in, display with touch panel and serial interfaces. In addition, the system supports -40 to 85°C temperature range and long longevity commitment targeting embedded products in various industrial segments and applications.

The evaluation kit comes with a VAR-6ULCustomBoard and a 7" Capacitive touch LCD.

DART-6UL

URL:

Test results

The Yocto Project releases in the table below have been tested by the Mender community. Please update it if you have tested this integration on other Yocto Project releases:

SD Card Root Filesystem

Yocto Project Build Runtime
rocko (2.4) :test_works: :test_works:
sumo (2.5) :test_works: :test_works:
thud (2.6) :test_works: :test_works:
zeus (3.0) :test_works: :test_works:

eMMC Root Filesystem

Yocto Project Build Runtime
zeus (3.0) :test_works: :test_works:

NAND Root Filesystem

Yocto Project Build Runtime
thud (2.6) :test_works: :test_works:

Build Means that the Yocto Project build using this Mender integration completes without errors and outputs images.
Runtime Means that Mender has been verified to work on the board. For U-Boot-based boards, the integration checklist has been verified.

Getting started

Prerequisites

  • A supported Linux distribution and dependencies installed on your workstation/laptop as described in the Yocto Mega Manual
    • NOTE. Instructions depend on which Yocto version you intend to use.
  • Google repo tool installed and in your PATH.

Configuring the build

Setup Yocto environment

Set the Yocto Project branch you are building for:

# set to your branch, make sure it is supported (see table above)
export BRANCH="rocko"

Create a directory for your mender-variscite setup to live in and clone the
meta information.

mkdir mender-variscite && cd mender-variscite

Initialize repo manifest:

if [ ${BRANCH} == "zeus" ]; then
  REPO_BRANCH="fsl-${BRANCH}"
else
  REPO_BRANCH="${BRANCH}"
fi
repo init -u https://github.com/varigit/variscite-bsp-platform.git -b $REPO_BRANCH                                                                                                                  
mkdir .repo/local_manifests
cd .repo/local_manifests/
wget https://raw.githubusercontent.com/mendersoftware/meta-mender-community/$BRANCH/scripts/mender-no-setup.xml
cd -

Fetch layers in manifest:

repo sync
cd .repo/local_manifests/
ln -sf ../../sources/meta-mender-community/scripts/mender-no-setup.xml .
cd -

Determine root filesystem media

The Variscite DART-6UL platform supports running U-Boot directly from the following media:

  • SD-Card
  • eMMC
  • NAND flash

The root filesystem can be stored on any of the following media:

  • SD-Card
  • eMMC
  • NAND flash

Set the shell variable for your desired root filesystem media:

export MEDIA="sdcard"
export MEDIA="nand"
export MEDIA="emmc"

Setup build environment

Initialize the build environment:

MACHINE=imx6ul-var-dart DISTRO=fslc-x11 . var-setup-release.sh -b build
cat ../sources/meta-mender-community/meta-mender-variscite/templates/bblayers.conf.append >> conf/bblayers.conf
cat ../sources/meta-mender-community/templates/local.conf.append >> conf/local.conf
cat ../sources/meta-mender-community/meta-mender-variscite/templates/local.conf.append >> conf/local.conf
cat ../sources/meta-mender-community/meta-mender-variscite/templates/local-${MEDIA}.conf.append >> conf/local.conf

Building the image

You can now proceed with building an image:

bitbake core-image-base

Replace core-image-base with your desired image target.

Using the build output

SD Card

Provision an SD Card with the built above. WARNING, make sure you use the correct device node as the of= parameter to avoid overwriting the wrong device:

sudo dd if=tmp/deploy/images/imx6ul-var-dart/core-image-base-imx6ul-var-dart.sdimg of=<SDCARD-DEVICE-NODE> conv=fdatasync bs=8M

Remove the SD Card from your build host and insert it into the target. Configure your board to boot from SD Card by setting the Boot Select switches to position “00”. Now turn on power to the board and it will boot from the SDCard and Mender will connect to the server configured in your local.conf file.

NAND

To be able to provision images to the NAND, we need to boot a prebuilt image from Variscite using an SDCard. Download the image and write it to an SDCard. WARNING, make sure you use the correct device node as the of= parameter to avoid overwriting the wrong device:

gunzip sumo-fslc-4.9.88-mx6ul-v1.1.img.gz
sudo dd if=sumo-fslc-4.9.88-mx6ul-v1.1.img of=<SDCARD-DEVICE-NODE> conv=fdatasync bs=8M

Now remove and reinsert the SD Card to have your system automount it (or just issue a manual mount command). Copy the necessary files from your build tree to the SD Card.

sudo cp -f tmp/deploy/images/imx6ul-var-dart/core-image-base-imx6ul-var-dart.ubimg \
          tmp/deploy/images/imx6ul-var-dart/SPL \
          tmp/deploy/images/imx6ul-var-dart/u-boot.img-nand \
          <SDCARD-MOUNT-POINT>

Remove the SD Card from your build host and insert it into the target. Configure your board to boot from SD Card by setting the Boot Select switches to position “00”. Now turn on power to the board and it will boot from the SDCard. Login as user root with no password and execute the following commands to provision the binaries:

flash_erase /dev/mtd0 0 0
kobs-ng init -x /SPL --search_exponent=1 -v
flash_erase /dev/mtd1 0 0
nandwrite -p /dev/mtd1 /u-boot.img-nand
flash_erase /dev/mtd4 0 0
nandwrite -k /dev/mtd4 /core-image-base-imx6ul-var-dart.ubimg
halt

Remove the SDCard, configure your board to boot from NAND by setting the Boot Select switch to position “10” and power cycle your board.

On the other hand, if you already have Mender running on your device and want to deploy a rootfs update using this build, you should use the Mender Artifact files, which have .mender suffix. You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client standalone mode.

References


If this post was useful to you, please press like, or leave a thank you note to the contributor who put valuable time into this and made it available to you. It will be much appreciated!

1 Like

5 posts were split to a new topic: How to write DART-6UL image to eMMC

Why is my target not connecting to the server configured in local.conf ?
MENDER_SERVER_URL = “https://hosted.mender.io
MENDER_TENANT_TOKEN =“… my token here …”

We need more information to help. From a shell prompt on your board what does journalctl -u mender-client show?

Drew

– Logs begin at Wed 2021-06-16 01:34:34 UTC, end at Wed 2021-06-16 01:39:18 UTC
. –
Jun 16 01:36:36 imx6ul-var-dart systemd[1]: Started Mender OTA update service.
Jun 16 01:36:37 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:37Z” level=i
nfo msg=“Loaded configuration file: /var/lib/mender/mender.conf”
Jun 16 01:36:37 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:37Z” level=i
nfo msg=“Loaded configuration file: /etc/mender/mender.conf”
Jun 16 01:36:38 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:38Z” level=i
nfo msg=“Mender running on partition: /dev/mmcblk0p2”
Jun 16 01:36:38 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:38Z” level=i
nfo msg=“State transition: init [none] → init [none]”
Jun 16 01:36:38 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:38Z” level=i
nfo msg=“State transition: init [none] → idle [Idle]”
Jun 16 01:36:38 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:38Z” level=i
nfo msg=“State transition: idle [Idle] → authorize-wait [Idle]”
Jun 16 01:36:38 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:38Z” level=i
nfo msg=“State transition: authorize-wait [Idle] → authorize [Sync]”
Jun 16 01:36:48 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:48Z” level=e
rror msg=“Failure occurred while executing authorization request: Method: Post,
URL: https://hosted.mender.io/api/devices/v1/authentication/auth_requests
Jun 16 01:36:48 imx6ul-var-dart mender[394]: time=“2021-06-16T01:36:48Z” level=e
rror msg="Authorize failed: transient error: authorization request failed: trans
ient error: authorization request failed: Unknown url.Error type: dial tcp: look

And I check my clock status:
root@imx6ul-var-dart:~# timedatectl status
Local time: Wed 2021-06-16 01:40:05 UTC
Universal time: Wed 2021-06-16 01:40:05 UTC
RTC time: Sat 2000-01-01 00:15:19
Time zone: UTC (UTC, +0000)
System clock synchronized: no
NTP service: active
RTC in local TZ: no

The time is not correct. How can I make the target sync every time it boots?

root@imx6ul-var-dart:~# mender --log-level debug daemon
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:211 github.com/mendersoftware/mender/conf.readConfigFile() Reading Mender configuration from file /var/lib/mender/mender.conf
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:204 github.com/mendersoftware/mender/conf.loadConfigFile() Loaded configuration file: /var/lib/mender/mender.conf
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:211 github.com/mendersoftware/mender/conf.readConfigFile() Reading Mender configuration from file /etc/mender/mender.conf
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:204 github.com/mendersoftware/mender/conf.loadConfigFile() Loaded configuration file: /etc/mender/mender.conf
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:137 github.com/mendersoftware/mender/conf.LoadConfig() Loaded 2 configuration file(s)
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:144 github.com/mendersoftware/mender/conf.LoadConfig() Loaded configuration = &conf.MenderConfig{MenderConfigFromFile:conf.MenderConfigFromFile{ArtifactVerifyKey:"", HttpsClient:client.HttpsClient{Certificate:"", Key:"", SSLEngine:""}, Security:client.Security{AuthPrivateKey:"", SSLEngine:""}, RootfsPartA:"/dev/mmcblk0p2", RootfsPartB:"/dev/mmcblk0p3", DeviceTypeFile:"/var/lib/mender/device_type", DBus:conf.DBusConfig{Enabled:true}, UpdatePollIntervalSeconds:5, InventoryPollIntervalSeconds:5, SkipVerify:false, RetryPollIntervalSeconds:30, StateScriptTimeoutSeconds:0, StateScriptRetryTimeoutSeconds:0, StateScriptRetryIntervalSeconds:0, ModuleTimeoutSeconds:0, ServerCertificate:"", ServerURL:“https://hosted.mender.io”, UpdateLogPath:"", TenantToken:“eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZW5kZXIudGVuYW50IjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIiwiaXNzIjoiTWVuZGVyIiwic3ViIjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIn0.of_4VU3M0xQkko5aI2JupqYaJmNNBQ3A2O3oevpw2nz85NogI9_LW9FbrXUonlm9Bl4ptsR83VfSoD8Zat8N0KFCSQCUw2PxP66Bm_o2PAYSvFvZ67S-du79p1tm4JwR2Zxb_Mw8hRkWpwe4QQittjB5b6sTf4wYfNQJa07joQNb0ToQQwSaBc0NxsUXbFDS0o0h3f6siNHppdLaLsURvWIdVj8DoFLsI2TtJsgq8xiEe_msfBObQ5Bql9zlmA3_fzsY5jyYU2eRzUMqsWX_5rvzj1JBdinbjfcMb2Z51iIshcjOfdzg_9yy1VIOWWinfV-MLBCU3O7KVgqHiSdsG-0S6fzNTYyuDdSmzSFcx8qsEfu9TNp9PFHZplke2AW3vsyHLvR1f_FgMPMHQAqmwjZ4vrNzkjA0iG_LX466fwDh-gfyM_Ian0mbW0Hhm2H4b2z40FfkFY6HPDiRziTX7mKJlHqQq2OTZ8gTYUtYnYKhCDM2G23ny3tk91XaEU35”, Servers:[]client.MenderServer(nil)}, ModulesPath:"/usr/share/mender/modules/v3", ModulesWorkPath:"/var/lib/mender/modules/v3", ArtifactInfoFile:"/etc/mender/artifact_info", ArtifactScriptsPath:"/var/lib/mender/scripts", RootfsScriptsPath:"/etc/mender/scripts"}
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:185 github.com/mendersoftware/mender/conf.(*MenderConfig).Validate() Verified configuration = &conf.MenderConfig{MenderConfigFromFile:conf.MenderConfigFromFile{ArtifactVerifyKey:"", HttpsClient:client.HttpsClient{Certificate:"", Key:"", SSLEngine:""}, Security:client.Security{AuthPrivateKey:"", SSLEngine:""}, RootfsPartA:"/dev/mmcblk0p2", RootfsPartB:"/dev/mmcblk0p3", DeviceTypeFile:"/var/lib/mender/device_type", DBus:conf.DBusConfig{Enabled:true}, UpdatePollIntervalSeconds:5, InventoryPollIntervalSeconds:5, SkipVerify:false, RetryPollIntervalSeconds:30, StateScriptTimeoutSeconds:0, StateScriptRetryTimeoutSeconds:0, StateScriptRetryIntervalSeconds:0, ModuleTimeoutSeconds:0, ServerCertificate:"", ServerURL:“https://hosted.mender.io”, UpdateLogPath:"", TenantToken:“eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZW5kZXIudGVuYW50IjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIiwiaXNzIjoiTWVuZGVyIiwic3ViIjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIn0.of_4VU3M0xQkko5aI2JupqYaJmNNBQ3A2O3oevpw2nz85NogI9_LW9FbrXUonlm9Bl4ptsR83VfSoD8Zat8N0KFCSQCUw2PxP66Bm_o2PAYSvFvZ67S-du79p1tm4JwR2Zxb_Mw8hRkWpwe4QQittjB5b6sTf4wYfNQJa07joQNb0ToQQwSaBc0NxsUXbFDS0o0h3f6siNHppdLaLsURvWIdVj8DoFLsI2TtJsgq8xiEe_msfBObQ5Bql9zlmA3_fzsY5jyYU2eRzUMqsWX_5rvzj1JBdinbjfcMb2Z51iIshcjOfdzg_9yy1VIOWWinfV-MLBCU3O7KVgqHiSdsG-0S6fzNTYyuDdSmzSFcx8qsEfu9TNp9PFHZplke2AW3vsyHLvR1f_FgMPMHQAqmwjZ4vrNzkjA0iG_LX466fwDh-gfyM_Ian0mbW0Hhm2H4b2z40FfkFY6HPDiRziTX7mKJlHqQq2OTZ8gTYUtYnYKhCDM2G23ny3tk91XaEU35”, Servers:[]client.MenderServer{client.MenderServer{ServerURL:“https://hosted.mender.io”}}}, ModulesPath:"/usr/share/mender/modules/v3", ModulesWorkPath:"/var/lib/mender/modules/v3", ArtifactInfoFile:"/etc/mender/artifact_info", ArtifactScriptsPath:"/var/lib/mender/scripts", RootfsScriptsPath:"/etc/mender/scripts"}
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:208 github.com/mendersoftware/mender/installer.getEnvironmentVariable() Have U-Boot variable: mender_check_saveenv_canary=
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:231 github.com/mendersoftware/mender/installer.getEnvironmentVariable() List of U-Boot variables:map[mender_check_saveenv_canary:]
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:208 github.com/mendersoftware/mender/installer.getEnvironmentVariable() Have U-Boot variable: mender_boot_part=2
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:231 github.com/mendersoftware/mender/installer.getEnvironmentVariable() List of U-Boot variables:map[mender_boot_part:2]
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/installer/partitions.go:175 github.com/mendersoftware/mender/installer.(*partitions).getAndCacheActivePartition() Setting active partition from mount candidate: /dev/mmcblk0p2
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/cli/cli.go:447 github.com/mendersoftware/mender/cli.(*runOptionsType).commonCLIHandler() Mender running on partition: /dev/mmcblk0p2
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/installer/modules.go:881 github.com/mendersoftware/mender/installer.NewModuleInstallerFactory() ModuleTimeoutSeconds not set. Defaulting to 14400 seconds
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:461 github.com/mendersoftware/mender/app.transitionState() State transition: init [none] → init [none]
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:268 github.com/mendersoftware/mender/app.(*initState).Handle() No state data stored
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:461 github.com/mendersoftware/mender/app.transitionState() State transition: init [none] → idle [Idle]
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/statescript/executor.go:82 github.com/mendersoftware/mender/statescript.Launcher.getTimeout() statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/auth.go:352 github.com/mendersoftware/mender/app.(*menderAuthManagerService).run() received the GET_AUTH_TOKEN action
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:461 github.com/mendersoftware/mender/app.transitionState() State transition: idle [Idle] → authorize-wait [Idle]
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:400 github.com/mendersoftware/mender/app.(*authorizeWaitState).Handle() Handle authorize wait state
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:410 github.com/mendersoftware/mender/app.(*authorizeWaitState).Handle() Wait 0s before next authorization attempt
INFO[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:461 github.com/mendersoftware/mender/app.transitionState() State transition: authorize-wait [Idle] → authorize [Sync]
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/statescript/executor.go:82 github.com/mendersoftware/mender/statescript.Launcher.getTimeout() statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
DEBU[0000]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/statescript/executor.go:82 github.com/mendersoftware/mender/statescript.Launcher.getTimeout() statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
DEBU[0001]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:429 github.com/mendersoftware/mender/app.(*authorizeState).Handle() Handle authorize state
DEBU[0001]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/auth.go:355 github.com/mendersoftware/mender/app.(*menderAuthManagerService).run() received the FETCH_AUTH_TOKEN action
DEBU[0001]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/auth.go:598 github.com/mendersoftware/mender/app.(*menderAuthManagerService).MakeAuthRequest() Tenant token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZW5kZXIudGVuYW50IjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIiwiaXNzIjoiTWVuZGVyIiwic3ViIjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIn0.of_4VU3M0xQkko5aI2JupqYaJmNNBQ3A2O3oevpw2nz85NogI9_LW9FbrXUonlm9Bl4ptsR83VfSoD8Zat8N0KFCSQCUw2PxP66Bm_o2PAYSvFvZ67S-du79p1tm4JwR2Zxb_Mw8hRkWpwe4QQittjB5b6sTf4wYfNQJa07joQNb0ToQQwSaBc0NxsUXbFDS0o0h3f6siNHppdLaLsURvWIdVj8DoFLsI2TtJsgq8xiEe_msfBObQ5Bql9zlmA3_fzsY5jyYU2eRzUMqsWX_5rvzj1JBdinbjfcMb2Z51iIshcjOfdzg_9yy1VIOWWinfV-MLBCU3O7KVgqHiSdsG-0S6fzNTYyuDdSmzSFcx8qsEfu9TNp9PFHZplke2AW3vsyHLvR1f_FgMPMHQAqmwjZ4vrNzkjA0iG_LX466fwDh-gfyM_Ian0mbW0Hhm2H4b2z40FfkFY6HPDiRziTX7mKJlHqQq2OTZ8gTYUtYnYKhCDM2G23ny3tk91XaEU35
DEBU[0001]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/auth.go:603 github.com/mendersoftware/mender/app.(*menderAuthManagerService).MakeAuthRequest() Authorization data: {{“mac”:“f8:dc:7a:47:0d:49”} eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZW5kZXIudGVuYW50IjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIiwiaXNzIjoiTWVuZGVyIiwic3ViIjoiNjBiZWNlMjk3OTZlOGVhMGNmODZjZDlhIn0.of_4VU3M0xQkko5aI2JupqYaJmNNBQ3A2O3oevpw2nz85NogI9_LW9FbrXUonlm9Bl4ptsR83VfSoD8Zat8N0KFCSQCUw2PxP66Bm_o2PAYSvFvZ67S-du79p1tm4JwR2Zxb_Mw8hRkWpwe4QQittjB5b6sTf4wYfNQJa07joQNb0ToQQwSaBc0NxsUXbFDS0o0h3f6siNHppdLaLsURvWIdVj8DoFLsI2TtJsgq8xiEe_msfBObQ5Bql9zlmA3_fzsY5jyYU2eRzUMqsWX_5rvzj1JBdinbjfcMb2Z51iIshcjOfdzg_9yy1VIOWWinfV-MLBCU3O7KVgqHiSdsG-0S6fzNTYyuDdSmzSFcx8qsEfu9TNp9PFHZplke2AW3vsyHLvR1f_FgMPMHQAqmwjZ4vrNzkjA0iG_LX466fwDh-gfyM_Ian0mbW0Hhm2H4b2z40FfkFY6HPDiRziTX7mKJlHqQq2OTZ8gTYUtYnYKhCDM2G23ny3tk91XaEU35 -----BEGIN PUBLIC KEY-----
MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA3henvLaLAkI8qe6luWFq
PhwkvA6Q4zAvxpFzHe7PMqX5GEjJiZtYv78jCT7zzOyAC63WSoIKoHApcxGFE3cx
nxdo3IZKKb5/guIzcKeKAtjLsqxGPL0YBgpWSgto7lHAD3365bhwzdDT3uZqWhS0
RxYOeDuCXgGPlu3f3XU2CcizbiRLx6zJpo7xRShZS/avNjxzD9u+79SIB/GwChXM
/Nrm00nySGRNTyCdpQ63dt7VSl4L3kCv++GLzZ9W/qRjejU3GoiDHWDQngawkdk3
NI51t5Rymk/snovQBtLFDRnAG8/oRhzbgWjtOpH9gL5z3YpCj+abA7LNrZUMMJpP
3ge+vItSC7zS3cTfi6L8zQndMQaaFYyslWEHdOMHnSATq2RICmH9gxwcayDyZDcF
FyoDJGs4ewGqSAIWDLOA3IVtwPM1CdcR3UphdmqbF8/m9ElUy17iGtmq3TMhjEK9
W8wJkcQpBcrGWOPlrncuEsqBg3uE/tckcswt0XXzwjyJAgMBAAE=
-----END PUBLIC KEY-----
}
DEBU[0001]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/client/client_auth.go:52 github.com/mendersoftware/mender/client.(*AuthClient).Request() Making an authorization request () to server https://hosted.mender.io

ERRO[0460]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/client/client_auth.go:57 github.com/mendersoftware/mender/client.(*AuthClient).Request() Failure occurred while executing authorization request: Method: Post, URL: https://hosted.mender.io/api/devices/v1/authentication/auth_requests
ERRO[0460]/home/herodev/mender-variscite-zeus/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/mender-client/2.6.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:431 github.com/mendersoftware/mender/app.(*authorizeState).Handle() Authorize failed: transient error: authorization request failed: transient error: authorization request failed: Unknown url.Error type: dial tcp: lookup hosted.mender.io on 10.1.1.2:53: read udp 10.1.1.102:58304->10.1.1.2:53: i/o timeout

The time should synchronize automatically if there is an active network connection. It may take some time but unless you have changed the systemd recipe config I am fairly certain it is enabled by default.

The other errors do appear to be some kind of networking issue. You are using 10.1.1.2 as your DNS server and it seems to not be responding. That would also explain why time is not synchronizing.

Drew

1 Like

Thanks Drew! The target was not connected to internet.

@drewmoseley , I tried to use export MEDIA=“emmc”

I created the image still using this command:
sudo dd if=tmp/deploy/images/hero-secc/hero-secc-firmware-release-hero-secc.sdimg of=/dev/sdb conv=fdatasync bs=8M

then boot via sdcard which was successful but when I try to write the image to emmc via this command:

sudo dd if=hero-secc-firmware-release-hero-secc.sdimg of=/dev/mmcblk1 status=progress conv=fdatasync

I got this error:

root@hero-secc:~# sudo dd if=hero-secc-firmware-release-hero-secc.sdimg of=/dev/mmcblk1 status=progress conv=fdatasync
dd: failed to open ‘hero-secc-firmware-release-hero-secc.sdimg’: No such file or directory

why it can’t see the *.sdimg ?

this is the local.conf appended from ```
meta-mender-variscite/templates/local-emmc.conf.append


# eMMC Settings
VARISCITE_UBOOT_ENV_IN_EMMC = "1"

MENDER_STORAGE_DEVICE = "/dev/mmcblk1"
MENDER_UBOOT_STORAGE_DEVICE = "1"
UBOOT_CONFIG = "sd"

MENDER_BOOT_PART_SIZE_MB_mender-uboot = "0"
KERNEL_IMAGETYPE_mender-uboot = "zImage"

The emmc-based sdimg file is not automatically part of the sdcard image. You’ll need to use a USB key or separate sdcard to transfer that file from your build system.
Drew

1 Like

Thanks Drew!
I was able to perform dd command but when the target boots, I got this errror:

[FAILED] Failed to mount /data.
See ‘systemctl status data.mount’ for details.

[[0;1;31mWarning:[[0m The unit file, source configuration file or drop-ins of da
ta.mount changed on disk. Run ‘systemctl daemon-reload’ to reload units.
[[0;1;31m*[[0m data.mount - /data
Loaded: loaded (/etc/fstab; generated)
Active: [[0;1;31mfailed[[0m (Result: exit-code) since Tue 2021-06-15 07:37:44
UTC; 4 weeks 1 days ago
Where: /data
What: /dev/mmcblk1p3
Docs: man:fstab(5)
man:systemd-fstab-generator(8)

Jun 15 07:37:44 hero-secc systemd[1]: Mounting /data…
Jun 15 07:37:44 hero-secc mount[481]: mount: /data: wrong fs type, bad option, b
ad superblock on /dev/mmcblk1p3, missing codepage or helper program, or other er
ror.
Jun 15 07:37:44 hero-secc systemd[1]: [[0;1;39m[[0;1;31m[[0;1;39mdata.mount: Mou
nt process exited, code=exited, status=32/n/a[[0m
Jun 15 07:37:44 hero-secc systemd[1]: [[0;1;38;5;185m[[0;1;39m[[0;1;38;5;185mdat
a.mount: Failed with result ‘exit-code’.[[0m
Jun 15 07:37:44 hero-secc systemd[1]: [[0;1;31m[[0;1;39m[[0;1;31mFailed to mount
/data.[[0m

I noticed that my mmcblk1 has no mounting for /data?
nodatamount

But there is a data folder in the rootfs.
data

Why is mmcblk1p3 which is the /data has no fstype?
lsblk

This is the command I used
sudo dd if=hero-secc-firmware-release-hero-secc.sdimg of=/dev/mmcblk1 status=progress conv=fdatasync

The image partition looks ok too:

Do you really need 3G partitions? That seems like a lot. Does the board have 8G?

Drew

1 Like

Thanks @drewmoseley , the /data not mounting because of the memory size. But I still have error on the mender-configure.

[FAILED] Failed to start Mender-configure device configuration.
See ‘systemctl status mender-configure-…ply-device-config.service’ for details.

Invalid unit name “mender-configure-…ply-device-config.service” was escaped as
“mender-configure-\xe2\x80\xa6ply-device-config.service” (maybe you should use
systemd-escape?)
Unit mender-configure-\xe2\x80\xa6ply-device-config.service could not be found.

I fixed this with setting but not sure if mender-configure-apply-device-config.service will still run.

#SYSTEMD_SERVICE_${PN} = “mender-configure-apply-device-config.service”
SYSTEMD_SERVICE_ESCAPED_${PN} = “mender-configure-apply-device-config.service”

Please advise. Thank you!

I’m not terribly familiar with the mender-configure stuff. Perhaps @TheMeaningfulEnginee or @lramirez can help.

I have used these board integration instruction broadly successfully however i have encountered a subtle problem. The module has a default mac address programmed into an OTP fuse and this appears to load ok into the kernelargs variable in uboot. The problem is that when the board has finished booting through the grub integration the mac address is not set . This ends with systemd-networkd choosing a mac address but this is different and can change when a full file system update is done. Is there a way to key this argument passed to the kernel to set the mac address ?

2023 update :
the pseudo-native layer is making issues when trying to compile the image.
you have to first execute bitbake pseudo-native to force the usage of https instead of git and correctly fetch the layer.
After this bitbake your_image_name is possible to be run. hope this helps people not being able to compile following exactly all the steps.

The u-boot patch is also miss-aligned with latest zeus u-boot, you can update the of the 0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch

@@ -59,84 +59,45 @@
 #define CONFIG_SYS_I2C_SPEED		100000
 #endif
 
+#ifdef CONFIG_SPL_BUILD
+#define BOOTENV
+#else
+#define BOOT_TARGET_DEVICES(func) \
+        func(MMC, mmc, 1) \
+        func(MMC, mmc, 0)
+#include <config_distro_bootcmd.h>
+#endif
+
+
 #define NAND_BOOT_ENV_SETTINGS \
-	"nandargs=setenv bootargs console=${console},${baudrate} " \
-		"ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs rw ${cma_size}\0" \
-	"nandboot=echo Booting from nand ...; " \
-		"run nandargs; " \
-		"run optargs; " \
-		"nand read ${loadaddr} 0x500000 0xbe0000; " \
-		"nand read ${fdt_addr} 0x10e0000 0x20000; " \
-		"bootz ${loadaddr} - ${fdt_addr}\0" \
+	"nandargs=setenv bootargs console=${console},${baudrate} \
+		${cma_size}\0" \
 	"mtdids=" MTDIDS_DEFAULT "\0" \
 	"mtdparts=" MTDPARTS_DEFAULT "\0"
 
 
 #define MMC_BOOT_ENV_SETTINGS \
-	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
-	"mmcblk=0\0" \
-	"mmcautodetect=yes\0" \
-	"mmcbootpart=1\0" \
-	"mmcrootpart=2\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
-		"root=/dev/mmcblk${mmcblk}p${mmcrootpart} rootwait rw " \
-		"${cma_size}\0" \
-	"loadbootenv=" \
-		"load mmc ${mmcdev}:${mmcbootpart} ${loadaddr} ${bootdir}/${bootenv}\0" \
-	"importbootenv=echo Importing bootenv from mmc ...; " \
-		"env import -t ${loadaddr} ${filesize}\0" \
-	"loadbootscript=" \
-		"load mmc ${mmcdev}:${mmcbootpart} ${loadaddr} ${bootdir}/${script};\0" \
-	"bootscript=echo Running bootscript from mmc ...; " \
-		"source\0" \
-	"loadimage=load mmc ${mmcdev}:${mmcbootpart} ${loadaddr} ${bootdir}/${image}\0" \
-	"loadfdt=run findfdt; " \
-		"echo fdt_file=${fdt_file}; " \
-		"load mmc ${mmcdev}:${mmcbootpart} ${fdt_addr} ${bootdir}/${fdt_file}\0" \
-	"mmcboot=echo Booting from mmc ...; " \
-		"run mmcargs; " \
-		"run optargs; " \
-		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
-			"if run loadfdt; then " \
-				"bootz ${loadaddr} - ${fdt_addr}; " \
-			"else " \
-				"if test ${boot_fdt} = try; then " \
-					"bootz; " \
-				"else " \
-					"echo WARN: Cannot load the DT; " \
-				"fi; " \
-			"fi; " \
-		"else " \
-			"bootz; " \
-		"fi\0" \
-
+		"${cma_size}\0"
 
 #ifdef CONFIG_NAND_BOOT
 #define BOOT_ENV_SETTINGS	NAND_BOOT_ENV_SETTINGS
 #define CONFIG_BOOTCOMMAND \
 	"run ramsize_check; " \
-	"run nandboot || " \
-	"run netboot"
-
+	"run nandargs; " \
+	"run optargs; " \
+	"run findfdt; " \
+	"setenv kernel_addr_r ${loadaddr}; " \
+	"run distro_bootcmd"
 #else
 #define BOOT_ENV_SETTINGS	MMC_BOOT_ENV_SETTINGS
 #define CONFIG_BOOTCOMMAND \
 	"run ramsize_check; " \
-	"mmc dev ${mmcdev};" \
-	"mmc dev ${mmcdev}; if mmc rescan; then " \
-		"if run loadbootenv; then " \
-			"run importbootenv; " \
-		"fi; " \
-		"if run loadbootscript; then " \
-			"run bootscript; " \
-		"else " \
-			"if run loadimage; then " \
-				"run mmcboot; " \
-			"else run netboot; " \
-			"fi; " \
-		"fi; " \
-	"else run netboot; fi"
-
+	"run mmcargs; " \
+	"run optargs; " \
+        "run findfdt; " \
+	"setenv kernel_addr_r ${loadaddr}; " \
+	"run distro_bootcmd"
 #endif
 
 #define OPT_ENV_SETTINGS \
@@ -144,13 +105,12 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	BOOT_ENV_SETTINGS \
+	BOOTENV \
 	OPT_ENV_SETTINGS \
 	"bootenv=uEnv.txt\0" \
-	"script=boot.scr\0" \
-	"image=zImage\0" \
 	"console=ttymxc0\0" \
-	"fdt_file=undefined\0" \
-	"fdt_addr=0x83000000\0" \
+	"fdtfile=undefined\0" \
+	"fdt_addr_r=0x83000000\0" \
 	"fdt_high=0xffffffff\0" \
 	"initrd_high=0xffffffff\0" \
 	"panel=VAR-WVGA-LCD\0" \
@@ -162,45 +122,18 @@
 	"splashdisable=setenv splashfile; setenv splashimage\0" \
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
-	"netargs=setenv bootargs console=${console},${baudrate} " \
-		"root=/dev/nfs rw ${cma_size} " \
-		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
-	"netboot=echo Booting from net ...; " \
-		"run netargs; " \
-		"run optargs; " \
-		"if test ${ip_dyn} = yes; then " \
-			"setenv get_cmd dhcp; " \
-		"else " \
-			"setenv get_cmd tftp; " \
-		"fi; " \
-		"${get_cmd} ${image}; " \
-		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
-			"run findfdt; " \
-			"echo fdt_file=${fdt_file}; " \
-			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
-				"bootz ${loadaddr} - ${fdt_addr}; " \
-			"else " \
-				"if test ${boot_fdt} = try; then " \
-					"bootz; " \
-				"else " \
-					"echo WARN: Cannot load the DT; " \
-				"fi; " \
-			"fi; " \
-		"else " \
-			"bootz; " \
-		"fi;\0" \
 	"usbnet_devaddr=f8:dc:7a:00:00:02\0" \
 	"usbnet_hostaddr=f8:dc:7a:00:00:01\0" \
 	"ramsize_check="\
 		"if test $sdram_size -lt 256; then " \
 			"setenv cma_size cma=32MB; " \
-			"setenv fdt_addr 0x84000000; " \
+			"setenv fdt_addr_r 0x84000000; " \
 			"setenv loadaddr 0x84600000; " \
 		"else " \
 			"setenv cma_size cma=64MB; " \
 		"fi;\0" \
 	"findfdt="\
-		"if test $fdt_file = undefined; then " \
+		"if test $fdtfile = undefined; then " \
 			"if test $board_name = DART-6UL; then " \
 				"setenv som var-dart; " \
 				"setenv carrier 6ulcustomboard; " \
@@ -232,10 +165,10 @@
 			"fi; " \
 			"if test -n $soc_type && test -n $som && " \
 			   "test -n $storage && test -n $mmc0_dev && test -n $carrier; then " \
-				"setenv fdt_file ${soc_type}-${som}-${carrier}-${storage}-${mmc0_dev}.dtb; " \
+				"setenv fdtfile ${soc_type}-${som}-${carrier}-${storage}-${mmc0_dev}.dtb; " \
 			"fi; " \
 			"setenv som; setenv carrier; setenv storage; setenv mmc0_dev; " \
-			"if test $fdt_file = undefined; then " \
+			"if test $fdtfile = undefined; then " \
 				"echo WARNING: Could not determine dtb to use; " \
 			"fi; " \
 		"fi;\0"

#kirkstone

I have meta-mender-community/meta-variscite working for kirkstone [1], but it is pending some enabling from upstream Variscite for the 5.10 kernel [2]. You will need to engage with Variscite sales to convince them to merge my changes. It is clearly not a priority for them.

[1] GitHub - moto-timo/meta-mender-community at variscite-bsp-kirkstone
[2] IMX6: add kirkstone support by moto-timo · Pull Request #17 · varigit/meta-variscite-bsp · GitHub