# Create Demo Image for Sama7G54-EK Board

**URL:** <https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [May 5, 2023, 3:08pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818 "2023-05-05T15:08:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 5, 2023, 3:08pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/1 "2023-05-05T15:08:55Z")

</div>

Hello All,

This is my first time setting up Mender, so please be kind as I learn the process… 🙂 thank you!

I’m using Yocto Project (Branch Kirkstone) and Building for Demo documentation ([https://docs.mender.io/operating-system-updates-yocto-project/build-for-demo](https://docs.mender.io/operating-system-updates-yocto-project/build-for-demo)).

My target board is Microchip’s Sama7G54-EK which is running U-Boot and Linux4Sam OS ([https://www.linux4sam.org/bin/view/Linux4SAM/Sama7g5EKMainPage#Build\_Yocto\_Poky\_rootfs\_from\_sou](https://www.linux4sam.org/bin/view/Linux4SAM/Sama7g5EKMainPage#Build_Yocto_Poky_rootfs_from_sou)).

Following all the steps as described in the documentation, I get following error:

> Blockquote  
> $ MACHINE=sama7g5ek-sd bitbake microchip-headless-image  
> Loading cache: 100% | | ETA: --:–:–  
> Loaded 0 entries from dependency cache.  
> Parsing recipes: 100% |################################################################################################################| Time: 0:01:45  
> Parsing of 2726 .bb files complete (0 cached, 2726 parsed). 4230 targets, 423 skipped, 0 masked, 0 errors.  
> NOTE: Resolving any missing task queue dependencies

> Build Configuration:  
> BB\_VERSION = “2.0.0”  
> BUILD\_SYS = “x86\_64-linux”  
> NATIVELSBSTRING = “universal”  
> TARGET\_SYS = “arm-poky-linux-gnueabi”  
> MACHINE = “sama7g5ek-sd”  
> DISTRO = “poky-atmel”  
> DISTRO\_VERSION = “4.0.8”  
> TUNE\_FEATURES = “arm vfp cortexa7 neon vfpv4 callconvention-hard”  
> TARGET\_FPU = “hard”  
> meta  
> meta-poky  
> meta-yocto-bsp = “kirkstone:85661be8ff3623faf05525bc9f27a2457381f8e9”  
> meta-oe  
> meta-networking  
> meta-webserver  
> meta-python  
> meta-initramfs = “kirkstone:9cf4ebeb3de524009a73f49722489dc4aa183adb”  
> meta-atmel = “kirkstone:772408b60c483e6157077699c42f10e1b817029d”  
> meta-multimedia = “kirkstone:9cf4ebeb3de524009a73f49722489dc4aa183adb”  
> meta-arm  
> meta-arm-toolchain = “kirkstone:a0216a41bde3f191037332a9238648bedfbc61bd”  
> meta-aws = “HEAD:3c62e017e5174abd689fc2e6042f053a950a7384”  
> meta-quectel = “master:15998a647c7fe4112cb5e21a2ab6f25ad250c422”  
> meta-mender-core  
> meta-mender-demo = “kirkstone:ab2a9f135979e5d6ec6bd431cbd4d43408112eeb”
> 
> Initialising tasks: 100% |#############################################################################################################| Time: 0:00:09  
> Sstate summary: Wanted 348 Local 318 Mirrors 0 Missed 30 Current 2569 (91% match, 98% complete)  
> Removing 16 stale sstate objects for arch sama7g5ek\_sd: 100% |#########################################################################| Time: 0:00:01  
> Removing 10 stale sstate objects for arch cortexa7hf-neon-vfpv4: 100% |################################################################| Time: 0:00:00  
> NOTE: Executing Tasks  
> WARNING: mender-client-3.5.0-r0 do\_compile: You are building with the mender-demo layer, which is not intended for production use  
> ERROR: microchip-headless-image-1.0-r1 do\_image\_bootimg: ExecutionError(‘/home/nitesh/Projects/yocto/build-sama7-aws-2/tmp/work/sama7g5ek\_sd-poky-linux-gnueabi/microchip-headless-image/1.0-r1/temp/run.do\_image\_bootimg.436412’, 1, None, None)  
> ERROR: Logfile of failure stored in: /home/nitesh/Projects/yocto/build-sama7-aws-2/tmp/work/sama7g5ek\_sd-poky-linux-gnueabi/microchip-headless-image/1.0-r1/temp/log.do\_image\_bootimg.436412  
> Log data follows:  
> | DEBUG: Executing python function extend\_recipe\_sysroot  
> | NOTE: Direct dependencies are [‘/home/nitesh/Projects/yocto/poky/meta/recipes-core/glibc/cross-localedef-native\_2.35.bb:do\_populate\_sysroot’, ‘/home/nitesh/Projects/yocto/poky/meta/recipes-core/glibc/ldconfig-native\_2.12.1.bb:do\_populate\_sysroot’, ‘/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/binutils/binutils-cross\_2.38.bb:do\_populate\_sysroot’, ‘/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/cdrtools/cdrtools-native\_3.01.bb:do\_populate\_sysroot’, ‘/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/qemu/qemuwrapper-cross\_1.0.bb:do\_populate\_sysroot’, ‘/home/nitesh/Projects/yocto/poky/meta/recipes-kernel/kmod/depmodwrapper-cross\_1.0.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-core/update-rc.d/update-rc.d\_0.8.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools\_5.16.2.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/dosfstools/dosfstools\_4.2.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs\_1.46.5.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/makedevs/makedevs\_1.0.1.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/mtools/mtools\_4.0.38.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/opkg-utils/opkg-utils\_0.5.0.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/opkg/opkg\_0.5.0.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/pseudo/pseudo\_git.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools\_git.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-devtools/syslinux/syslinux\_6.04-pre2.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-extended/pbzip2/pbzip2\_1.1.13.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-extended/pigz/pigz\_2.7.bb:do\_populate\_sysroot’, ‘virtual:native:/home/nitesh/Projects/yocto/poky/meta/recipes-support/bmap-tools/bmap-tools\_git.bb:do\_populate\_sysroot’]  
> | NOTE: Installed into sysroot: [‘dosfstools-native’]  
> | NOTE: Skipping as already exists in sysroot: [‘cross-localedef-native’, ‘ldconfig-native’, ‘binutils-cross-arm’, ‘cdrtools-native’, ‘qemuwrapper-cross’, ‘depmodwrapper-cross’, ‘update-rc.d-native’, ‘btrfs-tools-native’, ‘e2fsprogs-native’, ‘makedevs-native’, ‘mtools-native’, ‘opkg-utils-native’, ‘opkg-native’, ‘pseudo-native’, ‘squashfs-tools-native’, ‘syslinux-native’, ‘pbzip2-native’, ‘pigz-native’, ‘bmap-tools-native’, ‘qemu-native’, ‘xz-native’, ‘shadow-native’, ‘systemd-systemctl-native’, ‘bzip2-native’, ‘perl-native’, ‘gdk-pixbuf-native’, ‘kmod-native’, ‘attr-native’, ‘util-linux-native’, ‘gettext-minimal-native’, ‘texinfo-dummy-native’, ‘libtool-native’, ‘shared-mime-info-native’, ‘openssl-native’, ‘debianutils-native’, ‘zlib-native’, ‘nasm-native’, ‘python3-setuptools-native’, ‘lzo-native’, ‘python3-native’, ‘coreutils-native’, ‘python3-six-native’, ‘python3-installer-native’, ‘python3-wheel-native’, ‘libsolv-native’, ‘libarchive-native’, ‘lz4-native’, ‘zstd-native’, ‘flex-native’, ‘gnu-config-native’, ‘nss-native’, ‘glib-2.0-native’, ‘make-native’, ‘gdbm-native’, ‘libjpeg-turbo-native’, ‘gobject-introspection-native’, ‘libpng-native’, ‘util-linux-libuuid-native’, ‘libcap-ng-native’, ‘ncurses-native’, ‘libpcre2-native’, ‘itstool-native’, ‘libxml2-native’, ‘groff-native’, ‘libnsl2-native’, ‘libtirpc-native’, ‘readline-native’, ‘sqlite3-native’, ‘libffi-native’, ‘python3-flit-core-native’, ‘unzip-native’, ‘cmake-native’, ‘expat-native’, ‘m4-native’, ‘nspr-native’, ‘gettext-native’, ‘libpcre-native’, ‘curl-native’]  
> | DEBUG: Python function extend\_recipe\_sysroot finished  
> | DEBUG: Executing python function set\_image\_size  
> | DEBUG: 522188.000000 = 522188 \* 1.000000  
> | DEBUG: 32677888.000000 = max(522188.000000, 32677888)[32677888.000000] + 0  
> | DEBUG: 32677888.000000 = int(32677888.000000)  
> | DEBUG: 32677888 = aligned(32677888)  
> | DEBUG: returning 32677888  
> | DEBUG: Python function set\_image\_size finished  
> | DEBUG: Executing shell function do\_image\_bootimg  
> | 0+0 records in  
> | 0+0 records out  
> | 0 bytes copied, 2.5382e-05 s, 0.0 kB/s  
> | mkfs.fat: Warning: lowercase labels might not work properly on some systems  
> | mkfs.fat 4.2 (2021-01-31)  
> | Disk full  
> | WARNING: exit code 1 from a shell command.  
> ERROR: Task (/home/nitesh/Projects/yocto/poky/…/meta-atmel/recipes-atmel/images/microchip-headless-image.bb:do\_image\_bootimg) failed with exit code ‘1’  
> NOTE: Tasks Summary: Attempted 7328 tasks of which 7261 didn’t need to be rerun and 1 failed.
> 
> Summary: 1 task failed:  
> /home/nitesh/Projects/yocto/poky/…/meta-atmel/recipes-atmel/images/microchip-headless-image.bb:do\_image\_bootimg  
> Summary: There was 1 WARNING message.  
> Summary: There was 1 ERROR message, returning a non-zero exit code.

I got no idea why it says “Disk full” while I have plenty of HDD space left. My goal is to just build a demo image so I can run on the board and demonstrate Mender.

Any help will be highly appreciated.

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 5, 2023, 9:35pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/2 "2023-05-05T21:35:29Z")

</div>

Hi @ndivecha,

Thanks for reaching out! The error message is not about the storage on your harddisk, but the resulting image. If I understand correctly, then the boot partition default is too small. You can increase it by adding this to a config file (like `local.conf`, or your distro/machine configuration):

```auto
MENDER_BOOT_PART_SIZE_MB = "64"

```

It is documented [here](https://docs.mender.io/operating-system-updates-yocto-project/variables#mender_boot_part_size_mb).

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 6, 2023, 1:11am UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/3 "2023-05-06T01:11:23Z")

</div>

Hello @TheYoctoJester ,

Thanks for your reply… Much appreciated.

So adding this line did the trick and I was able to generate \*.sdimg:

```auto
MENDER_BOOT_PART_SIZE_MB = "64"

```

Here is my local.conf:

> #Example: Memory card storage  
> MENDER\_STORAGE\_DEVICE = “/dev/mmcblk0”  
> #Example: Memory card with 2GiB of storage.  
> #MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “29476”  
> #MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “14738”  
> MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “2048”
> 
> #MENDER\_UBOOT\_STORAGE\_INTERFACE = “mmc”  
> #MENDER\_UBOOT\_STORAGE\_DEVICE = “0”
> 
> #From @TheYoctoJester Mender
> 
> MENDER\_BOOT\_PART\_SIZE\_MB = “64”
> 
> MENDER\_BOOT\_PART = “${MENDER\_STORAGE\_DEVICE\_BASE}1”  
> MENDER\_DATA\_PART = “${MENDER\_STORAGE\_DEVICE\_BASE}4”  
> MENDER\_ROOTFS\_PART\_A = “${MENDER\_STORAGE\_DEVICE\_BASE}2”  
> MENDER\_ROOTFS\_PART\_B = “${MENDER\_STORAGE\_DEVICE\_BASE}3”

Flash the SD card and booted up but got into loop with AT91Bootstrap and U-boot.

> RomBOOT  
> MCK: mck domains initialization complete.  
> TZC400: Initialization complete.  
> PUBL: Training complete.  
> UMCTL2: Initialization complete.  
> Backup mode enabled
> 
> AT91Bootstrap 4.0.5 (2022-11-09 13:05:42)
> 
> SD/MMC: Image: Read file u-boot.bin to 0x66f00000  
> MMC: ADMA supported  
> SD: Card Capacity: High or Extended  
> SD: Specification Version 3.0X  
> SD/MMC: Done to load image
> 
> U-Boot 2022.01-linux4sam-2022.10 (Nov 09 2022 - 13:45:10 +0000)
> 
> CPU: SAMA7G5  
> Crystal frequency: 24 MHz  
> CPU clock : 800 MHz  
> Master clock : 200 MHz
> 
> Model: Microchip SAMA7G5-EK  
> DRAM: 512 MiB  
> MMC: mmc@e1204000: 0, mmc@e1208000: 1  
> Loading Environment from MMC… OK  
> In: serial@200  
> Out: serial@200  
> Err: serial@200  
> Net: eth0: ethernet@e2800000, eth1: ethernet@e2804000  
> Hit any key to stop autoboot: 0  
> load - load binary file from a filesystem
> 
> Usage:  
> load [\<dev[:part]\> [[ [bytes [pos]]]]]  
> - Load binary file ‘filename’ from partition ‘part’ on device  
> type ‘interface’ instance ‘dev’ to address ‘addr’ in memory.  
> ‘bytes’ gives the size to load in bytes.  
> If ‘bytes’ is 0 or omitted, the file is read until the end.  
> ‘pos’ gives the file byte position to start reading from.  
> If ‘pos’ is 0 or omitted, the file is read from the start.  
> data abort  
> pc : [\<7ff73854\>] lr : [\<7ff79480\>]  
> reloc pc : [\<66f01854\>] lr : [\<66f07480\>]  
> sp : 7fb49260 ip : 7fffffff fp : 7ff8b954  
> r10: 7fb71f50 r9 : 7fb51eb0 r8 : 7fb71f54  
> r7 : 7ffe7284 r6 : 00000000 r5 : 7ffe9278 r4 : 00000001  
> r3 : 0000002d r2 : 7fb4927c r1 : 7fb49278 r0 : 00000000  
> Flags: nZCv IRQs off FIQs off Mode SVC\_32  
> Code: e5903094 e59000a0 e12fff13 e92d4010 (e5d0c025)  
> Resetting CPU …

I think my U-Boot environment is messed up… Or it can not find ${MENDER\_STORAGE\_DEVICE\_BASE} which is causing the issue.

> =\> printenv  
> altbootcmd=run mender\_altbootcmd; run bootcmd  
> arch=arm  
> baudrate=115200  
> board=sama7g5ek  
> board\_name=sama7g5ek  
> bootargs=console=ttyS0,115200 rw rootwait  
> bootcmd=run mender\_setup; setenv bootargs root=${mender\_kernel\_root} ${bootargs}; if test “${fdt\_addr\_r}” != “”; then load ${mender\_uboot\_root} ${fdt\_addr\_r} /boot/${mender\_dtb\_name}; fi; load ${mender\_uboot\_root} ${kernel\_addr\_r} /boot/${mender\_kernel\_name}; ${mender\_boot\_kernel\_type} ${kernel\_addr\_r} - ${fdt\_addr\_r}; run mender\_try\_to\_recover  
> bootcount=1  
> bootdelay=2  
> bootlimit=1  
> cpu=armv7  
> eth1addr=04:91:62:f2:a4:c9  
> ethaddr=04:91:62:f2:ae:88  
> fdtcontroladdr=7fb494f0  
> loadaddr=0x62000000  
> mender\_altbootcmd=if test ${mender\_boot\_part} = 2; then setenv mender\_boot\_part 3; setenv mender\_boot\_part\_hex 3; else setenv mender\_boot\_part 2; sete  
> nv mender\_boot\_part\_hex 2; fi; setenv upgrade\_available 0; saveenv; run mender\_setup  
> mender\_boot\_kernel\_type=bootz  
> mender\_boot\_part=2  
> mender\_boot\_part\_hex=2  
> mender\_check\_saveenv\_canary=1  
> mender\_dtb\_name=at91-sama7g5ek.dtb  
> mender\_kernel\_name=zImage  
> mender\_saveenv\_canary=1  
> mender\_setup=if test “${mender\_saveenv\_canary}” != “1”; then setenv mender\_saveenv\_canary 1; saveenv; fi; if test “${mender\_pre\_setup\_commands}” != “”  
> ; then run mender\_pre\_setup\_commands; fi; if test “${mender\_systemd\_machine\_id}” != “”; then setenv bootargs “systemd.machine\_id=${mender\_systemd\_mach  
> ine\_id} ${bootargs}”; fi; setenv mender\_kernel\_root /dev/mmcblk0p${mender\_boot\_part}; if test ${mender\_boot\_part} = 2; then setenv mender\_boot\_part\_na  
> me /dev/mmcblk0p2; else setenv mender\_boot\_part\_name /dev/mmcblk0p3; fi; setenv mender\_kernel\_root\_name ${mender\_boot\_part\_name}; setenv mender\_uboot\_  
> root mmc 0:${mender\_boot\_part\_hex}; setenv mender\_uboot\_root\_name ${mender\_boot\_part\_name}; setenv expand\_bootargs “setenv bootargs \”${bootargs}\“”  
> ; run expand\_bootargs; setenv expand\_bootargs; if test “${mender\_post\_setup\_commands}” != “”; then run mender\_post\_setup\_commands; fi  
> mender\_try\_to\_recover=if test ${upgrade\_available} = 1; then reset; fi  
> mender\_uboot\_boot=mmc 0:1  
> mender\_uboot\_dev=0  
> mender\_uboot\_if=mmc  
> soc=at91  
> stderr=serial@200  
> stdin=serial@200  
> stdout=serial@200=  
> upgrade\_available=0  
> vendor=atmel
> 
> Environment size: 2178/131067 bytes

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 6, 2023, 2:34am UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/4 "2023-05-06T02:34:13Z")

</div>

Looking at the partitions, files are there but load is failing:

```auto
load ${mender_uboot_root} ${kernel_addr_r} /boot/${mender_kernel_name};

```

boot partition:

```auto
=> fatls mmc 0:1
    27365 BOOT.BIN
  4767128 sama7g5ek.itb
   571252 u-boot.bin
    16384 uboot.env

4 file(s), 0 dir(s)

```

root fs:

```auto
=> ext4ls mmc 0:2
<DIR> 1024 .
<DIR> 1024 ..
<DIR> 12288 lost+found
<DIR> 3072 bin
<DIR> 1024 boot
<DIR> 1024 dev
<DIR> 1024 etc
<DIR> 1024 home
<DIR> 1024 lib
<DIR> 1024 media
<DIR> 1024 mnt
<DIR> 1024 proc
<DIR> 1024 run
<DIR> 3072 sbin
<DIR> 1024 srv
<DIR> 1024 sys
<DIR> 1024 tmp
<DIR> 1024 usr
<DIR> 1024 var
=> ext4ls mmc 0:2 boot
<DIR> 1024 .
<DIR> 1024 ..
         4767128 sama7g5ek.itb
            3664 sama7g5ek.its
            1323 sama7g5ek_i2s0_pcm5102a.dtbo
            1398 sama7g5ek_i2s0_proto.dtbo
            4251 sama7g5ek_isc_imx219.dtbo
            2718 sama7g5ek_isc_imx274.dtbo
            1415 sama7g5ek_pdmc0.dtbo
            1808 sama7g5ek_wilc3000.dtbo
<SYM> 41 zImage
         4706176 zImage-6.1.22-linux4microchip-2023.04-rc2
=>

```

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 7, 2023, 3:39pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/5 "2023-05-07T15:39:06Z")

</div>

Looking at the environment variables by running `run mender_setup` and partitions `fatls mmc 0:1` and `ext4ls mmc 0:2`, things do not line up.

- Something really strange about the DTB file… Filename `at91-sama7g5ek.dtb` shows on my host machine that it does exists under `/boot/` but when I plug the SD Card on target board and do `ext4ls mmc 0:2 boot` it does not show, as shown in earlier post.

- Variable ${kernel\_addr\_r} and ${fdt\_addr\_r} does not exists. Do I have to create these two variables manually and define the address? When I boot without Mender layer, I see Linux4SAM Linux kernel is load address 0x62000000 and SAMA7G5-EK Flattened Device Tree blob Load Address: 0x61000000

Right now my head is just spinning, trying to figure out how can I make Mender demo work on this board. I dont know what I am missing to make this work!

```auto
=> run mender_setup
=> printenv
altbootcmd=run mender_altbootcmd; run bootcmd
arch=arm
baudrate=115200
board=sama7g5ek
board_name=sama7g5ek
bootargs=console=ttyS0,115200 rw rootwait
bootcmd=run mender_setup; setenv bootargs root=${mender_kernel_root} ${bootargs}; if test "${fdt_addr_r}" != ""; then load ${mender_uboot_root} ${fdt_addr_r} /boot/${mender_dtb_name}; fi; load ${mender_uboot_root} ${kernel_addr_r} /boot/${mender_kernel_name}; ${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; run mender_try_to_recover
bootcount=1
bootdelay=2
bootlimit=1
cpu=armv7
eth1addr=04:91:62:f2:a4:c9
ethaddr=04:91:62:f2:ae:88
fdtcontroladdr=7fb494f0
loadaddr=0x62000000
mender_altbootcmd=if test ${mender_boot_part} = 2; then setenv mender_boot_part 3; setenv mender_boot_part_hex 3; else setenv mender_boot_part 2; setenv mender_boot_part_hex 2; fi; setenv upgrade_available 0; saveenv; run mender_setup
mender_boot_kernel_type=bootz
mender_boot_part=2
mender_boot_part_hex=2
mender_boot_part_name=/dev/mmcblk0p2
mender_check_saveenv_canary=1
mender_dtb_name=at91-sama7g5ek.dtb
mender_kernel_name=zImage
mender_kernel_root=/dev/mmcblk0p2
mender_kernel_root_name=/dev/mmcblk0p2
mender_saveenv_canary=1
mender_setup=if test "${mender_saveenv_canary}" != "1"; then setenv mender_saveenv_canary 1; saveenv; fi; if test "${mender_pre_setup_commands}" != ""; then run mender_pre_setup_commands; fi; if test "${mender_systemd_machine_id}" != ""; then setenv bootargs "systemd.machine_id=${mender_systemd_machine_id} ${bootargs}"; fi; setenv mender_kernel_root /dev/mmcblk0p${mender_boot_part}; if test ${mender_boot_part} = 2; then setenv mender_boot_part_name /dev/mmcblk0p2; else setenv mender_boot_part_name /dev/mmcblk0p3; fi; setenv mender_kernel_root_name ${mender_boot_part_name}; setenv mender_uboot_root mmc 0:${mender_boot_part_hex}; setenv mender_uboot_root_name ${mender_boot_part_name}; setenv expand_bootargs "setenv bootargs \\"${bootargs}\\""
; run expand_bootargs; setenv expand_bootargs; if test "${mender_post_setup_commands}" != ""; then run mender_post_setup_commands; fi mender_try_to_recover=if test ${upgrade_available} = 1; then reset; fi
mender_uboot_boot=mmc 0:1
mender_uboot_dev=0
mender_uboot_if=mmc
mender_uboot_root=mmc 0:2
mender_uboot_root_name=/dev/mmcblk0p2
soc=at91
stderr=serial@200
stdin=serial@200
stdout=serial@200
upgrade_available=0
vendor=atmel

```

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 8, 2023, 6:39am UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/6 "2023-05-08T06:39:31Z")

</div>

Hi @ndivecha,

Sorry to hear you’re having problems getting started. Can you please share your configuration so far, e.g. Mender-related settings that you added to `local.conf`, probably? Just judging from the `meta-mender-atmel` layer in [meta-mender-community](https://github.com/mendersoftware/meta-mender-community/blob/kirkstone/meta-mender-atmel), the usual way to work with the SAM boards seems to be manually setting `u-boot` up.

On a side note, does the board boot from SD card, eMMC, or something UBI?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 8, 2023, 11:56am UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/7 "2023-05-08T11:56:22Z")

</div>

Hello @TheYoctoJester

Much appreciate for your feedback.

Here is my `local.conf`:

```auto
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

ARTIFACTIMG_FSTYPE = "ext4"
MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
MENDER_STORAGE_TOTAL_SIZE_MB = "2048"
MENDER_UBOOT_STORAGE_INTERFACE = "mmc"
MENDER_UBOOT_STORAGE_DEVICE = "0"

# from @TheYoctoJester Mender
MENDER_BOOT_PART_SIZE_MB = "64"

MENDER_STORAGE_DEVICE_BASE = "${MENDER_STORAGE_DEVICE}"
MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}1"
MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}2"
MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}3"
MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}4"

MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = " kernel-image kernel-devicetree"

MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<TOKEN>"

```

Also I did add following lines to my `../meta-atmel/recipes-bsp/u-boot/u-boot-at91_2022.10.bb ` file since I m forking U-Boot as per the doc:

```auto
$ bitbake -e core-image-minimal | egrep '^PREFERRED_PROVIDER_(virtual/bootloader|u-boot)='
PREFERRED_PROVIDER_u-boot="u-boot-at91"
PREFERRED_PROVIDER_virtual/bootloader="u-boot-at91"

```

```auto
require /home/nitesh/Projects/yocto/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender.inc
# Mender
PROVIDES += "u-boot"
RPROVIDES_${PN} += "u-boot"
BOOTENV_SIZE = "0x20000"

```

And I got following layers on:

```auto
$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer path priority
==========================================================================
meta /home/nitesh/Projects/yocto/poky/meta 5
meta-poky /home/nitesh/Projects/yocto/poky/meta-poky 5
meta-yocto-bsp /home/nitesh/Projects/yocto/poky/meta-yocto-bsp 5
meta-oe /home/nitesh/Projects/yocto/poky/../meta-openembedded/meta-oe 5
meta-networking /home/nitesh/Projects/yocto/poky/../meta-openembedded/meta-networking 5
meta-webserver /home/nitesh/Projects/yocto/poky/../meta-openembedded/meta-webserver 5
meta-python /home/nitesh/Projects/yocto/poky/../meta-openembedded/meta-python 5
meta-initramfs /home/nitesh/Projects/yocto/poky/../meta-openembedded/meta-initramfs 5
meta-atmel /home/nitesh/Projects/yocto/poky/../meta-atmel 10
meta-multimedia /home/nitesh/Projects/yocto/poky/../meta-openembedded/meta-multimedia 5
meta-arm /home/nitesh/Projects/yocto/poky/../meta-arm/meta-arm 5
meta-arm-toolchain /home/nitesh/Projects/yocto/poky/../meta-arm/meta-arm-toolchain 5
meta-aws /home/nitesh/Projects/yocto/meta-aws 6
meta-quectel /home/nitesh/Projects/yocto/meta-quectel 6
meta-mender-core /home/nitesh/Projects/yocto/meta-mender/meta-mender-core 6
meta-mender-demo /home/nitesh/Projects/yocto/meta-mender/meta-mender-demo 10

```

Sama7G54-EK got both options for SD Card and eMMC.

I hope this info helps to find me a solution so I can boot up with Mender :-).

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 12:30pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/8 "2023-05-10T12:30:41Z")

