# Solidrun i.MX6 integration errors

**URL:** <https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [April 2, 2019, 12:51pm UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439 "2019-04-02T12:51:55Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 17, 2019, 7:03am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/21 "2019-04-17T07:03:41Z")

</div>

My board is using SPL to bring up the board / load the boot loader and further loading the linux when i use the wic image alone…  
Shall i need to add this SPL to IMAGE\_BOOT\_FILES ?=  
I added uboot.img , boot.scr , SPL as well… But still uboot not up

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 17, 2019, 7:20am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/22 "2019-04-17T07:20:06Z")

</div>

Can you paste the content of the `wks` file that is by `wic`?

IMAGE\_BOOT\_FILES is typically not the variable to use for bootloader files and instead these are to be used,

To tell `sdimg` to embed the boot-loader you need to specific these two variables. e.g in you `local.conf` ,

[https://docs.mender.io/1.7/artifacts/yocto-project/variables#mender\_image\_bootloader\_bootsector\_offset](https://docs.mender.io/1.7/artifacts/yocto-project/variables#mender_image_bootloader_bootsector_offset)  
[https://docs.mender.io/1.7/artifacts/yocto-project/variables#mender\_image\_bootloader\_file](https://docs.mender.io/1.7/artifacts/yocto-project/variables#mender_image_bootloader_file)

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [April 17, 2019, 7:26am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/23 "2019-04-17T07:26:42Z")

</div>

@ramu did you try any of these steps to update SPL + u-boot to see if it’s working: [link](https://developer.solid-run.com/knowledge-base/i-mx6-u-boot/) Juts my 2 cents.

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 17, 2019, 9:52am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/24 "2019-04-17T09:52:43Z")

</div>

1. Specified **imx-uboot-spl.wks** name in machine/solidrun-imx6.conf. But I see solidrun\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/ **mender-sdimg.wks** file. Content of the mender-sdimg.wks follows … I see SPL-partial and u-boot.img-partial as well in above dir…

# embed bootloader

part --source rawcopy --sourceparams=“file=/home/tcs/new-workspace/mender/poky/build/tmp/work/solidrun\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/SPL-partial” --ondisk “mmcblk0” --align 1 --no-table  
part --source rawcopy --sourceparams=“file=/home/tcs/new-workspace/mender/poky/build/tmp/work/solidrun\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/uboot.env” --ondisk “mmcblk0” --align 8192 --no-table  
part --source rootfs --rootfs-dir /home/tcs/new-workspace/mender/poky/build/tmp/work/solidrun\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/bootfs.image\_sdimg --ondisk “mmcblk0” --fstype=vfat --label boot --align 8192 --fixed-size 16 --active  
part --source rootfs --ondisk “mmcblk0” --fstype=ext4 --label primary --align 8192 --fixed-size 5537792k --exclude-path data/ uboot/  
part --source rootfs --ondisk “mmcblk0” --fstype=ext4 --label secondary --align 8192 --fixed-size 5537792k --exclude-path data/ uboot/  
part --source rootfs --rootfs-dir /home/tcs/new-workspace/mender/poky/build/tmp/work/solidrun\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/rootfs/data --ondisk “mmcblk0” --fstype=ext4 --label data --align 8192 --fixed-size 128  
bootloader --ptable msdos

1. Following varaibles specified in **local.conf**

MENDER\_ARTIFACT\_NAME = “release-1”  
INHERIT += “mender-full”  
MENDER\_FEATURES\_ENABLE\_append = " mender-uboot mender-image-sd"  
MENDER\_FEATURES\_DISABLE\_append = " mender-grub mender-image-uefi"  
MENDER\_STORAGE\_DEVICE = “/dev/mmcblk0”  
MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “11000”  
IMAGE\_INSTALL\_append = " kernel-image kernel-devicetree"

# For U-Boot

MENDER\_FEATURES\_ENABLE\_append = " mender-uboot mender-image-sd"  
MENDER\_FEATURES\_DISABLE\_append = " mender-grub mender-image-uefi"  
MENDER\_IMAGE\_BOOTLOADER\_FILE = “u-boot.img”  
MENDER\_IMAGE\_BOOTLOADER\_BOOTSECTOR\_OFFSET = “1”  
ARTIFACTIMG\_FSTYPE = “ext4”  
MENDER\_UBOOT\_STORAGE\_INTERFACE = “mmc”  
MENDER\_UBOOT\_STORAGE\_DEVICE = “0”  
MENDER\_IMAGE\_BOOTLOADER\_FILE = “u-boot.img”  
MENDER\_IMAGE\_BOOTLOADER\_BOOTSECTOR\_OFFSET = “1”

I specified u-boot.img Instead of SPL for MENDER\_IMAGE\_BOOTLOADER\_FILE in my previous builds… I have tried with SPL now… Still not Up…

I specified below variables in todays build only…  
MENDER\_UBOOT\_STORAGE\_INTERFACE = “mmc”  
MENDER\_UBOOT\_STORAGE\_DEVICE = “0”

3.## These are imp contents of **machine/solidrun-imx6.conf**

PREFERRED\_PROVIDER\_u-boot = “u-boot-solidrun-imx6”

#Changes End

UBOOT\_MACHINE ?= “mx6cuboxi\_defconfig”  
UBOOT\_MAKE\_TARGET = “all”  
UBOOT\_SUFFIX = “img”  
SPL\_BINARY = “SPL”  
WKS\_FILE = “imx-uboot-spl.wks”

## I added this when i added folder for u-boot-scr creation

WKS\_FILE\_DEPENDS = “virtual/bootloader solidrun-imx6-u-boot-scr”

## I added SPL and boot.scr

IMAGE\_BOOT\_FILES\_append = " SPL boot.scr extlinux.conf;extlinux/extlinux.conf"

UBOOT\_EXTLINUX = “1”  
UBOOT\_EXTLINUX\_ROOT = “root=PARTUUID=${uuid}”

KERNEL\_IMAGETYPE = “zImage”  
KERNEL\_DEVICETREE = "   
imx6q-hummingboard2.dtb   
imx6q-hummingboard2-emmc.dtb   
imx6q-hummingboard2-emmc-som-v15.dtb \

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 17, 2019, 10:40am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/25 "2019-04-17T10:40:32Z")

</div>

@MarekBelisko Wic image created from Yocto build working very fine… I am unable to integrated properly with mender… But wic image alone from Mender Yocto build able to bring up the board at least till uboot.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 17, 2019, 10:52am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/26 "2019-04-17T10:52:49Z")

