# Building Custom Yocto Image

**URL:** <https://mangoh.discourse.group/t/building-custom-yocto-image/1299>\
**Category:** Wiki\
**Created:** [April 4, 2018, 9:39pm UTC](https://mangoh.discourse.group/t/building-custom-yocto-image/1299 "2018-04-04T21:39:30Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![drewwestrick](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/drewwestrick/32/270_2.png) [@drewwestrick](https://mangoh.discourse.group/u/drewwestrick)\
**Post date:** [May 30, 2018, 1:42am UTC](https://mangoh.discourse.group/t/building-custom-yocto-image/1299/21 "2018-05-30T01:42:43Z")

</div>

I noticed earlier today that I’m running Ubuntu 18.04 LTS and Yocto 2.2 only officially supports 16.04 LTS. I’m not sure why compiling qemu would give the `static declaration of ‘memfd_create’ follows non-static declaration` error on 18.04 and not 16.04 (maybe a different version of gcc or something else build related?). Long story short, it does look like I’m now able to successfully build yocto for WP76XX as well as the toolchain.

---

<div class="post-metadata">

**Author:** ![fgodfrey](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@fgodfrey](https://mangoh.discourse.group/u/fgodfrey)\
**Post date:** [May 30, 2018, 5:47am UTC](https://mangoh.discourse.group/t/building-custom-yocto-image/1299/22 "2018-05-30T05:47:40Z")

</div>

I had these problems as well. I think it’s because the 18.04 Ubuntu uses a newer version of gcc that has stricter checking. I ended up fixing the various warnings/errors one at a time until I got a successful build. I’ve flashed that onto my mangOH Red and it works fine.  
For this error, on line 40 of wp77xx-yocto/yocto/build\_bin/tmp/work/x86\_64-linux/qemu-native/2.7.0-r1/qemu-2.7.0/util/memfd.c, I just removed the “static” on memfd\_create().

Unfortunately, I’m not really familiar with how to do things “right” in Yocto so I don’t have patches for what I changed or I’d post them. If I remember right (I did this about 2 weeks ago) all the errors were things other people had hit with Yocto and 18.04. I haven’t tried creating a Ubuntu 16.04 VM to build with.

---

<div class="post-metadata">

**Author:** ![drewwestrick](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/drewwestrick/32/270_2.png) [@drewwestrick](https://mangoh.discourse.group/u/drewwestrick)\
**Post date:** [May 30, 2018, 2:39pm UTC](https://mangoh.discourse.group/t/building-custom-yocto-image/1299/23 "2018-05-30T14:39:26Z")

</div>

@fgodfrey

Thanks for the insights. I figured it had something to do with the gcc version. I’m probably going to stick with 16.04 LTS for now just to avoid any headaches.

I too need to learn a lot more about Yocto and figure out how to add patches, packages, etc. I’m more familiar with Buildroot than Yocto.

On a related note, @dfrey do you know what the update / release schedule at Sierra looks like for Yocto/Linux? I see the WP76XX source (as of Release 9) is using Yocto 2.2 and Kernel 3.18.44. I realize it isn’t feasible to stay on mainline Yocto and the kernel with each new official firmware release, but I do have some concerns pushing 3.18 to new devices we are developing that are supposed to have a 5 year life-cycle.

---

<div class="post-metadata">

**Author:** ![kalaivani](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/kalaivani/32/2183_2.png) [@kalaivani](https://mangoh.discourse.group/u/kalaivani)\
**Post date:** [May 10, 2021, 11:05am UTC](https://mangoh.discourse.group/t/building-custom-yocto-image/1299/24 "2021-05-10T11:05:26Z")

</div>

can any one guide me how to build an .spk or .cwe file in VS Code application

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [May 10, 2021, 11:30am UTC](https://mangoh.discourse.group/t/building-custom-yocto-image/1299/25 "2021-05-10T11:30:53Z")

</div>

To make the legato image, just type

leaf shell  
make wp76xx

[Previous page](https://mangoh.discourse.group/t/building-custom-yocto-image/1299.md?page=1)