</div>

Hello @TheYoctoJester

Hope all is well… Just checking if you had any insights on how to fix this?

I did look into [meta-mender-community](https://github.com/mendersoftware/meta-mender-community/blob/kirkstone/meta-mender-atmel) and it is for Sama5’s… I wonder if it will work for Sama7G54-EK… Might give it a try!

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 10, 2023, 1:42pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/9 "2023-05-10T13:42:57Z")

</div>

Hello @ndivecha,

Sorry for the belated response. What we noticed, you’re manually setting

```auto
MENDER_STORAGE_DEVICE_BASE
MENDER_BOOT_PART
MENDER_ROOTFS_PART_A
MENDER_ROOTFS_PART_B
MENDER_DATA_PART

```

Unless you have a specific need to modify those, it is advisable to stick with the defaults. In your case it actually breaks, because you miss the `p` between `MENDER_STORAGE_DEVICE_BASE` and the digit. A common block node on mmc is for example `/dev/mmcblk0p1`.

Try to remove those assignments for a start.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 1:56pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/10 "2023-05-10T13:56:56Z")

</div>

Ah! 💡 make sense… Much appreciated for pointing out.

Nah, I don’t have any preference. I was just following the docs but I will go ahead and comment those lines out and re-bitbake the image.

Keep you posted.

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 2:32pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/11 "2023-05-10T14:32:18Z")

