# Building custom Yocto image on WP8548

**URL:** <https://mangoh.discourse.group/t/building-custom-yocto-image-on-wp8548/361>\
**Category:** Uncategorized\
**Created:** [February 6, 2017, 12:25pm UTC](https://mangoh.discourse.group/t/building-custom-yocto-image-on-wp8548/361 "2017-02-06T12:25:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hdr](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@hdr](https://mangoh.discourse.group/u/hdr)\
**Post date:** [February 6, 2017, 12:25pm UTC](https://mangoh.discourse.group/t/building-custom-yocto-image-on-wp8548/361/1 "2017-02-06T12:25:03Z")

</div>

I need to add to Yocto image some additional layers such as meta-mono and meta-nodejs and flash it on WP8548 device, I did carefully read all te instructions mentioned on [http://legato.io/legato-docs/latest/yoctoLegatoOverview.html1](http://legato.io/legato-docs/latest/yoctoLegatoOverview.html1), but I still can’t get working device with working system. These are my steps:

1 Download and extract sources from [http://source.sierrawireless.com/resources/legato/legatolinuxdist/1](http://source.sierrawireless.com/resources/legato/legatolinuxdist/1)

2 Clone meta-mono and meta-nodejs to meta-openembedded dir

3 I have tried to find file meta-swi-extras/meta-swi-bin/recipes/images/9615-cdp-sierra-image.inc mentioned in instructions, and I didn’t find it, so I’ve edited [build.sh](http://build.sh) script an added these lines:

# Enable the meta-mono layer

enable\_layer “meta-mono” “$OE/meta-mono”

# Enable the meta-nodejs layer

enable\_layer “meta-nodejs” “$OE/meta-nodejs”

4 make image

5 After build I’ve got these files in my …/yocto/build\_bin/tmp/deploy/images/swi-mdm9x15 dir:

- appsboot.mbn
- appsboot.raw
- boot-yocto-mdm9x15-20161223193117.2k.img
- boot-yocto-mdm9x15-20161223193117.2k.initramfs.img
- boot-yocto-mdm9x15-20161223193117.4k.img
- boot-yocto-mdm9x15-20161223193117.4k.initramfs.img
- boot-yocto-mdm9x15.2k.img
- boot-yocto-mdm9x15.2k.initramfs.img
- boot-yocto-mdm9x15.4k.img
- boot-yocto-mdm9x15.4k.initramfs.img
- boot-yocto-mdm9x15.img
- kernel
- mdm9x15-image-dev-swi-mdm9x15-20161223193117.rootfs.4k.yaffs2
- mdm9x15-image-dev-swi-mdm9x15-20161223193117.rootfs.manifest
- mdm9x15-image-dev-swi-mdm9x15-20161223193117.rootfs.squashfs
- mdm9x15-image-dev-swi-mdm9x15-20161223193117.rootfs.tar.bz2
- mdm9x15-image-dev-swi-mdm9x15-20161223193117.rootfs.version
- mdm9x15-image-dev-swi-mdm9x15-20161223193117.rootfs.yaffs2
- mdm9x15-image-dev-swi-mdm9x15.2k.default
- mdm9x15-image-dev-swi-mdm9x15.4k.default
- mdm9x15-image-dev-swi-mdm9x15.4k.yaffs2
- mdm9x15-image-dev-swi-mdm9x15.manifest
- mdm9x15-image-dev-swi-mdm9x15.squashfs
- mdm9x15-image-dev-swi-mdm9x15.tar.bz2
- mdm9x15-image-dev-swi-mdm9x15.version
- mdm9x15-image-initramfs-swi-mdm9x15-20161223193117.rootfs.cpio.gz
- mdm9x15-image-initramfs-swi-mdm9x15-20161223193117.rootfs.manifest
- mdm9x15-image-initramfs-swi-mdm9x15-20161223193117.rootfs.tar.bz2
- mdm9x15-image-initramfs-swi-mdm9x15.cpio.gz
- mdm9x15-image-initramfs-swi-mdm9x15.manifest
- mdm9x15-image-initramfs-swi-mdm9x15.tar.bz2
- modules–3.14.29+git0+a00e464379\_b0ce579abb-r0.1-swi-mdm9x15-20161223193117.tgz
- modules-swi-mdm9x15.tgz
- README\_-DONOT\_DELETE\_FILES\_IN\_THIS\_DIRECTORY.txt
- rootfs
- zImage
- zImage–3.14.29+git0+a00e464379\_b0ce579abb-r0.1-qcom-msm9615-20161223193117.dtb
- zImage–3.14.29+git0+a00e464379\_b0ce579abb-r0.1-swi-mdm9x15-20161223193117.bin
- zImage-initramfs-3.14.29+gitAUTOINC+a00e464379\_b0ce579abb-r0.1-swi-mdm9x15-20161223193117.bin
- zImage-initramfs-swi-mdm9x15.bin
- zImage-qcom-msm9615.dtb
- zImage-swi-mdm9x15.bin

I’ve noticed that rootfs is actually the broken link, and there is no any \*.ubi file, so I assumed the rootfs file is mdm9x15-image-dev-swi-mdm9x15.squashfs, its size is 166,6 MB

6 Change size of SYSTEM partition using command  
AT!APPPARTCHG=896,128,20096,384,171048,384,36888,2560,20288,1152 to fit my rootfs.

7 Erase old images flash new ones using fastboot

8 After successful flashing I’ve got this core log:  
Android Bootloader - UART\_DM Initialized!!!  
[10] ERROR: No misc partition found  
[10] ERROR: Invalid boot image pagesize. Device pagesize: 2048, Image pagesize: 4096  
[20] ERROR: Could not do normal boot. Reverting to fastboot mode.  
[60] udc\_start()

What am I doing wrong? Please help.

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [February 6, 2017, 3:26pm UTC](https://mangoh.discourse.group/t/building-custom-yocto-image-on-wp8548/361/2 "2017-02-06T15:26:20Z")

</div>

If you look in `<yocto_folder>/build_bin//tmp/deploy/images/swi-mdm9x15/` you will see that some of the files have `2k` in the filename and others have `4k` in the filename. It seems that you have put the 4k files onto your device, but it wants 2k files.
