when building the swupdate package on pyro using "bitbake swupdate", it complains that json-c, curl, openssl and mtd-utils are not found and it doesn't find the header files. In swupdate.inc, there are checks whether some of the variables are set (CONFIG_JSON, CONFIG_SURICATTA). However, at the time of the check, these variables are not set, while later during compiling time, they seem to be set, possibly due to dependencies in the configuration that are resolved during build time.
One additional error that I did not find a solution to yet is the following that occurs after resolving the dependencies manually by adding them to DEPENDS:
| ==========
| bootloader/lib.a(uboot.o): In function `bootloader_env_set':
| uboot.c:(.text.bootloader_env_set+0xb0): undefined reference to `fw_env_flush'
| collect2: error: ld returned 1 exit status
| Makefile:375: recipe for target 'swupdate_unstripped' failed
| make: *** [swupdate_unstripped] Error 1
| make: *** Waiting for unfinished jobs....
| arm-poky-linux-gnueabi-strip -s --remove-section=.note --remove-section=.comment tools/progress_unstripped -o tools/progress; chmod a+x tools/progress
| arm-poky-linux-gnueabi-strip -s --remove-section=.note --remove-section=.comment tools/hawkbitcfg_unstripped -o tools/hawkbitcfg; chmod a+x tools/hawkbitcfg
| arm-poky-linux-gnueabi-strip -s --remove-section=.note --remove-section=.comment tools/client_unstripped -o tools/client; chmod a+x tools/client
| arm-poky-linux-gnueabi-strip -s --remove-section=.note --remove-section=.comment tools/sendtohawkbit_unstripped -o tools/sendtohawkbit; chmod a+x tools/sendtohawkbit
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /data/yocto-var-pyro/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/swupdate/2017.07-r0/temp/log.do_compile.6213)
Best regards
Johannes
Best regards
Johannes
Thanks for your answer.
I actually didn't run menuconfig, so it used the standard defconfig provided by meta-swupdate.
I suggest adding the needed dependencies for the standard configuration to the defconfig in the layer such that it compiles out of the box when adding the layer and building swupdate. In our case, we use autobuilder and are fine with the standard configuration, at least at this time. So, menuconfig would not be a direct option, we would rather have to include a new configuration in our own layer, which could be generated by menuconfig before. However, for most cases this might not be necessary if the provided defconfig would compile directly.
Best regards
Johannes
I may misunderstand, but I think the defconfig in the meta-layer is not correct.
My suggestion was not to add DEPENDS in the recipe, or to change the method, but to make the defconfig file provided in the layer compatible by adding the CONFIG_* variables that are missing for it to be able to compile to meta-swupdate/recipes-support/swupdate/swupdate/defconfig.
One example is CONFIG_JSON, which is not present in meta-swupdate/recipes-support/swupdate/swupdate/defconfig but will be automatically activated during build time after the checks.
Best,
Johannes