</div>

Hello @TheYoctoJester

So it worked out great and now I see correct partitions with “p” but ran into dtb file issue. And I know this from before also and it is a strange one.

On my host (dev) machine when I plug the SD card I can see that dtb file exists in `/boot/at91-sama7g5ek.dtb`:

```auto
$ ls -l /media/nitesh/4377c493-5112-4a22-888b-da731bac4c7b/boot/
total 9100
-rw-r--r-- 1 root root 43360 Mar 9 2018 at91-sama7g5ek.dtb
-rwxr-xr-x 1 root root 1323 Mar 9 2018 sama7g5ek_i2s0_pcm5102a.dtbo
-rwxr-xr-x 1 root root 1398 Mar 9 2018 sama7g5ek_i2s0_proto.dtbo
-rwxr-xr-x 1 root root 4251 Mar 9 2018 sama7g5ek_isc_imx219.dtbo
-rwxr-xr-x 1 root root 2718 Mar 9 2018 sama7g5ek_isc_imx274.dtbo
-rwxr-xr-x 1 root root 4648288 Mar 9 2018 sama7g5ek.itb
-rwxr-xr-x 1 root root 3664 Mar 9 2018 sama7g5ek.its
-rwxr-xr-x 1 root root 1415 Mar 9 2018 sama7g5ek_pdmc0.dtbo
-rwxr-xr-x 1 root root 1808 Mar 9 2018 sama7g5ek_wilc3000.dtbo
lrwxrwxrwx 1 root root 38 Mar 9 2018 zImage -> zImage-5.15.68-linux4microchip-2022.10
-rw-r--r-- 1 root root 4588032 Mar 9 2018 zImage-5.15.68-linux4microchip-2022.10

```

