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 8327EC6FA8E for ; Sun, 26 Feb 2023 01:35:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8C6A85BB6; Sun, 26 Feb 2023 02:34:11 +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="Qngq4dFp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AF27685930; Sun, 26 Feb 2023 02:33:30 +0100 (CET) Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) (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 8CA6785B68 for ; Sun, 26 Feb 2023 02:33:23 +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-il1-x12b.google.com with SMTP id s8so2080084ilv.10 for ; Sat, 25 Feb 2023 17:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=Uc/q/nj3S5w7ZJFDsqmFKhd1fvRl07HLzdV4JfKh3eE=; b=Qngq4dFp2t+f+xuvmPrdhmcpjA1M6ONaf5D9m9tVl3aun56jQ5j5/yI+x+kOgQO4S1 WbnCF3sYE6l3cF1dtweUd0BVnjXL6vVJLK4UipU2HF5/KJtwOPAMXADrvgPCvwVuQ+Tu 4T8fPn7cyBO4fe32fiKi2ZiIWm4qXwafmHD6w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Uc/q/nj3S5w7ZJFDsqmFKhd1fvRl07HLzdV4JfKh3eE=; b=nk1cgiSwGzqQcpSPBH5rPsdK9/Ov1RuHzhDiXknVQE0pCiZqA995m8+1A2Hl63+5u1 WmALwwowz5nOM8MuGIu8c1pNn+DV5805EEDMnc6+/i7bVuC9yEpxXo3pPY20fF1B7cLn jjKXe3I9B42bC2L6dn7J3E5tav3GkUGgT5BOmAY19OALouqF7ZrbtpCaiH9isFrWd6Zs FrYQscTQJPa3kdSW6lxLBTpbrSpyuRed2af/ff5nrComRVIa0stctsN7/doWVTAYw/bx xgV4cb3QpRhLNwceBpQxKOLE/8wz83MTtEgZk2rfkhYNJdOwPNbHNzSLARI9A1OCX6bU 05kg== X-Gm-Message-State: AO0yUKW+++YRDrUzkihG15h5+ABQt92i7dVznRnRikvUbU63BECNYlv6 C++vuenJTbbyjPwMMdStrRq5xCEcyBwMMrJ+ X-Google-Smtp-Source: AK7set+AXU6YTT+OIROwF7TvPd5AAY5yBE2yxBUTZ02SBocaOXu43OtF0u8z5RkihllZ1NrxSwu1Dw== X-Received: by 2002:a92:6701:0:b0:315:4f67:7054 with SMTP id b1-20020a926701000000b003154f677054mr12633928ilc.19.1677375202935; Sat, 25 Feb 2023 17:33:22 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id r5-20020a92ce85000000b00316e3a38becsm932699ilo.18.2023.02.25.17.33.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 17:33:22 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Simon Glass Subject: [PATCH 10/10] efI: Allow packaging a kernel in the debugging script Date: Sat, 25 Feb 2023 18:33:05 -0700 Message-Id: <20230226013305.2251638-11-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230226013305.2251638-1-sjg@chromium.org> References: <20230226013305.2251638-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.6 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. Bd efault it is assumed that the kernel is built in the /tmp/kernel directory. Signed-off-by: Simon Glass --- 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.39.2.637.g21b0678d19-goog