---
title: Notes from a user on Mender without Yocto | Mender
description: Arnstein Kleven, one of our Mender users, decided to use Mender for his board without using Yocto, and he was kind enough to share his notes from the exper
---

[Mender Blog ](https://mender.io/blog)

# [Notes from a user on Mender without Yocto | Mender](https://mender.io/blog/notes-from-a-user-on-mender-without-yocto)

 Written by [Admin](https://mender.io/blog/author/admin) | Sep 22, 2017 4:00:00 AM

*Arnstein Kleven, one of our Mender users, decided to use Mender for his board without using Yocto, and he was kind enough to share his notes from the experience! It's great to have an outside perspective on the challenges this presents. I have edited the raw notes slightly for easier reading, but otherwise this is straight from the community!*

*Note that this post assumes that you know the [basics of Mender integration](https://docs.mender.io/1.2/devices), and [this post about porting Mender to a non-Yocto build system](https://mender.io/blog/porting-mender-to-a-non-yocto-build-system) gives some additional background.*

Files and paths that you will need on the device:

- Executables: 
    - `/usr/bin/mender`
    - `/sbin/fw_printenv`
    - `/sbin/fw_setenv`
    - `/usr/share/mender/identity/mender-device-identity`
    - `/usr/share/mender/inventory/mender-inventory-hostinfo`
    - `/usr/share/mender/inventory/mender-inventory-network`
- Systemd file: 
    - `/lib/systemd/system/mender.service`
- Configs: 
    - `/etc/mender/mender.conf`
    - `/etc/mender/tenant.conf`
    - `/etc/mender/server.crt`
    - `/etc/fw_env.config`
    - `/etc/mender/artifact_info`
    - `/var/lib/mender/device_type`

The Mender executable has to be compiled, as described in [the blog post from last year](https://mender.io/blog/porting-mender-to-a-non-yocto-build-system). `fw_printenv` and `fw_setenv` will be created with U-boot, as described later. The 3 last executables can be found in [the support folder in the mender repository](https://github.com/mendersoftware/mender/tree/master/support).

The Mender Systemd file can be found in [in the meta-mender repository](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/recipes-mender/mender/files/mender.service).

The base config files can be found in [this archive file](https://mender.io/blog/notes-from-a-user-on-mender-without-yocto/mender_base_files.tar) (***Editor:** the `tenant.conf` is only needed if you are using the Mender hosted service*). They all have an example in them, but will most likely need to be changed to fit your setup. `tenant.conf` should just be empty for now. The server certificate (`server.crt`) needs to be generated, as described in [the documentation](https://docs.mender.io/1.2/administration/certificates-and-keys#generating-new-keys-and-certificates).

Configuring U-boot for Mender:

Apply the patches found in [the meta-mender patch folder](https://github.com/mendersoftware/meta-mender/tree/master/meta-mender-core/recipes-bsp/u-boot/patches) to your `{uboot_folder}`. Put the `config_mender_defines.h` file in `{uboot_folder}/include`, and change the values in it to reflect your setup (***Editor:** see [this example](https://github.com/mendersoftware/meta-mender/blob/87699e1477c4c463e936f83e890dead37e29bbd0/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc#L51-L78) on how this file is generated*). If there is already a Mender U-boot patch for your board, apply it and you’re done.

If there is not already a Mender U-boot patch for your board, there are a couple things you need to do:

In the .h file for your board, make sure these are included:

```
#define CONFIG_BOOTCOUNT_LIMIT
#define CONFIG_BOOTCOUNT_ENV
#define CONFIG_ENV_IS_IN_MMC 1
```

If you have the environment in flash, `CONFIG_ENV_IS_IN_MMC` needs to be changed to `CONFIG_ENV_IS_IN_FLASH` etc.

You may need to add or remove other defines as well. `config_mender.h` will make sure to tell you what when you try to compile.

A generic boot command for a board is:

```
#undef CONFIG_BOOTCOMMAND
#define CONFIG_BOOTCOMMAND \
    "run mender_setup; " \
    "load ${mender_uboot_root} ${kernel_addr_r} ${mender_boot_root}/boot/Image; " \
    "load ${mender_uboot_root} ${fdt_addr_r} ${mender_boot_root}/boot/your_board.dtb; " \
    "setenv bootargs root=${mender_kernel_root} console=ttyFIQ0,1500000n8; " \
    "booti ${kernel_addr_r} - ${fdt_addr_r} ; " \
    "reset;\0" \
    "run mender_try_to_recover;"
```

Keep in mind that the `booti` command is used here. This is for loading 64-bit kernel images. If your kernel image is a zImage, you need to use `bootz`, and 32-bit kernel images use `bootm`. The console command will most likely need to be changed as well.

To get the `fw_printenv` and `fw_setenv` executables, run

```
make env 
```

in the U-boot folder. This will provide you with `fw_printenv` located in `${uboot_folder}/tools/env/`. Put this file as `fw_printenv` and `fw_setenv` in `/sbin` , and make sure to add `/sbin` to your path by running

```
export PATH=$PATH:/sbin
```

[View full post](https://mender.io/blog/notes-from-a-user-on-mender-without-yocto)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Admin"
  },
  "dateModified" : "2024-03-04T14:59:24.093Z",
  "datePublished" : "2017-09-22T04:00:00Z",
  "headline" : "Notes from a user on Mender without Yocto",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://mender.io/blog/notes-from-a-user-on-mender-without-yocto",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Mender Blog"
  }
}
```