But when I plug the SD Card on Sama7 board, it fails to find `/boot/at91-sama7g5ek.dtb`:

```auto
Model: Microchip SAMA7G5-EK
DRAM: 512 MiB
MMC: mmc@e1204000: 0, mmc@e1208000: 1
Loading Environment from MMC... OK
In: serial@200
Out: serial@200
Err: serial@200
Net: eth0: ethernet@e2800000, eth1: ethernet@e2804000
Hit any key to stop autoboot: 0 
Failed to load '/boot/at91-sama7g5ek.dtb'
4706176 bytes read in 295 ms (15.2 MiB/s)
Kernel image @ 0x62000000 [0x000000 - 0x47cf80]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree

```

and when I try to list mmc:

```auto
=> ext4ls mmc 0:2
<DIR> 1024 .
<DIR> 1024 ..
<DIR> 12288 lost+found
<DIR> 3072 bin
<DIR> 1024 boot
<DIR> 1024 dev
<DIR> 1024 etc
<DIR> 1024 home
<DIR> 1024 lib
<DIR> 1024 media
<DIR> 1024 mnt
<DIR> 1024 proc
<DIR> 1024 run
<DIR> 3072 sbin
<DIR> 1024 srv
<DIR> 1024 sys
<DIR> 1024 tmp
<DIR> 1024 usr
<DIR> 1024 var
=> ext4ls mmc 0:2 boot
<DIR> 1024 .
<DIR> 1024 ..
         4767128 sama7g5ek.itb
            3664 sama7g5ek.its
            1323 sama7g5ek_i2s0_pcm5102a.dtbo
            1398 sama7g5ek_i2s0_proto.dtbo
            4251 sama7g5ek_isc_imx219.dtbo
            2718 sama7g5ek_isc_imx274.dtbo
            1415 sama7g5ek_pdmc0.dtbo
            1808 sama7g5ek_wilc3000.dtbo
<SYM> 41 zImage
         4706176 zImage-6.1.22-linux4microchip-2023.04-rc2
=> 

```

