From patchwork Thu May 13 02:00:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1477907 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=RZiIYJEC; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FgZd936f5z9sWP for ; Thu, 13 May 2021 12:01:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id DBCE1842B6; Thu, 13 May 2021 02:00:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y64UgYcgkEuK; Thu, 13 May 2021 02:00:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 5635A83E22; Thu, 13 May 2021 02:00:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 977D81BF281 for ; Thu, 13 May 2021 02:00:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9258F40F86 for ; Thu, 13 May 2021 02:00:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6EKTdyxS0MNa for ; Thu, 13 May 2021 02:00:55 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by smtp4.osuosl.org (Postfix) with ESMTPS id E587640F82 for ; Thu, 13 May 2021 02:00:55 +0000 (UTC) Received: by mail-pl1-x62c.google.com with SMTP id h20so13567648plr.4 for ; Wed, 12 May 2021 19:00:55 -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=/v0imQmTbJxksHosD7+W52uLT5MhOQSZNv1Et5sLpg0=; b=RZiIYJECBdzmNVQ11PBGyqwrHnNL18d5+G1EtT9qSTJfPk4eQBneWMJySF5WL7DvGV lD4iywMH3fJLMFfpKMSnMYSIOuUD7orj8pFXrbYtoDzRvJVhmE/4mwZob+xNwzVlknUg 6XmJPT68pIDZ1vy7nxl26cScdDsMxw5y0nStnhf3FF6LqrThgGuKFVinD3Ng7Ugi4bPq qVHzgfoVuSXSEaoObEn3hRCx3VqsJTjfXZOCR/VB8zCV5/qGVhvmxkMwmfnp1Sm1yXLe 6CuBWJogRlAdbtbhubEWo05JnTagv9DfQVGfEt3JDHCtCmNyYxsDv+z6og8vyOrDMD4q jpgg== 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=/v0imQmTbJxksHosD7+W52uLT5MhOQSZNv1Et5sLpg0=; b=hZSmHNECXwLhacYaAToKjVY4QZJdslweFee5Hlirjsk8cBqLj0XzbJ38u0ELBMuRwj 1FgL65FECrcSIRaj2vGiq8djo6ozlAznOK+5+u0EYA0gc9PHvyaWjxyKfWLR8QlmvPff wUsFgPCDztojjd/BNSuQrCzxkmrl2nRFUWOYz9NzIEJzbfiZ9VWk6KxiBmWN9fTkeALs 4XGd05Bo1El+LewYnEgDwfQBb6GNRJ2idBQppgnY9qo5PgyidWRsqhumVDR5HK1tMSIH V+iEaTHszy/Ey5Rz1Hg8TbGSA9GX7wRhrSHiA+fMklBVSE5yrymqrqd26M+fgXFg8DSk ylug== X-Gm-Message-State: AOAM533wAU966vNCG9+DOdVsckppY7TVqF85zCfu9K8ZT+E6/6z1QCB3 YKi/7DDOqapVYvpLnLIJw92sAn3ZNgE= X-Google-Smtp-Source: ABdhPJz7hoLQfLAhXcjCCvyloTQOk81zrMgLRu5S1vcqWx2y57/x3ZfOLXCEmFja+ECq3XZprgM6YA== X-Received: by 2002:a17:902:6a87:b029:ef:2942:89fc with SMTP id n7-20020a1709026a87b02900ef294289fcmr22244000plk.36.1620871255085; Wed, 12 May 2021 19:00:55 -0700 (PDT) Received: from adam.duskett ([47.153.80.143]) by smtp.gmail.com with ESMTPSA id m20sm5506692pjq.40.2021.05.12.19.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 19:00:54 -0700 (PDT) From: Adam Duskett To: buildroot@buildroot.org Date: Wed, 12 May 2021 19:00:52 -0700 Message-Id: <20210513020052.2528223-1-aduskett@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/mender-grubenv: fix installing on non-efi platforms X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, mender-grubenv unconditionally installs files from the $(TARGET_DIR)/boot/EFI directory to the $(BINARIES_DIR)/efi-part. This fails on systems that are not building grub against EFI. Add a check in mender-grubenv.mk to ensure the files are copied to the correct location if EFI is not selected. Signed-off-by: Adam Duskett --- package/mender-grubenv/mender-grubenv.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/mender-grubenv/mender-grubenv.mk b/package/mender-grubenv/mender-grubenv.mk index ade0f4c0ed..f06dbbe35c 100644 --- a/package/mender-grubenv/mender-grubenv.mk +++ b/package/mender-grubenv/mender-grubenv.mk @@ -55,11 +55,20 @@ define MENDER_GRUBENV_INSTALL_TARGET_CMDS endef # Overwrite the default grub2 config files with the ones in this package. +ifeq ($(BR2_TARGET_GRUB2_I386_PC)$(BR2_TARGET_GRUB2_ARM_UBOOT),y) +define MENDER_GRUBENV_INSTALL_IMAGES_CMDS + mkdir -p $(BINARIES_DIR)/boot-part/grub + cp -dpfr $(TARGET_DIR)/boot/grub/grub.cfg \ + $(TARGET_DIR)/boot/grub/mender_grubenv* \ + $(BINARIES_DIR)/boot-part/grub +endef +else define MENDER_GRUBENV_INSTALL_IMAGES_CMDS mkdir -p $(BINARIES_DIR)/efi-part/EFI/BOOT cp -dpfr $(TARGET_DIR)/boot/EFI/BOOT/grub.cfg \ $(TARGET_DIR)/boot/EFI/BOOT/mender_grubenv* \ $(BINARIES_DIR)/efi-part/EFI/BOOT endef +endif $(eval $(generic-package))