From: "zhengruoqin" <zhengrq.fnst@cn.fujitsu.com>
To: Stefano Babic <sbabic@denx.de>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Cc: swupdate <swupdate@googlegroups.com>
Subject: [swupdate] RE: [yocto] [PATCH] [meta-swupdate] Fix build error of dependence.
Date: Thu, 18 Jun 2020 07:08:33 +0000 [thread overview]
Message-ID: <1592464111066.55405@cn.fujitsu.com> (raw)
In-Reply-To: <982020c1-346e-7183-31df-7fe61c898537@denx.de>
Hi, Stefano
I'm sorry I'm so late for your reply.
> I do not think the issue exists.
I bitbake swupdate with poky and meta-oe without any modifications, depend error happens, isn't it an issue?
> In fact, CONFIG_MONGOOSESSL is protected by
> CONFIG_SSL_IMPL_OPENSSL or CONFIG_SSL_IMPL_MBEDTLS. If you set
> CONFIG_MONGOOSESSL, SSL is already set.
I don't find the relationship of CONFIG_MONGOOSESSL and CONFIG_SSL_IMPL_OPENSSL or CONFIG_SSL_IMPL_MBEDTLS in menuconfig step.
---------------------------
$ grep MONGOOSESSL tmp/work/core2-64-poky-linux/swupdate/2020.04-r0/git/ -r | grep Kconfig
$
---------------------------
By default CONFIG_SSL_IMPL_OPENSSL will be enable during configure step. But openssl is not in the dependences of swupdate. That' s why error happens by default.
Of course, YP users can fix this build error by manuconfig or modified the defconfig. But that's not friendly.
In fact, after configuring the CONFIG_SSL_IMPL_OPENSSL will be added into .config file. But swupdate.inc judges which dependence will be added by defconfig file before configure step.
So, I thought out two methods to fix this issue to make swupdate can be passed by default.
1. Added openssl into dependences by DEPENDS parameter, such as the following:
----------------------------
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -72,7 +72,7 @@ S = "${WORKDIR}/git/"
......
-DEPENDS += "kern-tools-native"
+DEPENDS += "kern-tools-native openssl"
----------------------------
2. Added CONFIG_SSL_IMPL_OPENSSL into defconfig file.
----------------------------
--- a/recipes-support/swupdate/swupdate/defconfig
+++ b/recipes-support/swupdate/swupdate/defconfig
@@ -96,3 +96,4 @@ CONFIG_SHELLSCRIPTHANDLER=y
# CONFIG_ARCHIVE is not set
# CONFIG_REMOTE_HANDLER is not set
# CONFIG_BOOTLOADERHANDLER is not set
+CONFIG_SSL_IMPL_OPENSSL=y
----------------------------
Users who want to use mbedtls instead if openssl can added bbappend file to modify the DEPENDS parameter or defconfig file.
How about my suggestion?
Best regards
Zheng
________________________________________
发件人: Stefano Babic <sbabic@denx.de>
发送时间: 2020年6月8日 16:55
收件人: Zheng, Ruoqin; Stefano Babic; yocto@yoctoproject.org
抄送: swupdate
主题: Re: [swupdate] RE: [yocto] [PATCH] [meta-swupdate] Fix build error of dependence.
Hi Zheng,
On 08.06.20 10:49, Zheng, Ruoqin wrote:
> Hi Stefano
>
>> there is a ML for SWUpdate and meta-swupdate (see CC), we are cross-
>> posting here:
> Thank you, I got it.
>
>> openSSL is not the only supported SSL library, the Webserver runs also with
>> mbedTLS. This patch forces to use openSSL and conflicts in case mbedTLS is
>> used as signing and crypto library.
>>
>>> if 'CONFIG_JSON=y\n' in features:
>>> depends += ' json-c'
> OK, I'll update my patch and send V2 version.
>
I do not think the issue exists. In fact, CONFIG_MONGOOSESSL is
protected by CONFIG_SSL_IMPL_OPENSSL or CONFIG_SSL_IMPL_MBEDTLS. If you
set CONFIG_MONGOOSESSL, SSL is already set.
The only way to go into the issue is to modify directly your defconfig
file instead of running "bitbake -c menuconfig" and then apply the
diffconfig or the new defconfig. But this is of course a wrong way,
exactly as in kernel.
Try to run "mnuconfig" and then you can apply the fragment to your
diffconfig (fragments are supported, too).
Best regards,
Stefano
> --------------------------------------------------
> Zheng Ruoqin
> Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
> ADDR.: No.6 Wenzhu Road, Software Avenue,
> Nanjing, 210012, China
> MAIL : zhengrq.fnst@cn.fujistu.com
>
>
>
>> -----Original Message-----
>> From: Stefano Babic <sbabic@denx.de>
>> Sent: Thursday, June 4, 2020 3:22 PM
>> To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>;
>> yocto@yoctoproject.org
>> Cc: swupdate <swupdate@googlegroups.com>
>> Subject: Re: [yocto] [PATCH] [meta-swupdate] Fix build error of dependence.
>>
>> Hi Zheng,
>>
>> there is a ML for SWUpdate and meta-swupdate (see CC), we are cross-
>> posting here:
>>
>> On 04.06.20 14:26, zhengruoqin wrote:
>>> -c -o mongoose/mongoose.o mongoose/mongoose.c
>>> | mongoose/mongoose.c:4496:10: fatal error: openssl/ssl.h: No such
>>> | file
>>> or directory
>>>
>>> Signed-off-by: Zheng Ruoqing <zhengrq.fnst@cn.fujitsu.com>
>>> ---
>>> recipes-support/swupdate/swupdate.inc | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/recipes-support/swupdate/swupdate.inc
>>> b/recipes-support/swupdate/swupdate.inc
>>> index 9ea0a8a..3d9a3fa 100644
>>> --- a/recipes-support/swupdate/swupdate.inc
>>> +++ b/recipes-support/swupdate/swupdate.inc
>>> @@ -123,6 +123,9 @@ python () {
>>> elif 'CONFIG_SSL_IMPL_MBEDTLS=y\n' in features:
>>> depends += ' mbedtls'
>>>
>>> + if 'CONFIG_MONGOOSESSL=y\n' in features:
>>> + depends += ' openssl'
>>> +
>>
>> openSSL is not the only supported SSL library, the Webserver runs also with
>> mbedTLS. This patch forces to use openSSL and conflicts in case mbedTLS is
>> used as signing and crypto library.
>>
>>> if 'CONFIG_JSON=y\n' in features:
>>> depends += ' json-c'
>>>
>>>
>>>
>>>
>>>
>>
>> Best regards,
>> Stefano Babic
>>
>>
>>
>>
>>
>
>
>
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
next prev parent reply other threads:[~2020-06-18 7:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 12:26 [PATCH] [meta-swupdate] Fix build error of dependence zhengruoqin
2020-06-04 7:22 ` [yocto] " Stefano Babic
2020-06-08 8:49 ` zhengruoqin
2020-06-08 8:55 ` [swupdate] " Stefano Babic
2020-06-18 7:08 ` zhengruoqin [this message]
2020-06-18 7:42 ` Stefano Babic
[not found] ` <CAAxSGfY9uDN708Cy5LFd3cgeRMgfBT85o8Pw=mFwL-T66oOe+w@mail.gmail.com>
2020-06-18 8:22 ` Stefano Babic
2020-06-19 6:20 ` zhengruoqin
2020-06-19 8:53 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1592464111066.55405@cn.fujitsu.com \
--to=zhengrq.fnst@cn.fujitsu.com \
--cc=sbabic@denx.de \
--cc=swupdate@googlegroups.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox