SWUpdate configuration using menuconfig

1,031 views
Skip to first unread message

Sourabh Hegde

unread,
Dec 22, 2021, 4:02:49 PM12/22/21
to swupdate
Hi All,

I am trying to change some default configs using "make menuconfig". After saving new config and running "make" I am getting below error:

Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
scripts/kconfig/conf  --silentoldconfig Kconfig
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
  CC      core/swupdate.o
In file included from include/util.h:20:0,
                 from core/swupdate.c:30:
include/swupdate_settings.h:17:10: fatal error: libconfig.h: No such file or directory
 #include <libconfig.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:168: core/swupdate.o] Error 1
make: *** [Makefile:516: core] Error 2

So it looks like "lua" package is not found. Under "General Configurations" there is an "lua pkg-config name" option but I am not sure what should be provided there.

Can anyone please let me know how should I resolve it?

And also how will these new configs implemented? Do I need to run anything other than "make" command?

Thanks in advance

Kind Regards,
Sourabh

SWUpdate_config.PNG

Sam Van Den Berge

unread,
Dec 23, 2021, 2:22:53 AM12/23/21
to Sourabh Hegde, swupdate
On Wed, Dec 22, 2021 at 01:02:49PM -0800, Sourabh Hegde wrote:
> Hi All,
>
> I am trying to change some default configs using "make menuconfig". After
> saving new config and running "make" I am getting below error:
>
> Package lua was not found in the pkg-config search path.

I think the lua pkg-config name is something like lua5.1. Depending
on what version is installed offcourse.

Assuming lua is installed, you'll need to run the following command
"pkg-config --list-all | grep -i lua" to know what exactly you need to
use.
> --
> You received this message because you are subscribed to the Google Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to swupdate+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/swupdate/356f8777-5d7b-44db-8b1a-dce58faac7b5n%40googlegroups.com.


Sourabh Hegde

unread,
Dec 23, 2021, 2:32:39 AM12/23/21
to swupdate
Hi,

Thanks for the info. I have installed Lua5.3 packages and included lua5.3 in lua pkg-config. I am not getting this error now. But now I am facing this error

bootloader/uboot.c:22:10: fatal error: libuboot.h: No such file or directory
 #include <libuboot.h>
          ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:168: bootloader/uboot.o] Error 1
make: *** [Makefile:516: bootloader] Error 2

I am using U-boot bootloader. Can you please let me know what this error means?

Thanks in advance.

Kind Regards,
Sourabh

SWUpdate_config.PNG

Sam Van Den Berge

unread,
Dec 23, 2021, 3:21:37 AM12/23/21
to Sourabh Hegde, swupdate
On Wed, Dec 22, 2021 at 11:32:39PM -0800, Sourabh Hegde wrote:
> Hi,
>
> Thanks for the info. I have installed Lua5.3 packages and included lua5.3
> in lua pkg-config. I am not getting this error now. But now I am facing
> this error
>
> bootloader/uboot.c:22:10: fatal error: libuboot.h: No such file or directory
> #include <libuboot.h>
> ^~~~~~~~~~~~

Did you install libubootenv? It is one of the requirements if you want
to have support for U-boot. See "Configuration and build" here:
https://sbabic.github.io/swupdate/swupdate.html?highlight=libubootenv
> To view this discussion on the web visit https://groups.google.com/d/msgid/swupdate/93610162-4781-46e1-bb69-d5dd00a887b3n%40googlegroups.com.


Sourabh Hegde

unread,
Dec 23, 2021, 4:28:46 AM12/23/21
to swupdate
Hi,

I have already installed these libraries. But still I get same errors. When I enable MTD support I get "In file included from core/swupdate.c:37:0:
include/flash.h:13:10: fatal error: libmtd.h: No such file or directory
 #include <libmtd.h> "


For libubootenv: "libubootenv-tool is already the newest version (0.2-1)."

Regards,
Sourabh

Sam Van Den Berge

