Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add section on how to build images with trace logs #2396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions 301.Troubleshoot/01.Yocto-project-build/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,36 @@ PREFERRED_VERSION_mender-client = "master"
<!--AUTOVERSION: "Yocto branches higher than 3.1 (%)"/ignore "Mender client % and later"/ignore-->
In Yocto branches higher than 3.1 (dunfell), Mender client 3.0.0 and later will be built by default.


## How to build an image with Mender client and connect using trace logs

This assumes you're in the build directory of your Yocto project and bitbake has been initialized.
The snippet will change the unit files for services to start them with trace level logging.


``` bash
bitbake-layers create-layer meta-mender-helpers
bitbake-layers add-layer meta-mender-helpers

mkdir -p meta-mender-helpers/recipes-helpers/mender-connect
cat > meta-mender-helpers/recipes-helpers/mender-connect/mender-connect_%.bbappend << "EOF"
do_install:append() {
sed -i "s|ExecStart=.*|ExecStart=/usr/bin/mender-connect --trace daemon|" ${D}/${systemd_unitdir}/system/mender-connect.service
}
EOF


mkdir -p meta-mender-helpers/recipes-helpers/mender-client
cat > meta-mender-helpers/recipes-helpers/mender-client/mender_%.bbappend << "EOF"
do_install:append() {
sed -i "s|ExecStart=.*|ExecStart=/usr/bin/mender-auth --log-level trace daemon|" ${D}/${systemd_unitdir}/system/mender-authd.service
sed -i "s|ExecStart=.*|ExecStart=/usr/bin/mender-update --log-level trace daemon|" ${D}/${systemd_unitdir}/system/mender-updated.service
}
EOF
```


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Maybe a short line on how to remove the layer again.


## Your project is using a fork of U-Boot which conflicts with the U-Boot Mender uses

When [Building a Mender Yocto Project image](../../05.Operating-System-updates-Yocto-Project/03.Build-for-demo/docs.md) for your own project and device, you encounter a build error similar to the following:
Expand Down