From patchwork Mon Sep 23 22:30:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maxiwell S. Garcia" X-Patchwork-Id: 1166223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46cfDX5P2dz9s00 for ; Tue, 24 Sep 2019 08:31:08 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46cfDX4VYmzDqPT for ; Tue, 24 Sep 2019 08:31:08 +1000 (AEST) X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=maxiwell@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46cfD40R5mzDqHW for ; Tue, 24 Sep 2019 08:30:43 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8NMQs1L127932 for ; Mon, 23 Sep 2019 18:30:37 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 2v743wvsjb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2019 18:30:37 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8NMUDev026412 for ; Mon, 23 Sep 2019 22:30:36 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma01wdc.us.ibm.com with ESMTP id 2v5bg6q8m1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2019 22:30:36 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8NMUZoB41353530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Sep 2019 22:30:35 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F099EC6055; Mon, 23 Sep 2019 22:30:34 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6EDFC6057; Mon, 23 Sep 2019 22:30:33 +0000 (GMT) Received: from maxibm.ibmuc.com (unknown [9.85.133.177]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 23 Sep 2019 22:30:33 +0000 (GMT) From: "Maxiwell S. Garcia" To: petitboot@lists.ozlabs.org Subject: [PATCH v2 1/4] configure: Add libelf as a requirement Date: Mon, 23 Sep 2019 19:30:21 -0300 Message-Id: <20190923223024.995-2-maxiwell@linux.ibm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190923223024.995-1-maxiwell@linux.ibm.com> References: <20190923223024.995-1-maxiwell@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-09-23_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909230189 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" With this library, petitboot is able to open the ELF binary to check information, like annotation in ELF notes section. Signed-off-by: Maxiwell S. Garcia --- configure.ac | 6 ++++++ discover/Makefile.am | 3 ++- utils/Makefile.am | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5d541fb..f3382e0 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,11 @@ AC_CHECK_LIB([udev], [udev_new], [AC_MSG_FAILURE([The libudev development library is required by petitboot. Try installing the package libudev-dev or libudev-devel.])] ) +AC_CHECK_LIB([elf], [elf_begin], + [ELF_LIBS=-lelf], + [AC_MSG_FAILURE([The libelf development library is required by petitboot. Try installing the package libelf-dev or elfutils-libelf-devel.])] +) + PKG_CHECK_EXISTS(libudev >= 218, [old_udev=no], [old_udev=yes]) if test "$old_udev" = "yes" ; then AC_DEFINE(UDEV_LOGGING, 1, [Support old udev logging interface]) @@ -476,6 +481,7 @@ AS_IF( ) AC_SUBST([UDEV_LIBS]) +AC_SUBST([ELF_LIBS]) AC_SUBST([DEVMAPPER_LIBS]) AC_SUBST([CRYPT_LIBS]) AC_SUBST([FDT_LIBS]) diff --git a/discover/Makefile.am b/discover/Makefile.am index bfe33fa..e2d0e93 100644 --- a/discover/Makefile.am +++ b/discover/Makefile.am @@ -58,7 +58,8 @@ discover_pb_discover_LDADD = \ discover/native/native-parser.ro \ discover/platform.ro \ $(core_lib) \ - $(UDEV_LIBS) + $(UDEV_LIBS) \ + $(ELF_LIBS) discover_pb_discover_LDFLAGS = \ $(AM_LDFLAGS) \ diff --git a/utils/Makefile.am b/utils/Makefile.am index a523430..8788150 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -18,7 +18,8 @@ dist_pkglibexec_SCRIPTS = utils/pb-console sbin_PROGRAMS += utils/pb-event utils/pb-config utils_pb_config_LDADD = $(top_builddir)/lib/libpbcore.la \ - $(top_builddir)/discover/platform.ro + $(top_builddir)/discover/platform.ro \ + $(ELF_LIBS) utils_hooks_30_dtb_updates_SOURCES = utils/hooks/30-dtb-updates.c utils_hooks_30_dtb_updates_LDADD = $(top_builddir)/lib/libpbcore.la \