# iWave Arria 10 Mender build issue

**URL:** <https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218>\
**Category:** General Discussions\
**Created:** [February 15, 2019, 9:25am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218 "2019-02-15T09:25:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 9:25am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/1 "2019-02-15T09:25:26Z")

</div>

Moving this over from the Google Group.  
[https://groups.google.com/a/lists.mender.io/forum/#!topic/mender/UXB9cR4G9sE](https://groups.google.com/a/lists.mender.io/forum/#!topic/mender/UXB9cR4G9sE)

I am porting my mender integration onto the iWave iW-RainboW-G24M Arria10 SOC Module.  
[https://www.iwavesystems.com/arria-10-soc-som.html](https://www.iwavesystems.com/arria-10-soc-som.html)

The standard iWave Yocto build is based on the Angstrom release: angstrom-v2017.06-yocto2.3.  
GCC version: linaro-5.2.

I have both the standard iWave u-boot & kernel building from Yocto.  
I have both of these running on the module.

I seem to have integrated Mender into the u-boot and have this running on the iWave module.

However when I attempt to build the Mender kernel I’m getting errors with the mender do\_install script:

```auto
| /home/gnewman/yocto/mender-iwg24m-release-bsp/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.6.0-r0/temp/run.do_install.9926: line 125: -Wl,--hash-style=gnu: command not found_
| WARNING: /home/gnewman/yocto/mender-iwg24m-release-bsp/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.6.0-r0/temp/run.do_install.9926:1 exit 127 from 'GOOS=$(eval $(${GO} env) && echo $GOOS)'_
| ERROR: Function failed: do_install (log file is located at /home/gnewman/yocto/mender-iwg24m-release-bsp/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.6.0-r0/temp/log.do_install.9926)_**
ERROR: Task (/home/gnewman/yocto/mender-iwg24m-release-bsp/layers/meta-mender/meta-mender-core/recipes-mender/mender/mender_1.6.0.bb:do_install) failed with exit code '1'_
NOTE: Tasks Summary: Attempted 2291 tasks of which 2280 didn't need to be rerun and 1 failed._
NOTE: Writing buildhistory_

```

Looking at the run.do\_install.9926 file I see that the line previous line is an intall -d:

```auto
do_install() {_
    install -d /home/gnewman/yocto/mender_yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/mender/1.5.0-r0/image//usr/bin_

    GOOS=$(eval $(arm-poky-linux-gnueabi-go env) && echo $GOOS)_
	...

```

When I check the directory

```auto
/home/gnewman/yocto/mender_yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/mender/1.5.0-r0/image//usr/bin

```

I can see that there is nothing in the dir.

Checking my succesful mender build from my Intel Arria10 board I see that there is a mender binary in this directory:

```auto
gnewman@server-1:~/yocto/mender_yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/mender/1.5.0-r0/image/usr/bin$ ls -als
total 7168_
   4 drwxr-xr-x 2 gnewman gnewman 4096 Jan 30 09:04 ._
   4 drwxr-xr-x 5 gnewman gnewman 4096 Jan 30 09:04 .._
7160 -rwxr-xr-x 1 gnewman gnewman 7330164 Jan 30 09:04 mender

```

Is this binary an output from do\_compile?  
I’m guessing that the lack of this binary what is causing my error?

If so, I do not get any previous build errors, what would prevent the binary from being created?

As always, any help would be much appreciated.

Regards,

Gary

Edit: @mirzak, prettify using pre-formated text for code-blocks. Change title to “Mender build issue” as this is related to the Mender binary and not kernel (which might be confused with Linux kernel)

---

<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:** [February 15, 2019, 9:42am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/2 "2019-02-15T09:42:16Z")

</div>

> Is this binary an output from do\_compile?

Yes the binary is supposed to be created during `do_compile` and installed to `${D}/${bindir}` during `do_install`.

And it is a bit strange that you get an error during `do_install` and not `do_compile`, the error being:

```
 run.do_install.9926: line 125: -Wl,--hash-style=gnu: command not found

```

Can you check which command it is running at `run.do_install.9926: line 125:`

It would be interesting to see the log of the `do_compile` step, that is content of:

```
 /home/gnewman/yocto/mender-iwg24m-release-bsp/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.6.0-r0/temp/run.do_compile

```

---

<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:** [February 15, 2019, 9:50am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/3 "2019-02-15T09:50:21Z")

</div>

Ah, it seems that this command is failing,

```
  eval $(go env) && echo $GOOS

```

Can you try running `bitbake -c devshell mender` and then run above, and check what the output is.

---

<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:** [February 15, 2019, 10:00am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/4 "2019-02-15T10:00:27Z")

</div>

Hm,

I tried your setup, using:

```auto
repo init -u git://github.com/Angstrom-distribution/angstrom-manifest -b angstrom-v2017.06- yocto2.3
repo sync
MACHINE=arria10 . setup-environment

```

I cloned and added `meta-mender-core` to `bblayers.conf` and then ran `bitbake mender`. I do not get any errors, which hints to me that this is a host environment problem.

What is your host machine? I am running a debian9 machine.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 10:00am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/5 "2019-02-15T10:00:34Z")

</div>

> [@mirzak](#):
>
> eval $(go env) && echo $GOOS

root@server-1:~/yocto/mender-iwg24m-release-bsp/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.6.0-r0/git# eval $(go env) && echo $GOOS  
linux

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 10:02am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/6 "2019-02-15T10:02:29Z")

</div>

Ubuntu 14.04 LTS

---

<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:** [February 15, 2019, 10:06am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/7 "2019-02-15T10:06:17Z")

</div>

And what does `gcc --version` produce on your host machine?

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 10:13am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/8 "2019-02-15T10:13:36Z")

</div>

Ah but of course this doesn’t include the iWave patch.  
Maybe there could be some problem between Mender and the iWave changes.

IWave install instructions are as follows:

**To setup the yocto, follow the procedure given below.**  
**• Set the Git username and create a build directory using below commands.**  
 **git config --global user.name "Your Name"\*\* \*\* git config --global user.email "Your Email"**  
 **mkdir iwg24m-release-bsp\*\* \*\* cd iwg24m-release-bsp**  
**• Download the altera.xml file and repo utility using below commands.**  
 **wget http://releases.rocketboards.org/release/2018.05/gsrd/src/altera.xml\*\* \*\* wget [http://commondatastorage.googleapis.com/git-repo-downloads/repo](http://commondatastorage.googleapis.com/git-repo-downloads/repo)**  
**• Change the permission on repo file using below command.**  
\*\* chmod 777 repo\*\* \*\*• Export the PATH to current directory execute below command.\*\* \*\* export PATH=PATH:~/iwg24m-release-bsp\*\* \*\*• Download angstrom-manifest using below commands.\*\* \*\* repo init -u git://github.com/Angstrom-distribution/angstrom-manifest -b angstrom-v2017.06-\*\*  
**yocto2.3**  
**• Create a local manifest directory and move altera.xml file to local manifest using below commands.**  
 **mkdir -p .repo/local\_manifests\*\* \*\* mv altera.xml .repo/local\_manifests/**  
**• Open manifest.xml file and do the changes as shown below**  
**vi .repo/manifest.xml**  
**• Delete the below line**  
  
**• Complete the download using below command.**  
 **repo sync\*\* \*\*• Set the Machine ID and setup environment using below command.\*\* \*\* MACHINE=iwg24m . ./setup-environment**  
**• To add the meta-altera-refdes layer to conf/bblayers.conf execute below command.**  
 **sed -i '/meta-altera/a \ \ {TOPDIR}/layers/meta-altera-refdes \’ conf/bblayers.conf**  
**• To remove the meta-atmel layer and meta-gumstix-community from conf/bblayers.conf execute below**  
**command.**  
 **sed -i '/meta-atmel/d' conf/bblayers.conf\*\* \*\* sed -i ‘/meta-gumstix-community/d’ conf/bblayers.conf**  
**REL0.1**  
**Page 11 of 37 iWave Systems Technologies Pvt. Ltd.**  
**iW-RainboW-G24M Linux User Manual**  
**• Un-tar the Source-Code.tar.gz file from deliverables.**  
 **cd \<path to iW-RainboW-G24M-CU-Rx.x-RELx.x-Arria10-SX480-Linux4.9.78-YoctoPyro\_Deliverables\>/\*\* \*\*iW-RainboW-G24M-CU-R2.2-REL0.1-Arria10-SX480-Linux4.9.78-YoctoPyro\_Deliverables/Source-Code/\*\* \*\* tar –xvf Source-Code.tar.gz**  
**• The Yocto patch file is located in below path in deliverables.**  
 **\<path\_to\_Source-Code\>/Source-Code/Linux/Yocto/PATCH000-iW-PRFAZ-SC-01-R2.2-REL0.1-\*\* \*\*YoctoPyro\_basic\_customization.patch\*\* \*\*• To apply the Yocto patch file, execute the below commands.\*\* \*\* patch -Np1 \< /PATCH000-iW-PRFAZ-SC-01-R2.2-REL0.1-**  
**YoctoPyro\_basic\_customization.patch**  
**• Execute below command to compile kernel images and yocto filesystem for iW-G24M platform.**  
**$ bitbake gsrd-console-image**

I tried to upload the patch but wasn’t allowed.

Gary

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 10:15am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/9 "2019-02-15T10:15:35Z")

</div>

root@server-1:~/yocto/mender-iwg24m-release-bsp/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.6.0-r0/git# gcc --version  
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4  
Copyright © 2013 Free Software Foundation, Inc.  
This is free software; see the source for copying conditions. There is NO  
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

---

<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:** [February 15, 2019, 10:22am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/10 "2019-02-15T10:22:29Z")

</div>

> [@GaryNewman](#):
>
> gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4

You could also try without the iWave patches, if that works then you have a reference.

If you still have problems I suspect you need to update your host environment, or at least gcc.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 10:23am UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/11 "2019-02-15T10:23:33Z")

</div>

Good point I’ll try.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 2:28pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/12 "2019-02-15T14:28:57Z")

</div>

Just to update you, I tried the same build as you.

repo init -u git://github.com/Angstrom-distribution/angstrom-manifest -b angstrom-v2017.06- yocto2.3  
repo sync  
git clone -b thud git://github.com/mendersoftware/meta-mender  
MACHINE=arria10 . setup-environment  
Added meta-mender-core to bblayers.

I hit an error which I think I’ve seed before & then hit the do\_install error:

_ERROR: mender-1.7.0-r0 do\_populate\_lic: QA Issue: mender: LIC\_FILES\_CHKSUM points to an invalid file: /home/gnewman/yocto/iWave/angstrom\_repo/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.7.0-r0/git/src/github.com/mendersoftware/mender/LIC\_FILES\_CHKSUM.sha256 [license-checksum]_  
_ERROR: mender-1.7.0-r0 do\_install: Function failed: do\_install (log file is located at /home/gnewman/yocto/iWave/angstrom\_repo/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.7.0-r0/temp/log.do\_install.27979)_  
_ERROR: Logfile of failure stored in: /home/gnewman/yocto/iWave/angstrom\_repo/build/tmp-angstrom-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/mender/1.7.0-r0/temp/log.do\_install.27979_

Have you seen this LIC\_FILES\_CHKSUM.sha256 error before?

Anyway as this looks like an environment issue, I’ll create a a debian9 virtual machine and try again.

Thanks

Gary

---

<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:** [February 15, 2019, 2:31pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/13 "2019-02-15T14:31:20Z")

</div>

> [@GaryNewman](#):
>
> git clone -b thud git://github.com/mendersoftware/meta-mender

Please try using `pyro` branch of meta-mender as well, as the rest of the layers are at the same if I recall correctly.

---

<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:** [February 15, 2019, 2:32pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/14 "2019-02-15T14:32:40Z")

</div>

Because of this,

> <https://github.com/mendersoftware/meta-mender/commit/d36b1c94d4d94b8cae3b306e03d946cac2b2670a>

---

<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:** [February 15, 2019, 2:34pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/15 "2019-02-15T14:34:53Z")

</div>

> Anyway as this looks like an environment issue, I’ll create a a debian9 virtual machine and try again.

Does it? Because if it works without iWave patches in your current environment then it is probably something that comes in from the applied patches that messes it up.

I would check tool-chain changes or compiler flags first.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 2:39pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/16 "2019-02-15T14:39:05Z")

</div>

I’ll try pyro.

Im a little confused, maybe I’m missing something.  
As it still doesn’t work without iWave then I thought this points toward the environment.

---

<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:** [February 15, 2019, 2:41pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/17 "2019-02-15T14:41:11Z")

</div>

Well it is not the same error, as it seems that it has passed `do_compile` and `do_install` and failed on `do_populate_lic`, and this is probably due to the fact that you are using `thud` of meta-mender.

I suspect that it will compile just fine if you `pyro` of meta-mender.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 2:44pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/18 "2019-02-15T14:44:34Z")

</div>

Ah sorry, I saw the do\_populate\_lic early on in the build & then saw the do\_install error near the end.

But as you suggest, I will try pyro and let you know.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 15, 2019, 3:43pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/19 "2019-02-15T15:43:28Z")

</div>

Ok that did indeed build clean, I’ll integrate iWave and see what happens.

---

<div class="post-metadata">

**Author:** ![GaryNewman](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@GaryNewman](https://hub.mender.io/u/GaryNewman)\
**Post date:** [February 20, 2019, 1:10pm UTC](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218/20 "2019-02-20T13:10:54Z")

</div>

Hi Mizrak,

So I’ve been attempting to install mender pyro on to of a clean iWave install and I’ve hit some issues.

I’ve done the following in this order:

- Installed & synced a new repo (angstrom-v2017.06-  
yocto2.3)

- Patched Linux & uboot for iWave.

- Successfully built iWave u-boot and gsrd-console-image.

- Added mender:  
_git clone -b pyro git://github.com/mendersoftware/meta-mender_  
_MACHINE=iwg24m . ./setup-environment_

- Added meta-mender-core to bblayers.conf & successfully built _bitbake mender_

- I have then configured the layers for mender:

1. Added mender variables to local.conf
2. Added mender changes to u-boot recipe.
3. Added mender changes to machine conf.
4. Changed meta-mender-core patch 0003-Integration-of-Mender-boot-code-into-U-Boot.patch (In every build I’ve had to rewrite this patch so that it will apply to my u-boot v2014.10-r1)
5. Added patch 0005-default-gcc.patch (allows fw\_printenv to be built for my target).
6. Updated u-boot-mender-common.inc for new patches.
7. Added patch to u-boot recipe to configure socfpga\_arria10.h with Mender config defines.

- I have then attempted to build _bitbake gsrd-console-image_

This is then giving me the following error:

**_ERROR: u-boot-fw-utils-1\_2017.01-r0 do\_patch: Command Error: ‘quilt --quiltrc /home/gnewman/yocto/iWave/iWave-mender-yocto/build/tmp-angstrom-glibc/work/iwg24m-angstrom-linux-gnueabi/u-boot-fw-utils/1\_2017.01-r0/recipe-sysroot-native/etc/quiltrc push’ exited with 0 Output:_**  
**_Applying patch 0003-Integration-of-Mender-boot-code-into-U-Boot.patch_**  
**_patching file include/env\_default.h_**  
**_patching file scripts/Makefile.autoconf_**  
**_Hunk #1 FAILED at 78._**  
**_1 out of 1 hunk FAILED – rejects in file scripts/Makefile.autoconf_**  
**_Patch 0003-Integration-of-Mender-boot-code-into-U-Boot.patch does not apply (enforce with -f)_**  
**_ERROR: u-boot-fw-utils-1\_2017.01-r0 do\_patch: Function failed: patch\_do\_patch_**  
**_ERROR: Logfile of failure stored in: /home/gnewman/yocto/iWave/iWave-mender-yocto/build/tmp-angstrom-glibc/work/iwg24m-angstrom-linux-gnueabi/u-boot-fw-utils/1\_2017.01-r0/temp/log.do\_patch.9859_**  
**_ERROR: Task (/home/gnewman/yocto/iWave/iWave-mender-yocto/layers/openembedded-core/meta/recipes-bsp/u-boot/u-boot-fw-utils\_2017.01.bb:do\_patch) failed with exit code '1’_**

This is because I had to change 0003-Integration-of-Mender-boot-code-into-U-Boot.patch to apply to my u-boot build. But in this scenario I seem to be building a separate **u-boot-fw-utils** build. This build is different to my u-boot & therefore the patch will not apply to it.

Do you know why _u-boot-fw-utils_\* is being built? I have never had to build this in any of my previous builds and I’m not aware that I’m using any different configurations. I have not made any changes to u-boot-fw-utils & was under the impression from the ‘Manual U-Boot integration’ section of the documentation, that this would be based on the source of my u-boot build?

Thanks for any help,

Gary

[Next page](https://hub.mender.io/t/iwave-arria-10-mender-build-issue/218.md?page=2)
