Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B91AC7618A for ; Sun, 19 Mar 2023 19:34:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A47785CF9; Sun, 19 Mar 2023 20:32:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Y4iOU5m8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 78BE685B70; Sun, 19 Mar 2023 20:31:31 +0100 (CET) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CDF0B85C63 for ; Sun, 19 Mar 2023 20:31:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-pl1-x62e.google.com with SMTP id h8so10415177plf.10 for ; Sun, 19 Mar 2023 12:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1679254278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q7LetxPf/RFKwMvtpsOCFcrwESehdTOSFB4QmYanDgk=; b=Y4iOU5m8KCB/OM9yeETmkDpKQkrdCjBrUw77W0eKJh4jA64BkIo5TNoT+cvtnr/Y73 uAHc0pA5YQ9XBmOTSkpz+UlkuCKJVH7fu/IB1IQ+bjSDJaPN/KSilvash5AG0arTCdu2 iAivhEZORxWxgrTiWFhc9QbFwOmbKfnWaBqD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679254278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q7LetxPf/RFKwMvtpsOCFcrwESehdTOSFB4QmYanDgk=; b=4kn4MimSoqyRLyJ8ULZV/m6ZsxZnwkxQf3K4Ov1xqYGLtCGviWc+Tx2bz5wwSmiyP6 YY7jLPq458WAE8cSK+iLf/AAyg3CRSxRSJpX3zPHbuEQ8b4G4cyLhTETN0J3Yq1jJk9s zneRJXb2v+DQh8ruBRhqtjvIgU1m3VU8DZU/vB9uHOP8ioHF5RHDsBm2RM0BGaSkV9LF K2ooDhe6UlruWQij9jvocNbSBbHlL/htzfc7dW/n+BDwcdZ5xVb6EML3TM/VS6xT1Lie XqSkO82S2hQzkYL7ksnwnt9QK9yxAEj+TFaQxR73aAxgVlj0jxdH3iyHBrlYV6nJ7Mlh XbsA== X-Gm-Message-State: AO0yUKWHPYkDmxOhOoEc1rc2V9lLSThsTGmT93zATPfQoCsCGy45Q0eK sT9D7KQ7awlIHV9fQfhUGHQ3mRk/Wa60ET7O3sw= X-Google-Smtp-Source: AK7set+TLYX6ayFs7uGfC436o3FwKAMp3rV7nJli1gQfaXP5vG9yEwGXzs6b+R9gvTjMaUGYbMIH9Q== X-Received: by 2002:a17:902:f90f:b0:19f:1c64:c9d8 with SMTP id kw15-20020a170902f90f00b0019f1c64c9d8mr12366603plb.14.1679254277951; Sun, 19 Mar 2023 12:31:17 -0700 (PDT) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id v12-20020a1709029a0c00b0019a75ea08e5sm5090651plp.33.2023.03.19.12.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 12:31:17 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Simon Glass Subject: [PATCH v3 12/12] efI: Allow packaging a kernel in the debugging script Date: Mon, 20 Mar 2023 08:30:16 +1300 Message-Id: <20230319193017.1084764-13-sjg@chromium.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230319193017.1084764-1-sjg@chromium.org> References: <20230319193017.1084764-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add an option to package a kernel into the debugging script used for EFI. The name of the kernel must be added to the script. By default it is assumed that the kernel is built in the /tmp/kernel directory. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Fix typos in commit message scripts/build-efi.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/build-efi.sh b/scripts/build-efi.sh index 46c28807ef1f..6b7df2e9bfe8 100755 --- a/scripts/build-efi.sh +++ b/scripts/build-efi.sh @@ -18,12 +18,15 @@ # OVMF-pure-efi.x64.fd at # https://drive.google.com/file/d/1c39YI9QtpByGQ4V0UNNQtGqttEzS-eFV/view?usp=sharing +bzimage_fname=/tmp/kernel/arch/x86/boot/bzImage + set -e usage() { echo "Usage: $0 [-a | -p] [other opts]" 1>&2 echo 1>&2 echo " -a - Package up the app" 1>&2 + echo " -k - Add a kernel" 1>&2 echo " -o - Use old EFI app build (before 32/64 split)" 1>&2 echo " -p - Package up the payload" 1>&2 echo " -P - Create a partition table" 1>&2 @@ -52,11 +55,14 @@ serial= # before the 32/64 split of the app old= +# package up a kernel as well +kernel= + # Set ubdir to the build directory where you build U-Boot out-of-tree # We avoid in-tree build because it gets confusing trying different builds ubdir=/tmp/b/ -while getopts "aopPrsw" opt; do +while getopts "akopPrsw" opt; do case "${opt}" in a) type=app @@ -64,6 +70,9 @@ while getopts "aopPrsw" opt; do p) type=payload ;; + k) + kernel=1 + ;; r) run=1 ;; @@ -124,6 +133,9 @@ EOF # Copy files into the filesystem copy_files() { sudo cp $TMP/* $MNT + if [[ -n "${kernel}" ]]; then + sudo cp ${bzimage_fname} $MNT/vmlinuz + fi } # Create a filesystem on a raw device and copy in the files -- 2.40.0.rc1.284.g88254d51c5-goog