From nobody Sun Apr 6 03:28:17 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=chromium.org ARC-Seal: i=1; a=rsa-sha256; t=1741279892; cv=none; d=zohomail.com; s=zohoarc; b=Ntz4pzBfcIG1wSQKl3Kt7ZGgCWyO9oU0HUIY708Cc6iqok+MV9Wa4+nTcP5PNKKG/ffAoowlDD42KJKDqee8hj1ZRXuK1xZmJSw8dO2tH1+xMnpk1QhVejCeGF+V7C1EjHVrvrnx5NZMWBgoA5j3OS11pqRVfxFdXvHRjMRkNfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741279892; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YBw5RnVhttKdF2Qo8bwI9+KLvnZSt3HCKA4Su8eQKxU=; b=lgyz8UJCF+n6x/K4Gr5XQ0DzNFZgB7JHuL1OScXkNsXMOdRvm0hEDVq19EL3XBT0DVXovf8MP7G8FXH+OENmc95dOli7RsoQmgB0zOZZ0N5duvNaHFv3hJm8HmlRk45X5FFn8Yb0USWHFnqZiocwkns21BjrgtKPFRGM0Rj7X64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741279892255804.7119833935749; Thu, 6 Mar 2025 08:51:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDl7-0008C7-P9; Thu, 06 Mar 2025 11:07:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqDjM-00071w-Fa for qemu-devel@nongnu.org; Thu, 06 Mar 2025 11:06:06 -0500 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDjJ-0008Nv-SO for qemu-devel@nongnu.org; Thu, 06 Mar 2025 11:05:51 -0500 Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-3d43c972616so1726705ab.0 for ; Thu, 06 Mar 2025 08:05:48 -0800 (PST) Received: from chromium.org (c-73-203-119-151.hsd1.co.comcast.net. [73.203.119.151]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f213b959c1sm46759173.38.2025.03.06.08.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Mar 2025 08:05:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1741277147; x=1741881947; darn=nongnu.org; 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=YBw5RnVhttKdF2Qo8bwI9+KLvnZSt3HCKA4Su8eQKxU=; b=Ke4nTtMro0FNWrOIK3224bFW1wRQQovdaebgTErOxaZ54H2brZiUNINuKHgWeJu5YN XN4EO7hyTPeot0P0NL+/XgNX0lvGmjk7f4mftkPiggH+iZFwoY+QvAu5X1w02C0BDW/1 fUbvtctQE+UubjMkZihVKHty1Qokq5hogIZrg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741277147; x=1741881947; 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=YBw5RnVhttKdF2Qo8bwI9+KLvnZSt3HCKA4Su8eQKxU=; b=psCK6/4NrIyXmTB5ag+BwjFSYcWr5NanIYoxQ8wmTbdGYApamB8Rc/aWk22YZlOcHO 5+FCWKGgpMGfcH3NGlmFd0BGt1wvT862jivvXgbltU1GEziRCcTOGQAE9ScfGa9UAzYs 6bXTQjgSSFGX4Sp4oAEaZPvzZQNbxRdbM0b6BswOnbbfQYc8ImYhV63U/7YhLN+UAyw1 4HJRE6HEUlkLZZsPRwBJI+SEglkXpONPmdpNQnqZ2VpYgVx899ZkEcDMEwXM566GBBX4 ipB6H6CmnsXd9cWnqJKokx3M1xxewAu86IZ5fusl59f8VcQ2GWl7O0i9GeQmv9sex0/i TviA== X-Forwarded-Encrypted: i=1; AJvYcCVuvBOtGsKJrZNVvT2cWcg8xQ3lsIlHDiR8HebTq/oCZW9Xu+XlVu+X5ivm1i2rVOcen4UiUjhKS+i2@nongnu.org X-Gm-Message-State: AOJu0YzxpqpiqxjuBXqhtd6BuntE6pPjqZDm3UFAP3+NRpUnZrUwPSuc VA7o/KmSS/xViaZKVtKYOZLqR8fB5WxVYTjVW2nIlxtObuQR6KRcDQmQ8TvgXA== X-Gm-Gg: ASbGncuA5v/hvC437/TVYjo03X8DDOBFVo2ESAn9JghPAUcKnDoZxvmQ51ZbxSnZe2K nPBMbP5depcWObRcyij6ZsDa5xV3utnBIf5CnTuuKCPSvyHvT3xa2KpsGROcszkKhRudqI8k7lT C9lEwj1BaaNXr24iYTyoxeLBAgg0+BfMYp6u+wp2VeKv9Dx4kEF2yj/s4V8PpTFtr8L2jUdUdgR 2J5FWnY9wmiNxkRpI5ELqq+wZHOozMmJZy3KcREFVpy6Ja9fb7LWKeNA1sMDu5rRUGL68cJXteK 2J9WyLKo3nx14RPqO5L2HddecknsRmK+oK5KZiZaIRvM4fq3iBp/mvAvowsCb4RW3OkfizR7NoA GCc2kQw== X-Google-Smtp-Source: AGHT+IHuglgVnFtzfUwfDuVTzdXWjTh0CPnqHoatBlkZzeNQ3VGOrkEnP75Ie1cpdQ24+4tOGWjSXw== X-Received: by 2002:a05:6e02:4602:b0:3d4:2a80:74fb with SMTP id e9e14a558f8ab-3d436aa13abmr45343645ab.3.1741277147086; Thu, 06 Mar 2025 08:05:47 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Tom Rini , qemu-devel@nongnu.org Subject: [PATCH v4 28/47] x86: qemu: Support environment and cat command Date: Thu, 6 Mar 2025 09:03:55 -0700 Message-ID: <20250306160428.3041057-29-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250306160428.3041057-1-sjg@chromium.org> References: <20250306160428.3041057-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::12c; envelope-from=sjg@chromium.org; helo=mail-il1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @chromium.org) X-ZM-MESSAGEID: 1741279893492019000 Content-Type: text/plain; charset="utf-8" Add support for an environment stored in the first partition of the disk, which is assumed to hold a FAT filesystem. Support the 'cat' command as it is useful for looking at extlinux.conf files. Signed-off-by: Simon Glass --- (no changes since v1) configs/qemu-x86_64_defconfig | 6 ++++-- configs/qemu-x86_defconfig | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index 84b7dc8e99f..ae34cc2a6f8 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -41,9 +41,7 @@ CONFIG_SPL_NO_BSS_LIMIT=3Dy CONFIG_SPL_BOARD_INIT=3Dy CONFIG_SPL_SYS_MALLOC_SIMPLE=3Dy CONFIG_SPL_CPU=3Dy -CONFIG_SPL_ENV_SUPPORT=3Dy CONFIG_SPL_DM_SPI_FLASH=3Dy -CONFIG_SPL_NET=3Dy CONFIG_SPL_PCI=3Dy CONFIG_SPL_PCH=3Dy CONFIG_SPL_RTC=3Dy @@ -54,6 +52,7 @@ CONFIG_CMD_MEM_SEARCH=3Dy CONFIG_CMD_IDE=3Dy CONFIG_CMD_SPI=3Dy CONFIG_CMD_USB=3Dy +CONFIG_CMD_CAT=3Dy # CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_BOOTFILESIZE=3Dy CONFIG_CMD_EFIDEBUG=3Dy @@ -61,6 +60,9 @@ CONFIG_CMD_TIME=3Dy CONFIG_CMD_BOOTSTAGE=3Dy CONFIG_CMD_EXT4_WRITE=3Dy CONFIG_ENV_OVERWRITE=3Dy +CONFIG_ENV_IS_IN_FAT=3Dy +CONFIG_ENV_FAT_INTERFACE=3D"virtio" +CONFIG_ENV_FAT_DEVICE_AND_PART=3D"0:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=3Dy CONFIG_USE_BOOTFILE=3Dy CONFIG_BOOTFILE=3D"bzImage" diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index d52afa42955..7afa3827e61 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -34,6 +34,7 @@ CONFIG_CMD_MEM_SEARCH=3Dy CONFIG_CMD_IDE=3Dy CONFIG_CMD_SPI=3Dy CONFIG_CMD_USB=3Dy +CONFIG_CMD_CAT=3Dy # CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_BOOTFILESIZE=3Dy CONFIG_CMD_EFIDEBUG=3Dy @@ -42,6 +43,9 @@ CONFIG_CMD_BOOTSTAGE=3Dy CONFIG_CMD_EXT4_WRITE=3Dy CONFIG_MAC_PARTITION=3Dy CONFIG_ENV_OVERWRITE=3Dy +CONFIG_ENV_IS_IN_FAT=3Dy +CONFIG_ENV_FAT_INTERFACE=3D"virtio" +CONFIG_ENV_FAT_DEVICE_AND_PART=3D"0:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=3Dy CONFIG_USE_BOOTFILE=3Dy CONFIG_BOOTFILE=3D"bzImage" --=20 2.43.0