</div>

> [@ramu](#):
>
> Specified **imx-uboot-spl.wks** name in machine/solidrun-imx6.conf. But I see solidrun\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/ **mender-sdimg.wks** file. Content of the mender-sdimg.wks follows … I see SPL-partial and u-boot.img-partial as well in above dir…

Not really interested in this one. I want the `imx-uboot-spl.wks`, as this is the one that works for you, correct?

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 17, 2019, 11:16am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/27 "2019-04-17T11:16:55Z")

</div>

**.WKS** definition for Clearfog as below  
WKS\_FILE = “clearfog.wks”  
WKS\_FILE\_DEPENDS = “virtual/bootloader clearfog-u-boot-scr”

But generated mender-sdimg.wks file only not the clearfog.wks. But clearfog.wks defined in meta-clearfog/ folder…

Are we need to write this file in meta-solidrun/wic folder?

I see **meta-mender-core/classes/mender-part-images.bbclass** creating **mender-sdimg.wks** file in core-image-full-cmdline/1.0-r0/ folder.

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 18, 2019, 9:16am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/28 "2019-04-18T09:16:41Z")

</div>

Hi Mirzak,  
Here is the content of **imx-uboot-spl.wks** file… This one is used for WIC image creation…  
File location: meta-freescale/wic/imx-uboot-spl.wks

```auto
short-description: Create SD card image with a boot partition
long-description:
 Create an image that can be written onto a SD card using dd for use
 with i.MX SoC family.
 It uses SPL and u-boot

 The disk layout used is:
  - ----- --------- --------------
 | | SPL | u-boot | rootfs | - ----- --------- --------------
 ^ ^ ^ ^ ^
 | | | | |
 0 1kiB 69kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)

part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1
part u-boot --source rawcopy --sourceparams="file=u-boot.img" --ondisk mmcblk --no-table --align 69
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096

bootloader --ptable msdos

```

