From patchwork Fri Mar 15 16:18:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 160432 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp16951283jad; Fri, 15 Mar 2019 09:18:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsm5TMYe+9RL+coW4JfHC1mf1MoFiKxnyZC3ZrTucCi0gjN3SJ+pyR1fc1CD+WC7umRqe5 X-Received: by 2002:a63:6c01:: with SMTP id h1mr4240255pgc.330.1552666697073; Fri, 15 Mar 2019 09:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552666697; cv=none; d=google.com; s=arc-20160816; b=rmPNZA7gXoH6JJx0B3ZbgAzfjMLAn/87my31yvlgVnwj524X/Yf2cmqdgYafOMjW/T vcNxgCvg0Okj8HK60B3KiHd4hkyRIzuvxRQjgdon2qYS+8j1qHfnnOLP5kjyFMfftIVM Xero6xztwp9RpjxL+/r5UxkvdwiV/I3H0KxAVQ+kRXerui5RNcsfsXZSANie1aOoonOS wPe6pA6NbgJldQlEkI55QR3O/pnI7hm+oBSOW7FYtu5QizSaeMqQdCwhr7qJXJXKVwXU t3Y0TcvEQAnph99WST/q9hu2JG0DN5dUwNujWy5Zv3vlHpdz2Ul32i22l45JsQNERAUp Fvfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=gjdg54r5BS1lVdQQkj1PeNTd3RwXS8y0uBNMzdle3pE=; b=bgAjGfgHBIipYpc4NQRMwpOp7+dznR8+aiDeylDVyXcZVAxvAJzkeZlcVEd+NFjQmA 7r7zKmlG00JOhuZanBgACGfn+WlPRVAc0SlywE4jJOOBcEnL5Ye3KCCxnVJqOOwN7DhX fFA69kFqwTtqtFWyAHS34pbFKc04A9pckitKYKynBeg/bYjGLyCLB5qKfh9OaVkm3n+X uSTc7AUShvCKK5LvFJT/u79CjXla2dJ9R/gW0g9MXdgmBHRUtp5xJJ2JkYjNFQEgUOiA UkmJQX4iz7pvuXUYFa+UKi+xaKqlPD2aIwXRrotIQwtopXQzAo1WmCsr9XHx5Yhssrbi e9qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=JSO1wr2G; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id k17si898543pfa.181.2019.03.15.09.18.16; Fri, 15 Mar 2019 09:18:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=JSO1wr2G; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id EF8627C665; Fri, 15 Mar 2019 16:18:14 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by mail.openembedded.org (Postfix) with ESMTP id 5B2C27C631 for ; Fri, 15 Mar 2019 16:18:14 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id 125so6773232pgc.12 for ; Fri, 15 Mar 2019 09:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=83ALRBPtcO+Tw7E5Mhs3/7epPituz3UrzedACOfEX3I=; b=JSO1wr2GaNlNbWl4I20h4cu6bq2h2UXEZTy1COFm9zgd0ws/bKrF1Ir7CAMy43e9AC /DHB51yM/SEVVcYw2QH2bVGv+KWdCPDEq22scibM1uyBzHtjBoRWnqNUvgqcAl8KO8ix OSiceANwhv/dWNlTBU2fH3cgMtmQ7KePm4hhKEjtR2gAkLHOLkGz4FEHLdEDZBhT0aZ1 ATSwtGB0I8VNTtqQX2RcbV1KasRKc3JHrfKfALkEaliUXLeS7uiQyrZAobSvkaUY7g6M rTFoihXRwuSM7rk86k25rZFEQYsuivUFjD6Y7+xSkRwR6K5Vtza543IkKFjmnLrZQ6MN Bv9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=83ALRBPtcO+Tw7E5Mhs3/7epPituz3UrzedACOfEX3I=; b=ULQEixPWbmEcLBHJrcmgrJx3zhYLHm9RP7EH5MEtA0DyqNwBTM0IWJ1ciyOvWWL5m8 Yf3DfL2+p88gDLUCtlz2LKs4b5dN3Wrk0QjiHNkdFPSrre92GVmIrnBBL187rhgHpDHy JZm9g2ZtX5xlTdONX9lusGg9mPR/20N+Fj7Nnkses+q1kzOC4xMQxF0JuhuTloXDDc4C unhPXjN5Jdd3gA9KiVmoGdyWK0uPdEZVCbR9vcNjHRQnngsDJQQTjnMA44PtqzJDt41N RXXDfCyv5SxoS90+DKZ+2pUHaVcSgzk+9P9erojE0SB1t+SyXppXtzLWCFDax6WiWZRT Kzpw== X-Gm-Message-State: APjAAAWWbIlsmx6gYfsoSQV66M3T76vz7nCbdpudRQIjOy6Q07yHcGi9 zW/IsJYYDnGTyOeTqokdLFz9+7+a X-Received: by 2002:a17:902:9a88:: with SMTP id w8mr5149715plp.8.1552666694585; Fri, 15 Mar 2019 09:18:14 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::b8f7]) by smtp.gmail.com with ESMTPSA id h23sm3047286pfn.68.2019.03.15.09.18.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 09:18:13 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Fri, 15 Mar 2019 09:18:04 -0700 Message-Id: <20190315161804.26688-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [oe] [meta-initramfs][PATCH] kexec-tools, kexec: Fix build with latest klibc X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org klibc has changed its signature of reboot() API adapt the use here Signed-off-by: Khem Raj --- ...ecboot-Use-new-reboot-API-with-klibc.patch | 42 +++++++++++++++++++ .../recipes-bsp/kexecboot/kexecboot_git.bb | 2 + .../kexec-tools-klibc/klibc-reboot.patch | 11 +++++ .../kexec/kexec-tools-klibc_git.bb | 3 +- 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch create mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch -- 2.21.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch new file mode 100644 index 0000000000..52d622a2f8 --- /dev/null +++ b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch @@ -0,0 +1,42 @@ +From a6d1678379df6142a68cc9bb76dae540a31b8fdb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 14 Mar 2019 23:47:50 -0700 +Subject: [PATCH] kexecboot: Use new reboot() API with klibc + +Klibc has changed this API in +https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=6b621b8705ce5901dcf49607c8a3523c9e521901 + +therefore adopt the code + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/kexecboot.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/kexecboot.c b/src/kexecboot.c +index cf49b40..c785fce 100644 +--- a/src/kexecboot.c ++++ b/src/kexecboot.c +@@ -857,7 +857,7 @@ int process_ctx_menu(struct params_t *params, int action) { + #else + sync(); + /* if ( -1 == reboot(LINUX_REBOOT_CMD_RESTART) ) { */ +- if ( -1 == reboot(RB_AUTOBOOT) ) { ++ if ( -1 == reboot(RB_AUTOBOOT, NULL) ) { + log_msg(lg, "Can't initiate reboot: %s", ERRMSG); + } + #endif +@@ -874,7 +874,7 @@ int process_ctx_menu(struct params_t *params, int action) { + #else + sync(); + /* if ( -1 == reboot(LINUX_REBOOT_CMD_POWER_OFF) ) { */ +- if ( -1 == reboot(RB_POWER_OFF) ) { ++ if ( -1 == reboot(RB_POWER_OFF, NULL) ) { + log_msg(lg, "Can't initiate shutdown: %s", ERRMSG); + } + #endif +-- +2.21.0 + diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb index 61210e7680..4b20e1ed9a 100644 --- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb +++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb @@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" PV = "0.6+git${SRCPV}" S = "${WORKDIR}/git" SRC_URI = "git://github.com/kexecboot/kexecboot.git" +SRC_URI_append_libc-klibc = " file://0001-kexecboot-Use-new-reboot-API-with-klibc.patch " + SRCREV = "7409a1e0aaea61af87c4eca0149cec18a9f58ab6" inherit autotools diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch new file mode 100644 index 0000000000..be1301df68 --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch @@ -0,0 +1,11 @@ +--- a/kexec/kexec.c ++++ b/kexec/kexec.c +@@ -901,7 +901,7 @@ static int my_exec(void) + if (xen_present()) + xen_kexec_exec(); + else +- reboot(LINUX_REBOOT_CMD_KEXEC); ++ reboot(LINUX_REBOOT_CMD_KEXEC, NULL); + /* I have failed if I make it here */ + fprintf(stderr, "kexec failed: %s\n", + strerror(errno)); diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb index ebf5ff5ae4..7ad55d8b8c 100644 --- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb @@ -31,7 +31,8 @@ KLIBC_PATCHES += " \ file://0012-purgatory-string.c-avoid-inclusion-of-string.h.patch \ file://0013-sha256.h-avoid-inclusion-of-sys-types.h.patch \ file://0014-add-if_nameindex-from-musl.patch \ - file://0015-vmcore-dmesg-fix-warning.patch" + file://0015-vmcore-dmesg-fix-warning.patch \ + file://klibc-reboot.patch" WARNING_FIXES = "" FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \