From patchwork Thu Sep 25 17:47:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 413 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=1758822495; bh=vl408E4LNDvVaput0dcrh6r8a+HqXnJAdtX2mN0xWZE=; 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=JqLTCBzwOknpv2q4nla3nZloD4gPaktWOrM8yILUhablSAqrjyZfNJM8SF8w2JDaJ RIOZ3/V4jUMbI/OwjeGHfptek8Ju32EHd53g6nF0Y6wNUEbOiQu64fVAaQuUn30gma tOeaXjoY8Qk2xKunF6L75LFPCBTOf6EQUlJhtsdJ0iJKzaYX9kK8zc+b2mEPv5bi7p s+A5ZPoAXA5a3ECdAdojbxpAwYR6A2TBj4p50Bc1Fa80jCnBaiSQIVu+RfXjEl83Xa IF1iywl+digC48ObKn5JPBIsjSz9DkCcjTYuiL0vUww4zdLFfK6vxJuKTvHSdwhKTz +rEkEK/lf+uxg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 534D167D90 for ; Thu, 25 Sep 2025 11:48:15 -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 vlYF_4nDNZXV for ; Thu, 25 Sep 2025 11:48:15 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822495; bh=vl408E4LNDvVaput0dcrh6r8a+HqXnJAdtX2mN0xWZE=; 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=JqLTCBzwOknpv2q4nla3nZloD4gPaktWOrM8yILUhablSAqrjyZfNJM8SF8w2JDaJ RIOZ3/V4jUMbI/OwjeGHfptek8Ju32EHd53g6nF0Y6wNUEbOiQu64fVAaQuUn30gma tOeaXjoY8Qk2xKunF6L75LFPCBTOf6EQUlJhtsdJ0iJKzaYX9kK8zc+b2mEPv5bi7p s+A5ZPoAXA5a3ECdAdojbxpAwYR6A2TBj4p50Bc1Fa80jCnBaiSQIVu+RfXjEl83Xa IF1iywl+digC48ObKn5JPBIsjSz9DkCcjTYuiL0vUww4zdLFfK6vxJuKTvHSdwhKTz +rEkEK/lf+uxg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4334767D93 for ; Thu, 25 Sep 2025 11:48:15 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822493; bh=BB6nbJwbzTIBNCqO6ZuhVZhP9S1zSyvEzx6tPcgwn5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eG3hRNINoDLza1Ki5w5WZMcnAO4FcHLjgA4cdZGKgpx7o9OuX2JKM0Zph5s0p8Tq6 aLC60tc6tnUByJSE2UlF6d8L4NmUY+iZNMeMaTF+ib3bto2GjbKPE4VNUG+OgP91yT ZYQPCR5lzODmhA/Vs6aa/QiEghCXzh5WCgoO+jRMHDd3tJKMxbVJCYFAE6ay/5RnAG JS1QIhh1rXQyPld6zhS5N7uRwx2VjYfFLNmu5X5GBj0yFFpQQEP/rVvFT0YqlBlbzv Gmuop70Esr7RYKg4RlGV9V2TGbRTy46bwUKZRFrteLRMflQEHMJEik7Z4Gb6zlgNFI ZKFk1+MaLKruw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CFB9E67D76; Thu, 25 Sep 2025 11:48:13 -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 y-WQnzvQIJWW; Thu, 25 Sep 2025 11:48:13 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822489; bh=43w4ex/kYQ4jjBjbjQzqgzmNZ2GfhFn89glNCKK9yzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Szh8ZG3EhjCXfsOmzedzTaSC7g4zKVNzzA2jFbtXkieaxYIICwbOqioycWj65i2oS ykP6dwa4mYzNwgA5ulMnV/vyagnGm7AU2LHqVoXVtHzY5kxckVWnq/EZQOEhiPPUtK ur+WO98RDEGAfU3rJEbQWqcS7iwquumF6DWhvi4NDKZABsgYgtBgnNvD1APbDH3SLX LZZ16DPUdW1bsWgqraQ7YOfxlq8+7//f8NZ0dXCxyATTYJzBPVL+lE1tKhqKFvAbxF m1k6rYeUqtoK6FQhtv6EZQsbeLfHHX1riWYuTnAz27hwDCUWRawPIlUL12jviId3Dz AsxyzkNWUflgA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8603467CA2; Thu, 25 Sep 2025 11:48:09 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:25 -0600 Message-ID: <20250925174753.3429102-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CVL4FXE4KAURSGUKJVGO3B3FBR7QOG3U X-Message-ID-Hash: CVL4FXE4KAURSGUKJVGO3B3FBR7QOG3U 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/22] bdinfo: Show the flags 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 The flags contain lots of little pieces of information. Print them out with the bdinfo command, so the user can look them up if needed. Signed-off-by: Simon Glass --- cmd/bdinfo.c | 1 + test/cmd/bdinfo.c | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index a70a1c59f51..69d9c3cfe4d 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -138,6 +138,7 @@ static int bdinfo_print_all(struct bd_info *bd) #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) lprint_num_l("multi_dtb_fit", (ulong)gd->multi_dtb_fit); #endif + lprint_num_l("flags", gd->flags); if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) { lmb_dump_all_force(); if (IS_ENABLED(CONFIG_OF_REAL)) diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 03d9846de10..6b4cfa96e4d 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -191,6 +191,7 @@ static int bdinfo_test_all(struct unit_test_state *uts) #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) ut_assertok(test_num_l(uts, "multi_dtb_fit", (ulong)gd->multi_dtb_fit)); #endif + ut_assertok(test_num_l(uts, "flags", gd->flags)); if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) { ut_assertok(lmb_test_dump_all(uts)); From patchwork Thu Sep 25 17:47:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 414 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=1758822497; bh=vJxLeMhXr3qjev7/AbRQyUsU+/lSOU29LUaOLjGXVrk=; 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=F+odXJhb73Y9b1AsiKlqToRE4tHwVQnA12BVQdUb1r4qAjdaaD4qU16C9C1tOOYzW pKmVc+O6gY20MGjoporCrdENEQG9lCdlgVIsGXtgue+3G4VKkLmoSuVXvNH2+PaYWe u9H0jQpr7M3jItsZ910qKlrXcvzAST4YuPerw3eoOwuk9n4q1U1YMBbtBok2YjjyRG /2COkpVJwegJdZIOX6st5jp5VYbwPBlBNpsgIEGIOjbGrVpbVeBLnUU1WunmysbQSr 1gB9Sq+tPlSkk/z+fP0YXtUcdc/sFAPnWYCqp9rwBDElmGl0ay+VnyNVwovRSGHcBv G75jSWPXvDy8w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DE82067D76 for ; Thu, 25 Sep 2025 11:48:17 -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 vdZVqnuHX3d7 for ; Thu, 25 Sep 2025 11:48:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822496; bh=vJxLeMhXr3qjev7/AbRQyUsU+/lSOU29LUaOLjGXVrk=; 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=TA8i/FLHhEUPUHW4XWsXLUipRADCTxl+W1xckAeyf4wbgY9Myc06AWhygFDbRdXTX /x4H1SRm9hBFWHlQOeI5U0n2OERRWMQNNQVGuOYQu71ZMH27GFR0taB75/hufVcl/m ohM7ZKtp3RIbReiFbJG2L3ZZLU/chxBkDTWZBAHE8ALG+q84rRh7asZe/TS7OA1pJZ i+qcw099jru0Gp2HGVW+lmj+PjXu6bH+tv/ToQbfsaB60bdecvYQcm7Pme3Ukh1VRk b4vAmB1GrLif4SJw/BNbZjXyA0WKYhqkB1gGgk/r13DQIpHpn3jEanK0kCnbrbqiIV CllgVHba3N05A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E48DE67D82 for ; Thu, 25 Sep 2025 11:48:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822494; bh=rvuf/lg1qEGJJSYQriHJIjaTLhZiIOWPqHXittaQ0AE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jg6lA7JxAVCr1Nojlco9g5BdBI2dHZ625SGGPL78LgcszP9+84ndLlNG9bOhFfeAA qM4QuNNK0O7Ea+IDbs5UhWZTbfewzS91WUuSSYhZte9rVRrv2ILuU2CXLpR6jmwuQ9 ZAQ7lkRDRD84z7Y9a7BoztQ8h1teCZzBmJX/0RqpibrcK67mL6ICxmEwnKSSJYx/cB n/aTVseYPP2RHnlzhxs7PvWBRO5gDhtC1J/NN67XUZbsc4idmJ1cMk+9IdEZZ3qbZ5 576nu6/RFSRymN5z/f3RIUFoD7MPd/fhFa3D37iQZo9JvNwUU9j9TW0RNHZ6Wne8mb rR5aXYSfO+GNQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CF61D67D82; Thu, 25 Sep 2025 11:48:14 -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 IlYnJRWELEMb; Thu, 25 Sep 2025 11:48:14 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822494; bh=/PXz6cRNX1wav3d8r+VZaqV/BgGrLkBsiiCbvRPfyWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U4cC11LBHEyyJRtXHgvvDgaXcDj5ZHifa+ALae/gB3OJY6E5LGLFsGSBg5GTUWCsn 1K9GTYXfoYjHFuBKrDPBjfl7TQQStsoJwoSudWfmYngG/PKnzoGDRXPX2lOQbfEglW gFDNlyTf/eBv57LFHZqmVLIeHgJUW96sjomOPfMoV+iiCulD5wiuwEAnvEGmDn7KFD 2rsQbzdpVa0fRmN9Jp/TCnZXW21bF5nR4UdiieWgUhzmOwwpJpBfJ3kHbiC4aaYTpa QlAM1GoCg+7LP/9dqscwJxR86GJ81Uo7NopDZCTNnlHAjl316hNPsVMbhR5Pu0B6+f 8kXhi5lugpexw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1FA8E67CA2; Thu, 25 Sep 2025 11:48:14 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:26 -0600 Message-ID: <20250925174753.3429102-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: FKBTA4C5N5RVTSMNWRBKN6GTEXHK4QF5 X-Message-ID-Hash: FKBTA4C5N5RVTSMNWRBKN6GTEXHK4QF5 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/22] script: Use a minimum of 1G of memory for EFI 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 Since the U-Boot app now requests 512MB (to fit the ramdisk, etc.) and Tianocore uses some as well, the current 512MB is not enough. Double it. Signed-off-by: Simon Glass --- scripts/build-efi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-efi b/scripts/build-efi index 27446295b2d..21c2b656530 100755 --- a/scripts/build-efi +++ b/scripts/build-efi @@ -127,7 +127,7 @@ class BuildEfi: mem = '4G' extra.extend(['-smp', '4']) else: - mem = '512' + mem = '1G' if self.args.debug: extra.extend(['-s', '-S']) From patchwork Thu Sep 25 17:47:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 415 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=1758822501; bh=latd37VX87Rz4WPOj5VfDMaMwFglusD8Qp59zb3p4cE=; 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=TRsrwESTMrpJUWMO1nIWZsEQEasbWhctl0FozGjw4RWHL18vPDTL441goAxJNgHWy VGYrOXkt9x/gBlJkGDixwuoGBKC30ms7czfGsiKTCEkefh9cXAlzqGwQ2512mqf20e 99iGrIK9HlOg3sP598TcudQX7u73djS3N/a0HxIQCE0pIQb7v6GK2Ys8xNeEvmANmX OHXDMJrSIjORtPWX34GceGepubxsSuUK5UzxDPOki23GvBMAC+ztkQ3Ux4n7fKtLAd GmFmTxJglY1C9fa3zVNJdF6fL3eXO1WHMASiAbhG+TH8v3fqhWj0VtKQhGS/IcezIM mtEJUonURFtSw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6E04867D93 for ; Thu, 25 Sep 2025 11:48:21 -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 2q7IZ2PKTz_B for ; Thu, 25 Sep 2025 11:48:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822501; bh=latd37VX87Rz4WPOj5VfDMaMwFglusD8Qp59zb3p4cE=; 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=TRsrwESTMrpJUWMO1nIWZsEQEasbWhctl0FozGjw4RWHL18vPDTL441goAxJNgHWy VGYrOXkt9x/gBlJkGDixwuoGBKC30ms7czfGsiKTCEkefh9cXAlzqGwQ2512mqf20e 99iGrIK9HlOg3sP598TcudQX7u73djS3N/a0HxIQCE0pIQb7v6GK2Ys8xNeEvmANmX OHXDMJrSIjORtPWX34GceGepubxsSuUK5UzxDPOki23GvBMAC+ztkQ3Ux4n7fKtLAd GmFmTxJglY1C9fa3zVNJdF6fL3eXO1WHMASiAbhG+TH8v3fqhWj0VtKQhGS/IcezIM mtEJUonURFtSw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5D88067D82 for ; Thu, 25 Sep 2025 11:48:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822500; bh=8kQcnDDjShKjmTUKIeb466inV/9DFHir4KUI0RHOP5k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sX0nQRPKBUl1VOD1+FlZ8kd0lMMOZbPPryXpggGFTtp9d1FZP35ZgBUI028wdWm0X frAn8lGHMsrJOgdlm6oAux+M8ZcJ3ucD+HwgdZ0yibxOkNzBJQjQ9RqSUERt4rPlDQ DIPe2iRxRNmUbMG0bwasxL320eL4YO1R4QrEwHLL6H4fpIi+ImFhb/kLzEqwhFz+Rj Xx2nGCbB3Rctu8BkpWRmRVCT6+CZBZ+A7jJAMzIqgeytQ+hiGtZt9akZ5AVHlcsLA9 6ulw2noWYqRJgjgTFbopQR3/xsfHnGhvWpqKkbHC3f5EQEKgK46zfC20b45aBzkOus yRIgaBgE0EKrg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3A4B167D76; Thu, 25 Sep 2025 11:48:20 -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 CNbwSMoTImpk; Thu, 25 Sep 2025 11:48:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822495; bh=78VzqzL+tQZ+nwOM5smLESorHpOoJ5VtBmsiBLye/8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=day/RrdNIHXb0ng7njnsYDVGDptCYLxAUT9a9Bxf0ZaGprt60khHQJiSd2S688SEF X3H6Xe8MYzPwH81HgufUJnppUKTiayNJI+MHsySu/HFI7YT6aFvmHu86YdBnbzeCiF Pnrk6s5dt+BuTzxpDMg0pCUw1E5tm7SRebrSLA7QW4Olaz4zmh5hNqEJkxKEusaPAL uRWbHaoXMFCdoHUezobMYHAQidn3zS9p5yxJxG17wYQCzp3E9aCoH0WEkTH+09tNjg OvWWamphHUlJaTcVn6ilQCRhE+bkPfpRuhWjvE+mrk8QB2mStpk6LC3n3ITys5SLUs wkOKRHx1rF+oA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 209AE67CA2; Thu, 25 Sep 2025 11:48:15 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:27 -0600 Message-ID: <20250925174753.3429102-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2TSJODWVSJFHA3ONPJQ3VCD4Q5JGWSXF X-Message-ID-Hash: 2TSJODWVSJFHA3ONPJQ3VCD4Q5JGWSXF 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/22] console: Reset the pager when clearing the console 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 When the console is cleared we have a fresh screen so we can reset the pager. Signed-off-by: Simon Glass --- common/console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/console.c b/common/console.c index 561a859dc1e..c033d72486a 100644 --- a/common/console.c +++ b/common/console.c @@ -1108,6 +1108,7 @@ int console_clear(void) if (ret) return ret; } + pager_reset(gd_pager()); return 0; } From patchwork Thu Sep 25 17:47:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 416 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=1758822505; bh=95mi5Aejqjm0P9/cKEpMyHjjlkbY7b+cBySxIZ/i3z0=; 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=wfsnA7S361h2hkUPx/DKD6BjQOYhtPNrtkRCWUjFiwrnG0sq9B+cWwTnrH9E4trtv qEXKJj36W3OAnjHNaSzcSDUEOUZhtNoHS0/UlPtmzegVP9Jp5+b200ony0rmgrDDYQ fK2vuxi4FgHtP+aldP7/TbuLtyqP22YBsPgCfL6158SEzI+KcP8LwkoFaBcf6PwFzz G1HAogfDgrNKwlNLsl0WFkJTJAAbHIDOFP969VT9vV1klskuokpNSQTCNPUmtnQBhA 6UllZJFBMPrCdkh8BF3lffhlg+TOwQ4wywgrK+kklBqLf6mtzqk0chypTy/sETqtN8 u0j0VuHtVKYDw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E3F0267D29 for ; Thu, 25 Sep 2025 11:48:25 -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 wWkUnJh5pb-U for ; Thu, 25 Sep 2025 11:48:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822505; bh=95mi5Aejqjm0P9/cKEpMyHjjlkbY7b+cBySxIZ/i3z0=; 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=wfsnA7S361h2hkUPx/DKD6BjQOYhtPNrtkRCWUjFiwrnG0sq9B+cWwTnrH9E4trtv qEXKJj36W3OAnjHNaSzcSDUEOUZhtNoHS0/UlPtmzegVP9Jp5+b200ony0rmgrDDYQ fK2vuxi4FgHtP+aldP7/TbuLtyqP22YBsPgCfL6158SEzI+KcP8LwkoFaBcf6PwFzz G1HAogfDgrNKwlNLsl0WFkJTJAAbHIDOFP969VT9vV1klskuokpNSQTCNPUmtnQBhA 6UllZJFBMPrCdkh8BF3lffhlg+TOwQ4wywgrK+kklBqLf6mtzqk0chypTy/sETqtN8 u0j0VuHtVKYDw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CFD2067D8B for ; Thu, 25 Sep 2025 11:48:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822504; bh=DXj6519klrEgTu9+/zj4bQrfw5OHuJovLaUghgXYVyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XBJThWVuATKQ2KIqN1fG5aI8usQkFKEbfaVePG9jY2ECp9BnfTHFwCzMplZT/CKe3 h6v3tCAkE6OExNsrajntG5EWahpnaqHDG69vJnbkMZFVlRfBYkrCWrjmFYrqxDXijD HNMsrPLSMnH4fmKqLiN72mIacIOYr3ylKw/FiEFqwiZk8RqLihSlLSdA51ZbeX4SRo XEpkwA9lTuuHPVMj8RlJy33unyiJI01myjLGVqfRSuVQQzf/RGknIuuzNcFn21qqWO biUQgXWBYrgkEQ2pc6Ni4ko/aOVE6ugG9kkWALsblP2Hs5fjMJYMbaKk7/drofYpqY Wn2QxNqDmdVsw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0E83967D29; Thu, 25 Sep 2025 11:48:24 -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 r0L2R73jtliw; Thu, 25 Sep 2025 11:48:23 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822500; bh=ikAzx9IAbQOyNCssVSiqpMVzBpCYd85VWYGRicC64jU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pSXBUXx72YpgV81wcvhjNbbdk0O1LclFAkQrVCSVCV4yW8nRCrfrR+ZnA6Z1zBiL7 HZebddRebl7wdM2L9bfpBDQBXwT7Csat90yRCsnYVelko5bqd5pUDjVgiBlK7LqTuX fDGVUQR7WzDM7k2trsdjbesNsc/nHT5pg8OZGvp6yaKhma/g57KS3/sXec/4b1XDbO C44uvdkY/v5Y5RsJlUzjgJl0viYBAAIXSkPI86vgFMslkWX5ZSFCMy84MR/bDWxSHM ZWaqCCnCiOJcwC8pZ5VfVAAM2Fzvy/a4NOWDmWEpD8PCen1sEgzKoq3tzzBsLnh+Kv h29L8+lIeec3Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B4F7E67CAC; Thu, 25 Sep 2025 11:48:19 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:28 -0600 Message-ID: <20250925174753.3429102-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: UJ4EMI7MJBXMG2ECGUHSQOT53JODXL7Z X-Message-ID-Hash: UJ4EMI7MJBXMG2ECGUHSQOT53JODXL7Z 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/22] doc: Fix up the booti examples 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 The command has been updated but the docs was left behind. Fix it. Signed-off-by: Simon Glass Fixes: 7f9e630a9ea ("boot: Drop hex prefix from the booti image-mov..") --- doc/usage/cmd/booti.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/usage/cmd/booti.rst b/doc/usage/cmd/booti.rst index 313efb83cc6..a4264853f89 100644 --- a/doc/usage/cmd/booti.rst +++ b/doc/usage/cmd/booti.rst @@ -58,7 +58,7 @@ This is the boot log of an Odroid C2 board: => load mmc 0:1 $ramdisk_addr_r initrd.img-5.10.0-3-arm64 27421776 bytes read in 1209 ms (21.6 MiB/s) => booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r - Moving Image from 0x8080000 to 0x8200000, end=9c60000 + Moving Image from 8080000 to 8200000, end 9c60000 ## Flattened Device Tree blob at 08008000 Booting using the fdt blob at 0x8008000 Loading Ramdisk to 7a52a000, end 7bf50c50 ... OK @@ -87,7 +87,7 @@ Here is the boot log for the compressed kernel: 27421776 bytes read in 1181 ms (22.1 MiB/s) => booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r Uncompressing Kernel Image - Moving Image from 0x8080000 to 0x8200000, end=9c60000 + Moving Image from 8080000 to 8200000, end 9c60000 ## Flattened Device Tree blob at 08008000 Booting using the fdt blob at 0x8008000 Loading Ramdisk to 7a52a000, end 7bf50c50 ... OK From patchwork Thu Sep 25 17:47:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 417 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=1758822508; bh=V79wO1onhJ/wviRSg8I97qOuoi5LWjoXOlvzs8VlmsQ=; 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=YE+yq2f1FbsuCieNBjFOj3/ue6JVkkATKJy7jO3xcGgC0PIwkQubJKS05OEXJvJ4W DLl6jFT+/O6pPD5syjlgAhLdB6fPyWgUv9S1s4iaU6UNW7ozhNfY9X/ro4sRzTOGOK V35c78cpJ3MYzrEoGllHVlk9732TxUJK1GVZggk32e3WI7o/hYooU97zg4xOt6OeaF u/pEwHkvv1qVV8qQwe2iesSYQ/bJ+f5zXUtLFBnQPcfAFxK9XSPyMqmbLszniQFHIw CbXGL4yIkLWOnACpbWjDUqF6W/XrfyJO4IAMo4chsvD0CNVX9Nhx880koKgpkED+Gs mbgHOZ6KrlxJQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9263167DA2 for ; Thu, 25 Sep 2025 11:48:28 -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 A2VXQSDwmHZr for ; Thu, 25 Sep 2025 11:48:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822508; bh=V79wO1onhJ/wviRSg8I97qOuoi5LWjoXOlvzs8VlmsQ=; 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=YE+yq2f1FbsuCieNBjFOj3/ue6JVkkATKJy7jO3xcGgC0PIwkQubJKS05OEXJvJ4W DLl6jFT+/O6pPD5syjlgAhLdB6fPyWgUv9S1s4iaU6UNW7ozhNfY9X/ro4sRzTOGOK V35c78cpJ3MYzrEoGllHVlk9732TxUJK1GVZggk32e3WI7o/hYooU97zg4xOt6OeaF u/pEwHkvv1qVV8qQwe2iesSYQ/bJ+f5zXUtLFBnQPcfAFxK9XSPyMqmbLszniQFHIw CbXGL4yIkLWOnACpbWjDUqF6W/XrfyJO4IAMo4chsvD0CNVX9Nhx880koKgpkED+Gs mbgHOZ6KrlxJQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7CCE867D93 for ; Thu, 25 Sep 2025 11:48:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822507; bh=yANkU3Qm+BMx+aB+0cPL/8er4vJxn3QZQdjwjRPfAKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=crBZWKnTjDWePaavPL6Zqc2KRqrAppgz9Q59EFqDQisE0e7orbqVKya3t8YyzEdb6 ULVWz41n4LXqSVPGYAnUGTGw9RTXr4aSGagPAMqv5oLDue96a6jBly0s+XjCHbNCb0 CY23GHy3l1aoCZz3FJapN/2vcOscEHPX9QIjxq8GCRWS5DuBIW/jOq1JQ55ta1kgZ8 l7wJuHoBwY1WQY4rQoHLREqzFnMER0UOil+RUfXUSyvrCR8ygz+ZUVjKERk5PQ2JDb 71RHCJVjvl+6Pf5xJpRkyf4MdVkg1/cSAecuqQLE83PhxqDO7UZtLH0ETJ4o76GHJy yFRyZSH8/2gzQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 21A1967D29; Thu, 25 Sep 2025 11:48:27 -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 oY9gqxtYxdR9; Thu, 25 Sep 2025 11:48:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822504; bh=B7JOnV+x5IJ8XrFA4wMvKIwOnAYlOuw2Mb/fXxH+t00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZMC3tnWE26xTioIgUcIiQ73XKOjlU6IzlsSUBaE5OvVjddi/nUuzC7rmvjiRkO/T2 K5/eBMHjLrsAI5B+lqqZT6xNwvBhkVx2Mkg0uT2wnfWs8CDquhtXp/Om03OQKeoMmr Wzyw/pQWQrlApJEMMUYKaqat+Tq7m4FOY0D/D0vcVK34M0kxs71dEmRX3RdTYQjruK I0lRQiAwUQfGNTLDXmnshW1bOgyrT8JHnlmXJ2cgrh7Qa9mJgYLTc4wFAy3Bb1+iVX /GT68fEvEl97ehgS/GON293onYCwOvGCbsr2+GYuL0H/c9bO/nFM+k1IuSUMaGhjGp 8tuQ+lajBL3ug== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 50A7E67CAC; Thu, 25 Sep 2025 11:48:24 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:29 -0600 Message-ID: <20250925174753.3429102-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: T5SF4HERSDIPRACJLQMFFZMRVQG2TDAX X-Message-ID-Hash: T5SF4HERSDIPRACJLQMFFZMRVQG2TDAX 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: Heinrich Schuchardt , Simon Glass , Ilias Apalodimas X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 05/22] efi: Avoid a memory leak in efi_bind_block() on error path 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 Free the memory used if an error occurs. Suggested-by: Ilias Apalodimas Signed-off-by: Simon Glass --- lib/efi_client/efi_app_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/efi_client/efi_app_init.c b/lib/efi_client/efi_app_init.c index b5421dc5a91..462c9db61e9 100644 --- a/lib/efi_client/efi_app_init.c +++ b/lib/efi_client/efi_app_init.c @@ -60,8 +60,10 @@ int efi_bind_block(efi_handle_t handle, struct efi_block_io *blkio, plat->handle = handle; plat->blkio = blkio; plat->device_path = malloc(device_path_len); - if (!plat->device_path) + if (!plat->device_path) { + free(plat); return log_msg_ret("path", -ENOMEM); + } memcpy(plat->device_path, device_path, device_path_len); snprintf(name, sizeof(name), "efi_media_%x", From patchwork Thu Sep 25 17:47:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 418 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=1758822513; bh=B3cvJNzUWQcUBIPIIR2g2VH3vtcX51yMyCFkIzIU2OQ=; 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=eGuu8YLSG2yQ5UXNTNP55U0ryQM6Bv+w0hZfp+pymTUy5kIpH6JO5cHxrliIcnGdg ZkDZudlGHaA/lplZZ4Dgx1q+es3ISPxVEf40tcjQ3Y6ZcQVdONey5MNt1A8cwF/bRy I/gSVZU75qOP4A2cWQupAJiirUHABFOdE8CSilWBJscUPztopKoxfenhGXaam19TZI eAZXN5PwgIVnye5BSTf29HNTmXHDXuaTr5j0VJcwHkn1TwoJoe/AZIDPbZG2bgBuSE OQokBBIkAN/+MrpH6p56bAtaues1V9RShIqu/haASLFhDOB264A6vJ5TUJev+gvmDj Qmt+c6atQCK4g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 01D4C67DA2 for ; Thu, 25 Sep 2025 11:48:33 -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 aqRzeh6W0Qwi for ; Thu, 25 Sep 2025 11:48:32 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822512; bh=B3cvJNzUWQcUBIPIIR2g2VH3vtcX51yMyCFkIzIU2OQ=; 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=GT+4cZ3XGaU1IHg4mrdHY4SV6ewwPq0pYGw+O9IRxjkdy2NZJbYKCTwTSabrOP4pb DtrH3HRMpCmGmRcsjYkDjtOKJjMfmxSZ6UvHhYHNGRdowaJiNKfGguuU8TAc8u11E2 y4EuZkfVMZVmJX3zoR86fXwfi1RPBsv48A/tAA1U7ead3k9uh0qMH1QU7qP12MC5Fg KCav8eBwCtiRoOR8uskg1Fz9e0fUqgO9k6GoVrvZa6GIx2AZJwwhsG5qNFK7DiA0Bh aJ7W0R2Vgz7a05UBiM+X/MK/+srG1G7WPrdvB9LchWLS9x1KnUqQbRAxFV24hAAyWW yLBHiBV+4BVww== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E4C4967D29 for ; Thu, 25 Sep 2025 11:48:32 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822510; bh=rrpzTzDXSnL4FEdB4dPHd6jEXD1HKJq6DciDf6BxYOM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hk03d/WkNASDK71BLvoIExesiSry8RCqXir+JHfywcK/WYHferOr3ga8Nci8WssPu OL1Rf9qSVwIOI6YFC4Pg5qI1FOmmiU0c9sK4BHETxga0PghPvXN+B4bqza2jgIBeuc m7RFqZK43Z7OV+ZYgARZW8vcPl2XuN55Q54LLQ3QVeSgYm6hJ8FjdWistaKitYkwtJ VFsAXEgLEqumve0LW9RFvcHo8g/s/v1mCL30D2URFv1rgvPWoxoCkbe0Cm2s9keN4/ BCoFHVGhLaW4nLoY5fIqZopZypBjFLaK/OtdpbfLwK4N98Z3IYC2JgRVMCahywNITL fIpS7GkmUbPWA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E46BE67CEF; Thu, 25 Sep 2025 11:48:30 -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 T-sKSDzobSf4; Thu, 25 Sep 2025 11:48:30 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822506; bh=zEgk2eIFWeiloiHR7rptSjDCXjidWJyZPviYH19ZscU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PIeHPya26mNUTQvHo3P88AfKNiQfgxyqJOiMJZuRs2LAAxwrDNQPQ3DsDUg06SaaU 9UbWhEkCXQ1MaxV+Ta9MF/BnI/69yOpOt0tEeRv1GZ/JFzJz4uBme2kz8dIs+bOd5a G31nc+fyQ2u2shs05oG6EgcV5eiTzH5z7oX2QsjIzIm/ilJVUPns01fKsuHow80hix mh0rV5bxihuZq/Nmyt1tqeSjWhHZXLSE0DNfjrR6MHnZMPnRmrF/BCE3sVceFg/qnZ 09EObLXzRjgBPVTJbnltrQwmNkNPHV+gZxxSJNXwIZTXTs0M9rSUHo+Lhqjg1GHks8 t1g9vPOjAvcyQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5B12A67DA7; Thu, 25 Sep 2025 11:48:26 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:30 -0600 Message-ID: <20250925174753.3429102-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 47PUGJ4244NJRNAX3ZV4SGRLHFHKXLSE X-Message-ID-Hash: 47PUGJ4244NJRNAX3ZV4SGRLHFHKXLSE 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/22] efi: Drop config.h 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 We don't need to include this file anymore, so drop it. Signed-off-by: Simon Glass --- drivers/net/efi_net.c | 1 - drivers/tpm/tpm2_efi.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/net/efi_net.c b/drivers/net/efi_net.c index 370056040f3..abc69058437 100644 --- a/drivers/net/efi_net.c +++ b/drivers/net/efi_net.c @@ -4,7 +4,6 @@ * */ -#include #include #include #include diff --git a/drivers/tpm/tpm2_efi.c b/drivers/tpm/tpm2_efi.c index 2eb144891d8..c6e7db762b5 100644 --- a/drivers/tpm/tpm2_efi.c +++ b/drivers/tpm/tpm2_efi.c @@ -4,7 +4,6 @@ * */ -#include #include #include #include From patchwork Thu Sep 25 17:47:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 419 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=1758822515; bh=606IkFO59SGtds/3prWUa0PC0ag4KgxEPw8eV0/4VWQ=; 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=ISIDBs1y2hiv25UBMfZYX+MibhA6KxnJMEpHA2dumxwEJDYlpwop3MstjSNGcOp1V oP+owXFrPgoVDWOGHvrDmZnZNsU0XGKND+MT/UT5pCuc5mhJ8lPdMa6MnO0d+ewpLi zuXc3uCWZ2lgmS/T2gJ5lftKPU+6WxSQeu+wUEqZkvv+yKfQJwVdck/90Ll37TQ3ot pxiKPUyPBhcgKvFXFtssY1v33rL6ig6TTfP7kf2tIsROu5pzfwmugCGoXLYBRf+1pM SS/azDmSgMlAnf7bQiHdJ2ZQEO9wU4m56I6/YklR0IC2h3HnaXqeMFR+TUXWfYiwJ7 IUl/XfVIABlBA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6946A67D9A for ; Thu, 25 Sep 2025 11:48:35 -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 Ax1dPdA9Dz7Z for ; Thu, 25 Sep 2025 11:48:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822515; bh=606IkFO59SGtds/3prWUa0PC0ag4KgxEPw8eV0/4VWQ=; 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=ISIDBs1y2hiv25UBMfZYX+MibhA6KxnJMEpHA2dumxwEJDYlpwop3MstjSNGcOp1V oP+owXFrPgoVDWOGHvrDmZnZNsU0XGKND+MT/UT5pCuc5mhJ8lPdMa6MnO0d+ewpLi zuXc3uCWZ2lgmS/T2gJ5lftKPU+6WxSQeu+wUEqZkvv+yKfQJwVdck/90Ll37TQ3ot pxiKPUyPBhcgKvFXFtssY1v33rL6ig6TTfP7kf2tIsROu5pzfwmugCGoXLYBRf+1pM SS/azDmSgMlAnf7bQiHdJ2ZQEO9wU4m56I6/YklR0IC2h3HnaXqeMFR+TUXWfYiwJ7 IUl/XfVIABlBA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 59F4867D29 for ; Thu, 25 Sep 2025 11:48:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822512; bh=fw/XTKtd4JevFUozxX8dRiCrJ7AizjemqTaQLG0Rn4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZbCVV7ZkPmyBkBMMRvs5q4LRULdLdIXjLbdR4L8m7BmEKGzRdmJK43hKND9hT5m2m N49crqUz6s64FdaOa/5mKtHdFZMMdDXIrAnh2aejmoUYDmJsi+9vFbm8bxRiBn1Bqm mJ+Z1wvaDoRCHUfliT65+0iKbFnkaldViRJJNu5kw93iMz3cRTZ0NCVFNY+UqYrK/k Y1xMHfiJByQ90g354/bAgWFdojnkHAxlUytqvlYJjTJgBZ9Ij78HffnYoG5MrUWztR SARUFNdSxh4XGVZsGQmTykVOHwTrWxIvbca1eNMITZEBJuUspg34iAe9rF5kRS8O8b nhZIYHiDWzxbw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AC26F67CA2; Thu, 25 Sep 2025 11:48:32 -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 QXFNvzR2fEBV; Thu, 25 Sep 2025 11:48:32 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822511; bh=ff9A1Zaz2Y/CtnU+8+O6y5+Kr8A7LXxSmg60xu5TADM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pY9pBBrc65Lw1bwwXRoD4VN1VL8tvyUa5Of1Rs8bfkCP0CSbNCr2mWfaIhR064RsS dzBGgcRupChDzTEmu1Cwwv3vgJtq0YJrRGxPg7gXPekjrTucGaOsbC1guNAoi+kcdC x0nIR7L8kpkOyr5fZrIGqrGRwR8ertLew0BzOCK1gotRCuoiRvUVFDscxorfLPG92g iX+WL28Mu9gnfVG5zwWt9aS8VTNJqte39KkRElG+nEWUVQ1ZQKX4sHpL+D5sT/xCJX eRFv6ayu2Eqo1bfqIyOoe19wjbQV0+ie1qOw1t0dvIxEWUxU1KAVoQHpD36evJHE2I Z99PGugBCThcQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id EFD9667D29; Thu, 25 Sep 2025 11:48:30 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:31 -0600 Message-ID: <20250925174753.3429102-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Y6UYWID3HI75MOTCXCPI45H54UGP3GUA X-Message-ID-Hash: Y6UYWID3HI75MOTCXCPI45H54UGP3GUA 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/22] test: Drop an unwanted blank line in dm_test_video_box() 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 This test has a blank line which separates one part of the test from another. Drop it. Signed-off-by: Simon Glass --- test/dm/video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/test/dm/video.c b/test/dm/video.c index bb88c17e272..702e9854005 100644 --- a/test/dm/video.c +++ b/test/dm/video.c @@ -950,7 +950,6 @@ static int dm_test_video_box(struct unit_test_state *uts) video_index_to_colour(priv, VID_GREEN), true); video_draw_box(dev, 350, 250, 400, 300, 0, video_index_to_colour(priv, VID_YELLOW), true); - ut_asserteq(175, video_compress_fb(uts, dev, false)); return 0; From patchwork Thu Sep 25 17:47:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 420 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=1758822519; bh=jxj06DMuWHNs3ASghn7Z2GjNMQQu6Pxx5Qxq18SvB4E=; 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=hXtKklmY58VatwRaSiHdB1eg0yaFj1Y4q/upWXt9q1vfS5ZjXssY+Y2nVVLlUxTdk Hk2TskcDJfwATaErbeAGjIkBOcrRJc5sf0G+Ncxu9rbWSfmNjg4t+ndkptmAoYiqWS Zt+60jo6rAcoHYibJEUuOVuzLUz1HVz5dV+vxixfdoXVH56PQJT+XPcLqpr+H1zQvL zYgh0Zu03IEmzif73nsqAw2l10bXHQxhl+sI/DShBPUO3J9RQTFHGkKKUQpGo2t7gQ DiCO8kyZ8F8tZDG58cPIXjfaVFKFDUbfIArbwwqX6KxX2Uc5rsgQT7X7+qdoSfRrT5 kYgSBVlYw+viQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D703667D9A for ; Thu, 25 Sep 2025 11:48:39 -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 tZAkeq-siR8N for ; Thu, 25 Sep 2025 11:48:39 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822519; bh=jxj06DMuWHNs3ASghn7Z2GjNMQQu6Pxx5Qxq18SvB4E=; 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=hXtKklmY58VatwRaSiHdB1eg0yaFj1Y4q/upWXt9q1vfS5ZjXssY+Y2nVVLlUxTdk Hk2TskcDJfwATaErbeAGjIkBOcrRJc5sf0G+Ncxu9rbWSfmNjg4t+ndkptmAoYiqWS Zt+60jo6rAcoHYibJEUuOVuzLUz1HVz5dV+vxixfdoXVH56PQJT+XPcLqpr+H1zQvL zYgh0Zu03IEmzif73nsqAw2l10bXHQxhl+sI/DShBPUO3J9RQTFHGkKKUQpGo2t7gQ DiCO8kyZ8F8tZDG58cPIXjfaVFKFDUbfIArbwwqX6KxX2Uc5rsgQT7X7+qdoSfRrT5 kYgSBVlYw+viQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C647D67D29 for ; Thu, 25 Sep 2025 11:48:39 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822517; bh=t3dI9KHGFcdhjftBVs/5aBhD34OYd/yFWQccIpRGX0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OucmMb1KA5JgX6MlRtoE2yHupWJ2C1mquvD7xhg657ikt3su5Kp30Z1MAm9EeS0a+ xVnL6u4IgdoclPDxwFzCXFSE40mZAQT1NNKHXK5eJY1RhuZRoMsxEdR2anyehKki8M QCcHZYsdzWjQlIoPRVG54C2LtJvxgu++qmQ9HmtXFkbU8xGp+ldEo2eayLDk8Xefu+ YfkiW4RRYVSLeGtAoe7rwMhXqau82FuIAfqvxLdTzIwQrwLbXFiU5y+T8m7S6m/2ya RhN77DRJl8flxQzHeRfQaSEsBqfrg029falfmoRJTVXCQz9DzpTR28HHEVvRjP5ib6 WRqoJAEuBO9hg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C9BCA67CA2; Thu, 25 Sep 2025 11:48:37 -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 ipPUPhUS4ngF; Thu, 25 Sep 2025 11:48:37 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822513; bh=qLLrZY2cAjTqfztdFMhDsdLtNICSb6MSifnisYy8Umg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gvct6OfNcjquAeqBN2hb/Y47XqSCmPTLVrCYwttM8Ptzo0yMFug6r/NGmOIfy5t5r v//vBNhVu2dlsnL40EL4nBKZOdvO0hA5+sxVpw2cE6whMfsVlyjBv32l0ht/++3CAq H9smAq1Sajxv0u8urPN0YO35LoIoZoQc7585hYGm+ZiUIIJPm3rGejNe/fisyd152x mWxSCMBTfv8jw/mx3n3U0a2q31UIvf1mjOGbffafYBXKnXtCzpuvOsNy0xZf0tDBk/ 68903ER3SOUr6CXO1hovXgarxtvHDUe59gVAkgkeVLfratVg9/f+bgNhAxOgbKIpNW r8BT/6FsFSxsg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id EEFC467CEF; Thu, 25 Sep 2025 11:48:32 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:32 -0600 Message-ID: <20250925174753.3429102-9-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: K6VQQSR57AUOTHLWDR4FF4PICACWR6NU X-Message-ID-Hash: K6VQQSR57AUOTHLWDR4FF4PICACWR6NU 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 08/22] test: Allow creating disks with a different Ubuntu version 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 Add a way to specify the (fake) Ubuntu release being used, so that we can (later) add more tests for this case. Signed-off-by: Simon Glass --- test/py/img/ubuntu.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/py/img/ubuntu.py b/test/py/img/ubuntu.py index 06e8251c05b..1247ec134d5 100644 --- a/test/py/img/ubuntu.py +++ b/test/py/img/ubuntu.py @@ -6,7 +6,7 @@ from img.common import setup_extlinux_image -def setup_ubuntu_image(config, log, devnum, basename): +def setup_ubuntu_image(config, log, devnum, basename, version='24.04.1 LTS'): """Create a 20MB Ubuntu disk image with a single FAT partition Args: @@ -32,16 +32,16 @@ timeout 50 label l0 - menu label Ubuntu 24.04.1 LTS 6.8.0-53-generic + menu label Ubuntu %s 6.8.0-53-generic linux /boot/%s initrd /boot/%s append root=/dev/disk/by-uuid/bcfdda4a-8249-4f40-9f0f-7c1a76b6cbe8 ro earlycon label l0r - menu label Ubuntu 24.04.1 LTS 6.8.0-53-generic (rescue target) + menu label Ubuntu %s 6.8.0-53-generic (rescue target) linux /boot/%s initrd /boot/%s -''' % (vmlinux, initrd, vmlinux, initrd) +''' % ((version, vmlinux, initrd) * 2) setup_extlinux_image(config, log, devnum, basename, vmlinux, initrd, dtbdir, script) From patchwork Thu Sep 25 17:47:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 421 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=1758822522; bh=zLmjftVwgn7ljtFxWMeUNiGB5VR0nBajVMXdtqOjkLE=; 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=fZvecN9XgxoslORukxEVMRBtdT0HKmABZ2Ts+OI3xSCsRvd0MRF7YN+sEufQ6SQLI clPQIALLWVGFLgW2eiN1BvoTnBbJjpBnzyU+fjUJAVCR4nC5WOhI3w/kHAUs4lZlpH zX1yXyIyv6Rq0oRfvzLmwG2wLfybcKye4Qh4UziTdH6UNxTEBheFeGqjmu5kclYL1N Q1cWGdAw4dFkqv3jqeMdG2gG0F/ItirtRb38BY/peRIH8/7cI781/7meMMhsYe3KAl x+mydZ0LdI4r0weeAU14ImtcAxn3yMRdbLLoHp84s7zfAuHLOMUVRHxqWkWwFnsbTZ UqJ0q/GjI3UxQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 404A367D8F for ; Thu, 25 Sep 2025 11:48:42 -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 VdQER-ieXb6h for ; Thu, 25 Sep 2025 11:48:42 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822520; bh=zLmjftVwgn7ljtFxWMeUNiGB5VR0nBajVMXdtqOjkLE=; 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=JitzFeza9b3i+hy9RNXaw+JKPZvtqY7ECfOZRYc+GC7eV0ogRSA4i4lD6URbvN/pX ls6ez4t+EovvE0vL79iEqEOxxtIrpLij49gp4DdjFCK5/pw+06ieh9CXm6bcIbfbE8 Gbpiyd3YXQ23pK8t7uQLn5Ga4azCZ7rhR81PCmfAav0Odg/XCEKy0fduLWNxFCk5Sh fEn0ra/JvIFuARod+UApN61bVtzaDxY1sT+30KJHSpmiJD7w1ZW5WE/P57wKtryd+t kZLjYI0tuYPDyVHT7ljExqgjaDVgYYeboB6c7Iina1Dfw/lvYcOnXu/AL0nZuMXCI6 lh/fC7RtYHx1A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3A98967D29 for ; Thu, 25 Sep 2025 11:48:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822519; bh=wOHMmJ+PzDi2FeTBJk54Jb0n4HrABlFji9L0R2zGCJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aIJOo36BPbwvjr7uOM65ktudI29D0JQbRhYecmxNxJnmOwOVf9SxE5Wca2v7Q3VVR jsBksuUI36bN6ODPJXnOlzVqOsjTzIVMPXryj3SdzKDIm1Cy8rseFjwVjjGgMCyVpO u2lTBSHhpTiCG/yJCk/pV6rsjKi2dpFmEC82CObixp2zU8ah+pIiTnAPbxPrtJMvO9 IjAp2o7mbDB1vd6itTEqdWP1N1NAm6yfrDM9MW8tVgF1J2jR7HyAQN0H00vjyal/PR VS5GlKKEhdApRMTW37+Jnmifr+DVv0H8ak2Xh1VLRBb8Ukj8RwW1+YM3CFp9KZStSy aJ54EChwOKhKw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5788067CAC; Thu, 25 Sep 2025 11:48:39 -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 8-6b8IWFvSMl; Thu, 25 Sep 2025 11:48:39 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822518; bh=MsxQElVO4+gP2XJbErtLabS/Y9ek0gMEg5SYPxyNttc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RxbFvi3D/TOD0q4GB4r/0OYelnrdHDzIzdYkfQAuRqen+740x2xmPfnHS4i0e7ODT rbOHnovMHp3wqSUOVd5YrzMFyJ3gobelQFCqsuAYDXojtoFBfbyvro9qc50hiODYyE BI++vABo0lpgU5HXMn+vkyQFIHsn+QspWwJzH+c7k5gimh7WAklKNrWXiiMfzYTOQ8 qnMX3r2fcPrIkoPlbm/M9ecUMn+DaiMvRu5ZOx82U1+S6wTqL96cvP0AqY568fnQss YPZucg7xIOwBs6qIQrKWNNMSm1O89e2UdUkcQ7GXNk7UoScHR14X9yuMYo92SYO8WH FAwCy+S6Z47Jg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1C5E767CEF; Thu, 25 Sep 2025 11:48:38 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:33 -0600 Message-ID: <20250925174753.3429102-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QUKZ6XD5W3VK6B337ZOGK5D7DB6QGLLK X-Message-ID-Hash: QUKZ6XD5W3VK6B337ZOGK5D7DB6QGLLK 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/22] cmd: part_find: Correct radix and calls 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 Recent work removed the if_type member. Update the code to use the new method for obtaining the interface type. Use hex so that large partition numbers (>=10) work correctly. Signed-off-by: Simon Glass --- cmd/part_find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/part_find.c b/cmd/part_find.c index c39fce21e40..68b66569204 100644 --- a/cmd/part_find.c +++ b/cmd/part_find.c @@ -107,7 +107,7 @@ static int part_find(int argc, char *const argv[]) &loader_part_no)) { char env[256]; - ret = snprintf(env, sizeof(env), "%s %d:%d", blk_get_if_type_name(desc->if_type), desc->devnum, loader_part_no); + ret = snprintf(env, sizeof(env), "%s %x:%x", blk_get_if_type_name(desc->if_type), desc->devnum, loader_part_no); if (ret < 0 || ret == sizeof(env)) return CMD_RET_FAILURE; if (env_set("target_part", env)) @@ -123,7 +123,7 @@ static int part_find(int argc, char *const argv[]) break; if (strcasecmp(argv[1], info.type_guid) == 0) { char env[256]; - ret = snprintf(env, sizeof(env), "%s %d:%d", blk_get_if_type_name(desc->if_type), desc->devnum, i); + ret = snprintf(env, sizeof(env), "%s %x:%x", blk_get_uclass_name(desc->uclass_id), desc->devnum, i); if (ret < 0 || ret == sizeof(env)) return CMD_RET_FAILURE; env_set("target_part", env); From patchwork Thu Sep 25 17:47:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 422 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=1758822526; bh=CR/9sYrMmVSoWQnXEnG556QbMEmj6xGt/YhnRT5dOdM=; 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=rBSFJF53XjVsIuR62aFa8qo2/xT0oQ5OndOhkzHKWo7I6SdmcooMA4mBfZahVYSJS E3HwIclXifdYxQ506D7cgJ9DoIyvk/+zYwWUCuO5lj2aSE+Q0TobcPtEBb6eqszZQj KKK5KEF2/4aPwL0mTDl23Kzy3KNyPee2Ahnd73HxnnHqz46S+DAnMezsjKTY0DYRW0 NXs/YnAekE1FA6EfLS0DzgEupqLWH1Vw9Vr5cOSTXiXjEE5wQmKW7uyGZy1VBNIMU+ H9+605r7PQbh4orkfGRjzEuzrTGEaJzl3ONtD736mkHbkiEYldEu4nUbOwiFxcz28B EpUO4UEvmteMA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 085DB67D9A for ; Thu, 25 Sep 2025 11:48:46 -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 d2OySGfkk0vl for ; Thu, 25 Sep 2025 11:48:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822525; bh=CR/9sYrMmVSoWQnXEnG556QbMEmj6xGt/YhnRT5dOdM=; 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=UTBRff6Euokvq9Z4U1Nf21hK/sBdNyFvCpn/hKqkveQJExlkaMS8uo9g+H1a8wE5Z F5bF5EWGz7Q6jwBu87fsYK90W/p9mxGLyI8wuxrQYdlIrZEDagl+M/MHKqtqMS1ie0 KRw5+CMejF46l4MzexJo97SWaK8CNbjHPQ9Xp2bIGk16DZLW1Exl81HDZTmjXeG1ll 5b5PdCT8e7SuYRy236Jr+bnhoi8SunmIEhTB9656OObogR3gcl5JhV/fQpvu3PStkB 6eawtsZhHDTD0aXTSeWBgKDr6dYTOpzf/dUaY8/bfm1dYDq36/LvriDc96vgJJQScO PDT5Fmae6GfGA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E9F4067CEF for ; Thu, 25 Sep 2025 11:48:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822524; bh=S0Q9cQ9qbZdisc3eGBRg3MAAiB/RfQlg2ISP5EEWLAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NrOyNzuvKjeqojTOlAWpF8Nw7kZVDu1eV7uKUnxEdromf5bbUufuqYzm5IKwfmMbZ GGWIHiKuuj7o3b56DbSb6PdFj7kecsWzzCGZpxnWAG978QkNSL4jZPnVsDUYUP+boX szufzXiob52KIHPVXt9kXrR4nG1o7JfzKp16EDLNncnFn7HFR8OECliuChUx9yi7Md z9GiFZ7yWS3aCs85ospZmp/xeIE6zSMG9RWE0s7IHxGHKlYj6L9Or9o9xXnQ3DR80n m9hAhUPIMz9Qjl75SQ/3aXDungf9w5uVoqSNR4LSMlyBq5X8DSEA4e+7e/35IALn9B NvKxaRYcwYOcA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 87AEF67D76; Thu, 25 Sep 2025 11:48:44 -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 QXaCuULSvrFq; Thu, 25 Sep 2025 11:48:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822519; bh=wxItg7qkpAX1Leu0uJtZ3vczoPhoiJLitVK8f8P9l9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmVyd0m5O2wIqROQpPqYbrN6p76fWQyHkshNs7Vm3PbO5KWojYwomsAQepkAh+Xy9 RzJvMbIDmhUjlsuxBDqhvO9FErTYMpIFaxAGTftvIGBEG8VSrL77HMpS+CfDmuefxx GFb3/+LyXNN7xWD2T9JTzaRvXZ1NasVvqawJbTlnBTaOoWRdOOQnTBycU/o5KBhbs+ pcu8ypyJ7hUE1auIUyZq7giKEynHRTFXjyPjbIl8NXAghkcdzwvPTcPGV1hh1wHerQ XGf7bLv1bS5T66AzQdqma9CW+aWdPxK9RTs5PYclwulArUfyQxJfumOld2hmwvHzvl EBRYstkqaDxYQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 99BDE67CA2; Thu, 25 Sep 2025 11:48:39 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:34 -0600 Message-ID: <20250925174753.3429102-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RPELBPS6TWNL2EIOID725I5C4MEC3H5A X-Message-ID-Hash: RPELBPS6TWNL2EIOID725I5C4MEC3H5A 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/22] cmd: sandbox: efi: Enable part_find for sandbox and EFI app 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 Enable this command for sandbox and the EFI app. Signed-off-by: Simon Glass --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index af79770b4c6..44e1b60c592 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1539,6 +1539,7 @@ config CMD_PART config CMD_PART_FIND bool "part_find" depends on PARTITIONS + default y if SANDBOX || EFI_APP select HAVE_BLOCK_DEVICE select PARTITION_UUIDS select PARTITION_TYPE_GUID From patchwork Thu Sep 25 17:47:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 423 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=1758822530; bh=ozpGg2Ecai4jWjk+pEdJiQgC9vTJ63P/6yIBmskzqIE=; 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=Gou5sDOBj5cs4l4HQDhN9VvY320yidtrLEpCHALn8GB3AGdvKv0JfpNU6eFknkmt5 HdO9XbU9I6s3mRkIcGmmGUYMQvZ7VS2eIoLledKM5gYEzpGD5GZ4tIij3UZnNCJYkF X6+dSpfBM30O8QmLXavMlYzZcslKtYc9zYd688gjbM1wGu90yD71l6djTvQu1mefLB 7NXcFGH4teElKlJ/4UGzF2dCVkn7XvRHLi5YDx3pf1i8rOCISC6ntmyWYezfhdcnIx uQf4lDRdISZrn8sLwZhPc8yUPYDJqg0oaMSZAtt14FENEFFzpZGEu8rk3wvs9N+AMH 15W3BazP3xALw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7DED467CA2 for ; Thu, 25 Sep 2025 11:48: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 twOcS76s10Sa for ; Thu, 25 Sep 2025 11:48:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822530; bh=ozpGg2Ecai4jWjk+pEdJiQgC9vTJ63P/6yIBmskzqIE=; 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=Gou5sDOBj5cs4l4HQDhN9VvY320yidtrLEpCHALn8GB3AGdvKv0JfpNU6eFknkmt5 HdO9XbU9I6s3mRkIcGmmGUYMQvZ7VS2eIoLledKM5gYEzpGD5GZ4tIij3UZnNCJYkF X6+dSpfBM30O8QmLXavMlYzZcslKtYc9zYd688gjbM1wGu90yD71l6djTvQu1mefLB 7NXcFGH4teElKlJ/4UGzF2dCVkn7XvRHLi5YDx3pf1i8rOCISC6ntmyWYezfhdcnIx uQf4lDRdISZrn8sLwZhPc8yUPYDJqg0oaMSZAtt14FENEFFzpZGEu8rk3wvs9N+AMH 15W3BazP3xALw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6D8F867D29 for ; Thu, 25 Sep 2025 11:48:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822528; bh=aeBwjZRgOfFkRszRjSI2uFsWkhgP4K7wyqxZ43bxElA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jhZWxvzd6VaZ6wSEdNJ3uGkFYkINfhzTl2JkpJSpncp3AubWORQvNBcU+8aSIQ+dZ 0AHkgniMynV1hZpPLXnJ2kiY1+mT0bYWHUFUTp6FBUCJsiAQN0tGnYGiZCchqLKKZf 0BM4omrC721U26q9+TiUtknmi8brfAoFMj/dJf8aOw6aV7LJQr2O2hGsubc60JzT1t wirZKH0Stvw2Wc2RM0cU5xbArqxATOrUGBbTaL90WIsR3PTfr5tHlqSpFPQTejkQUc y51RL1b/JPjXiUvyD6/DCrQnMIJHn9/YRQqllre/IHSxWk4iVE74ujge3bcD7LZ68C QsdAEL2WOBNCA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9757867CA2; Thu, 25 Sep 2025 11:48: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 fON4t-vlfuVG; Thu, 25 Sep 2025 11:48:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822524; bh=PCzkucpILxzVvFU9A3rkC/bp78wJLLyrD8CJVYCMjLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kUtqebKLQGLPzLs3VmVE+UrKaHycorkGWmmqaFyKnBHl26/1odK2903ZQRhqGxxZ6 ygw36hYCuqlQ9DQT14g3mqwAva9cbtNZzpNUX9rjGrQhjd+r8X+TszSt9GtlmfQBVI RfRyB+WThqMke5FgGGB8GJBVCafg7kKMZj79GIl0X69w0RESnfmxMgIzTbRgVTZolO KP8sk5i7WmQ0M/I8YDsozxKDDxSWhgPKKiTr2S7neMHtTnXwclC5acBBSNifo/iVfa X7djNA1o0NQvPWhaTLAeKLrDm6nCYx59K1PYCYZvSsDlINmwHU8t78QyolHUz4uPul nSGood7qjOUjQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3DFD467D29; Thu, 25 Sep 2025 11:48:44 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:35 -0600 Message-ID: <20250925174753.3429102-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 34YCIVNINYBIBS3MWB6ZH7ZYHEN5PGBT X-Message-ID-Hash: 34YCIVNINYBIBS3MWB6ZH7ZYHEN5PGBT 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 11/22] cmd: Refactor part_find() into separate functions 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 This function uses #ifdefs and ends up with a very large indent, Split it into two separate functions, one for the EFI app and one for other builds. Drop the use of config.h while we are here. Signed-off-by: Simon Glass --- cmd/part_find.c | 154 +++++++++++++++++++++++++++++------------------- 1 file changed, 94 insertions(+), 60 deletions(-) diff --git a/cmd/part_find.c b/cmd/part_find.c index 68b66569204..f3ce5b417a8 100644 --- a/cmd/part_find.c +++ b/cmd/part_find.c @@ -5,12 +5,10 @@ */ #include -#include #include #include #include #include -#if defined(CONFIG_EFI_CLIENT) || defined(CONFIG_EFI_APP) #include #include @@ -47,21 +45,86 @@ static bool partition_is_on_device(const struct efi_device_path *device, } return false; } -#endif + +/** + * part_self_find() - Check if a device contains the loaded-image path + * + * @udev: Block device to check + * @loaded_image_path: EFI path of the loaded image + * Return 0 if found, -ENOENT if not, other -ve value on error + */ +static int part_self_find(struct udevice *udev, + struct efi_device_path *loaded_image_path) +{ + struct blk_desc *desc = dev_get_uclass_plat(udev); + + if (desc->uclass_id == UCLASS_EFI_MEDIA) { + struct efi_media_plat *plat = dev_get_plat(udev->parent); + u32 loader_part_no; + + if (partition_is_on_device(plat->device_path, loaded_image_path, + &loader_part_no)) { + char env[256]; + int ret; + + ret = snprintf(env, sizeof(env), "%s %x:%x", + blk_get_uclass_name(desc->uclass_id), + desc->devnum, loader_part_no); + if (ret < 0 || ret == sizeof(env)) + return -ENOSPC; + if (env_set("target_part", env)) + return -ENOMEM; + return 0; + } + } + + return -ENOENT; +} + +/** + * part_blk_find() - Check if a device contains a partition with a type uuid + * + * @udev: Block device to check + * @uuid: UUID to search for (in string form) + * Return 0 if found, -ENOENT if not, other -ve value on error + */ +static int part_blk_find(struct udevice *udev, const char *uuid) +{ + struct blk_desc *desc = dev_get_uclass_plat(udev); + int i; + + for (i = 1; i <= MAX_SEARCH_PARTITIONS; i++) { + struct disk_partition info; + int ret; + + ret = part_get_info(desc, i, &info); + if (ret) + break; + if (strcasecmp(uuid, info.type_guid) == 0) { + char env[256]; + + ret = snprintf(env, sizeof(env), "%s %x:%x", + blk_get_uclass_name(desc->uclass_id), + desc->devnum, i); + if (ret < 0 || ret == sizeof(env)) + return -ENOSPC; + debug("Setting target_part to %s\n", env); + if (env_set("target_part", env)) + return -ENOMEM; + return 0; + } + } + + return -ENOENT; +} static int part_find(int argc, char *const argv[]) { -#if defined(CONFIG_EFI_CLIENT) || defined(CONFIG_EFI_APP) efi_guid_t efi_devpath_guid = EFI_DEVICE_PATH_PROTOCOL_GUID; struct efi_device_path *loaded_image_path = NULL; - struct efi_boot_services *boot = efi_get_boot(); - struct efi_priv *priv = efi_get_priv(); bool part_self = false; -#endif struct driver *d = ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); - struct disk_partition info; - struct blk_desc *desc; struct driver *entry; struct udevice *udev; struct uclass *uc; @@ -70,16 +133,20 @@ static int part_find(int argc, char *const argv[]) if (argc != 2) return CMD_RET_USAGE; -#if defined(CONFIG_EFI_CLIENT) || defined(CONFIG_EFI_APP) - part_self = !strncmp(argv[1], "self", 6); - if (part_self) { - ret = boot->handle_protocol(priv->loaded_image->device_handle, - &efi_devpath_guid, - (void **)&loaded_image_path); - if (ret) - log_warning("failed to get device path for loaded image (ret=%d)", ret); + if (IS_ENABLED(CONFIG_EFI_CLIENT)) { + struct efi_boot_services *boot = efi_get_boot(); + struct efi_priv *priv = efi_get_priv(); + + part_self = !strncmp(argv[1], "self", 6); + if (part_self) { + ret = boot->handle_protocol(priv->loaded_image->device_handle, + &efi_devpath_guid, + (void **)&loaded_image_path); + if (ret) + log_warning("failed to get device path for loaded image (ret=%d)", + ret); + } } -#endif ret = uclass_get(UCLASS_BLK, &uc); if (ret) { @@ -90,50 +157,17 @@ static int part_find(int argc, char *const argv[]) if (entry->id != UCLASS_BLK) continue; uclass_foreach_dev(udev, uc) { - int i; - if (udev->driver != entry) continue; - desc = dev_get_uclass_plat(udev); -#if defined(CONFIG_EFI_CLIENT) || defined(CONFIG_EFI_APP) - if (part_self) { - if (desc->if_type == IF_TYPE_EFI_MEDIA) { - struct efi_media_plat *plat = - dev_get_plat(udev->parent); - __u32 loader_part_no; - - if (partition_is_on_device(plat->device_path, - loaded_image_path, - &loader_part_no)) { - char env[256]; - - ret = snprintf(env, sizeof(env), "%s %x:%x", blk_get_if_type_name(desc->if_type), desc->devnum, loader_part_no); - if (ret < 0 || ret == sizeof(env)) - return CMD_RET_FAILURE; - if (env_set("target_part", env)) - return CMD_RET_FAILURE; - return CMD_RET_SUCCESS; - } - } - } else { -#endif - for (i = 1; i <= MAX_SEARCH_PARTITIONS; i++) { - ret = part_get_info(desc, i, &info); - if (ret) - break; - if (strcasecmp(argv[1], info.type_guid) == 0) { - char env[256]; - ret = snprintf(env, sizeof(env), "%s %x:%x", blk_get_uclass_name(desc->uclass_id), desc->devnum, i); - if (ret < 0 || ret == sizeof(env)) - return CMD_RET_FAILURE; - env_set("target_part", env); - debug("Setting target_part to %s\n", env); - return CMD_RET_SUCCESS; - } - } -#if defined(CONFIG_EFI_CLIENT) || defined(CONFIG_EFI_APP) - } -#endif + + if (IS_ENABLED(CONFIG_EFI_CLIENT) && part_self) + ret = part_self_find(udev, loaded_image_path); + else + ret = part_blk_find(udev, argv[1]); + if (!ret) + return 0; + if (ret != -ENOENT) + break; } } From patchwork Thu Sep 25 17:47:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 424 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=1758822534; bh=5Z9JRY20QvfzUBQ1lO9j07d1GLQ293yaS8pFpzowMxE=; 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=pbzuKFvLF7NDSYFk+xal9eJqTmsqltl4XyzrQBKvF6tx92OACfP5jsn7qRD26mFVZ 7g73mVmPeadMTpx5C+09v6+2A5u3J3wck0fXkpf0OsCs1ZwwFcwL+iShpZqciHbEeb svep1n2vYZYaJMDruI+cC9Bfek8EJcbBVb+3Gm8R2Y1AumOkuo7185dgc/jgJzO0F0 0y5hx3qJybxGRN4xAqf/dDSPby5OaE/lyyJV3l5zkt2RDmsexVPMku7Zgr1m2s2muN 4bd6rk/0AAk5CJdAJ2XchpZI05CQw3ZLdLybQjb+GubaQfWXikgWL52bGNwPuuZAMO UoTmPCd4MtZ6w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EA3C367D93 for ; Thu, 25 Sep 2025 11:48:54 -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 YajZ1pmNl15d for ; Thu, 25 Sep 2025 11:48:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822534; bh=5Z9JRY20QvfzUBQ1lO9j07d1GLQ293yaS8pFpzowMxE=; 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=pbzuKFvLF7NDSYFk+xal9eJqTmsqltl4XyzrQBKvF6tx92OACfP5jsn7qRD26mFVZ 7g73mVmPeadMTpx5C+09v6+2A5u3J3wck0fXkpf0OsCs1ZwwFcwL+iShpZqciHbEeb svep1n2vYZYaJMDruI+cC9Bfek8EJcbBVb+3Gm8R2Y1AumOkuo7185dgc/jgJzO0F0 0y5hx3qJybxGRN4xAqf/dDSPby5OaE/lyyJV3l5zkt2RDmsexVPMku7Zgr1m2s2muN 4bd6rk/0AAk5CJdAJ2XchpZI05CQw3ZLdLybQjb+GubaQfWXikgWL52bGNwPuuZAMO UoTmPCd4MtZ6w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D8EA167CAC for ; Thu, 25 Sep 2025 11:48:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822532; bh=IAQljyEwU8Fxw47UU2JUAqt+w+mjoRYlEFeuyF5SP1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tvMN5n5Y6glp50AIUyBp+lyiFp1SOhtFaqFukNwjg8+J7Z0FmpLZL9SLMkrq8T1W+ Kono+00ouwewKMvvIn3fA8YHKXdlrjiOlNd77mNbbgGAyefwXjj1RYM+PDyP5g2EF2 0y57cMiDAVJFT5ZykQLKAXIwnjhRPjJ3RAMzTXNFD2FXZHDu6invyAd374hVLBg4V5 qVErMtG/2iIagU0cdu5QjehMuTfsX9YD3FMuNMc1Ha2BejFe+RZf0R4w8z9PVdsg2J MD32YfsPy6lFupxP0CLwQbm6S3O9Sd02THMtO/SfOFtOONKA4kr589TXT6qziixYS5 wdALHr+BPmgRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E251867CA2; Thu, 25 Sep 2025 11:48:52 -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 8DOTim-kQhYI; Thu, 25 Sep 2025 11:48:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822529; bh=T9wQ8bvqeFxx9qnlb78NqKu6N4VvEZQiSRiJVyNLftw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iy75ZCLhz1mE8M9vgeDsoNf3jUVQ3UKyWlbWVpU5JjXsT0MlwvhVXSH3jZOaQAB0k PIuv31Xc0lX9lHuItrqI0qQBolTcTI85y7tM6L2NfCim4mFHx5VguGSlrFUHFbTEwp iyeScTBfO7E1ehcMdl9btF7avW6b22eOBstTWHRO6ySfnK4eoZWH3AQJ3PiO00FmOp rGyTz1Gc/ILpMS7lFLruhpglZofUmwsqq+D+2IGZ8Qi/TPvPtKE/x8qQWVy2nufrIP IF8lEYSdQ6K5/xf2gzxEV7YGp7vSxHvdvsE4GpceC7j+XRAe+9sVDlrhRTuY3NanB6 S/DhPggkujI5Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DD2D667CEF; Thu, 25 Sep 2025 11:48:48 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:36 -0600 Message-ID: <20250925174753.3429102-13-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: U3ZHY64WYKE6KSKA45YA7XHZY3DNREHM X-Message-ID-Hash: U3ZHY64WYKE6KSKA45YA7XHZY3DNREHM 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 12/22] doc: test: Add docs and test for part_find 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 Add some documentation and a test for this new command. Signed-off-by: Simon Glass --- doc/usage/cmd/part_find.rst | 119 ++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + test/cmd/Makefile | 1 + test/cmd/part_find.c | 42 +++++++++++++ 4 files changed, 163 insertions(+) create mode 100644 doc/usage/cmd/part_find.rst create mode 100644 test/cmd/part_find.c diff --git a/doc/usage/cmd/part_find.rst b/doc/usage/cmd/part_find.rst new file mode 100644 index 00000000000..fd5bd6578d5 --- /dev/null +++ b/doc/usage/cmd/part_find.rst @@ -0,0 +1,119 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +.. index:: + single: part_find (command) + +part_find command +================= + +Synopsis +-------- + +:: + + part_find + part_find self + +Description +----------- + +The `part_find` command is used to find a partition with a given type GUID. When +it finds one, it sets the target_part environment variable to the corresponding +``interface dev:part`` string. + +uuid + Universally Unique Identifier (UUID) to search, expressed as a string + +self + This is only permitted in the EFI app. It indicates that the required + partition is the one from which the app was started. + +Example +------- + +This shows searching for an EFI system partition and looking at the files on +that partition:: + + => host bind 1 mmc5.img + => part list host 0 + + Partition Map for host device 0 -- Partition Type: EFI + + Part Start LBA End LBA Name + Attributes + Type GUID + Partition GUID + 1 0x0000202f 0x0000282e "" + attrs: 0x0000000000000000 + type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + (data) + guid: 6b1e51e3-427c-9f45-a947-e467b7216356 + 2 0x0000002d 0x0000082c "" + attrs: 0x0000000000000000 + type: fe3a2a5d-4f32-41a7-b725-accc3285a309 + (cros-kern) + guid: dece619f-4876-e140-a6c9-8c208a0c9099 + 3 0x0000202e 0x0000202e "" + attrs: 0x0000000000000000 + type: 3cb8e202-3b7e-47dd-8a3c-7ff2a13cfcec + (cros-root) + guid: 078cee87-a195-ae4c-a974-8ba3a3d783b3 + 4 0x0000082d 0x0000102c "" + attrs: 0x0000000000000000 + type: fe3a2a5d-4f32-41a7-b725-accc3285a309 + (cros-kern) + guid: 08d2f20f-d941-fc43-96f6-948931289d71 + 5 0x0000202d 0x0000202d "" + attrs: 0x0000000000000000 + type: 3cb8e202-3b7e-47dd-8a3c-7ff2a13cfcec + (cros-root) + guid: 0b23ba00-a11c-ed4e-8b49-5e8738899569 + 6 0x00000029 0x00000029 "" + attrs: 0x0000000000000000 + type: fe3a2a5d-4f32-41a7-b725-accc3285a309 + (cros-kern) + guid: 6d8158a8-f82d-0d4d-8983-a3ada4eb9b73 + 7 0x0000002a 0x0000002a "" + attrs: 0x0000000000000000 + type: 3cb8e202-3b7e-47dd-8a3c-7ff2a13cfcec + (cros-root) + guid: 76e8f9b0-7db7-3844-8f18-21de93485211 + 8 0x0000102d 0x0000182c "" + attrs: 0x0000000000000000 + type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + (data) + guid: 071dfd2d-173c-f64b-9474-3318665e1d24 + 9 0x0000002b 0x0000002b "" + attrs: 0x0000000000000000 + type: 2e0a753d-9e48-43b0-8337-b15192cb1b5e + (cros-rsrv) + guid: b9d078c3-bafa-cd48-b771-a0aaa18d5008 + 10 0x0000002c 0x0000002c "" + attrs: 0x0000000000000000 + type: 2e0a753d-9e48-43b0-8337-b15192cb1b5e + (cros-rsrv) + guid: 7b0c0234-1a29-0c4f-bceb-40fae8f7b27c + 11 0x00000028 0x00000028 "" + attrs: 0x0000000000000000 + type: cab6e88e-abf3-4102-a07a-d4bb9be3c1d3 + (cros-fw) + guid: aced715d-cd1f-394a-9e3e-24b54a7b1472 + 12 0x0000182d 0x0000202c "" + attrs: 0x0000000000000000 + type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b + (system) + guid: e1672afd-75ee-d74e-be95-8726b12b5e74 + => part_find c12a7328-f81f-11d2-ba4b-00a0c93ec93b + => print target_part + target_part=host 0:c + => ls $target_part + EFI/ + + 0 file(s), 1 dir(s) + + +Return value +------------ + +The return value $? is set to 0 (true) if the command succeeds. If no partition +could be found, the return value $? is set to 1 (false). diff --git a/doc/usage/index.rst b/doc/usage/index.rst index eeda632b1a0..4d6b2f5227a 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -100,6 +100,7 @@ Shell commands cmd/mv cmd/panic cmd/part + cmd/part_find cmd/pause cmd/pinmux cmd/printenv diff --git a/test/cmd/Makefile b/test/cmd/Makefile index 5fe6ac7bb3e..773b3d7569b 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_CMD_MEMINFO) += meminfo.o endif obj-$(CONFIG_CMD_MEMORY) += mem_copy.o obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o +obj-$(CONFIG_CMD_PART_FIND) += part_find.o ifdef CONFIG_CMD_PCI obj-$(CONFIG_CMD_PCI_MPS) += pci_mps.o endif diff --git a/test/cmd/part_find.c b/test/cmd/part_find.c new file mode 100644 index 00000000000..1663d4a654f --- /dev/null +++ b/test/cmd/part_find.c @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test for 'part_find' command + * + * Copyright 2024 Google LLC + * Written by Simon Glass + */ + +#include +#include +#include +#include +#include +#include + +/* Test 'part_find' command */ +static int cmd_test_part_find(struct unit_test_state *uts) +{ + struct udevice *dev; + ofnode root, node; + + /* Enable the requested mmc node since we need a second bootflow */ + root = oftree_root(oftree_default()); + node = ofnode_find_subnode(root, "mmc5"); + ut_assert(ofnode_valid(node)); + ut_assertok(lists_bind_fdt(gd->dm_root, node, &dev, NULL, false)); + + ut_assertok(device_probe(dev)); + + ut_assertok(env_set("target_part", NULL)); + ut_assertok(run_command("part_find c12a7328-f81f-11d2-ba4b-00a0c93ec93b", 0)); + ut_assert_console_end(); + ut_asserteq_str("mmc 5:c", env_get("target_part")); + + ut_asserteq(1, run_command("part_find invalid", 0)); + ut_asserteq_str("mmc 5:c", env_get("target_part")); + + ut_assert_console_end(); + + return 0; +} +CMD_TEST(cmd_test_part_find, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT); From patchwork Thu Sep 25 17:47:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 425 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=1758822538; bh=HWkYBW11k/oMtCkOK68Hilbu0GkWFVTnbbXDoMmDo48=; 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=dMrFSYgD/F1YniB6mFEQGfRgEbUbkrWb0/BsozrTj84fl07ZylYdjb3/uzItptcbD 565u5H41f8O8wDdxRhGBC8rgyfLJ4E3k4eVssRtbRUONuDfXZYlm5oV2tdKSsCVdbY EkvP0FMiFY6kFgtBujy+T5iJY1LWeRR4bBk4049uWUSucj5470FmnDpaPlbF9coNW8 297qs/W3iMn7lJsJH7DUD4bGl4o+fl0q9wWnc1lPh02TXaV0RYZ5cfGcZDUzxaR1OK efLMZPcoRWHN2JNMPJBF6GQEPUMMLfhbvxtbp/8mEvHbP4Fx8LmC5CTHPJNk0ah5ot dk14g4xLRpUjg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BE79C67D9A for ; Thu, 25 Sep 2025 11:48:58 -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 H5Jw0Z6Epvt7 for ; Thu, 25 Sep 2025 11:48:58 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822538; bh=HWkYBW11k/oMtCkOK68Hilbu0GkWFVTnbbXDoMmDo48=; 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=dMrFSYgD/F1YniB6mFEQGfRgEbUbkrWb0/BsozrTj84fl07ZylYdjb3/uzItptcbD 565u5H41f8O8wDdxRhGBC8rgyfLJ4E3k4eVssRtbRUONuDfXZYlm5oV2tdKSsCVdbY EkvP0FMiFY6kFgtBujy+T5iJY1LWeRR4bBk4049uWUSucj5470FmnDpaPlbF9coNW8 297qs/W3iMn7lJsJH7DUD4bGl4o+fl0q9wWnc1lPh02TXaV0RYZ5cfGcZDUzxaR1OK efLMZPcoRWHN2JNMPJBF6GQEPUMMLfhbvxtbp/8mEvHbP4Fx8LmC5CTHPJNk0ah5ot dk14g4xLRpUjg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ADF9B67CEF for ; Thu, 25 Sep 2025 11:48:58 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822537; bh=7eZznSxcToZ0JBBdAGKpYn91FWc61+bw/G752rQek0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q2ESxmJYN4/MDb0cJx57fMDbNdp/7eZ17lB6Ovv+Hx+c7z0JPTwMwvEQR3XxqN2Cd jaiNvO3CDYfDhU6xHrgaOjMXM1oND+clRhmykSRKTM6Yu4RelwBGqEdVQxuFewDAVt U4L0IBV3TVF8vMWW+sEAKY2+6ndSikvU9ZP4tudTu/u3P1nULoiHp0IV7oAFW8MQ3u kPQzj1zGnYOuMJA2/IHK4UWyxXjhUfAm2waeFznFT9dL198LodflrtF9aMnDc5APlk 58/6EmEkQKhO7lYanJ1hBHX8aPQZ0Ar9uRkpiQ0n1tg1TgAehSf7qT1gomRJmHueuu I0OXn6m0x2s+w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 45BF367DA2; Thu, 25 Sep 2025 11:48:57 -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 8mBUNiS5GnU9; Thu, 25 Sep 2025 11:48:57 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822531; bh=i0U/Pwf79y8J8o4hoJ6R+9vFQrDGmNCJXNS0BBt4KKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ON7+P5BXKXj116joS2PQ9LTxrSJd3m8wPGLcEF5gWf2F4Ppyz9GxNWICrS1wsuVSJ h42Hi1Dy6iXBv5SDeuX4iKvwKchXmM8B77eoXVgofI9nOzMZjOJytW6qPFMZHtl0UU cHUhD5kFtA2IX49Tev13AcqdlaFEaeTKYFqz5es3O1d3bp8GhAq7apFrvGqrpDE799 QHYbJt0U7gKSAIT3CYaikUv9C4vvYPaBUbbok76q0Xs0NW6qdiaeZLr2I5tdTxt/Kn Og9eR9gQzsWfgmYyNkrKrRJrZbwFc9UaAM5xVUsRu2xqjTeSaMPHFcz9f0eI8OmDuo NewOAh3R3h6OA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0D23C67D29; Thu, 25 Sep 2025 11:48:50 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:37 -0600 Message-ID: <20250925174753.3429102-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: DZ3HZ2KAJHL4BIAOX67P7CHGRSUWTMQ4 X-Message-ID-Hash: DZ3HZ2KAJHL4BIAOX67P7CHGRSUWTMQ4 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 13/22] cmd: Update addr_find to use a simple lmb allocation 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 There should be no need to parse the LMB tables manually. Use the allocation-function provided instead. Adjust the argument checks while we are here. Also enable this command for sandbox and the EFI app, so it is built in CI. Signed-off-by: Simon Glass --- cmd/Kconfig | 4 ++-- cmd/addr_find.c | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 44e1b60c592..05c130b511e 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -129,8 +129,8 @@ config CMD_ACPI want to make hardware changes without the OS needing to be adjusted. config CMD_ADDR_FIND - bool "addr_find" - default y if EFI_APP + bool "addr_find" + default y if SANDBOX || EFI_APP help This command searches for an unused region of address space sufficiently large to hold a file. If successful, it sets the diff --git a/cmd/addr_find.c b/cmd/addr_find.c index 876c58feabd..64ecc816be3 100644 --- a/cmd/addr_find.c +++ b/cmd/addr_find.c @@ -17,8 +17,8 @@ DECLARE_GLOBAL_DATA_PTR; int do_addr_find(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const char *filename; + phys_addr_t start; loff_t size; - ulong addr; int ret; if (!gd->fdt_blob) { @@ -47,24 +47,21 @@ int do_addr_find(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return CMD_RET_FAILURE; } - addr = lmb_alloc(size, SZ_1M); - if (!addr) { + start = lmb_alloc(size, SZ_2M); + if ((long)start < 0) { log_err("Failed to find enough RAM for 0x%llx bytes\n", size); - return CMD_RET_FAILURE; - } - if (env_set_hex("loadaddr", addr)) { - log_err("Could not set loadaddr\n"); return CMD_RET_FAILURE; } - log_debug("Set loadaddr to %lx\n", addr); + env_set_hex("loadaddr", start); + debug("Set loadaddr to %llx\n", (u64)start); - return CMD_RET_SUCCESS; + return 0; } U_BOOT_CMD( - addr_find, 7, 1, do_addr_find, + addr_find, 4, 1, do_addr_find, "find a load address suitable for a file", " [] \n" "- find a consecutive region of memory sufficiently large to hold\n" From patchwork Thu Sep 25 17:47:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 426 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=1758822543; bh=4kC4D2yw05v9KwWOv3LCHJ42TCXLfwA4Y+fj+J3RfMw=; 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=qGBlAF8gvYIhtMCPJg3/yXZveg9tww0ftcDJzIfQ/5L14ipnI3Ec/s+TQxzxZ19LX 5AjfWFkFgZLZratW2QNzbC9OHq/N669bxKZ39QMCLr12FStenp/CxuBvrhV8ChStyR xxPU3mIc2TdwAYDaPKlpRClZKNp5Rmqx4B92Emdphy2AktheOdGm9qdUEF1OOdnnaZ TeTyNyXnxzf+rhxk027lg0kPRWn4s/h1ifvU+7Cf3GYnzdZxPf5ZAsbAG+GZajUrBc +gJfrTsHKkYUwogSiogS65DPVjjtluOD7l9d8gevSf8uU1A6tkgvIQz1PMZLTtJjtv 2Fmj+6Sk4lpEw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4BF5567DA7 for ; Thu, 25 Sep 2025 11:49:03 -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 GNO4nZ1S2bRl for ; Thu, 25 Sep 2025 11:49:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822543; bh=4kC4D2yw05v9KwWOv3LCHJ42TCXLfwA4Y+fj+J3RfMw=; 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=qGBlAF8gvYIhtMCPJg3/yXZveg9tww0ftcDJzIfQ/5L14ipnI3Ec/s+TQxzxZ19LX 5AjfWFkFgZLZratW2QNzbC9OHq/N669bxKZ39QMCLr12FStenp/CxuBvrhV8ChStyR xxPU3mIc2TdwAYDaPKlpRClZKNp5Rmqx4B92Emdphy2AktheOdGm9qdUEF1OOdnnaZ TeTyNyXnxzf+rhxk027lg0kPRWn4s/h1ifvU+7Cf3GYnzdZxPf5ZAsbAG+GZajUrBc +gJfrTsHKkYUwogSiogS65DPVjjtluOD7l9d8gevSf8uU1A6tkgvIQz1PMZLTtJjtv 2Fmj+6Sk4lpEw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2C41467D90 for ; Thu, 25 Sep 2025 11:49:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822541; bh=UsgCSfIFFx5u0qW+w+8ycnJfZMb5H4E9weu7JS/RG4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LuTIRmqzJqB21hbpV55bCbWa1A6ckcNiO0URhM+dzDbuF3UXvwxHHry1vYwYeS7Hq venDeVb4Q6N/M37QlCBG/KGo8JriapNwNq5QXSJJORTYE6itFDuzENzE0Mq3b+BxC3 jE2ukdFOsc0MM5jkeCCyMj72m4o2/MklQ2+wf6zfk8KYRPK6Aq54xMJy1zjhCTknxw Yos/fIEMzPQU39ldZrkTt0/3rZmnORZMzDqU7IX3ZWGPvC+2LoRfA0cpeyUH8qZiQY lM5LG2zbYaBot5o90bKryyKXDszOp+2vl6D+fGTjH1dq2jFOCB7G6vc6VSl1Wv8nl+ eDN6f/F6v5FnQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 27A8D67CEF; Thu, 25 Sep 2025 11:49:01 -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 yd0MgIhprRD9; Thu, 25 Sep 2025 11:49:01 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822535; bh=pDA7jyWFsF/6321cNoBE8SlG/XOmPq9K22VVGJpqMZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZ6HxCIhloLPm9eQ7qL34ufuHi+0Szn1AFm4IZf1j3OqfeqdJVEhcqEx9UWcd9Xlw txOmJvjVOqIEbbNRkZPNP8vLHFBOzUUOLNo2jRItF6e2Xfcw9UrOJHAfqv380+VL8e 1KgIgf/gJITrdMKSOFoMLD7Z6Ow0fzpRAH5X101+X6cXH/2trQ5vkHmupFRqfNROKa R0Q9NySutKjQ1LhyYeTht88dFybEJeW0EIipnSVm6x796tTRqSDxZvYVLJ6C9pddSe lmhxKmkd1UlTR/XLtH/OMC5KiCKDfIKHqzod49SEQ6GmweWUD3/RJ2VFGHHV2LRCsF PDP6MNuaiUC+A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9A3F967D90; Thu, 25 Sep 2025 11:48:55 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:38 -0600 Message-ID: <20250925174753.3429102-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VFNCIIWE5E62PJXTEBMB446QKYAH643U X-Message-ID-Hash: VFNCIIWE5E62PJXTEBMB446QKYAH643U 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/22] cmd: Update addr_find to ignore the devicetree 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 We don't particularly need a devicetree to use the addr_find command, so drop this condition. Signed-off-by: Simon Glass --- cmd/addr_find.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cmd/addr_find.c b/cmd/addr_find.c index 64ecc816be3..9d88091f541 100644 --- a/cmd/addr_find.c +++ b/cmd/addr_find.c @@ -21,11 +21,6 @@ int do_addr_find(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) loff_t size; int ret; - if (!gd->fdt_blob) { - log_err("No FDT setup\n"); - return CMD_RET_FAILURE; - } - if (fs_set_blk_dev(argv[1], argc >= 3 ? argv[2] : NULL, FS_TYPE_ANY)) { log_err("Can't set block device\n"); return CMD_RET_FAILURE; From patchwork Thu Sep 25 17:47:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 427 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=1758822545; bh=m2k8KZAcZIz56fYN6tMuRVHPDmwyKMYOyHSYUaSPPr4=; 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=XBXLnineGHXhILM6VGMW+CynPB3aR9sTyft7D2Zs+JDqg05CyjuW3DnJeVB378Qsb ijbd3v8g05bGIwlT0Sg4OqyZktcG/nwmkJj/gbMIAkF5aZuK0PzKtf0atmTR1BudAU IdifBsTbGwwRj3bF3HD389jd3U5GIs/8xyA7pi+JnTGacoxe0zb04sY41BHG6odlJB JTB3uy8pdfcPY/cJGk+bA4rflmrnNMWEs0FfkScxi6kJ9VgkcN1r+zxR9SJNOJGhft j/CHEC4Z1QzYleNcxZ8Ccf5l1RvhMpJ9i0LkfwKWdWFYATc8UH55uJO4L1hipIfk6m MeemWk8fjLApw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9B79E67CEF for ; Thu, 25 Sep 2025 11:49:05 -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 aeS3gfjH4gGr for ; Thu, 25 Sep 2025 11:49:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822543; bh=m2k8KZAcZIz56fYN6tMuRVHPDmwyKMYOyHSYUaSPPr4=; 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=mbkmD5nOK/Rrcll6LY3Y2ZxonA1AKHqFhQmUX1SYeylbdpWFXccSSvCx5a0CY+8SJ I6aUeLLh43v7MSWGYOVMECs0d0WH/jiy4E1dCG0iSe+UMKrM+xr8XgrsVd/mvc/+wx 2x+h2TjQXvl1EEHVnhaRyWL3AnwCRCT0Yb29JJjnSlZZ4Ch2E+Et8Q/rP1MC8bUy9M Tkf8+iXXpcxZLW3m+AqgM3Hue/dKiugur0F2scrI21FCxEDYqAnMlm/2tyw6Lzv+o9 VU0ib4DlOt5saAJtUm9QtQXF0heazieyshS2HluSwRjEgE/FKh8Sk0RLDqlfJNgmZf iccu0V6cKm8Yw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AD35867D29 for ; Thu, 25 Sep 2025 11:49:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822542; bh=7lZhOSKyRi0PEe+3mdx2Uq1fNIoHU9qIT2lQcKqpW1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DSIlf1JTXGNjWNrd3WqMs0+0wlKkl9UTPDfwPGglMoO5ukJjZ5yuE6ZMbEHd3EpXk Nkm1X/OAHCAIHQ3ODWDJ/Y59fHfdwIxoNZTcppL+tfZy8Ol0NChDonFLs3bNM2EAyR b5uDHtKyZtMVdnl0lSoMF8Pbc6hyMvk+E+BcIR9NRR8Zw540mLLX29013a39fk3Dn8 pS3q6DfPnSxuCkYeJU4LA1YjS6DMG7oue4skcoaHe0fvuWl8C1s+h2ABvpcQoTNkRw Ddqw0G6Dk8h9Bua3FP46o1v4m1iJi6j+t85MXIwJ2Jv72qs8PTg16Qy9yFmlprEsNa tY5/iige4fdBg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 07A2167D29; Thu, 25 Sep 2025 11:49:02 -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 SvXac6EyRT8b; Thu, 25 Sep 2025 11:49:01 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822540; bh=C/CLoB5Y6p6bzOmToUsLfl/evgpPeqT9OL5/oA5DIc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NVrNXTOgR5dFArcFROcQROX11kFt5Q6I1ohSfpRVzSNeFZ9Joo7+5LkbxSPD5O7uQ XcTGqpgeCLM9IMdwwKx1kYvU+/cViu8UpeEdwhA951Lwzopmr8tgcROf/YW2rhczhw sleA6nKIhnxogZYndNJqJ9LwFHPdJBAU8kmSs1PNfNoR/mAkvxmMFiNvicdBalbKmZ nrLCsKlfbEnOqriUumiXAwyARKx79ZLyx1XQDQcQgUNoXGOoyyy1BF80gnTSDexFrP 1XjvLlTMo4TUfdl+jm9VXh5N+PMaLxJkwhEdtHiUBWP7SJ/7PQ4KyIxTTqPi4KulU9 rlE3kvIZ0+Vqg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3435867C2B; Thu, 25 Sep 2025 11:49:00 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:39 -0600 Message-ID: <20250925174753.3429102-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: W4FQZ3V4YTR4KDEVB7VHBEWT24DTYIBD X-Message-ID-Hash: W4FQZ3V4YTR4KDEVB7VHBEWT24DTYIBD 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 15/22] doc: test: Add docs and test for addr_find 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 Add documentation and a test for this command. Drop the use of config.h while we are here. Signed-off-by: Simon Glass --- cmd/addr_find.c | 1 - doc/usage/cmd/addr_find.rst | 63 +++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + test/cmd/Makefile | 1 + test/cmd/addr_find.c | 27 ++++++++++++++++ 5 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 doc/usage/cmd/addr_find.rst create mode 100644 test/cmd/addr_find.c diff --git a/cmd/addr_find.c b/cmd/addr_find.c index 9d88091f541..55f50830771 100644 --- a/cmd/addr_find.c +++ b/cmd/addr_find.c @@ -5,7 +5,6 @@ */ #include -#include #include #include #include diff --git a/doc/usage/cmd/addr_find.rst b/doc/usage/cmd/addr_find.rst new file mode 100644 index 00000000000..0d16ffd236b --- /dev/null +++ b/doc/usage/cmd/addr_find.rst @@ -0,0 +1,63 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +.. index:: + single: addr_find (command) + +addr_find command +================= + +Synopsis +-------- + +:: + + addr_find [ []] + +Description +----------- + +The addr_find command is used to find a consecutive region of memory +sufficiently large to hold a file, ensuring that the memory is not currently in +use for another file, etc. + +If successful, 'loadaddr' is set to the located address. + +The number of transferred bytes is saved in the environment variable filesize. +The load address is saved in the environment variable fileaddr. + +interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + +dev + device number + +part + partition number, defaults to 0 (whole device) + +filename + path to file, defaults to environment variable 'bootfile' + +Example +------- + +This shows obtaining an address suitable for a file on an mmc disk:: + + => ls mmc 1 + extlinux/ + 97135227 initramfs-5.3.7-301.fc31.armv7hl.img + dtb-5.3.7-301.fc31.armv7hl/ + 12531628 vmlinuz-5.3.7-301.fc31.armv7hl + + 2 file(s), 2 dir(s) + + => addr_find mmc 1 vmlinuz-5.3.7-301.fc31.armv7hl + => print loadaddr + loadaddr=7c00000 + => + + +Return value +------------ + +The return value $? is set to 0 (true) if the command succeeds. If no suitable +address could be found, the return value $? is set to 1 (false). diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 4d6b2f5227a..21d6d120e7c 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -26,6 +26,7 @@ Shell commands :maxdepth: 1 cmd/acpi + cmd/addr_find cmd/addrmap cmd/armffa cmd/askenv diff --git a/test/cmd/Makefile b/test/cmd/Makefile index 773b3d7569b..ffb78f69041 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_CMD_PAUSE) += test_pause.o endif obj-y += exit.o obj-$(CONFIG_X86) += cpuid.o msr.o +obj-$(CONFIG_CMD_ADDR_FIND) += addr_find.o obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o obj-$(CONFIG_CMD_BDI) += bdinfo.o obj-$(CONFIG_CMD_CHID) += chid.o diff --git a/test/cmd/addr_find.c b/test/cmd/addr_find.c new file mode 100644 index 00000000000..ce087759d9e --- /dev/null +++ b/test/cmd/addr_find.c @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test for 'part_find' command + * + * Copyright 2024 Google LLC + * Written by Simon Glass + */ + +#include +#include +#include +#include +#include +#include + +/* Test 'addr_find' command */ +static int cmd_test_addr_find(struct unit_test_state *uts) +{ + ut_assertok(env_set("loadaddr", NULL)); + ut_assertok(run_command("addr_find mmc 1:1 vmlinuz-5.3.7-301.fc31.armv7hl", 0)); + ut_assert_console_end(); + + ut_assertnonnull(env_get("loadaddr")); + + return 0; +} +CMD_TEST(cmd_test_addr_find, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT); From patchwork Thu Sep 25 17:47:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 428 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=1758822549; bh=nHNALKuscAUiVTrFsTNOAOVnDSM6VmVMzqulYDMwGVA=; 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=DtO6QORYYOKideXeOZzrmGTVouHeEBlxkniL44L5d+lrlKN0og6HGHkz3JgLxB6WF ZxGZ5XjW+FXGwJulwNWcTc+LwGBkRHkgZKEIrUPHd9A172/j2evuWBZWnCkSR5T7Pb MEqyRkeKaOgpDDGWEYdf4oxVD/HEAjuvFhFt/4mlF4iu0RqEpKfmbb4Na9Yr747q6L 6b472NlyabEDChzZWR0yuAxXx7RXTiU0dn2E7WsiEIuHwNiFT6ZGV/7FAq2GMxDH57 LTkmFcq/NGpkXd1ertq81KXIgf3i3JKJZWfErr4nMPYdwgVCd12Ag40tJpnGSPcvSX oZQyljCvvWTnA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B24D667CA2 for ; Thu, 25 Sep 2025 11:49:09 -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 x7oSDfSPY5n7 for ; Thu, 25 Sep 2025 11:49:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822549; bh=nHNALKuscAUiVTrFsTNOAOVnDSM6VmVMzqulYDMwGVA=; 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=DtO6QORYYOKideXeOZzrmGTVouHeEBlxkniL44L5d+lrlKN0og6HGHkz3JgLxB6WF ZxGZ5XjW+FXGwJulwNWcTc+LwGBkRHkgZKEIrUPHd9A172/j2evuWBZWnCkSR5T7Pb MEqyRkeKaOgpDDGWEYdf4oxVD/HEAjuvFhFt/4mlF4iu0RqEpKfmbb4Na9Yr747q6L 6b472NlyabEDChzZWR0yuAxXx7RXTiU0dn2E7WsiEIuHwNiFT6ZGV/7FAq2GMxDH57 LTkmFcq/NGpkXd1ertq81KXIgf3i3JKJZWfErr4nMPYdwgVCd12Ag40tJpnGSPcvSX oZQyljCvvWTnA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9D07167D76 for ; Thu, 25 Sep 2025 11:49:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822547; bh=2/m5lbDEPcEAeUU7GBcswH6PA1/ht65UuwZpTB4lIHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQpXxmvE9FlwsL62pM0bbSX+VWpH7GbwqT6ltRgpSA0QATPuOJrfzxbCFGC1Ejbwo fweuNQWaWhFNl0L+6uUs8kABrvGnv6qQTBfDPFYHPrumHqQaIRObT+oJUKCgVgG9nn 57FtIC0sib9GwYYt16gNdGPXrX8M27dAe7GXCzfa4BvYxW51F2DQ4wiysMWZy7Em+X Mb1t56nBJwkPHCHHodTfVRLV4BEF1j5Uc/09Qa3KsTT2jrhj1ksU9e0cJE4NxXYqXt Q1u7pORK6TuQ81eRtC3+cqJ7tv/ssrYqlLKrCNFrH3gNUnWgMXIsTvtZc564A7KUPc vALqs5ZdPv5Mg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E266967CA2; Thu, 25 Sep 2025 11:49:07 -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 HYbLciJ11Gwm; Thu, 25 Sep 2025 11:49:07 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822542; bh=aoKBYNwo/CEx09JDNtup4l/lr68iy8DlcXDIU9RyAX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aYi3seaBXA5vsMecgD6yTSvUEFkc6ggcyB5lTaBDyyhDwYjU8JBZgqAPMWdiiZU82 NgpKdIXqig8dckeWFHAEVK5/9tV3P50E9vBBt7vhf8aLtcoFgDdXO4frbzk2448iZE 1EbR5VimDbRyPVQOma+1Wa/feiWZzyOaUBYPJD3FZ/wFN9kzehwifVdtxxmlkrpcx+ iP6eAa1XoYmlrqRROstQup3GQV/cFgLRbi3Lk8yrkMAzXsAlJsXB2gPTOAugTlrG+w nRAWTuxgyUpIRsAhjsACU0pOzoiqCF8mxVw2vq9jsp0c2j/+37XNFm2HKuwWIaC2kv jS6rPz83zSwyg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 4880D67C2B; Thu, 25 Sep 2025 11:49:02 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:40 -0600 Message-ID: <20250925174753.3429102-17-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: DT4ASABRYJHYS3YYBNG4WT7R2NQYFUUS X-Message-ID-Hash: DT4ASABRYJHYS3YYBNG4WT7R2NQYFUUS 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 16/22] boot: Tidy up positioning in bootflow_menu_new() 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 Several items use the SCENEOB_DISPLAY_MAX setting which does not work with alignment. Some others have a negative height, which is now checked, so results in the item being invisible. Fix these problems. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 602a2e33c88..3365b5c3b06 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -67,7 +67,7 @@ int bootflow_menu_new(struct expo **expp) ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE, "U-Boot - Boot Menu", NULL); ret |= scene_obj_set_bbox(scn, OBJ_MENU_TITLE, 0, 32, - SCENEOB_DISPLAY_MAX, 30); + 1366, 60); ret |= scene_obj_set_halign(scn, OBJ_MENU_TITLE, SCENEOA_CENTRE); logo = video_get_u_boot_logo(NULL); @@ -90,13 +90,13 @@ int bootflow_menu_new(struct expo **expp) "The highlighted entry will be executed automatically in %ds.", NULL); ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1A, 0, 590, - SCENEOB_DISPLAY_MAX, 30); + 1366, 590 + 40); ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1B, 0, 620, - SCENEOB_DISPLAY_MAX, 30); + 1366, 620 + 40); ret |= scene_obj_set_bbox(scn, OBJ_PROMPT2, 100, 650, 1366 - 100, 700); ret |= scene_obj_set_bbox(scn, OBJ_AUTOBOOT, 0, 720, - SCENEOB_DISPLAY_MAX, 750); + 1366, 750); ret |= scene_obj_set_halign(scn, OBJ_PROMPT1A, SCENEOA_CENTRE); ret |= scene_obj_set_halign(scn, OBJ_PROMPT1B, SCENEOA_CENTRE); ret |= scene_obj_set_halign(scn, OBJ_PROMPT2, SCENEOA_CENTRE); From patchwork Thu Sep 25 17:47:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 429 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=1758822554; bh=2M0K6i0gEEY8ZjxfEjAawp0+qhc3fEicmt7nHs8V5e4=; 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=CinU3Y8HEkB6GCD4OE4ApOG9hPMse+/AG7INc9VcKKRt/KaJ+2Kebzdc/UWf8yawi gHmdHCJZEVUY1sYIelQqDPlW+5zJdUQreMbv5oSEc7UPcztWhTKmNHi2oZHfgEunmZ +wWjQ58AItMtrqFiHCiAXuyU98vLsv3Ihal23O09qTeeIVmzTlKEasWSqZw08+HdDh +739FycIWliDSFoc3KPY/lcmyoq6zZ7eQPHOYc3Fk6B19KIwYZAqrC/iJLPSShWpDw KghY7agUXl5IT6ePWD3G4hi3p+VdHeVdVZEHG8dzQCv9VySXdfMgfrFiZBhbgWCrzx f2wvTID6ZESRg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 536E167D9A for ; Thu, 25 Sep 2025 11:49:14 -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 Rr8F_Uejcwpx for ; Thu, 25 Sep 2025 11:49:14 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822554; bh=2M0K6i0gEEY8ZjxfEjAawp0+qhc3fEicmt7nHs8V5e4=; 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=CinU3Y8HEkB6GCD4OE4ApOG9hPMse+/AG7INc9VcKKRt/KaJ+2Kebzdc/UWf8yawi gHmdHCJZEVUY1sYIelQqDPlW+5zJdUQreMbv5oSEc7UPcztWhTKmNHi2oZHfgEunmZ +wWjQ58AItMtrqFiHCiAXuyU98vLsv3Ihal23O09qTeeIVmzTlKEasWSqZw08+HdDh +739FycIWliDSFoc3KPY/lcmyoq6zZ7eQPHOYc3Fk6B19KIwYZAqrC/iJLPSShWpDw KghY7agUXl5IT6ePWD3G4hi3p+VdHeVdVZEHG8dzQCv9VySXdfMgfrFiZBhbgWCrzx f2wvTID6ZESRg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 42AAD67D90 for ; Thu, 25 Sep 2025 11:49:14 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822552; bh=Gxn28uiFtj/jfMn/CVSeyylCpJtaNtLTa/9fIxyG7/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CFcThBS5WD/fh4E31EO4mps8jWWrelpw4umN2vgZ/QakidramXxgDaHYAigLflwh6 BkImQU5dxATBp7OMe+8hyoK/A9VkVPxn4bgVVwSqGMRP66WG5237IfVdiw2d9Jrdu3 nsPRXF74Yx6h9rlpkIUD6ir7/EO2luBY7dioLmgqgQJkuC6H9BvG5UW21w3fg3jWNm QEdXOKTGmC4arGWr/pw5YaH+L00g8A7NxaIZvc669/Y5FgVzqOpx4dGpn1aswbzqQz SXSNZC/DmbIFoSfCwFrb/gPz6wR1RZWUAPAgXmjrU3/k0yDD/8s/A0JckFdjfGlv/O SaybD580LgOVg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2F95F67D93; Thu, 25 Sep 2025 11:49:12 -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 0vkavXCkKhpC; Thu, 25 Sep 2025 11:49:12 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822547; bh=Eze9vPjTdSeji2h7gPU/bUBaaPtotoB4bUguyHumYmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aFkkVoWwxSDTFDxCyFVqNS98VBELJ+2NfIjO4E0+ELRU322p5955QQCXsAHaVBOiP 1+HrMflvlVuEXiOcIIR79j4AIgK3+CfsRZGIJB04oWekzZFtWebpv3+/PazH3/On5C 3aVnNUWNykDnOFOJvybLb5qgS//dfvwotPcBPju2O3OPn2k2Z1XW1rIDJJo+0DqKQp GbB0LZFAJdEx7HxVRaVXSpUp6PX+dbCXxFHS/Pg4efDdb8AIeJppEEcgHh6Wsimi8B B2L1XLmL3FdNL5Y+DyPBI031SYh2R6GC4dhAd0nyBpsfZs3l5yiwyfWocfirlVR+eN FP0CW+7ZXTVXg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D796C67CEF; Thu, 25 Sep 2025 11:49:06 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:41 -0600 Message-ID: <20250925174753.3429102-18-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5CJFWRCAIL33XQURSBSGC6C5SL3K57DE X-Message-ID-Hash: 5CJFWRCAIL33XQURSBSGC6C5SL3K57DE 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 17/22] expo: Allow manual positioning of menu items 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 Sometimes we want to position items individually rather than relying on the automatic scene layout. Provide a flag for this, expanding the type to cope. Also add an assertion that the flags fit in the available space. Signed-off-by: Simon Glass --- boot/scene.c | 14 ++++++++++++++ include/expo.h | 27 +++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/boot/scene.c b/boot/scene.c index d7e0d008b56..96130f160fc 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -359,6 +359,18 @@ int scene_obj_set_hide(struct scene *scn, uint id, bool hide) return 0; } +int scene_obj_set_manual(struct scene *scn, uint id, bool manual) +{ + int ret; + + ret = scene_obj_flag_clrset(scn, id, SCENEOF_MANUAL, + manual ? SCENEOF_MANUAL : 0); + if (ret) + return log_msg_ret("fla", ret); + + return 0; +} + int scene_obj_flag_clrset(struct scene *scn, uint id, uint clr, uint set) { struct scene_obj *obj; @@ -810,6 +822,8 @@ int scene_arrange(struct scene *scn) handle_alignment(obj->horiz, obj->vert, &obj->bbox, &obj->dims, xsize, ysize, &obj->ofs); + if (obj->flags & SCENEOF_MANUAL) + continue; switch (obj->type) { case SCENEOBJT_NONE: case SCENEOBJT_IMAGE: diff --git a/include/expo.h b/include/expo.h index d6983ee77d4..e359da1343b 100644 --- a/include/expo.h +++ b/include/expo.h @@ -313,6 +313,8 @@ enum scene_obj_align { * @SCENEOF_SYNC_SIZE: object's size (width/height) has changed * @SCENEOF_SYNC_WIDTH: object's widget has changed * @SCENEOF_SYNC_BBOX: object's bounding box has changed + * @SCENEOF_MANUAL: manually arrange the items associated with this object + * @SCENEOF_LAST: used just as a check for the size of the flags mask */ enum scene_obj_flags_t { SCENEOF_HIDE = 1 << 0, @@ -323,6 +325,9 @@ enum scene_obj_flags_t { SCENEOF_SYNC_SIZE = BIT(5), SCENEOF_SYNC_WIDTH = BIT(6), SCENEOF_SYNC_BBOX = BIT(7), + SCENEOF_MANUAL = BIT(8), + + SCENEOF_LAST, /* check for size of flags below */ }; enum { @@ -361,12 +366,16 @@ struct scene_obj { struct scene_obj_dims dims; enum scene_obj_align horiz; enum scene_obj_align vert; - u8 flags; - u8 bit_length; + u16 flags; u16 start_bit; + u8 bit_length; struct list_head sibling; }; +/* Ensure the largest flag value fits in the flags field */ +_Static_assert(SCENEOF_LAST < BIT(sizeof(((struct scene_obj *)0)->flags) * 8), + "scene_obj flags exceed flags field capacity"); + /* object can be highlighted when moving around expo */ static inline bool scene_obj_can_highlight(const struct scene_obj *obj) { @@ -977,6 +986,20 @@ int scene_obj_set_valign(struct scene *scn, uint id, enum scene_obj_align aln); */ int scene_obj_set_hide(struct scene *scn, uint id, bool hide); +/** + * scene_obj_set_manual() - Set whether an object arranges its dependents + * + * When this is enabled, scene_arrange() will refrain from moving objects + * attached to this one. E.g. for a menu, normally it moves text objects + * associated with the menu. + * + * @scn: Scene to update + * @id: ID of object to update + * @manual: true to disable arrange dependents when this object is updated + * Returns: 0 if OK, -ENOENT if @id is invalid + */ +int scene_obj_set_manual(struct scene *scn, uint id, bool manual); + /** * scene_menu_set_title() - Set the title of a menu * From patchwork Thu Sep 25 17:47:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 430 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=1758822558; bh=UUQQndPR3KYoP8epuMNH/IYTgOcxU56NHSP44w0MTZ4=; 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=S9lt5dufrOi+xhuBekxhIEpcOf5MMguBOR92GzDcWb2cbc1izDvceUEuIbOl/00w2 W+pUHEIqrgygRbC+BZgxcUE9AY6PvSRWa9UTa1HO3y5+a8epb6Tnpo5F9qjAwa+ryO Ik2LJCGbGlTzChu7yFxsEJcnKDaR4h2gBX5uP1pWqfpzPLaNha5h/kS9/r2UNzQYG/ Ix5Nv5sjcEgtFD9yYyk1eggtiDnLZq7pEsmZFYFMNnjB+6Gj0bLm4THzy9Si064EXd qq5TMylhPIA7RuZ6vmrbaarXYtW5jrHyvnVs3D1iI2tKwcSZ5yMG1EPKbgRAOUBc9W 5f8uyy8/ljZwg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 446E867DB4 for ; Thu, 25 Sep 2025 11:49:18 -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 DSY2uOnO9d13 for ; Thu, 25 Sep 2025 11:49:18 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822558; bh=UUQQndPR3KYoP8epuMNH/IYTgOcxU56NHSP44w0MTZ4=; 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=S9lt5dufrOi+xhuBekxhIEpcOf5MMguBOR92GzDcWb2cbc1izDvceUEuIbOl/00w2 W+pUHEIqrgygRbC+BZgxcUE9AY6PvSRWa9UTa1HO3y5+a8epb6Tnpo5F9qjAwa+ryO Ik2LJCGbGlTzChu7yFxsEJcnKDaR4h2gBX5uP1pWqfpzPLaNha5h/kS9/r2UNzQYG/ Ix5Nv5sjcEgtFD9yYyk1eggtiDnLZq7pEsmZFYFMNnjB+6Gj0bLm4THzy9Si064EXd qq5TMylhPIA7RuZ6vmrbaarXYtW5jrHyvnVs3D1iI2tKwcSZ5yMG1EPKbgRAOUBc9W 5f8uyy8/ljZwg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 332C167D93 for ; Thu, 25 Sep 2025 11:49:18 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822556; bh=cxQAo46jyb3cruQd+i9xXfcGEkE5tTIRyxEKAzt30sk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hdtuu/91Yp08JrII/4NQefJNTrMvPTFaZQtAN67FOvrB8/Hpgd0oZm6XYxCn/5BsN e8N6ZVh2rsgRWDEZj2uUMd7RHhczxfjOQFMYa2sTlBrBrnXRnaHjqAZyebZCWk4nG5 3/RVD6NAHbvQ5t4TLDP5UleY9QJX0W3eeKOcpPKRzBMmSYLCIt6E8dZalSSPunLLam j7g6/Z/pb7SRLddMLpXWj+6JhZUeyu1k4J17E5RJ4AQ92xRWhQM6Ag4RdU2vpMpH9b tR+YzbbQMiY5N25NTUsIUGZ0kAb1k1O0TwxwLlHfJTZlaxfvpllOVL/FjCJuvfTfHl HUJ5hdOhX6t9g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AFCC567DA7; Thu, 25 Sep 2025 11:49:16 -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 6IX1Ubiuk0LL; Thu, 25 Sep 2025 11:49:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822551; bh=6w6ia+WYJlGlxHL/x0JY9gxHnCmo3FEIiuBjfHnoSnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BfSwm5j4UQN0O5x4pMlpomn1JHQahUsrp16Npdr3TtXGHSOWR3fvGvAtd8zS+cp3D ADPBnIoSu90ubE0JOhDDebBNHbEi54M7qD28MeXhfJdj0QmsOdRqxMUzqvlaiO7u7t 4xdxUX0s4Xfqs0yS51ZpJ0zzVduPRPt7MrARHmFavMqg9iRwEPQQ3DIdb8Of7gRIPq 8wheMb3MakVkcr7u70eAterFqPJ+2nO8MpLPby7anM1IKBiSBgo3n/C5P3AmSGlqRA CrvpUMjL930rUMbJYh+qdtYyrITwzsVV/0d6DBWlKWCD9a8fa5qhT4ihHhealxnnGN SRFRHp3vaKQQw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 750F667CA2; Thu, 25 Sep 2025 11:49:11 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:42 -0600 Message-ID: <20250925174753.3429102-19-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YIT76TDKGWB6T5U4LR5JIZLP7TDPNXAD X-Message-ID-Hash: YIT76TDKGWB6T5U4LR5JIZLP7TDPNXAD 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 18/22] Revert "ARM: Prevent the compiler from using NEON registers" 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 The current compiler is gcc-13 which presumably has fixed this bug. Revert the work-around so we can enable Truetype which needs floating point. This reverts commit f43312c974eaeb7301cb2638aa4ab05ed7ca4c44. --- arch/arm/config.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 8a0167c165d..38c49c877c4 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -23,7 +23,6 @@ endif PLATFORM_RELFLAGS += -fno-common $(FIXED_REG) PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \ - $(call cc-option,-mgeneral-regs-only) \ $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) # LLVM support From patchwork Thu Sep 25 17:47:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 431 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=1758822560; bh=0mh+Ks/rmw96hZfnuc6UqIZVB+iyRPMwRaGDcGdFUL8=; 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=u4/lv2TGIdJ78MC8O2TUuu5MxoeyZp9AFvMLsgzv1cv37nF4q8HYLX4Hvbtuq44gb KVsuYXjdkjCPiOuqUBWgNpqyxGOz/LGxLr2/iFw82uaVEzGF+5k6CLgH7O/ue7Apnx iPuHzobafSUM8IdQiKuiDr4+oU4kgnI8TxzfP0OTdwCanHumh5mnVIizWNkbqGn5rk P3uatoQRqL8/+3H4oTkEW4kt8ZN8gvI1pD/S9isNl5XP07GgSobDHD3XqmUCSAtjSy vGjISMNOKo4rtKmf0Fnx29wx286FVbT2GgqavYzgkE9Np+27dcjNZjs98FAqVqIvjp WORhz2BFFLhzQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BA25F67C2B for ; Thu, 25 Sep 2025 11:49:20 -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 p456w6WCzOo7 for ; Thu, 25 Sep 2025 11:49:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822559; bh=0mh+Ks/rmw96hZfnuc6UqIZVB+iyRPMwRaGDcGdFUL8=; 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=j2HiuzJQFugR2m5qVaJF8y99bo+0TZyArnTH1gaHiLoJb6LY2t/sP+3ydJt7qMOz3 ersCEYs3zGdBuNPfez+eV1QeGObIM7nuolBlQkKN3iwOqQ7Tk8JqtTAk8joOWmhCou 4/OwMu3rZ2TFYNuTOu+3IHmf9FRrRdq0KsRk9ZAZk8r9Evy0saZbuWy6DYVFpKUwSF 3ATfjC9xk0Wyekrmvp0Aek4r/OU5/IbfGcTz4gACJvuf8HnsMqah/BiofL1tSqV+iD RPHEWpQj9wMAb08usvRmZx6EnHtjA8+rFx7+E+qKlCLKctEdGB4dQzVegJhE5/IOaR UIXNGX9WG/SsA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A6E8967D93 for ; Thu, 25 Sep 2025 11:49:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822557; bh=Vzh6cjfRjlG9VVWXtIg8ZEswXpfAajRAdOuBnlf6sCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNEXH/qlLVhJtJyV7C0d/RH+SkljbVjepjtKgszYkTB8pCXYJa5B1OTgaWgubBMKm kEY5yh5MXaLQR8TcQsVgrdSVsxGodLQYnelPHqIDD07lIKXy/TRp5VzkqQNnr8leZS 1NjiSiRnO7Q0d8HCEfPzUog1SzoTrfpL9RDdtuTbruVtD3yVMoiyq/25f1WVgnEDvv 8ZYF4Ssh4aQrpalLM9oNO05zJ2cldTL8kg0omdqu4IX/uHi/TQvEeBZ/JEy1vllyW5 hjvmPJizHWMjDn9IIdOf0AkViduIxFcNxyit3NU309oWyaeoPojD3718n3PtXI3+Gz jOBZoJvIUctTA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D2C3367C2B; Thu, 25 Sep 2025 11:49:17 -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 zxe7UPiHpD-E; Thu, 25 Sep 2025 11:49:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822556; bh=sbr2Y4PdhFeEGtwrkWglLEVu34bgVZ1UcPMyhrSFilg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C4vo5+jsKzGdMtYlYjxsCJKLX9X1JwGc2tWftuTCVMN36YRprzOSDfL+zcPe+lKd/ jf+aSEuQhFWNUe+VbsDZHMJWkAWz2l3Y9WOsTUuxILTY4XFrnZpUJg6PURqPA2gYqt ydq+aUW0vV2DMFeg2mg18qxXtwHF7HYZ6ohKRc1HrSLanqC7L1GHoH0DtDuif5v1k8 XrLChwTsekcxbnMq0B8okBritS2BlweA5PG0nH+PmegEg4Nsja9bR3qKkR+l3F9rpp B83iuNg8yA0N5cqzzXJVnPVvqSF88IFRhK6VTbytU+S1FQ6OO/QBsrSglSbfALzcqM WJAG/VAdJidZA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 39BD667D90; Thu, 25 Sep 2025 11:49:16 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:43 -0600 Message-ID: <20250925174753.3429102-20-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JHTDG64QLSCVEDALFKEYLUFUSILOJQ22 X-Message-ID-Hash: JHTDG64QLSCVEDALFKEYLUFUSILOJQ22 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 19/22] efi: Enable truetype in the ARM app 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 Enable truetype fonts so the menus can look nicer. Signed-off-by: Simon Glass --- configs/efi-arm_app64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/efi-arm_app64_defconfig b/configs/efi-arm_app64_defconfig index 8defb83f9d4..35e8b4d36ed 100644 --- a/configs/efi-arm_app64_defconfig +++ b/configs/efi-arm_app64_defconfig @@ -49,6 +49,7 @@ CONFIG_SYSCON=y CONFIG_DM_RNG=y CONFIG_SYSRESET=y CONFIG_VIDEO=y +CONFIG_CONSOLE_TRUETYPE=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_FAT_WRITE=y From patchwork Thu Sep 25 17:47:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 432 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=1758822563; bh=leVB/ma4m5mJ+22F5cf/TfrJ6KTcFkmJ5EEVoeKrjAU=; 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=POHjgjwq0O4bVPo37OsLkG9VezYeTlDCiZ89wuHGuUMXyGV2ILRoUt/MZ7SOg8q6/ iFY7Eew6gcBjM6lOiujsGa5XJUiLkNC76lWCppULkWWUSEVztjUGHiqPp5EaAUGCwl M/irmC46Z8ieP8zvlxlllPGavgfNxcq7EdJxvetUs9Nv6UE30PzaCjxTF0GeM13YBK m04NMXHUoRo/cdBuCtdSOUxwt/vCB43hNFDjCmBG0BMfcczkJBF5psn7zTjwFq9d6P V9mHDXHXzBsLdKucpWdn2H1k+hLnS2cOUiw7a4rduP5wFzikBt1Hv8+T28CTeWMfWu 1Sr5q0h0e82Dg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3028D67D29 for ; Thu, 25 Sep 2025 11:49:23 -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 yY5QYJPK6Zoq for ; Thu, 25 Sep 2025 11:49:23 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822563; bh=leVB/ma4m5mJ+22F5cf/TfrJ6KTcFkmJ5EEVoeKrjAU=; 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=POHjgjwq0O4bVPo37OsLkG9VezYeTlDCiZ89wuHGuUMXyGV2ILRoUt/MZ7SOg8q6/ iFY7Eew6gcBjM6lOiujsGa5XJUiLkNC76lWCppULkWWUSEVztjUGHiqPp5EaAUGCwl M/irmC46Z8ieP8zvlxlllPGavgfNxcq7EdJxvetUs9Nv6UE30PzaCjxTF0GeM13YBK m04NMXHUoRo/cdBuCtdSOUxwt/vCB43hNFDjCmBG0BMfcczkJBF5psn7zTjwFq9d6P V9mHDXHXzBsLdKucpWdn2H1k+hLnS2cOUiw7a4rduP5wFzikBt1Hv8+T28CTeWMfWu 1Sr5q0h0e82Dg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 19B9E67D90 for ; Thu, 25 Sep 2025 11:49:23 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822560; bh=Xl+4OdfU3TETGruEvqDNJTVTZ6981zxTThu17Mk9MJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p4A/J+Rso3uUf5cV+yLTF8mcB8TVxIUlx2nPmYYbV0ZCjvS9U8XWWJCyy2Vp2CfO/ 7paRvJEbljd/L5N8X9exomeoQKWVX/3lFOCMHAts2MPWkTsAcId3rO5uimsQcmKbGh nPoN3RFGcU4OCOMEQJXYPV76LKf4OtLAycNlNt1nPdNBw6uzYEyig4xrwdvZm+pzz/ z4/qXYH7rCYQjtRyS4KFFHxRm3bj8HkZrpkjqb+LzFdtGZXPzLEp+v/BsDydLofTyT cVfp+8JKw42lMmJZLlVZsHJLYzUYqqcdhk7aQc23YPw7uloY8hDaGiBu5aGyEZMoRE TxwUUfBVBob4g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A73D067DBA; Thu, 25 Sep 2025 11:49:20 -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 9D6FIjf-e1zw; Thu, 25 Sep 2025 11:49:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822558; bh=0NEHPySDHQ096O1uEL40mG33FSX0cyrOMRNbqUbO8GU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sb9Ve1Jbwok5Z1PBqmN3PePBhNBMlCtqiY0jlAREoXTSm7HyvD+T5EPM9U8ToKPQO dtLJGpci6hAflRH+VGabrD7sTcrY8w4aMNJauTs8nJhBbsaRhm7VuzJJw2wo3zDNgM j5vvQdzF3t+Go+cAC13zBwMAR3/b/BvHBZmpHgqIH0U4b/p4aehTmqbuwLE+SBeCWy q76HV0egXUryUwiiPef0oZFmylWokekPIm17QsnHo/vBykdEVyrkHdXG0lpk0PYEyO Qn3scWNpBM9nCR2p9jFGMQJMiFb8ezPoXLFhVFtEcfdpFGlghuBuMXpjLRXw7PG7pD kvf3jkMcW4Cdg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 24A1F67D90; Thu, 25 Sep 2025 11:49:18 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:44 -0600 Message-ID: <20250925174753.3429102-21-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: PIGGPPPPU4TJZ7XFMMJSEZLPUOBGDLRT X-Message-ID-Hash: PIGGPPPPU4TJZ7XFMMJSEZLPUOBGDLRT 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 20/22] efi: arm: Drop setting of fdt_addr 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 This variable is not needed in the ARM app and can be confusing since there might not be memory at this location. Drop it. Signed-off-by: Simon Glass --- board/efi/efi-arm_app/efi-arm_app.env | 1 - 1 file changed, 1 deletion(-) diff --git a/board/efi/efi-arm_app/efi-arm_app.env b/board/efi/efi-arm_app/efi-arm_app.env index 3b839f5710c..b28c15556de 100644 --- a/board/efi/efi-arm_app/efi-arm_app.env +++ b/board/efi/efi-arm_app/efi-arm_app.env @@ -6,7 +6,6 @@ */ /* common console settings */ -fdt_addr=40000000 stdin=serial stdout=serial,vidconsole stderr=serial,vidconsole From patchwork Thu Sep 25 17:47:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 434 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=1758822569; bh=Q+xmlsN0LwRfeQYnRNnHf7dGWpQ0762vRsjU2Pqy8hg=; 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=is2NxEds39VWlN0hBG0VvxodvcRDuDTdWxMcgoFExepKuEOP1vw3rEvv4AfyNZAB6 0T2ppnIa7aRVHjJAI8YEGM9dnPknvze9QoCmn+/x6LI0+uG7Hrov/mqJ3i7warZySf VjEEAQUo5V+A1ZLycvR+TZLY6y6QNjTPg2QdwNGIdPljCw+xR6LbzZB7XIQjZi1YLh l4FPlwUvufjnxm3hw97mPZf7IDjIHZ9iJ0h2BHq0mksuHnCEImJfAwuicEjnz/40+c 0Nz9U+xg9u7mzZcHyPzntQ6K1Df3+tLwtXmTwj86+Xzt8OK/aDCSVVB8cLdwwWbHGo duR0qLlQiPBow== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ED7CB67C2B for ; Thu, 25 Sep 2025 11:49:29 -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 oGlAc0_Y5xtF for ; Thu, 25 Sep 2025 11:49:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822568; bh=Q+xmlsN0LwRfeQYnRNnHf7dGWpQ0762vRsjU2Pqy8hg=; 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=G1jrsSjUH4beDeYgH3YfaaN3GjKMOM6hZUDTYWaptXkF0uUd/kwVcCZzJ8ogeeLsw NnublEY8A9V7hGl2p3yaThtlIYlNCIjyaCl8m7OEl1yhfr0R44CG9n/3Yhw3UZjQnP 099tixDY+lBxNph+NqADoEauwfpMbFL3Tu1kzQvvHeBmWm6HNbNvUur6Rf7gQNnx9v VRBlYn2aBKRqTWbhdlvtlQSqmn7u4opjib2RFNB7fpw064Jd5VljZrqH6TPypUZMhM +aAAiwUGhLcoJZD8BqUHu2dEyIyVm3fHNaymBHNgcsnrgLe0G0O4Wc7P3xb5ebgSaa sQWcc3tC+Oq2w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7221667D93 for ; Thu, 25 Sep 2025 11:49:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822565; bh=BNIz930X24dTGl2vX+lN0jSjz65PE7d67G/tGl+KnvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SzZ8elB6GHkjyX/IEG+P7gHkLDer7R7yVs1xrvKj9DkVvxb513O5exiiL3lYLVDsG yRdVvTVHYqsghwKtHxoH4WgYdeQ+ugifEFm0UANvtdswxO4/x6IDhZxpamrBmrY+7v Vot4DAnxSCJjeMyrinK+XUXvZctElE2BQDge0NnEgzDI0XnyTFYLHDeiUIz8g8AdZN sUOjqX2Y0tgfTFDbaLfV7vQBVdznkyVRhg9WyscMMIuv1IBLlbRR1jtT1w9T13yCV2 n953x8fToBKRAFX/yYz7OkOXqvNbTT13FOWQ3sHVx3Edn8VKpkVU+edlcp6vppqp1q r20CE9B3GhHWg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9714567D29; Thu, 25 Sep 2025 11:49:25 -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 IBMo6e_Z7h60; Thu, 25 Sep 2025 11:49:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822559; bh=bmYqkTsL5lnTnYtGSDHOJb5okNZ5R39yxlSyJluqjes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CBj/bXljjTeQvjbDrH5n7cEqETD2V2QbSxpeCz1Z5hRJHi0U3T+sQtzAK9teAgWKI bir/2cn+7yAThlxpLBKrpb+7FCa1HvB4gmiJiITcSjrKcntO6IL1WDyLIrckw8i74T 029wJKtk3TA6tCKW3zOn1gHCHg0UGgAF/ZkieNlmOVPCCBuQYbTfEhRM/bZ4WsQjBB ePI3yr8LV1K+wbovHVWL5gLFWhahaRiU0sTyJYQTLuiAJbaMwlmN7IQHZYeN0XAd94 C6n1pDYIwtQ6asvGmzlY9aQjiFzh/wPta4fMI/FQ6sO8PqK8jvHlntuD4RihP95xlv 7XS+MbZfj/Swg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id F0CB967CA2; Thu, 25 Sep 2025 11:49:18 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:45 -0600 Message-ID: <20250925174753.3429102-22-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YMOX5EOJUPGOAZZJOPJYUZW4MRRHWYQU X-Message-ID-Hash: YMOX5EOJUPGOAZZJOPJYUZW4MRRHWYQU 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 21/22] efi: Move key decoding into a shared file 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 Create a new file in lib/efi to handle conversion of keys from EFI format to characters, so we can use it from multiple places. Update the serial_efi driver accordingly. Signed-off-by: Simon Glass --- drivers/serial/serial_efi.c | 15 +------------- include/efi.h | 32 +++++++++++++++++++++++++++++ lib/efi/Makefile | 1 + lib/efi/input.c | 40 +++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 14 deletions(-) create mode 100644 lib/efi/input.c diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c index b506bb18ffb..6645520e2ca 100644 --- a/drivers/serial/serial_efi.c +++ b/drivers/serial/serial_efi.c @@ -73,7 +73,6 @@ static int serial_efi_get_key(struct serial_efi_priv *priv) static int serial_efi_getc(struct udevice *dev) { struct serial_efi_priv *priv = dev_get_priv(dev); - char conv_scan[10] = {0, 'p', 'n', 'f', 'b', 'a', 'e', 0, 8}; int ret, ch; ret = serial_efi_get_key(priv); @@ -81,19 +80,7 @@ static int serial_efi_getc(struct udevice *dev) return ret; priv->have_key = false; - ch = priv->key.unicode_char; - - /* - * Unicode char 8 (for backspace) is never returned. Instead we get a - * key scan code of 8. Handle this so that backspace works correctly - * in the U-Boot command line. - */ - if (!ch && priv->key.scan_code < sizeof(conv_scan)) { - ch = conv_scan[priv->key.scan_code]; - if (ch >= 'a') - ch -= 'a' - 1; - } - debug(" [%x %x %x] ", ch, priv->key.unicode_char, priv->key.scan_code); + ch = efi_decode_key(&priv->key); return ch; } diff --git a/include/efi.h b/include/efi.h index 52f3a014f1d..3d983bd69a4 100644 --- a/include/efi.h +++ b/include/efi.h @@ -24,6 +24,8 @@ #endif struct abuf; +struct efi_input_key; +struct efi_key_data; struct udevice; /* Type INTN in UEFI specification */ @@ -912,4 +914,34 @@ int efi_read_var(const u16 *name, const efi_guid_t *guid, u32 *attrp, uint16_t *efi_dp_str(struct efi_device_path *dp); +/** + * efi_decode_key() - Convert EFI input key to character + * + * Converts an EFI input key structure to a character code, handling + * both unicode characters and scan codes for special keys like arrow keys + * and backspace. + * + * Unicode characters are returned as-is, with the exception that carriage + * return ('\r') is converted to newline ('\n') for consistency with U-Boot + * conventions. + * + * @key: Pointer to EFI input key structure + * Return: Character code (0-255), or 0 if no valid character + */ +int efi_decode_key(struct efi_input_key *key); + +/** + * efi_decode_key_ex() - Convert EFI extended input key to character + * + * Converts an EFI extended key data structure to a character code by + * extracting the basic input key and calling efi_decode_key(). + * + * This function provides a convenient wrapper for handling EFI Simple Text + * Input EX Protocol key data, which includes modifier keys (currently ignored) + * + * @key_data: Pointer to EFI extended key data structure + * Return: Character code (0-255), or 0 if no valid character + */ +int efi_decode_key_ex(struct efi_key_data *key_data); + #endif /* _LINUX_EFI_H */ diff --git a/lib/efi/Makefile b/lib/efi/Makefile index 842067dcab3..c2e56df7144 100644 --- a/lib/efi/Makefile +++ b/lib/efi/Makefile @@ -6,6 +6,7 @@ obj-y += basename.o obj-y += device_path.o obj-y += helper.o +obj-y += input.o obj-y += load_options.o obj-y += memory.o obj-y += run.o diff --git a/lib/efi/input.c b/lib/efi/input.c new file mode 100644 index 00000000000..4d6b81bf183 --- /dev/null +++ b/lib/efi/input.c @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * EFI input key decoding functions + * + * Copyright (c) 2015 Google, Inc + * Written by Simon Glass + */ + +#define LOG_CATEGORY LOGC_EFI + +#include +#include +#include + +int efi_decode_key(struct efi_input_key *key) +{ + static const char conv_scan[] = {0, 'p', 'n', 'f', 'b', 'a', 'e', 0, 8}; + int ch; + + ch = key->unicode_char; + + /* + * Unicode char 8 (for backspace) is never returned. Instead we get a + * key scan code of 8. Handle this so that backspace works correctly + * in the U-Boot command line. + */ + if (!ch && key->scan_code < sizeof(conv_scan)) { + ch = conv_scan[key->scan_code]; + if (ch >= 'a') + ch -= 'a' - 1; + } + log_debug(" [%x %x %x] ", ch, key->unicode_char, key->scan_code); + + return ch; +} + +int efi_decode_key_ex(struct efi_key_data *key_data) +{ + return efi_decode_key(&key_data->key); +} From patchwork Thu Sep 25 17:47:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 433 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=1758822567; bh=IF/dpSxMfm+HJmp06oQKBPg4D1TpMOpPRYmw1dkJ8Js=; 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=HeyPGC734QzIgGQNDMj/nV1pqJyXM2KIT9TTzzrTDrZ5e5tlXyL54M6rE7RD9vZ4f e5UCvnkZLjPeoq692h1rqk5rIDYfkyVT7iV5U5H1Imaftrl/SrrVNFjvvgd4oJCLuD 22dWuvCI54t8nvTA7ONEjLfuh2dtdKuvkfIiZeNK8m/t8jHyH4QcCTnFsoSDRkw2vB 5xVuvbJJFyQtjevHa5g/oB8IeYoMVQPW05E2z2XcWtpIZEPx2mWtpE0CMaBRZi5g96 xVYVSEb74afABPlEATEh6B7v9/YnUrelS5g0VDvjc1YWJKm9DwKKZsIygm4qZig7M/ /rif2lb/YAz7A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9853B67D93 for ; Thu, 25 Sep 2025 11:49:27 -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 MtPFBdykE6K9 for ; Thu, 25 Sep 2025 11:49:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822567; bh=IF/dpSxMfm+HJmp06oQKBPg4D1TpMOpPRYmw1dkJ8Js=; 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=HeyPGC734QzIgGQNDMj/nV1pqJyXM2KIT9TTzzrTDrZ5e5tlXyL54M6rE7RD9vZ4f e5UCvnkZLjPeoq692h1rqk5rIDYfkyVT7iV5U5H1Imaftrl/SrrVNFjvvgd4oJCLuD 22dWuvCI54t8nvTA7ONEjLfuh2dtdKuvkfIiZeNK8m/t8jHyH4QcCTnFsoSDRkw2vB 5xVuvbJJFyQtjevHa5g/oB8IeYoMVQPW05E2z2XcWtpIZEPx2mWtpE0CMaBRZi5g96 xVYVSEb74afABPlEATEh6B7v9/YnUrelS5g0VDvjc1YWJKm9DwKKZsIygm4qZig7M/ /rif2lb/YAz7A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8807167D82 for ; Thu, 25 Sep 2025 11:49:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822565; bh=AgBbD1gVN1ju+ylAzSp67yz35G2wI/B42A18pK+Zr2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i0D44Mdvi8TyBRN6TfiS7Z+hQbwvkm9Hpqh++nnCIdNBpDYhgDLK+Plac0pk0zZjq w0MaL1rTUEenOm+dHcy/ZaMhPH5poZg1RVLQuiDRs/RMJzASdOtnBvuu17UAmlszw8 SMIpbKJKAS/e9x/bFbhyjYAlukPuV+BPf7KNqgSN9yeSF1OgwCmtw+ZI8pclB2ITBO 0b/C1VerKeBsU3BbruPLUduWjWXn8tMRsTRr9XuDxRfUwbd2ceEOb+eqg0KeHm+Bm2 7YjNWXoSYsg3v4P7QCmv6C2XzR98utk+XTXhxu6DeOWMPI8ce+XVbPBm4ljX+If5uL HRDsJhyO0BLdQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9757567D90; Thu, 25 Sep 2025 11:49:25 -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 h8ZWdFtNIwQq; Thu, 25 Sep 2025 11:49:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758822563; bh=hnVJUhmcJwon94FdIEZtbjzRiLVr8FDIxuP5bWEks8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C5zhNlxzGtymvxdkBumAQ2Eg8ydfj9hBrYJrhJhQ6bIyH1HfGCp7JzpVMEX5agVC3 UyC5LH76Ae1YXcObNA26wzhyASxldCk464aueVbNXNvTgvain1tmMbSXDlb7YF10+h CegVh+VqaU8LHFjLzpCJqNMQwrx+3OMO7dJr/SkmW0fQLjIt5FNHu9PLtvNwKNOO9d BvUXjalRQlB5rEp+UmNQvqn9g62/Ls88rhgXM0Hnuj3El3CpkxPGGnTBdcFARg/MkV a3bFBJYtdI6vPm0fleTTwkqqA78RnMEDzSO7K0eJRyitWXkMAKIxCSCvlxIEGuJuxr sCELUzrFHjJGQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9B4D367CEF; Thu, 25 Sep 2025 11:49:23 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 25 Sep 2025 11:47:46 -0600 Message-ID: <20250925174753.3429102-23-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174753.3429102-1-sjg@u-boot.org> References: <20250925174753.3429102-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: GEGBNHHEND2SATV2S7CJJBN6MFFCZJ5E X-Message-ID-Hash: GEGBNHHEND2SATV2S7CJJBN6MFFCZJ5E 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 22/22] efi: app: Provide a keyboard driver 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 Add a keyboard driver which returns keys produced by EFI. This is basically the same as the serial driver but it doesn't combine input and output into one driver, allowing more control when using a separate screen. Add the required devicetree fragment for ARM (only). Signed-off-by: Simon Glass --- arch/arm/dts/efi-arm_app.dts | 4 + drivers/input/Kconfig | 14 +++ drivers/input/Makefile | 2 + drivers/input/efi_keyb.c | 173 +++++++++++++++++++++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 drivers/input/efi_keyb.c diff --git a/arch/arm/dts/efi-arm_app.dts b/arch/arm/dts/efi-arm_app.dts index d2a008fba6a..1a7ed77e6a8 100644 --- a/arch/arm/dts/efi-arm_app.dts +++ b/arch/arm/dts/efi-arm_app.dts @@ -29,6 +29,10 @@ bootph-some-ram; }; + keyboard { + compatible = "efi-keyboard"; + }; + mouse { compatible = "efi,mouse"; }; diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 7b34902dd7c..6e19f6f7b3d 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -14,6 +14,7 @@ config TPL_INPUT config DM_KEYBOARD bool "Enable driver model keyboard support" depends on DM + default y if EFI_APP help This adds a uclass for keyboards and implements keyboard support using driver model. The API is implemented by keyboard.h and @@ -63,6 +64,19 @@ config CROS_EC_KEYB Messages are used to request key scans from the EC and these are then decoded into keys by this driver. +config EFI_KEYB + bool "Keyboard on top of EFI" + depends on DM_KEYBOARD && EFI_APP + default y + help + Provides a keyboard driver for EFI. While this is often connected + to the serial driver, that can be confusing on a device which has + both serial and keyboard devices. Provide a separate keyboard + driver. + + For now this is not used, pending further work on teasing this + apart within the EFI subsystem. + config SPL_CROS_EC_KEYB bool "Enable Chrome OS EC keyboard support in SPL" depends on SPL_INPUT diff --git a/drivers/input/Makefile b/drivers/input/Makefile index 4debad9e713..e8888079a1c 100644 --- a/drivers/input/Makefile +++ b/drivers/input/Makefile @@ -8,6 +8,8 @@ obj-$(CONFIG_$(PHASE_)OF_CONTROL) += key_matrix.o obj-$(CONFIG_$(PHASE_)DM_KEYBOARD) += input.o keyboard-uclass.o obj-$(CONFIG_BUTTON_KEYBOARD) += button_kbd.o +obj-$(CONFIG_EFI_KEYB) += efi_keyb.o + ifndef CONFIG_XPL_BUILD obj-$(CONFIG_APPLE_SPI_KEYB) += apple_spi_kbd.o diff --git a/drivers/input/efi_keyb.c b/drivers/input/efi_keyb.c new file mode 100644 index 00000000000..0cbb438c6de --- /dev/null +++ b/drivers/input/efi_keyb.c @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * EFI-keyboard input driver + * + * Uses EFI's Simple Text Input Protocol, polling keystrokes and providing them + * to stdio + */ + +#define LOG_CATEGORY LOGC_EFI + +#include +#include +#include +#include +#include +#include +#include + +/* + * struct efi_kbd_priv - private information for the keyboard + * + * @ex_con + */ +struct efi_kbd_priv { + struct efi_simple_text_input_ex_protocol *ex_con; + struct efi_simple_text_input_protocol *con_in; + struct efi_input_key key; + struct efi_key_data exkey; + + bool have_key; +}; + +/** + * efi_kbd_tstc() - Test for a character from EFI + * + * @dev: keyboard device + * Return: 1 if a character is available, 0 otherwise. + */ +static int efi_kbd_tstc(struct udevice *dev) +{ + struct efi_kbd_priv *priv = dev_get_priv(dev); + efi_status_t status; + + /* If we already have a key from a previous check, report it's available */ + if (priv->have_key) + return 1; + + /* wait until we don't see EFI_NOT_READY */ + if (priv->ex_con) { + status = priv->ex_con->read_key_stroke_ex(priv->ex_con, + &priv->exkey); + } else { + status = priv->con_in->read_key_stroke(priv->con_in, + &priv->key); + } + if (!status) { + priv->have_key = true; + return 1; + } + + return 0; +} + +/** + * efi_kbd_getc() - Get a character from EFI + * + * Waits until a key is available and returns the associated character + * + * @dev: stdio device pointer + * Return: character code, or 0 if none + */ +static int efi_kbd_getc(struct udevice *dev) +{ + struct efi_kbd_priv *priv = dev_get_priv(dev); + + if (!efi_kbd_tstc(dev)) + return 0; + + priv->have_key = false; + if (priv->ex_con) { + struct efi_input_key *exkey = &priv->exkey.key; + + log_debug("got exkey %x scan %x\n", exkey->unicode_char, + exkey->scan_code); + return efi_decode_key(exkey); + } else { + struct efi_input_key *key = &priv->key; + + log_debug("got key %x\n", key->unicode_char); + return efi_decode_key(key); + } + + return 0; +} + +/** + * efi_kbd_start() - Start the driver + * + * Reset the keyboard ready for use + * + * Return: 0 on success (always) + */ +static int efi_kbd_start(struct udevice *dev) +{ + struct efi_kbd_priv *priv = dev_get_priv(dev); + + log_debug("keyboard start\n"); + + /* reset keyboard to drop anything pressed during UEFI startup */ + priv->con_in->reset(priv->con_in, true); + if (priv->ex_con) + priv->ex_con->reset(priv->ex_con, true); + priv->have_key = false; + + return 0; +} + +static int efi_kbd_probe(struct udevice *dev) +{ + struct keyboard_priv *uc_priv = dev_get_uclass_priv(dev); + struct efi_system_table *systab = efi_get_sys_table(); + struct stdio_dev *sdev = &uc_priv->sdev; + struct efi_kbd_priv *priv = dev_get_priv(dev); + efi_status_t ret_efi; + int ret; + + log_debug("keyboard probe '%s'\n", dev->name); + priv->con_in = systab->con_in; + + /* Try to get the EFI Simple Text Input EX protocol from console handle */ + if (systab->con_in_handle) { + efi_guid_t ex_guid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID; + + ret_efi = efi_get_boot()->open_protocol(systab->con_in_handle, + &ex_guid, + (void **)&priv->ex_con, + NULL, NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL); + if (ret_efi != EFI_SUCCESS) { + log_debug("Extended input protocol not available\n"); + priv->ex_con = NULL; + } + } + + strcpy(sdev->name, "efi-kbd"); + ret = input_stdio_register(sdev); + if (ret) { + log_err("Failed to register\n"); + return ret; + } + + return 0; +} + +static const struct keyboard_ops efi_kbd_ops = { + .start = efi_kbd_start, + .tstc = efi_kbd_tstc, + .getc = efi_kbd_getc, +}; + +static const struct udevice_id efi_kbd_ids[] = { + { .compatible = "efi-keyboard" }, + { } +}; + +U_BOOT_DRIVER(efi_kbd) = { + .name = "efi_kbd", + .id = UCLASS_KEYBOARD, + .of_match = efi_kbd_ids, + .ops = &efi_kbd_ops, + .priv_auto = sizeof(struct efi_kbd_priv), + .probe = efi_kbd_probe, +};