Edit: @mirzak: prettified file syntax

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 18, 2019, 9:36am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/29 "2019-04-18T09:36:14Z")

</div>

Oki, now I see what you need to do. You have two different files `SPL` and `u-boot.img` that need to be embedded. That is both must be written at the beginning of the disk.

Unfortunately `MENDER_IMAGE_BOOTLOADER_FILE/OFFSET` only accept one file as a argument. And to get around this you need to do something similar to this,

> <https://github.com/mendersoftware/meta-mender-community/blob/sumo/meta-mender-variscite/recipes-bsp/u-boot/u-boot-variscite.bbappend#L6-L11>

And then you can set,

```auto
MENDER_IMAGE_BOOTLOADER_FILE = "u-boot.img`
MENDER_IMAGE_BOOTLOADER_OFFSET = "1"

```

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 18, 2019, 10:57am UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/30 "2019-04-18T10:57:11Z")

</div>

Thanks you Mirzak… I am just trying to understand where to add this make\_u\_boot\_spl\_image…  
I added above function as below in board specific location @ recipes-bsp/u-boot/u-boot-tcs-imx6\_2018.01.bbappend

u-boot-spl.img deployed into deploy/images but I am not seeing this file in boot partition and primary partitions /boot folder as well…

do\_deploy() {  
install -m 644 {B}/{config}/{SPL\_BINARY} {DEPLOYDIR}/u-boot-spl-{PV}-{PR}.img  
rm -f {DEPLOYDIR}/u-boot-spl.img ln -sf u-boot-spl-{PV}-{PR}.img {DEPLOYDIR}/u-boot-spl.img  
dd if={DEPLOYDIR}/u-boot.img of={DEPLOYDIR}/u-boot-spl-{PV}-{PR}.img bs=1K seek=68 conv=notrunc  
}

But i see this file getting written in mender-sdimg.wks file…

# embed bootloader

part --source rawcopy --sourceparams=“file=/home/tcs/new-workspace/mender/poky/build/tmp/work/tcs\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/u-boot-spl.img partial” --ondisk “mmcblk0” --align 1 --no-table  
part --source rawcopy --sourceparams=“file=/home/tcs/new-workspace/mender/poky/build/tmp/work/tcs\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/uboot.env” --ondisk “mmcblk0” --align 8192 --no-table  
part --source rootfs --rootfs-dir /home/tcs/new-workspace/mender/poky/build/tmp/work/tcs\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/bootfs.image\_sdimg --ondisk “mmcblk0” --fstype=vfat --label boot --align 8192 --fixed-size 16 --active  
part --source rootfs --ondisk “mmcblk0” --fstype=ext4 --label primary --align 8192 --fixed-size 5537792k --exclude-path data/ uboot/  
part --source rootfs --ondisk “mmcblk0” --fstype=ext4 --label secondary --align 8192 --fixed-size 5537792k --exclude-path data/ uboot/  
part --source rootfs --rootfs-dir /home/tcs/new-workspace/mender/poky/build/tmp/work/tcs\_imx6-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0/rootfs/data --ondisk “mmcblk0” --fstype=ext4 --label data --align 8192 --fixed-size 128

Now i changes boot sector to 2 and checking it

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 18, 2019, 2:53pm UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/31 "2019-04-18T14:53:25Z")

</div>

Many thanks to you Mirzak… Board is up and even the linux also up and running…Below changes made the difference…

MENDER\_IMAGE\_BOOTLOADER\_FILE = " u-boot-spl.img"  
MENDER\_IMAGE\_BOOTLOADER\_OFFSET = “2”

I need to try for updating the board with new artifact using mender client…

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 22, 2019, 6:20pm UTC](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439/32 "2019-04-22T18:20:37Z")

</div>

Great to hear you where able to progress.

[Previous page](https://hub.mender.io/t/solidrun-i-mx6-integration-errors/439.md?page=1)
