FAQ - Frequently Asked Questions

From Ronetix's Wiki
Revision as of 13:33, 15 February 2024 by Ilko (talk | contribs) (Add mask of systemd-oomd)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Why when building Yocto, sometimes the Ubuntu Terminal is closed without any notification?

Ubuntu 22.04 comes with the systemd-oomd service enabled by default,
which limits the RAM of a terminal application to no more than 50% by default.
If a terminal application uses more than 50% RAM, the OOM daemon kills the entire process tree,
so even the terminal hosting the processes that were killed will suddenly vanish.
The simplest solution is to disable the OOM daemon:

$ sudo systemctl disable --now systemd-oomd
$ sudo systemctl mask systemd-oomd

If the Yocto building is killed by OOM, and then again started, some tasks can fail.
For example:

Summary: 3 tasks failed:
 /mnt/960GB/nxp/yocto-micledore/sources/poky/meta/recipes-devtools/binutils/binutils_2.40.bb:do_compile
 /mnt/960GB/nxp/yocto-micledore/sources/poky/meta/recipes-devtools/gdb/gdb_13.2.bb:do_compile
 /mnt/960GB/nxp/yocto-micledore/sources/poky/meta/recipes-devtools/gcc/gcc_12.3.bb:do_compile

In this case, the failed tasks must be cleaned:

$ bitbake -c cleanall binutils gdb gcc
$ bitbake imx-image-core


How to rebase the Ronetix U-BOOT git repository?

Here are the steps to rebase the U-BOOT repository:

$ git clone https://github.com/ronetix/u-boot.git
$ cd u-boot
$ git remote add nxp https://github.com/nxp-imx/uboot-imx.git 
$ git fetch nxp
$ git checkout remotes/origin/lf_v2023.04 -b lf_v2023.04
$ git rebase nxp/lf_v2023.04

If there are some conflicts, resolve them manually, for example:

$ vim arch/arm/mach-imx/imx9/Kconfig # fix and save
$ git add arch/arm/mach-imx/imx9/Kconfig
$ git commit -m "mach-imx/imx9/Kconfig : resolve merge conflict"
$ git rebase --continue