3

I want to avoid setting the default environment in CONFIG_EXTRA_ENV_SETTINGS, therefore I've set CONFIG_DEFAULT_ENV_FILE="uEnv.txt" and created that text file but bitbake doesn't find it:

make[1]: *** No rule to make target 'uEnv.txt', needed by 'include/generated/defaultenv_autogenerated.h'. Stop.

This is what the tree and the files look like:

└── u-boot
    ├── files
    │   ├── ma1.cfg
    │   └── uEnv.txt
    └── u-boot-xlnx_%.bbappend

ma1.cfg:

CONFIG_USE_DEFAULT_ENV_FILE=y
CONFIG_DEFAULT_ENV_FILE="uEnv.txt"

u-boot-xlnx_%.bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_append_tmc = " \
    file://ma1.cfg \
    file://uEnv.txt \
    "

PACKAGE_BEFORE_PN += "${PN}-env"
RPROVIDES_${PN}-env += "u-boot-default-env"

I don't know where to put the uEnv.txt so it will be found. I already (blindly) tried to specify some different paths like CONFIG_DEFAULT_ENV_FILE="../uEnv.txt" but to no avail. I suspect that I need to put it somewhere in a do_configure_append() but I don't know where.

Searching for CONFIG_DEFAULT_ENV_FILE only yields results which state that it can be used to create the environment from a file[1], but unfortunately not how. Or, more precisely: How to use it with bitbake.

So I hope someone can help me here: What do I need to do so bitbake places the text file where make is going to find it?

[1] https://lists.denx.de/pipermail/u-boot/2018-March/323347.html

1 Answers1

0

You need to pass your uEnv.txt file to the build directory to be found by Make.

You can do this in your bbappend file like:

do_configure_append() {
    cp ${WORKDIR}/uEnv.txt ${S}
}
Efe Can
  • 1
  • 1