Not found… Everything else is there except `/boot/at91-sama7g5ek.dtb`.

Thoughts?

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 5:03pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/12 "2023-05-10T17:03:54Z")

</div>

Btw, here is update `printenv`

```auto
=> printenv 
altbootcmd=run mender_altbootcmd; run bootcmd
arch=arm
baudrate=115200
board=sama7g5ek
board_name=sama7g5ek
bootargs=root=/dev/mmcblk0p2 root=/dev/mmcblk0p2 console=ttyS0,115200 rw rootwait
bootcmd=run mender_setup; setenv bootargs root=${mender_kernel_root} ${bootargs}; if test "${fdt_addr_r}" != ""; then load ${mender_uboot_root} ${fdt_addr_r} /boot/${mender_dtb_name}; fi; load ${mender_uboot_root} ${kernel_addr_r} /boot/${mender_kernel_name}; ${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; run mender_try_to_recover
bootcount=1
bootdelay=2
bootlimit=1
cpu=armv7
eth1addr=04:91:62:f2:a4:c9
ethaddr=04:91:62:f2:ae:88
fdt_addr_r=0x61000000
fdtcontroladdr=7fb494f0
fileaddr=62000000
filesize=47cf80
kernel_addr_r=0x62000000
loadaddr=0x62000000
mender_altbootcmd=if test ${mender_boot_part} = 2; then setenv mender_boot_part 3; setenv mender_boot_part_hex 3; else setenv mender_boot_part 2; sete
nv mender_boot_part_hex 2; fi; setenv upgrade_available 0; saveenv; run mender_setup
mender_boot_kernel_type=bootz
mender_boot_part=2
mender_boot_part_hex=2
mender_boot_part_name=/dev/mmcblk0p2
mender_check_saveenv_canary=1
mender_dtb_name=at91-sama7g5ek.dtb
mender_kernel_name=zImage
mender_kernel_root=/dev/mmcblk0p2
mender_kernel_root_name=/dev/mmcblk0p2
mender_saveenv_canary=1
mender_setup=if test "${mender_saveenv_canary}" != "1"; then setenv mender_saveenv_canary 1; saveenv; fi; if test "${mender_pre_setup_commands}" != ""
; then run mender_pre_setup_commands; fi; if test "${mender_systemd_machine_id}" != ""; then setenv bootargs "systemd.machine_id=${mender_systemd_machine_id} ${bootargs}"; fi; setenv mender_kernel_root /dev/mmcblk0p${mender_boot_part}; if test ${mender_boot_part} = 2; then setenv mender_boot_part_name /dev/mmcblk0p2; else setenv mender_boot_part_name /dev/mmcblk0p3; fi; setenv mender_kernel_root_name ${mender_boot_part_name}; setenv mender_uboot_root mmc 0:${mender_boot_part_hex}; setenv mender_uboot_root_name ${mender_boot_part_name}; setenv expand_bootargs "setenv bootargs \\"${bootargs}\\""; run expand_bootargs; setenv expand_bootargs; if test "${mender_post_setup_commands}" != ""; then run mender_post_setup_commands; fi
mender_try_to_recover=if test ${upgrade_available} = 1; then reset; fi
mender_uboot_boot=mmc 0:1
mender_uboot_dev=0
mender_uboot_if=mmc
mender_uboot_root=mmc 0:2
mender_uboot_root_name=/dev/mmcblk0p2
soc=at91
stderr=serial@200
stdin=serial@200
stdout=serial@200
upgrade_available=0
vendor=atmel

Environment size: 2473/131067 bytes

```

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 10, 2023, 8:04pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/13 "2023-05-10T20:04:29Z")