unread,
Dec 23, 2021, 4:44:10 AM12/23/21
to Sourabh Hegde, swupdate
On Thu, Dec 23, 2021 at 01:28:46AM -0800, Sourabh Hegde wrote:
> Hi,
>
> I have already installed these libraries. But still I get same errors. When
> I enable MTD support I get "In file included from core/swupdate.c:37:0:
> include/flash.h:13:10: fatal error: libmtd.h: No such file or directory
> #include <libmtd.h> "
>
>
> For libubootenv: "libubootenv-tool is already the newest version (0.2-1)."

Did you install the *dev* version as well? E.g. apt install libubootenv-dev?
Some probably for mtd. You'll need libmtdev-dev.
> To view this discussion on the web visit https://groups.google.com/d/msgid/swupdate/6cc3bb25-24ef-4f32-a519-b6d1bbbaba09n%40googlegroups.com.

Sourabh Hegde

unread,
Dec 23, 2021, 4:45:39 AM12/23/21
to swupdate
Hi,

Additional info:

I am using my own meta layer to build .swu images. Not sure whether this is relevant to above issue. And also I am using swupdate-image.inc to install swupdate in separate recipe.

Sourabh Hegde

unread,
Dec 23, 2021, 4:51:07 AM12/23/21
to swupdate
Ah okay. I installed libubootenv-dev now and it worked. But issue is still with libmtd.h. I have installed libmtdev-dev also. But now anyways, without MTD support it's working.

Thanks for the help.

Kind Regards,
Sourabh

Sourabh Hegde

unread,
Dec 23, 2021, 5:45:31 AM12/23/21
to swupdate
Hi again,

I have an issue in do_swuimage. My .swu image recipe looks like this:

DESCRIPTION = "Compound image for Avenger96 boards"
SECTION = ""

# Note: sw-description is mandatory
SRC_URI = " \
        file://sw-description \
        file://update.sh \
"

inherit swupdate

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SWUPDATE_SIGNING = "RSA"
SWUPDATE_PRIVATE_KEY = "~/swu-keys/swupdate-priv.pem"

# IMAGE_DEPENDS: list of Yocto images that contains a root filesystem
# it will be ensured they are built before creating swupdate image
IMAGE_DEPENDS = "core-image-full-cmdline"

# SWUPDATE_IMAGES: list of images that will be part of the compound image
# the list can have any binaries - images must be in the DEPLOY directory
SWUPDATE_IMAGES = " \
        core-image-full-cmdline \
"

# Images can have multiple formats - define which image must be
# taken to be put in the compound image
SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz"

So, it first builds "core-image-full-cmdline" and its output is in deploy directory(under my build directory) as- "core-image-full-cmdline-dh-stm32mp1-dhcor-avenger96-20211223101505.rootfs.ext4.gz"

But while doing do_swuimage SWUpdate says :

Exception: FileNotFoundError: [Errno 2] No such file or directory: '/root/build-swu-v2/tmp/work/dh_stm32mp1_dhcor_avenger96-poky-linux-gnueabi/avenger96-swu-v1/1.0-r0/avenger96-swu-v1/core-image-full-cmdline-dh-stm32mp1-dhcor-avenger96-20211222170320.rootfs.ext4.gz'

And the ~/build-swu-v2/tmp/work/dh_stm32mp1_dhcor_avenger96-poky-linux-gnueabi/avenger96-swu-v1/1.0-r0/avenger96-swu-v1 has this file: "core-image-full-cmdline-dh-stm32mp1-dhcor-avenger96.ext4.gz"

In sw-description I have included: filename = "core-image-full-cmdline-dh-stm32mp1-dhcor-avenger96-20211222170320.rootfs.ext4.gz";

Should I remove "20211222170320.rootfs" part from sw-description?

Thanks in advance.

Kind Regards,
Sourabh

Piyush Charan

unread,
Apr 5, 2022, 7:56:07 AM4/5/22
to swupdate

This also did not helped me So I have created yacto project copied all .h files from mtd.. folder to include folder of my swupdate it worked . I am getting lib linking issue let see 
Reply all
Reply to author
Forward
0 new messages