From patchwork Fri Oct 31 06:54:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 661 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761893750; bh=/vJEnEDop6tSXqNZLGPq0b6umWkABYxLbD7vuNfjTdQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B6RhD3lnN27FEAL5jBKUFENwZxsx6Red85yftsaOm4D4KWJ6HUW1rZfzlJnKfvt8a CxHFKnarBcEJKaRO/m/w1/BvLS5FjWy1N4zqrUMeGOIhynVLMKdwWi4ea2H+cpDXX4 mqIvm8qAxAsDKnDkaAyWsRiMkeyGDLMXcZ+4fcTdhk+2H5LbPYzvXjpzyMKjRhSXux PmqMAWpHCKUqemCYS1+adeRfpHuqPNF98jpZQYIlPV06kg9+i+u6oVhadu/VB6UTi6 uIcmXpbngWT4mruvgmfPE7RvZUVUelHVe8uTRkUBRoWyRA8Z7ayTvi+I9Q9UYAs7qu qygy2bBMAPY2A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B0A5F68346 for ; Fri, 31 Oct 2025 00:55:50 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id FYVbWgPLsi6u for ; Fri, 31 Oct 2025 00:55:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761893750; bh=/vJEnEDop6tSXqNZLGPq0b6umWkABYxLbD7vuNfjTdQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B6RhD3lnN27FEAL5jBKUFENwZxsx6Red85yftsaOm4D4KWJ6HUW1rZfzlJnKfvt8a CxHFKnarBcEJKaRO/m/w1/BvLS5FjWy1N4zqrUMeGOIhynVLMKdwWi4ea2H+cpDXX4 mqIvm8qAxAsDKnDkaAyWsRiMkeyGDLMXcZ+4fcTdhk+2H5LbPYzvXjpzyMKjRhSXux PmqMAWpHCKUqemCYS1+adeRfpHuqPNF98jpZQYIlPV06kg9+i+u6oVhadu/VB6UTi6 uIcmXpbngWT4mruvgmfPE7RvZUVUelHVe8uTRkUBRoWyRA8Z7ayTvi+I9Q9UYAs7qu qygy2bBMAPY2A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A1273682E9 for ; Fri, 31 Oct 2025 00:55:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761893748; bh=7Wpn76RktNmQ7Ckqn38skFkzO6xn+0dDLbmr2yo7/bU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeYCDW4P55inaLj5m7AZnKp6PTsr3rTF1Po6uaob8H/GkL25E9a7+bv59fqElujnM ZxKqiFywPE8HZ22fWpwFF3vB3eSslV5dOd1UnF2GvLo4tBIw4vs5E9dfkacCw07WxT 5PuX+eR6srn1IRYHCS/cHPzE1u9SX84erAxJQequN22Sw24paFyXen7fr3cw6QpYu2 2kLFO3F5IFAOC/FI/9OAIpa9B1+/6RgR5ckMuiqkrdt2nj6o3aoqWbs50LnRXdNEOl TM7tx4FpLWjeEok8XVj6qSl+/9TzD53szTXLyH/n+eXD+uyGCjxPlHvQivqNEQMU7S scKH0uODydJZQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6CE086827C; Fri, 31 Oct 2025 00:55:48 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id hmZF-xBBVs2P; Fri, 31 Oct 2025 00:55:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761893744; bh=S37J44fJ7+fm09AxcHMi9sqiaCcti2N/Qhk2aKrM0Qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jk4HItWcGsJPIcuVBtVsKx5PWPquCZEzWcrlOgHi68zd1nl88VhzTtmPAmH9hRfED UQbUf+Yhr6Pu2BT2zc6JzF9A7PjBiDOowD4lI2EpmpCevSAzTBl2DTbSAuE/evth0t JDqVaFtth6ZgtfWRe//1aJEd6TmnDYbFkc3l5s/SKn1NluElRwLPogS791MFIPD8zg jrSb8PBPyETw9tcrUPRnbUP4iRFVKqa36dk9JoVNfMG0KV/tEWBG/YrkVvJaVPMP03 5NY+fc6L6wLFwjS4IRPjlTQdF7q/8GHspGqHOLu1DhU4GV56/Rfh02/JQ66yuorYQH qCrI3C+ygx36w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 59066682CD; Fri, 31 Oct 2025 00:55:44 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 31 Oct 2025 00:54:07 -0600 Message-ID: <20251031065439.3251464-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031065439.3251464-1-sjg@u-boot.org> References: <20251031065439.3251464-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: UZUVPN76FYHNPJ57LGFFRW2BOFG2YVGQ X-Message-ID-Hash: UZUVPN76FYHNPJ57LGFFRW2BOFG2YVGQ X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 11/24] test/py: Set up an Ubuntu image with space for FDE List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Update one of the Ubuntu images to provide space for using full-disk encryption. Signed-off-by: Simon Glass --- test/py/img/ubuntu.py | 11 ++++++++--- test/py/tests/test_ut.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/py/img/ubuntu.py b/test/py/img/ubuntu.py index 1247ec134d5..c60da4a0c41 100644 --- a/test/py/img/ubuntu.py +++ b/test/py/img/ubuntu.py @@ -6,14 +6,19 @@ from img.common import setup_extlinux_image -def setup_ubuntu_image(config, log, devnum, basename, version='24.04.1 LTS'): - """Create a 20MB Ubuntu disk image with a single FAT partition +def setup_ubuntu_image(config, log, devnum, basename, version='24.04.1 LTS', + use_fde=False): + """Create a Ubuntu disk image with a FAT partition and ext4 partition + + This creates a FAT partition containing extlinux files, kernel, etc. and a + separate ext4 partition containing the root disk Args: config (ArbitraryAttributeContainer): Configuration log (multiplexed_log.Logfile): Log to write to devnum (int): Device number to use, e.g. 1 basename (str): Base name to use in the filename, e.g. 'mmc' + use_fde (bool): True to set up full-disk encryption """ vmlinux = 'vmlinuz-6.8.0-53-generic' initrd = 'initrd.img-6.8.0-53-generic' @@ -44,4 +49,4 @@ label l0r initrd /boot/%s ''' % ((version, vmlinux, initrd) * 2) setup_extlinux_image(config, log, devnum, basename, vmlinux, initrd, dtbdir, - script) + script, part2_size=60 if use_fde else 1) diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py index b532bdced13..218f5a74ac1 100644 --- a/test/py/tests/test_ut.py +++ b/test/py/tests/test_ut.py @@ -83,7 +83,7 @@ def test_ut_dm_init_bootstd(u_boot_config, u_boot_log): setup_ubuntu_image(u_boot_config, u_boot_log, 3, 'flash', '25.04') setup_localboot_image(u_boot_config, u_boot_log) setup_vbe_image(u_boot_config, u_boot_log) - setup_ubuntu_image(u_boot_config, u_boot_log, 11, 'mmc') + setup_ubuntu_image(u_boot_config, u_boot_log, 11, 'mmc', use_fde=True) def test_ut(ubman, ut_subtest): """Execute a "ut" subtest.