# Does meta-mender have a problem with devtool modify?

**URL:** <https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568>\
**Category:** General Discussions\
**Created:** [May 15, 2019, 10:05pm UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568 "2019-05-15T22:05:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![amh](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@amh](https://hub.mender.io/u/amh)\
**Post date:** [May 15, 2019, 10:05pm UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/1 "2019-05-15T22:05:21Z")

</div>

I’m trying to modify the u-boot-mdm recipe using _devtool modify u-boot-edm_. It doesn’t appear to matter where I put the unpacked files (my own directory or one in the ‘workspace’ layer), there are immediate problems: I either get messages like ‘error BLAH is required for Mender to work’, or problems with ‘do\_mender\_tar\_src’.

Since Mender seems to be a common factor, I am wondering if meta-mender is not suited to use with _devtool_

---

<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:** [May 16, 2019, 7:49am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/2 "2019-05-16T07:49:44Z")

</div>

I personally do not use `devtool` and we do not have any tests to ensure it works either, meaning that their could be issues with it in combination with meta-mender.

But I would expect the problems to be isolated to the “u-boot” recipes, as this is where we have a lot of [specialized logic](https://github.com/mendersoftware/meta-mender/tree/master/meta-mender-core/recipes-bsp/u-boot) and this is also where the `do_mender_tar_src` task is defined which you see in your error logs.

If you are able to find out what is causing the problems, please feel free to submit a PR.

---

<div class="post-metadata">

**Author:** ![amh](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@amh](https://hub.mender.io/u/amh)\
**Post date:** [May 17, 2019, 7:54am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/3 "2019-05-17T07:54:20Z")

</div>

Yes, I’ve since found that the problem does seem to be restricted to u-boot.

My yocto debugging skills are limited at this point, but I’ll let you know if I find a fix.

Thanks for your prompt response.

---

<div class="post-metadata">

**Author:** ![brianPTL](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@brianPTL](https://hub.mender.io/u/brianPTL)\
**Post date:** [June 7, 2019, 9:15am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/4 "2019-06-07T09:15:41Z")

</div>

Hi,

Did you ever find the solution to this?

I am doing the following:

```auto
devtool modify u-boot-imx
devtool build u-boot-imx

```

and I get the error:

```auto
03-r0/temp/log.do_mender_tar_src.22367
DEBUG: Executing shell function do_mender_tar_src
tar: git: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
WARNING: exit code 2 from a shell command.
ERROR: Function failed: do_mender_tar_src (log file is located at /home/brian/imx-yocto-bsp/build_evk/tmp/work/imx6ull_theopolis-poky-linux-gnueabi/u-boot-imx/2017.03-r0/temp/log.do_mender_tar_src.22367)

```

Is there a recommended way of building u-boot after mender integration? If I try to extract the source and build I get the following errors:

```auto
make
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK include/config.h
  CFG u-boot.cfg
In file included from include/config.h:10:0,
                 from ./include/common.h:21:
include/config_mender.h:32:3: error: #error CONFIG_BOOTCOUNT_LIMIT is required for Mender to work
 # error CONFIG_BOOTCOUNT_LIMIT is required for Mender to work
   ^ ~~~~
include/config_mender.h:37:3: error: #error CONFIG_BOOTCOUNT_ENV is required for Mender to work
 # error CONFIG_BOOTCOUNT_ENV is required for Mender to work
   ^ ~~~~
include/config_mender.h:41:3: error: #error CONFIG_SYS_MMC_ENV_DEV should not be defined explicitly (will be auto-configured).
 # error CONFIG_SYS_MMC_ENV_DEV should not be defined explicitly (will be auto-configured).
   ^ ~~~~
include/config_mender.h:44:3: error: #error CONFIG_SYS_MMC_ENV_PART should not be defined explicitly (will be auto-configured).
 # error CONFIG_SYS_MMC_ENV_PART should not be defined explicitly (will be auto-configured).
   ^ ~~~~
include/config_mender.h:47:3: error: #error CONFIG_ENV_OFFSET should not be defined explicitly (will be auto-configured).
 # error CONFIG_ENV_OFFSET should not be defined explicitly (will be auto-configured).
   ^ ~~~~
include/config_mender.h:54:3: error: #error 'CONFIG_ENV_SIZE' define must be equal to bitbake variable 'BOOTENV_SIZE' set in U-Boot build recipe.
 # error 'CONFIG_ENV_SIZE' define must be equal to bitbake variable 'BOOTENV_SIZE' set in U-Boot build recipe.
   ^ ~~~~
scripts/Makefile.autoconf:79: recipe for target 'u-boot.cfg' failed
make[1]: *** [u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.

```

---

<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:** [June 7, 2019, 9:50am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/5 "2019-06-07T09:50:32Z")

</div>

> If I try to extract the source and build I get the following errors

What sources are you extracting? This seems to be missing some patches that are applied during a “normal build”.

I normally just use `bitbake -c devshell` and `bitbake -c compile u-boot` if I am testing things out to create patches.

---

<div class="post-metadata">

**Author:** ![brianPTL](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@brianPTL](https://hub.mender.io/u/brianPTL)\
**Post date:** [June 7, 2019, 10:07am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/6 "2019-06-07T10:07:36Z")

</div>

I have a build server for doing our yocto builds (24 cores, 48Gb RAM etc), but if I am working on the kernel or u-boot I tend to get the source and build locally on my laptop.

One way to do this is to use `devtool modify` then either use `devtool build` to build in place on the server, or copy the source to my laptop and `source` the sdk and build there instead.

Another way is to get the source is to use the `devshell` and copy the source from there.

So if you want to e.g. add some new code to u-boot then is your process:

1. Open the devshell: `bitbake u-boot -c devshell`
2. Edit your files
3. Close the devshell
4. Compile using `bitbake u-boot -c compile`
5. Return to 1. if there is more to do
6. Once you are happy, create patches from the devshell source area.

?

---

<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:** [June 7, 2019, 10:31am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/7 "2019-06-07T10:31:42Z")

</div>

> [@brianPTL](#):
>
> - Open the devshell: `bitbake u-boot -c devshell`
> - Edit your files
> - Close the devshell
> - Compile using `bitbake u-boot -c compile`
> - Return to 1. if there is more to do
> - Once you are happy, create patches from the devshell source area.

Exactly, but keep in mind that I tend to do very small change sets nowadays and this is typically a process I use to create Mender integration patches.

If I was to do bigger changes on u-boot or Linux kernel sources I would also prefer to have a working tree locally. The few times I have needed this I have done it manually:

- copy source (git clone of SRC\_URI and SRC\_REV)
- copy and apply patches from Yocto layers
- make changes

The `devtool modify` and `devtool build` process sounds neet but have not yet have the need to learn it 😛.

But in the end it would be nice to fix `meta-mender` not to break the `devtool` workflow, and I do not believe that we have intentionally broken this. It might be possible that the problem is in `devtool` and meta-mender only triggers it. But someone needs to do some digging.

This step keeps coming up in the error,

> <https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/recipes-bsp/u-boot/u-boot-mender.inc#L15-L32>

---

<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:** [June 7, 2019, 10:38am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/8 "2019-06-07T10:38:44Z")

</div>

I have created a task to track this,

[https://tracker.mender.io/browse/MEN-2591](https://tracker.mender.io/browse/MEN-2591)

---

<div class="post-metadata">

**Author:** ![brianPTL](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@brianPTL](https://hub.mender.io/u/brianPTL)\
**Post date:** [June 7, 2019, 10:39am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/9 "2019-06-07T10:39:27Z")

</div>

Yes, the devtool is a nice tool. It keeps a git repo of the changes you make.

You commit as you go along. You can then issue `devtool finish` on your recipe and specify a target layer. It will then create the bbappends and patches in that layer - one patch per commit.

I am not good enough with Yocto to even know where to start debugging this to be honest, and I have to deal with it seldomly so I don’t really build the skills up enough.

---

<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:** [January 29, 2024, 11:07am UTC](https://hub.mender.io/t/does-meta-mender-have-a-problem-with-devtool-modify/568/10 "2024-01-29T11:07:25Z")

</div>

2 posts were split to a new topic: [Manual bootloader integration, patches missing](https://hub.mender.io/t/manual-bootloader-integration-patches-missing/6519)