</div>

Hi @ndivecha,

As there is an `.itb` (e.g. a fitImage), you actually shouldn’t need a separate device tree file. Can you try setting

```auto
MENDER_KERNEL_IMAGETYPE = "fitImage"

```

and check if it already does the trick?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 8:24pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/14 "2023-05-10T20:24:26Z")

</div>

Hey @TheYoctoJester,

Roger… adding and re-compiling.

Just on side notes… Any thoughts why `/boot/at91-sama7g5ek.dtb` won’t show on Sama7 board but when SD Card plugged into host (dev) machine it shows?

This is good learning experience… Much appreciate for been patiences with me.

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 8:27pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/15 "2023-05-10T20:27:17Z")

</div>

> [@TheYoctoJester](#):
>
> `MENDER_KERNEL_IMAGETYPE`

Got following warning message:

```auto
WARNING: "MENDER_KERNEL_IMAGETYPE" is not a recognized MENDER_ variable. Typo?

```

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 8:29pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/16 "2023-05-10T20:29:33Z")

</div>

Or should it be this (mender\_kernel\_imagetype\_force): [Variables | Mender documentation](https://docs.mender.io/operating-system-updates-yocto-project/variables#mender_kernel_imagetype_force)

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 10, 2023, 10:30pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/17 "2023-05-10T22:30:35Z")

