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 70549C6FA99 for ; Fri, 10 Mar 2023 20:57:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5F7D85F53; Fri, 10 Mar 2023 21:56:37 +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="W5hnKfYJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A59A85A63; Fri, 10 Mar 2023 21:56:35 +0100 (CET) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 4B3FC85FA3 for ; Fri, 10 Mar 2023 21:49:31 +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-io1-xd34.google.com with SMTP id v10so2539050iox.8 for ; Fri, 10 Mar 2023 12:49:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1678481369; 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=uAbCxtNGE9eBPGIoN9OVJ2KtroqHQMDO/seHxT/szv0=; b=W5hnKfYJJ5nZjm9CS47KoMenl9v7l9e6eDB5SOD55bap+TGl1iX1InEPEDeJmTOl98 Ib6mR2YA7FaRJ+ltA51F0IWlazBVpau9SZAOERMFNqX86W7qeYNKRtPonCMiuj+H3ws8 AtecCsOh6vUqgfs1JT9tMNF2tgM0R+7aUTgt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678481369; 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=uAbCxtNGE9eBPGIoN9OVJ2KtroqHQMDO/seHxT/szv0=; b=Xhp4SmoaW15YUxyiY7OkGjz3guDvJuMlI3IRUgN6K1/+kWaHNP+3ShohUUDy2TedgK pFDwIeWtLO+k0mD3Q0JAcBGLg4aRnsRn8DCyKKYYc+ND04AyUWqHsqaXv+OLeNz1Orqx m52AjkNbE6yH5VZJ1C1C2rX5SF26AkrlCOua+0i6zt59QaGtNFKY+9uSkrxzBXAiyXdM 5K84QXt308MZaL8Myhqqt6MuaGYByUZSevWxavkBhZs8heqJLEu3/I4uClaJAGie6n2m fJBRPcI5k1BAUtwn1dU3y49/G8guUqL5fVqRCW3nRGnP88pwYOtni/bF7upq6+p4LtS+ PbNg== X-Gm-Message-State: AO0yUKUxOtAGeU1qOj9B+vnofaw41cRo/eWPm8DEyM55aJLg68XBZ43e t6T7XYCPACjZY0feAOA9YdkdW2oMMpZZbEcpxgw= X-Google-Smtp-Source: AK7set8v0TP2talsBE8RjRIwASx1M6NaK0in0wRzjm4TNe3RssiC6zTiIpTSZXmHpcKkS0KRQG4wKA== X-Received: by 2002:a5e:c103:0:b0:74c:b91e:1c17 with SMTP id v3-20020a5ec103000000b0074cb91e1c17mr16168651iol.13.1678481369330; Fri, 10 Mar 2023 12:49:29 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id a7-20020a056e020e0700b00315785bfabfsm273817ilk.47.2023.03.10.12.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 12:49:28 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Simon Glass Subject: [PATCH v2 12/12] efI: Allow packaging a kernel in the debugging script Date: Fri, 10 Mar 2023 12:49:02 -0800 Message-Id: <20230310204903.416969-13-sjg@chromium.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230310204903.416969-1-sjg@chromium.org> References: <20230310204903.416969-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 --- 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 46c28807ef1..6b7df2e9bfe 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