From patchwork Wed Oct 25 20:58:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABl_PORTAY?= X-Patchwork-Id: 830372 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4003:c06::23d; helo=mail-oi0-x23d.google.com; envelope-from=swupdate+bncbaabbfhwyphqkgqexjsbffy@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="Bjn7dkwa"; dkim-atps=neutral Received: from mail-oi0-x23d.google.com (mail-oi0-x23d.google.com [IPv6:2607:f8b0:4003:c06::23d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yMjDR38nyz9t3n for ; Thu, 26 Oct 2017 07:59:02 +1100 (AEDT) Received: by mail-oi0-x23d.google.com with SMTP id s185sf1319719oif.16 for ; Wed, 25 Oct 2017 13:59:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1508965140; cv=pass; d=google.com; s=arc-20160816; b=l9g0lwGkbKd79mS+vG/ewa8Vn4zbg8Rqj+UPmfvPUmHi+cSxascymgoyx0rDanEFmB ShZmkQaiAqSRsu78xlLI6Uar+DGaB0i9chkd9HDfwOAcC4sLzOAAPCt3weq6qziqKjMc PZWlb8mMsBRs7rNG/7Pm3cQNpPPFpWKydxjbc5NV4RLRf4N51bt5BADSksf54V1HREME Xq8MPqbFlEKtgkfGJtwjMREAwab0cmvSbVd4GSJavGcFQsH8XgBTeA23ETzDzHC5krhT hfiO4TfpgW5uLc5MXcyrY1fakfDtuooosEUc/zavXLTlFERrDsp0UnhQ46zQr7e5+nRl 9mKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=prT0m27pgjJ8AGk7JS6xx/UqHnBhptUHSMUTm6bJbXk=; b=x2vkAivhrHH6dLuEn3zBmHGw+Z7ZMcM5ga6XDy+kp7Oe/Mdqj91tkLtumTCPGCYVbl qqMVvN01s6NXKN9fsNexcWnsyRarAmjblob6wfbGottW5/e/FSz0YBImPM1Oa5B/r3Io xzRuU0h2zgST6IfKtpTDnrlFOlCV4E+jQ43DTrZqVE59pw6JQTDyZzn1hAX9GC/SRuEx A/Izwt9RbU6iOLDDLFpw/740PirDTKk3LQew1KnxR6aZ/mmmI9EptAYiguAtPtjMGIf0 XJrVuKeLnOOsmMHBmBIPRd9iPIEb4+IAylPfehrudO4nSmSybR3pTuXL08C8l39eQfrv QuRQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gael.portay@savoirfairelinux.com designates 208.88.110.44 as permitted sender) smtp.mailfrom=gael.portay@savoirfairelinux.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=prT0m27pgjJ8AGk7JS6xx/UqHnBhptUHSMUTm6bJbXk=; b=Bjn7dkwa0jjBMHGfPOWFVmwXAhoPTmY7H2Q3gSJwCxH7BeLoxXhNmjmJLddOjl89aI 5Tup5EvLXuBIV3hJG2/IEJXVGELfoBokr2yZ47+p13646MDG9BFcwSR/TZ5hi/cm38lX XB/D+5WHfer1s/UKYS1blSPmRDP5sNgY16HSB78CctG9Bnj9qcDhazpoMa3aIAnk5pQa R00DAc2y3nmugio1+JgGX+NSdfv4GnBBWEUL3iquE7gMhjOcvZ799f7ZrRwbRcKF03/4 hhWMuY5PEEh170jBQ249kMPa+6ehEHwDZkoHlZYRbKytoPx3zc2gYsBRA13fg29GIYp+ Fv+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=prT0m27pgjJ8AGk7JS6xx/UqHnBhptUHSMUTm6bJbXk=; b=rEW5ChVLS5AsfEDWbi5Ede/qtWfpQjFxK+LKCFjlLvf4M/Vvliu2J1j7r7o/pAdgeW ao79/omqqeiLzkPMcLiu8FLGbs978UKa0UAAIfClCRrNL15KuQupIoKvHInbLJBlWIOe W54Lcq5blqSRXIjQqRijSWbMlPy99pW9uq/CI8AejoKeB9GX2kXPMZG1oItnf43hKDy6 AQtSEVm3BWQGbdNxPd0aYA5AiVUcR8Q2wVN7vLCwNnbnv1tecjjVQ8GfO0zy+DK1tNYz DXPYxdw3DcFaZk8JhkI2WQi11yXN2U2c68p75FfLv3HmuQaeUOTbWPfn+w7TGPszhxIL cwrw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AMCzsaW8iYwRsj33u9eMnlkTVgLACeSDVii72aDQxB/319+yUrdsUvcv IH4GtGRfV2Wnei5cJW4bxQc= X-Google-Smtp-Source: ABhQp+TFN/zw6Ydu1USoBH7fg6oag0lKlcnrQoKdaibPWDVN4N+YpUcPy1vGcYLE25iNw2MqaGlGMQ== X-Received: by 10.157.14.201 with SMTP id 67mr129365otj.4.1508965140458; Wed, 25 Oct 2017 13:59:00 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 10.202.170.82 with SMTP id t79ls1118357oie.12.gmail; Wed, 25 Oct 2017 13:59:00 -0700 (PDT) X-Received: by 10.157.18.236 with SMTP id g99mr1951774otg.69.1508965140047; Wed, 25 Oct 2017 13:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508965140; cv=none; d=google.com; s=arc-20160816; b=VrYck9tb/9nm/zdiYny/SxId4t/hduZi9qgHSdG/YjU3HDadf7ah3vw1MXMqQkuxlR o12lZoJtT0YPkRB/ZPgPJg/1nmar7uDbLJVPLp+x/1mLRNoIBNOI8UVJuLryEkRy0AtP tSWt+G7OmML27kTX9fPsCno9KV3aLOJTs76TaRL2h+8DhFfgzQXv/DpVXFxhuk1UKH11 n5UTEJD2yAKADlMl3KXVfMvlpiL44qleFUEaTBELpotN75fneUPrUVKm6uBwxh9fyJuL UpYrk/mOAVoa7EB5jYDHPSixigZRr8s3VO/iNx6nb2ZNCGW4zTE4fDNhjvfJ09LTiw1x nbSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=kolSyPjk99AyOkj/R4zD1/QRD2aYB9pQ2Nsl7xJX2vM=; b=SsbXVoLbRQxUKe9xcufMMxDtyTaOuie1URn61DczvgSgrwPw2knHDtlHLlkZt+VY3A wksGqYCuq+hKyCFxXd99Sd4kVauwQmtEYuZrrJj/+PqROCFnK9QyV51QeBzy+Syj9do4 RALdzg/6fG6gt+C62gIpv5+IcvguEYOiZyAUJbZXkdAcwlmqwkQ7vgUc3ZHsF9s1mqlx epDyHSxYJ/cEV6ZxrcZNWSwb0idt6BOScityjlfFke6AYeSkh9KTqhr/V1LIcO0H8jH4 YQeW9ItjzmOpIEAbQqiU6vnJv2FywnhEjdYP2Q8ap0+8g6Do5IzRQIfWv6sGozIIveNM 1QNw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gael.portay@savoirfairelinux.com designates 208.88.110.44 as permitted sender) smtp.mailfrom=gael.portay@savoirfairelinux.com Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com. [208.88.110.44]) by gmr-mx.google.com with ESMTPS id p42si223870otc.4.2017.10.25.13.58.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 13:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gael.portay@savoirfairelinux.com designates 208.88.110.44 as permitted sender) client-ip=208.88.110.44; Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 206449C2F12 for ; Wed, 25 Oct 2017 16:58:59 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QdhGDndgeCio; Wed, 25 Oct 2017 16:58:58 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 681DA9C2F36; Wed, 25 Oct 2017 16:58:58 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s46_5pNnr_tR; Wed, 25 Oct 2017 16:58:58 -0400 (EDT) Received: from archlinux.mtl.sfl (unknown [192.168.49.77]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 483289C2F12; Wed, 25 Oct 2017 16:58:58 -0400 (EDT) From: =?utf-8?q?Ga=C3=ABl_PORTAY?= To: swupdate@googlegroups.com Cc: =?utf-8?q?Ga=C3=ABl_PORTAY?= Subject: [swupdate] [PATCH] Add mtd-utils dependency if cfi or ubivol are set Date: Wed, 25 Oct 2017 16:58:55 -0400 Message-Id: <20171025205855.30492-1-gael.portay@savoirfairelinux.com> X-Mailer: git-send-email 2.14.2 MIME-Version: 1.0 X-Original-Sender: gael.portay@savoirfairelinux.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gael.portay@savoirfairelinux.com designates 208.88.110.44 as permitted sender) smtp.mailfrom=gael.portay@savoirfairelinux.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , This fixes the build issue below when CONFIG_CFI or CONFIG_UBIVOL are set but CONFIG_MTD is not. | In file included from handlers/flash_handler.c:44:0: | include/flash.h:26:24: fatal error: mtd/libmtd.h: No such file or directory | #include Signed-off-by: Gaƫl PORTAY --- Hi all, As said into the commit message, this fixes a build issue when the mtd-utils package is not built as dependency. The issue comes from the internal flash.h header which needs the header mtd/libmtd.h from mtd-utils. This internal header is included by these 5 following .c source files: $ grep -r '#include.*flash.h' . ./core/swupdate.c:#include "flash.h" ./corelib/stream_interface.c:#include "flash.h" ./corelib/mtd-interface.c:#include "flash.h" ./handlers/ubivol_handler.c:#include "flash.h" ./handlers/flash_handler.c:#include "flash.h" The file mtd-interface.c is compiled when CONFIG_MTD is set; this case is handled by swupdate.inc (see python() function). lib-$(CONFIG_MTD) += mtd-interface.o Both files swupdate.c and stream_interface.c are also handled when CONFIG_MTD is set. They include the flash.h header between the following preprocessor block: #ifdef CONFIG_MTD #include "flash.h" #endif But, concerning flash_handler.c and ubivol_handler.c they are compiled when their option is set CONFIG_CFI and CONFIG_UBIVOL. obj-$(CONFIG_CFI) += flash_handler.o obj-$(CONFIG_UBIVOL) += ubivol_handler.o Thus the python() function from swupdate.inc needs to handle those new two cases. Regards, Gael recipes-support/swupdate/swupdate.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc index 53a61ea..1431d15 100644 --- a/recipes-support/swupdate/swupdate.inc +++ b/recipes-support/swupdate/swupdate.inc @@ -86,6 +86,13 @@ python () { depends = d.getVar('DEPENDS', False) d.setVar('DEPENDS', depends + ' mtd-utils') + if 'CONFIG_CFI=y\n' in features: + depends = d.getVar('DEPENDS', False) + d.setVar('DEPENDS', depends + ' mtd-utils') + + if 'CONFIG_UBIVOL=y\n' in features: + depends = d.getVar('DEPENDS', False) + d.setVar('DEPENDS', depends + ' mtd-utils') } do_configure () {