</div>

No change… same issue:

```auto
AT91Bootstrap 4.0.5 (2022-11-09 13:05:42)

SD/MMC: Image: Read file u-boot.bin to 0x66f00000
MMC: ADMA supported
SD: Card Capacity: High or Extended
SD: Specification Version 3.0X
SD/MMC: Done to load image

U-Boot 2022.01-linux4sam-2022.10 (Nov 09 2022 - 13:45:10 +0000)

CPU: SAMA7G5
Crystal frequency: 24 MHz
CPU clock : 800 MHz
Master clock : 200 MHz

Model: Microchip SAMA7G5-EK
DRAM: 512 MiB
MMC: mmc@e1204000: 0, mmc@e1208000: 1
Loading Environment from MMC... OK
In: serial@200
Out: serial@200
Err: serial@200
Net: eth0: ethernet@e2800000, eth1: ethernet@e2804000
Hit any key to stop autoboot: 0 
Failed to load '/boot/at91-sama7g5ek.dtb'
4706176 bytes read in 295 ms (15.2 MiB/s)
Kernel image @ 0x62000000 [0x000000 - 0x47cf80]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
=> ext4ls mmc 0:2 boot
<DIR> 1024 .
<DIR> 1024 ..
         4767128 sama7g5ek.itb
            3664 sama7g5ek.its
            1323 sama7g5ek_i2s0_pcm5102a.dtbo
            1398 sama7g5ek_i2s0_proto.dtbo
            4251 sama7g5ek_isc_imx219.dtbo
            2718 sama7g5ek_isc_imx274.dtbo
            1415 sama7g5ek_pdmc0.dtbo
            1808 sama7g5ek_wilc3000.dtbo
<SYM> 41 zImage
         4706176 zImage-6.1.22-linux4microchip-2023.04-rc2
=> 

```

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 12, 2023, 12:25pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/18 "2023-05-12T12:25:46Z")

</div>

HI @ndivecha,

I’m currently setting up a somewhat similar build to look at it, but my current guess is that the best way is changing `KERNEL_IMAGETYPE` and `IMAGE_INSTALL` such that both kernel and dtb end up in the partition. Technically, the `fitImage` bundles those, but as the Mender boot script expects both to be present, it falls over. Theoretically you could change the boot script to something more suitable, but I think changing the kernel image type is easier.

Just so I can verify my assumptions, can you drop `bitbake -e` of your images somewhere? In case you fear this leaking sensible information, you can either mail it to me directly (josef.holzmayr@northern.tech), or filter it depending on your needs.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![ndivecha](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ndivecha/32/1908_2.png) [@ndivecha](https://hub.mender.io/u/ndivecha)\
**Post date:** [May 14, 2023, 2:36pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/19 "2023-05-14T14:36:01Z")

</div>

Happy Sunday Josef,

Thanks for your time and support.

Sent you email with `bitbake -e` info. Let me know your thoughts!.

Where are these two variables? `IMAGE_INSTALL` and `KERNEL_IMAGETYPE`, I did not find anywhere in docs or .inc file.

Hoping we can get this demo image boot-up this week… I gotta demo this week 😬

Cheers,  
Nitesh

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 14, 2023, 7:45pm UTC](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818/20 "2023-05-14T19:45:24Z")

</div>

Hi @ndivecha,

Got the `bitbake -e` dump, thanks. Looking a bit at it, it seems that especially `microchip-headless-image` is just huge. I usually do my tests on `core-image-minimal` to cut down build time. Once this boots, the rest is quite easy. By now I’ve a kind-of replica of the build, and both kernel and device tree get installed to `/boot`:

```auto
jd@j-kaitain:~/builds/sam/build$ ls -alh t/boot/
total 9.3M
drwxr-xr-x 2 root root 4.0K Mar 9 2018 .
drwxr-xr-x 21 root root 4.0K May 12 16:12 ..
-rw-r--r-- 1 root root 44K Mar 9 2018 at91-sama7g5ek.dtb
-rwxr-xr-x 1 root root 4.6M Mar 9 2018 sama7g5ek.itb
-rwxr-xr-x 1 root root 3.6K Mar 9 2018 sama7g5ek.its
-rwxr-xr-x 1 root root 1.3K Mar 9 2018 sama7g5ek_i2s0_pcm5102a.dtbo
-rwxr-xr-x 1 root root 1.4K Mar 9 2018 sama7g5ek_i2s0_proto.dtbo
-rwxr-xr-x 1 root root 4.2K Mar 9 2018 sama7g5ek_isc_imx219.dtbo
-rwxr-xr-x 1 root root 2.7K Mar 9 2018 sama7g5ek_isc_imx274.dtbo
-rwxr-xr-x 1 root root 1.4K Mar 9 2018 sama7g5ek_pdmc0.dtbo
-rwxr-xr-x 1 root root 1.8K Mar 9 2018 sama7g5ek_wilc3000.dtbo
lrwxrwxrwx 1 root root 41 Mar 9 2018 zImage -> zImage-6.1.22-linux4microchip-2023.04-rc4
-rw-r--r-- 1 root root 4.6M Mar 9 2018 zImage-6.1.22-linux4microchip-2023.04-rc4

```

I’ll send you the image by mail so you can give it a try.

For `IMAGE_INSTALL` and `KERNEL_IMAGETYPE`, those are generic Yocto variables, they apply to any build, not just Mender. Thats why we do not replicate their documentation - you can find the Yocto docs for them [here](https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_INSTALL) and [here](https://docs.yoctoproject.org/ref-manual/variables.html#term-KERNEL_IMAGETYPE).

Greetz,  
Josef

[Next page](https://hub.mender.io/t/create-demo-image-for-sama7g54-ek-board/5818.md?page=2)
