From patchwork Thu Sep 11 21:44:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 287 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=1757627086; bh=78Ws/E85f2JPa2xLRRomMYtlrfDIp/37O7Db0iji66Y=; 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=nJHzDGhMguV3yCNHEfLZLYjLG6kpDK47pecoAoVXmj9BsIWm8WJzu66olYai9ES4I efXR7ElfRzZ2MZO/8HPfVA5m1yM8xejQ7ApnwceY8AF3JDQlqyHkEdH2Lz665RU8Ni yOnJFhtTE33HpRR0cTrhtUHXLw29zhn33vJrHQS52O86Aph9Gt2F1+nRa3I0X3UVWH k5Fwy4Z4aEkTzH1kqf1ja6B5SoZlB0EP0y98r/+YAZhQkp4AEsBHlVIWlS1RV6Zmf3 Gb/VclWEJLFCnF4JVUjZkLUieCv/VaIfAD4b68soDLMyUieTZj3xaSM4Ds9YA97Y8x h+27pSFoMwdmg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6840F67B12 for ; Thu, 11 Sep 2025 15:44: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 OqNNfZSHW6d4 for ; Thu, 11 Sep 2025 15:44:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627086; bh=78Ws/E85f2JPa2xLRRomMYtlrfDIp/37O7Db0iji66Y=; 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=nJHzDGhMguV3yCNHEfLZLYjLG6kpDK47pecoAoVXmj9BsIWm8WJzu66olYai9ES4I efXR7ElfRzZ2MZO/8HPfVA5m1yM8xejQ7ApnwceY8AF3JDQlqyHkEdH2Lz665RU8Ni yOnJFhtTE33HpRR0cTrhtUHXLw29zhn33vJrHQS52O86Aph9Gt2F1+nRa3I0X3UVWH k5Fwy4Z4aEkTzH1kqf1ja6B5SoZlB0EP0y98r/+YAZhQkp4AEsBHlVIWlS1RV6Zmf3 Gb/VclWEJLFCnF4JVUjZkLUieCv/VaIfAD4b68soDLMyUieTZj3xaSM4Ds9YA97Y8x h+27pSFoMwdmg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5618767A58 for ; Thu, 11 Sep 2025 15:44:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627084; bh=sZt+GLfFHmEfSq7DzyPCkNFSKHf5zYiBTNDBeD8Enks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WimlZhgnG6U4+VwDkPy8L10iAcckN/Wipd3rx2cT5q/XHQBar2sCpWzA3qKJjXe6D H12/F9Qw+dY0DhWAYJqTioKqdKTID9Dt2ZcDB2hCrVnQe7r+poxu8H8rzepsGgjABG Vy/qRi8AywTImSAcRurDWEcOEAoaQBaQMQEZRoWXAGMU+53EDQldOcfqOGZ3LQ5coC JHEMWkJW6kf6ybkuQE91Paf15VWIskPRxcaEXKLdlLEFPj5BxXRf7/joG6pJ6VszSB CVZlXzUFnDIQNbSP7HjBGsrL5VLncU2RxnpQvRfGaSK9brT//ZJc8yiF5goF+bY4aV e8Hh1bzfkEuHg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CF0C567B0E; Thu, 11 Sep 2025 15:44: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 3WocAqpORvwV; Thu, 11 Sep 2025 15:44:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627079; bh=kceSj3Vm1sYIvV84GxZYTrydI+60cOpSbzJwrTWtHRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p4YqojFAoNeenVOxV9AzJ89YmYW2x17B+3fYQJEUjXiL6y52c+8oTHHEt8YrevTz9 VTcADEtrJ0bap1zWohgBtpt3QgVfs8lwkw7KakucZIw8plxp2kZT2XWfIE6xZfr26q kAs6DSZ6u87QqUMYHM6XeU81u+EUYVUrCoqHj1HedTVzSAXWXMtOXQibZyutlWYhCn t6zmn8cNKMMrgKXoe/CU2YFzSoEK9r4enYmoN0D/DLbAk1GrrzebtytvPIlcOACm9m Qej66F6RHAK8EGsWtU+cwQ9Rc96glpZoyg8dXdKgBPIWSH3f9G+2c0ZMdu+tskt8Pr o9DSwaEusou9A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E6CE7679D6; Thu, 11 Sep 2025 15:44:38 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:05 -0600 Message-ID: <20250911214425.3687188-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: FOOZNXMWAOJUKNROKFR24FR6GRNKWQBD X-Message-ID-Hash: FOOZNXMWAOJUKNROKFR24FR6GRNKWQBD 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 , Tom Rini X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/14] CI: Update to coreboot 25.03 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: Tom Rini At this point there's problems rebuilding coreboot-24.08 without manual intervention. Let us upgrade to a newer version. Signed-off-by: Tom Rini --- tools/docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index ceb7a25ad4d..38e1f3a941d 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -294,8 +294,8 @@ RUN mkdir /tmp/trace && \ rm -rf /tmp/trace # Build coreboot -RUN wget -O - https://coreboot.org/releases/coreboot-24.08.tar.xz | tar -C /tmp -xJ && \ - cd /tmp/coreboot-24.08 && \ +RUN wget -O - https://coreboot.org/releases/coreboot-25.03.tar.xz | tar -C /tmp -xJ && \ + cd /tmp/coreboot-25.03 && \ make crossgcc-i386 CPUS=$(nproc) && \ make -C payloads/coreinfo olddefconfig && \ make -C payloads/coreinfo && \ @@ -306,7 +306,7 @@ RUN wget -O - https://coreboot.org/releases/coreboot-24.08.tar.xz | tar -C /tmp make -j $(nproc) && \ sudo mkdir /opt/coreboot && \ sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/ && \ - rm -rf /tmp/coreboot-24.08 + rm -rf /tmp/coreboot-25.03 # Create our user/group RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot From patchwork Thu Sep 11 21:44:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 288 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=1757627089; bh=7wbvGBs+CuAQOESLLl0ifxRRzwBf3u8TpUzu08q7adI=; 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=CKrYo/5IkHUrOx7yOepB6sSj8EgHpb3UECVcVbChqZuMbcXyW2pSTl0sYoJjj3Y7+ KQr0FWX8s4PSqB92qlybDJtns5MBLuHbMg2Vs8yRx/7UpsnJtJM2dq8z/RnY54CIHQ l0w1gQUKO0mzSDQAwfk8wW5yYjqXsKm9GVVVQkhR1Xvhxyx1P9SRpwcd+9r2OJBou4 Ag1+xGr1Seojwc8XWQQvLSop73zLYFkv++fs7qE5G74cjPtnaUzTlZa7U+84RWHdse JzV5gZ1FpFZwx+munwNLH0GXx1zhsP0QTZqRd3lCDHFP705z/OK8rkZH9xUYVLAI+7 8flsiTKeN1sRg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CF2D367B12 for ; Thu, 11 Sep 2025 15:44:49 -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 whj48NBVb0Za for ; Thu, 11 Sep 2025 15:44:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627089; bh=7wbvGBs+CuAQOESLLl0ifxRRzwBf3u8TpUzu08q7adI=; 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=CKrYo/5IkHUrOx7yOepB6sSj8EgHpb3UECVcVbChqZuMbcXyW2pSTl0sYoJjj3Y7+ KQr0FWX8s4PSqB92qlybDJtns5MBLuHbMg2Vs8yRx/7UpsnJtJM2dq8z/RnY54CIHQ l0w1gQUKO0mzSDQAwfk8wW5yYjqXsKm9GVVVQkhR1Xvhxyx1P9SRpwcd+9r2OJBou4 Ag1+xGr1Seojwc8XWQQvLSop73zLYFkv++fs7qE5G74cjPtnaUzTlZa7U+84RWHdse JzV5gZ1FpFZwx+munwNLH0GXx1zhsP0QTZqRd3lCDHFP705z/OK8rkZH9xUYVLAI+7 8flsiTKeN1sRg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BDBDF67B0E for ; Thu, 11 Sep 2025 15:44:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627088; bh=WMSIn+FvUSIrkZD8mz78AIVc2el1zlp73f/W2TNGoy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M+WLzhMoYXjr9EcvvI/ZqsZiYOwxbIhEijK7ORhi8UzjI1iAWpouXrdEQ4IGwDabr 9MfohMUWUfkw2xWj2dTm/a6f6ZrcojaYLj5/vERL2Dx21CEbYlOog5fu1a/jF2PCtz U8SmHOtaDlRf3BDcLWWvBaLqodRUgbZGzI23xzNuujVrTmPM2/MgOC09hqyq5EVcAR O/JBKk7NbGgloxCnHQsnOSLad6qijNesZf/uYi2okBOmQwlLvmpSTvalheN7+RvYoA Ve5MIRCVnYROZEFm5fgGhenjTrvv25PWFd5SmtG0dxHoxRnlux5bzu4scC0y1GV7WS nOVLQsXHU2uqw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C2DDF67A5B; Thu, 11 Sep 2025 15:44: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 0poiGW4QsINm; Thu, 11 Sep 2025 15:44:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627083; bh=eBmkTSwQ7BAEjxZt16lQuZY517dfYlouU6CA5sNWTq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kSR67WGM+7DGJKnuX+wPlCC365pISD5Hpy1DyJpvzi3nzvP7d5UdAqVRCzUnLfTqv jOsMur9uq17tmD1wP/bUEOhzkSdwqOiwW7Kg7FzoK51XU3miD0JZvHbavi0GL0h/Zj Qb8V3l5ZVmyAvvFU5XBL0xzpdxjBlwE0HwUmbIme8fWGBq8Gf59PZmUk7RmqAx8Xu7 2ChPNikZ/F/z44jR8kd8qgz3DlT1o7EDJeQFplIJjp8mcJJdp0ifLKE0yPbKhXP/ca NAjtH7ElAgL/yz1PtKyt2Vdw3AEZuubsEXZCKFH4KBeFYwu8fGKwxeQwOUcNJPpIEF 6GC4B2y+QGx5g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9FD8467B0C; Thu, 11 Sep 2025 15:44:43 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:06 -0600 Message-ID: <20250911214425.3687188-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 4HACLPYW5LPHLJ53EEB5ERF77D7HFXYX X-Message-ID-Hash: 4HACLPYW5LPHLJ53EEB5ERF77D7HFXYX 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 , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/14] docker: Provide a rust toolchain 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 Install a Rust toolchain in the CI image so that it is possible to build the Rust examples. Co-developed-by: Claude Co-developed-by: Simon Glass Signed-off-by: Simon Glass --- tools/docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 38e1f3a941d..ba98a293e4b 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -313,6 +313,10 @@ RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot RUN useradd -m -U uboot USER uboot:uboot +# Install Rust toolchain for building Rust examples +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable +ENV PATH="/home/uboot/.cargo/bin:${PATH}" + # Populate the cache for pip to use. Get these via wget as the # COPY / ADD directives don't work as we need them to. RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt From patchwork Thu Sep 11 21:44:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 289 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=1757627092; bh=B8BfNJtGyqv9qW4FPiUWSd5q4GJQhVWBQgdukJxHahs=; 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=m1u2T6tllmBECPpcQiwsHpl6fd8SosO7lJs7tq2unQw+BuRry6Iyq7qp7hlb6yXR/ zhrwL3l/DVLd5nll+363gg0x3+wWZhpC6UgTMawce23OflZM4kB8SGfXLmzJNuX56j 8kG+tu/sTctdsZR1WlJsid/I0JRukBF+QGyMh0IROhLuWe/iBp4Acxi3absnTNmF0S zJhhoT/bur3BptedCZFMdmc9rfXfF4RbNp0YLlJ8hgL1drYWdfvkDYjbdecvFUo5R+ 7KT1rtVFmtRyoZwCkn9Rq3BuaF3j+NKFhIoJF/Dtk2YZAHqClIjopCYxUyAMO0PUoT bKNUfz4dAw16w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 246F167B12 for ; Thu, 11 Sep 2025 15:44: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 10024) with ESMTP id nfwVmJnK2rhp for ; Thu, 11 Sep 2025 15:44:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627090; bh=B8BfNJtGyqv9qW4FPiUWSd5q4GJQhVWBQgdukJxHahs=; 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=YOqgARGcyz2YifMP/Gfi6y1INKVMOJONWupYur6qg3e87ibHtxYQozIpuydlEuIje xNaim9d+JkA/6oomgA1MV6KAWlieH57XYshWVz/o0tPMWHooEe/qImVATwgDkiZ17x XnnT1GVcj6XgGXnbQtfi+s8vckW230t73KjZ2rY1kLc7DIhkIVVbEwHavaGwjOr5sj u32yojtueblqVmHZyHghuHKuYFvZyCt+Eiweg8Zi++Xu3e1CzF81pjc9IWjKmIxUlE oq1+w/3mkbzUfadQdKdGukEUx4xfPSp98u/Zyf0e50bgQUhbJlKzg9PMLUoGQBbAD+ /rkwe35GWOB2A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2477667B0E for ; Thu, 11 Sep 2025 15:44:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627089; bh=kYG6B9XB8p0PqHofA/OBKL/vNJB1JWwpK1tv7mZ6ex4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a3jdmz7cQrx9HNp9fvCURPrjIAQDD58uScoOTUnSRKwlEtciAuLGOiVgEPSk+5VOm izicg+VWa21W9fZ3exuxZSEXMR8jKSoqKrc9vY0FcCTCBqRqMhXL1by1aWXmNrogUp s0e281nx81EUvINIqU3DoYMO6ZlV6ja6nVvZeqPo7KHXUH1MC/mauF3Kk+hOTNpYVX Dd0F4cpc57r3eu+ltLsd/4k52PTqGSAP3WzinzgRB4p4l0M9Cg0Hz76lpY+ZlMet6i 9Cd/EM2BQBT1dlLmjQSEJMk9d+QtyAffNADUGKvJFG3lppgezAiE0qm5eDm8ZLLEah F0CtwvZKL/DpA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 052C667B0C; Thu, 11 Sep 2025 15:44:49 -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 4eK4va1-Y_mh; Thu, 11 Sep 2025 15:44:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627088; bh=Fk6ayz7xHslWnwOgKIaJc7UFh5RSDwuEvoYScEsdKG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jlLsEmxBgealDeNcBjxFvaLpaZt4h6OohxYlFBfDkr4wvpC88yi/e3rPpoU+UAJY5 Yt0bCRyXSdM0fM9h2tUbu+ojAcHdRSWTZd4rhff6Jz3eHC5S7beBt3WCRcSRyB1DAn fDtNlrbTbhLE+2KPFDmPkPVtmlySHJ90sY0TaYkk+KWZSd5fO/F/7TOvtnCatqEs5J RME3odRA9O/hg/1p7jk93+aPVc81uqz6S3bIJfIe/0UmJvwJxnTS9cQr9zxUX5mf+P B/S4OM/Q04VT1Fj7Jyq3Ch0WRGiqIketqU35FQ/C41+28SwlYud9FxZoBDGY7G4F/V fMBP4lQzeM1cg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7415D679D6; Thu, 11 Sep 2025 15:44:48 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:07 -0600 Message-ID: <20250911214425.3687188-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JCJ2VM7WW5VJQFQN7T3GYD2RENKAORR5 X-Message-ID-Hash: JCJ2VM7WW5VJQFQN7T3GYD2RENKAORR5 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/14] CI: Switch to new docker image 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 Use an image with Rust support so we can test the Rust integration. Signed-off-by: Simon Glass --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4e86801fdc..3785e61ec3f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ default: - ${DEFAULT_TAG} # Grab our configured image. The source for this is found # in the u-boot tree at tools/docker/Dockerfile - image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20250404-29Apr2025 + image: ${MIRROR_DOCKER}/sjg20/u-boot-gitlab-ci-runner:jammy-20250714-10Sep2025p2 services: - name: container-$(CI_JOB_ID) command: ["--rm"] From patchwork Thu Sep 11 21:44:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 290 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=1757627095; bh=WFV3wswtdB85tjYPm2OE0X/7tCcr+0NY8bcE6pSVs+8=; 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=bsAV9w8gqTJjh4Lwx3vxO7NNZTLkYatKhultA+4ryD1dlqL4Q4AG/OOO1GYVyQyof 0uegKBC5uTHiM6eqJ/wKpmypco1jF2uzP1fJd1c7t+em5deMipXbDiNEdhKoxCa6fz Ph6o6uYUJNP2fQJH9/9KhvIUsAXEa0671ej3gOkKUiF2p6YUxb//SgNKREdAaErSWS rtfWnTg5BAL/u/l35qixFEwXi4qhPNW+FlfHk7dZuOm7nF3QJzqbR8gJR3Ipe65l1e nNPP+hThaDOM55PBPX/p51vX28mA/PHXAy+v2gZOY+3eiAfuZtvxPFuc/qZHpeEyB0 NITKjd0nj8K7A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B45C567B0A for ; Thu, 11 Sep 2025 15:44:55 -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 frdlJ55zCFFI for ; Thu, 11 Sep 2025 15:44:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627095; bh=WFV3wswtdB85tjYPm2OE0X/7tCcr+0NY8bcE6pSVs+8=; 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=bsAV9w8gqTJjh4Lwx3vxO7NNZTLkYatKhultA+4ryD1dlqL4Q4AG/OOO1GYVyQyof 0uegKBC5uTHiM6eqJ/wKpmypco1jF2uzP1fJd1c7t+em5deMipXbDiNEdhKoxCa6fz Ph6o6uYUJNP2fQJH9/9KhvIUsAXEa0671ej3gOkKUiF2p6YUxb//SgNKREdAaErSWS rtfWnTg5BAL/u/l35qixFEwXi4qhPNW+FlfHk7dZuOm7nF3QJzqbR8gJR3Ipe65l1e nNPP+hThaDOM55PBPX/p51vX28mA/PHXAy+v2gZOY+3eiAfuZtvxPFuc/qZHpeEyB0 NITKjd0nj8K7A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A490567B0D for ; Thu, 11 Sep 2025 15:44:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627094; bh=GxWb84WuhrRecmqNXT73luZ7C8F11SfhreNTrpy4JeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NAxoH8DD4OvUphohSdxE1MogC0S6K5PQhREOiNQKFFrpZzpLVUCxdeN1Z1jI/X1// 7sU1l9tb4DD7szU1blGNaT5MLIpkkGDnaQK2pFqh6QdioYQJubkJ2BOaJIu2bTkyZQ TBg8Y3LKzZD8jaqKZJPfDPpso1KbtAgGMbMBW4ndm/FzM0miCp9v0C49aY9cUxU8cF gK1uHACIP38SFcuvhHOvlAn3DCSxRf4PjAkzAU6ao2RNKt1EPncDL+ko6oHg0yQ7F/ mdrIEMamg4DNMz9eR4MO8rUybw5kRh7bjGpFEr49WCEcuJyQIDmDt0mBVLHtZtHkJw kcYpMtCgfQRuw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5B1DB67B0A; Thu, 11 Sep 2025 15:44: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 10026) with ESMTP id UU8G4SIDyFrz; Thu, 11 Sep 2025 15:44:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627089; bh=hn3ziUzubjsDk8u2/Z+zCTq8dmy88kj3mrIHMQj2RAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GvSN237vG1CePIrlmUVVYih8xI8Ny7kfP0oc9sPyx7F8DE5UvNlScR8SDvsiwDoqs 7Nh4LiP89z8X1N0ot93Mn7FsnnVH5QOKhecvMnrzePDEOjOGnd9c4MhzaoBSL1STqq oN3unOUnKKu4H0Uan9amRpJ6cAyjDSmwBWDg9rqbx0NBbtXznQ7BxebICb7Kd0d8Bf joWoXQRBOAB7lS3s/QA63ArUF/jW5Iesyownp6AzgHE8wIiSXcWxrQf8AmVpf960s7 YS2JxT+BWSqgW1hbqiVd1lvntoRFqMC34ASp3ATpGP+O8d5D0sM2mpki8KtcIn3Dp+ X+LBD0AEbBsEw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 43078679D6; Thu, 11 Sep 2025 15:44:49 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:08 -0600 Message-ID: <20250911214425.3687188-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: PL2REGMDP4Y33FXBEDWDHE4NKK4HHMPB X-Message-ID-Hash: PL2REGMDP4Y33FXBEDWDHE4NKK4HHMPB 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/14] examples: Correct dependencies for ulib 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 need to check for the ulib library before building any examples. Add this and ensure that the examples are rebuilt if the library changes. Signed-off-by: Simon Glass --- examples/ulib/rules.mk | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/examples/ulib/rules.mk b/examples/ulib/rules.mk index aba6c63d8b6..c4b0bdb3668 100644 --- a/examples/ulib/rules.mk +++ b/examples/ulib/rules.mk @@ -19,11 +19,11 @@ $(foreach obj,$(sys-objs),$(eval $(OUTDIR)/$(obj): \ # Automatic build rules for all programs $(foreach prog,$(progs),$(eval $(OUTDIR)/$(prog): \ - $$(addprefix $(OUTDIR)/,$$($(prog)_objs)) ; \ - $$(CC) $$(CFLAGS) -o $$@ $$^ $$(SHARED_LDFLAGS))) + $$(addprefix $(OUTDIR)/,$$($(prog)_objs)) $(UBOOT_BUILD)/libu-boot.so ; \ + $$(CC) $$(CFLAGS) -o $$@ $$(filter-out %.so,$$^) $$(SHARED_LDFLAGS))) $(foreach prog,$(progs),$(eval $(OUTDIR)/$(prog)_static: \ - $$(addprefix $(OUTDIR)/,$$($(prog)_objs)) ; \ - $$(CC) $$(CFLAGS) -o $$@ $$^ $$(STATIC_LDFLAGS))) + $$(addprefix $(OUTDIR)/,$$($(prog)_objs)) $(UBOOT_BUILD)/libu-boot.a ; \ + $$(CC) $$(CFLAGS) -o $$@ $$(filter-out %.a,$$^) $$(STATIC_LDFLAGS))) # Create the output directory if it doesn't exist $(OUTDIR): @@ -32,8 +32,3 @@ $(OUTDIR): # Default rule: compile with U-Boot headers $(OUTDIR)/%.o: $(EXAMPLE_DIR)/%.c | $(OUTDIR) $(CC) $(CFLAGS) $(UBOOT_CFLAGS) -c -o $@ $< - -# The U-Boot library must be built before we can link against it -# Order-only prerequisites ensure libraries exist before linking -$(all_bins): | $(UBOOT_BUILD)/libu-boot.a $(UBOOT_BUILD)/libu-boot.so \ - $(OUTDIR) \ No newline at end of file From patchwork Thu Sep 11 21:44:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 291 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=1757627099; bh=gPKOYGaE34dbD/6xNslt68d5UD5GuoVhHptKx4iaac4=; 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=rALt/Tl+USDfg2QdW38ll1GB8z7BkbuZTCvFRtgPbpJGzOGIwllWmq9YgI6/2X9eR tDyEdTpoyC04iXUx39au0dMvSieJdQu37annL2b02417sbQfTTvp+OlIvCYy27FegT jvnaOi7Dt3A5mNK/rUGecVTyS2waUCZj0LglCsYrgsQHd742dej76QeB6M/tuqDJyq Lkbmsx3jOvsk4YTWLDNniA8ByCKpVYQq0w2viEULefwBOszLOTII7qU7zkZoCFqsbU 7RcWnWSfuGRAgx2eGaJLxbDrIlcwsvMai2QGlzhvEGONC8EzYJaPsUnHt0RcrtQ22T IksInmwdcmjWA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6A5C367B22 for ; Thu, 11 Sep 2025 15:44:59 -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 RlkILbV4psZV for ; Thu, 11 Sep 2025 15:44:59 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627099; bh=gPKOYGaE34dbD/6xNslt68d5UD5GuoVhHptKx4iaac4=; 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=rALt/Tl+USDfg2QdW38ll1GB8z7BkbuZTCvFRtgPbpJGzOGIwllWmq9YgI6/2X9eR tDyEdTpoyC04iXUx39au0dMvSieJdQu37annL2b02417sbQfTTvp+OlIvCYy27FegT jvnaOi7Dt3A5mNK/rUGecVTyS2waUCZj0LglCsYrgsQHd742dej76QeB6M/tuqDJyq Lkbmsx3jOvsk4YTWLDNniA8ByCKpVYQq0w2viEULefwBOszLOTII7qU7zkZoCFqsbU 7RcWnWSfuGRAgx2eGaJLxbDrIlcwsvMai2QGlzhvEGONC8EzYJaPsUnHt0RcrtQ22T IksInmwdcmjWA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5520F67B0D for ; Thu, 11 Sep 2025 15:44:59 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627098; bh=IQYHnwLpUVmzlDBo9Zox/2GmVSeVC+SpvaN8onhTntI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pyygUbofuLVGDPvLUEhIfXsPMcSuEwy+vg1MUF8KSX7yHQsisRYRhmF8nGO3daomi qN5KpAoz6kDdpvLBn32Xcs2VfCSzbAYGYn7NZAOCa/T9v6m465XZ9m6ju+TSJ6mmh/ UrGUJrmP58nP/jkenLvnCafb2oUL52PMtqSwP1GHQ2zM8VOFyBrasXogjZKPvJundT hW4uXm9Z53BXQdMUoJmVARYIh+xEmPKwuvXoahs53wz+xOMmeufuKEzJzsZDECmt+Q 6cNFJPKg8J6e6vjJzdCUB6bkRZgSmL1qrk4xGRhgvxC8at+Bk5KPxx3zjySyD/W76I yRsZGWXPCMiTg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 43224679D6; Thu, 11 Sep 2025 15:44: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 10026) with ESMTP id 5veAfm2M_y55; Thu, 11 Sep 2025 15:44:58 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627094; bh=o4c8q9Hw9FndmkhnvPDm2i8yEj7W67++6MTjFI9RZQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5OStUfeXBxL388Dp+KX0y7NXGisSy+RKewX3OW2rPcmWeucQvZIumWcjo2qwposZ o7L/yAoHbCA3QfaTXtOX27QhYB6vMP7SbDrLTKQg80zsTkYQxX3bb+5yV3RynoJdGU WLHmiMObxQ8jm9RY7nfUD8R2SKeEkmf3VciRvtryYWSsw/08Gs6WgRqFLNMuqqQEmH ZSGJeEqjic8IEbrCu/VwVSICSh9AIiTlnEi5uZiVWXKxdTM4temv6sQZhd0mvkAHmO 30rjDJVpelAFZmSpezgROuLh8nZY9YzsT6EM0L6ffKqbVSEdmsrgckioje2jt/3+m/ E+gXLeyFcuPOA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id F39BC67A59; Thu, 11 Sep 2025 15:44:53 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:09 -0600 Message-ID: <20250911214425.3687188-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ZWTCL4R4L4GSQ3KRVX7JR5WIGUBVHSPG X-Message-ID-Hash: ZWTCL4R4L4GSQ3KRVX7JR5WIGUBVHSPG 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 05/14] ulib: Return the full version with ulib_get_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 Provide the entire version string so it is possible to see the date of the build. Signed-off-by: Simon Glass --- lib/ulib/ulib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ulib/ulib.c b/lib/ulib/ulib.c index 385faa60844..ccaa655f398 100644 --- a/lib/ulib/ulib.c +++ b/lib/ulib/ulib.c @@ -9,6 +9,7 @@ #include #include #include +#include #include /* Static storage for global data when using simplified API */ @@ -32,5 +33,5 @@ void ulib_uninit(void) const char *ulib_get_version(void) { - return PLAIN_VERSION; + return version_string; } From patchwork Thu Sep 11 21:44:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 292 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=1757627101; bh=KLQhNGbYa1sHAUSUL1Jr5YFpp2b1CRjT+dbdX1IR0kk=; 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=kDl2T709Ah6LGjgrJ5HfORbhxov6rHDEkQxo6VJLytsoleb79lk9LZPK2Gprp8PKb cSujVAMQJz+RY1s+GiNXNgJarwtCQOeI9dMRyelh7m3SyqObe2pyw502ymB89+h+HH fzGavaQsumr6eXTVUDZuM+6bF6pGMqaS4COLxwtt0x5ruchYEiiyaySx4ddaoU5EjK Ub/dpfCM1Gu+ZdrMAqvIinWPTnNVryck+qq8fVZXfxYE5lzj5xH6raUssejLTwk+tg ItUfvlBznP+xfUd8F5hBHDZ5drOsQmXFL1xGITwQLseo0D31TSyWh8TGlNIM89rTGb 8IarXt5tKKo3g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BE95D67B26 for ; Thu, 11 Sep 2025 15:45: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 10024) with ESMTP id f1_meSPh3vjy for ; Thu, 11 Sep 2025 15:45:01 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627100; bh=KLQhNGbYa1sHAUSUL1Jr5YFpp2b1CRjT+dbdX1IR0kk=; 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=cNk8rloqOrNmQl4I3n5JrxG0tT5Nkfw3jhsEnx5+alx054LkCHIQn9eQk8vb1UZXs tiVzLiSLR1XdZ3tIOjfcqLJyToOOs8SWsHLSBa8Ad1t2IAYsTUB89uI4rSNT24jP8o 3G62lA+gRxmLVDkGXzEysdpfS1QN6gOnMV0qtoH6i9EuvVPUzMiNyvSncwXZlgMvjB dqIqlbPbfCiY/DnRj3YCNNVgq3mMBtdThw8OAqbI7x/zSGBUJz45sY6RLnQ+iAaSl3 PRDGy0pG8LvNXCiU4IJWA63KsuvxuAwWTOcu25BHvf0mQZdubYPRb/azuFyBtPHHBe 8Bh73u5umMV/g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BE49867A5B for ; Thu, 11 Sep 2025 15:45:00 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627099; bh=ptTyj3ymBZYLV4Ybl96uE1twXdb99KbsRNSILBp06Ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wg9sNtX/pDMFDJEzTaS6xKY3bbl3zH+KACvwhf8s+973kW0teQbn7JDaVPFxuxSO2 kFBRgUhXS5rmHmBIOpr+7HC/LoRKxAnJ5NPiCxqjzUyluojJx6ywH5p3kUB47coqHF vi7Ljylf+G0BCutNNnuXCydr52rHgzV+Su/1eCQM7jkIoTS6c7U9RGLCEDQAUKBfNM I3cSObxmBIIdcYJYFqDVvcsiWjzx671vY6DUmTGKFIcFk/uPdStezGNXYK4+/ySNqc pbEWw+9fU3ew9gGmp3DIrKFy8n55AwABzp/HM6WtpO+InOsFsjU+IAHtuO8dJH8DQ8 pbdEW5SAhYSNQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1D67067ADD; Thu, 11 Sep 2025 15:44:59 -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 YE20bX5Qga1G; Thu, 11 Sep 2025 15:44:59 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627098; bh=rGy36dGisVjSnLB+gZKKAa9XyhjoXe8QlhmK8Jjzm6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jkQuAStIH/LKFK2SdENdhFCa3F3IN4rgJxgz+lRdKjVde2KlrQVeydyskTL4T5taQ LUL5pUgrdIraeFBsmgw6P/jwd4zaLgjg8FDBUo7E8Llt3FTcEUBwkgF2XkP3Z4lPYJ jGttXG8ncfakoIcG/6mYpSy3MCgUBAXwpfNO9FHa4dTMRraL3LiPG4HFftiCGl97V2 c33Q34C5Rn3OwioxNFhElhtmf8/RAIegxKFk5BWqkkLwO3jl+l3GvY4jBbWFWEifod vqKhuE0eLQFS0ERWrAbWXkKxAO15hmqlP3iO5CRMukFnpd8jJHzudcaNR8xQoSFG81 eUXr0G60udptQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8A28967A59; Thu, 11 Sep 2025 15:44:58 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:10 -0600 Message-ID: <20250911214425.3687188-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: MKZAW7PRZKKPJBJBTCTWMQNIJQGNFA44 X-Message-ID-Hash: MKZAW7PRZKKPJBJBTCTWMQNIJQGNFA44 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/14] ulib: Add a way to obtain the 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 It is possible to simply read the 'version_string' variable, but it seems better to add a proper API call to get this. It is already defined in lib/ulib/ulib.c Add a prototype to u-boot-lib.h Make use of it from the demo program. Fix the comment for ulib_uninit() while we are here. Signed-off-by: Simon Glass --- examples/ulib/demo.c | 2 +- include/u-boot-lib.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/ulib/demo.c b/examples/ulib/demo.c index 9d916d3878a..5077fcda0a6 100644 --- a/examples/ulib/demo.c +++ b/examples/ulib/demo.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) } demo_show_banner(); - printf("U-Boot version: %s\n", version_string); + printf("U-Boot version: %s\n", ulib_get_version()); printf("\n"); /* Use U-Boot's os_open to open a file */ diff --git a/include/u-boot-lib.h b/include/u-boot-lib.h index aabc77aa4eb..934cc33eff5 100644 --- a/include/u-boot-lib.h +++ b/include/u-boot-lib.h @@ -25,10 +25,17 @@ struct global_data; int ulib_init(char *progname); /** - * ulib_uninit() shut down the U-Boot librrary + * ulib_uninit() - shut down the U-Boot library * * Call this when your program has finished using the library, before it exits */ void ulib_uninit(void); +/** + * ulib_get_version() - Get the version string + * + * Return: Full U-Boot version string + */ +const char *ulib_get_version(void); + #endif From patchwork Thu Sep 11 21:44:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 293 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=1757627105; bh=HNeEpu+yWlyhDtQ1HEzTVIUEIxGL8U5okGD4F7FXf+A=; 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=ZOUT/Jfr6mznDmWqNA7tL67kosanqCPXf0rqUm9SvXMdsNFTiNMjVN8E13S5gZuNM Gs75XiHK+K+UN/dlMxFP+eXzUH/+ID9kCA+HFaa8I21afEywhu57QB4+IdumrxZBAw Pt5WUH1sswuubApAkgBd1it3bgKRczZ+KL2y6szaKfrz4X0DJrTDyVhH399+UyGlXr KEqRJV8F2CU03Uwr3X4WVAsgFBr0Rutw/X5OWApqbZ+g4DO/RAlGvl4BsZIw9fV6Rw 905nllil6vL/kwwXl7E83uEgrE7hDRI8RbyZZad15BnyDpS8SU+SW+R6cYHjxB773D ao40J8KTh2SRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3C88F679D6 for ; Thu, 11 Sep 2025 15:45: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 TTDBA9hSxkTM for ; Thu, 11 Sep 2025 15:45:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627105; bh=HNeEpu+yWlyhDtQ1HEzTVIUEIxGL8U5okGD4F7FXf+A=; 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=ZOUT/Jfr6mznDmWqNA7tL67kosanqCPXf0rqUm9SvXMdsNFTiNMjVN8E13S5gZuNM Gs75XiHK+K+UN/dlMxFP+eXzUH/+ID9kCA+HFaa8I21afEywhu57QB4+IdumrxZBAw Pt5WUH1sswuubApAkgBd1it3bgKRczZ+KL2y6szaKfrz4X0DJrTDyVhH399+UyGlXr KEqRJV8F2CU03Uwr3X4WVAsgFBr0Rutw/X5OWApqbZ+g4DO/RAlGvl4BsZIw9fV6Rw 905nllil6vL/kwwXl7E83uEgrE7hDRI8RbyZZad15BnyDpS8SU+SW+R6cYHjxB773D ao40J8KTh2SRQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2AC3467A5B for ; Thu, 11 Sep 2025 15:45:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627103; bh=n5hvSx7rCfZUE4hdjkQgOJSDgUQgXJYz4lgxTdmxxik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FaX0bfV0MTBCOxeOi1Z09xUg5UkYXv+N2LJhgM3hw1rt9OUGL7BiZ/hl5dND4va4j YHbtfOxa/3fqU0MWOyRUt4K6uCdu/LmrNHJESCfjFoFaGQ8RzAIHox2MgucOHZqv1/ 9vcgbek7FGDO52PhfNB9ykVflWDTNFoJI6nvTe5rwvBmJwBbZ2gXM15trDYL+ozjxZ 2jvob9QDDU1lkUhosMExbFC9auKNiS/fk6ITFj5D/WlheApx41vFi2loxKJPKIwm3X XEWUyctzvYI4Xu4dGCwMyBdI3YDTvG0D6CvLrU9cOtLo7s+Vfzh1oGK4PeO6kZa2c1 TMDMoovTabJhg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 62EBB679D6; Thu, 11 Sep 2025 15:45: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 10026) with ESMTP id Y4vz5jxCuVId; Thu, 11 Sep 2025 15:45:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627099; bh=dO9HAtnK2/MpEE0E/U+JP0LJ1GuVC8Io846tyoQ+OYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PtqP5Ppue7PTKDavAHeFYfpolzd1MSwL4yd8Yzx2V4LXSXw3kGopqgSKOsN1ArkQD 3J2StQy/yYGhHOK7n6BNj2Vi6sOjK+mmP7zHWoQDhEToG1p0X9JvUUw+ieE49U6hRX N/+pPyPjdOJOfXPyJRwNcNFdP6TIt7rNHGmFhECM4QtB4KKlHAuCYu3WlxbJUsPfkV ChOUNJmpy3IHe+VAu+WPFsgdom2LYvtHmejDnRik+UJD9FQFP+3rd297cQO9kgIhSp Rj+xxDaEv9KbK5eVWu4+zDt+lZrmtKzZVt+4d0sU2d8RX8K/KkJPfnpcU5fi8Svtrb 8hteoVgq5N92Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6379567A59; Thu, 11 Sep 2025 15:44:59 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:11 -0600 Message-ID: <20250911214425.3687188-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: I4TZOEZN2XC6INMH62GBAXMP4AGOHY66 X-Message-ID-Hash: I4TZOEZN2XC6INMH62GBAXMP4AGOHY66 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 , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/14] ulib: Add a very basic rust library 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 lib/rust directory and add a very basic rust library in there. This will eventually expand to include more features. For now it only has a few ulib calls needed for the example programs. Co-developed-by: Claude Co-developed-by: Simon Glass Signed-off-by: Simon Glass --- lib/rust/.gitignore | 1 + lib/rust/Cargo.lock | 7 ++ lib/rust/Cargo.toml | 17 +++++ lib/rust/src/lib.rs | 173 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 lib/rust/.gitignore create mode 100644 lib/rust/Cargo.lock create mode 100644 lib/rust/Cargo.toml create mode 100644 lib/rust/src/lib.rs diff --git a/lib/rust/.gitignore b/lib/rust/.gitignore new file mode 100644 index 00000000000..2f7896d1d13 --- /dev/null +++ b/lib/rust/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/lib/rust/Cargo.lock b/lib/rust/Cargo.lock new file mode 100644 index 00000000000..dd8371f6255 --- /dev/null +++ b/lib/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "uboot-sys" +version = "0.1.0" diff --git a/lib/rust/Cargo.toml b/lib/rust/Cargo.toml new file mode 100644 index 00000000000..a321b31271e --- /dev/null +++ b/lib/rust/Cargo.toml @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0+ +[package] +name = "u-boot-sys" +version = "0.1.0" +edition = "2021" +license = "GPL-2.0+" +description = "Rust FFI bindings for U-Boot library functions" +authors = ["Simon Glass "] +repository = "https://concept.u-boot.org/u-boot/u-boot" +keywords = ["u-boot", "ffi", "bindings", "embedded"] +categories = ["external-ffi-bindings", "embedded"] + +[lib] +name = "u_boot_sys" +path = "src/lib.rs" + +[dependencies] diff --git a/lib/rust/src/lib.rs b/lib/rust/src/lib.rs new file mode 100644 index 00000000000..4ac9f9d32f1 --- /dev/null +++ b/lib/rust/src/lib.rs @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot FFI bindings for Rust + * + * This crate provides Rust FFI bindings for U-Boot library functions, + * equivalent to include/u-boot-lib.h + * + * Copyright 2025 Canonical Ltd. + * Written by Simon Glass + */ + +//! # U-Boot Bindings +//! +//! This crate provides Rust FFI bindings for U-Boot library functions. +//! It includes bindings for: +//! +//! - U-Boot library management functions (`ulib_*`) +//! - U-Boot API functions (`ub_*`) +//! - OS abstraction functions (`os_*`) +//! +//! ## Usage +//! +//! ```rust,no_run +//! use uboot_sys::{ulib_init, ulib_uninit, ub_printf}; +//! use std::ffi::CString; +//! +//! let program_name = CString::new("my_program").unwrap(); +//! unsafe { +//! if ulib_init(program_name.as_ptr() as *mut _) == 0 { +//! ub_printf(b"Hello from U-Boot!\n\0".as_ptr() as *const _); +//! ulib_uninit(); +//! } +//! } +//! ``` + +#![allow(clippy::manual_c_str_literals)] +#![allow(non_camel_case_types)] + +use std::os::raw::{c_char, c_int}; + +/// U-Boot library management functions +pub mod uboot_lib { + use super::*; + + extern "C" { + /// Set up the U-Boot library + /// + /// # Arguments + /// + /// * `progname` - Program name to use (must be a writeable string, + /// typically argv\[0\]) + /// + /// # Returns + /// + /// 0 if OK, negative error code on error + pub fn ulib_init(progname: *mut c_char) -> c_int; + + /// Shut down the U-Boot library + /// + /// Call this when your program has finished using the library, + /// before it exits + pub fn ulib_uninit(); + + /// Get the version string + /// + /// # Returns + /// + /// Full U-Boot version string + pub fn ulib_get_version() -> *const c_char; + } +} + +/// U-Boot API functions +pub mod uboot_api { + use super::*; + + extern "C" { + /// Print directly to console (equivalent to printf) + /// + /// # Arguments + /// + /// * `fmt` - The format string to use + /// * `...` - Arguments for the format string + /// + /// # Returns + /// + /// Number of characters printed + pub fn ub_printf(fmt: *const c_char, ...) -> c_int; + + /// Format a string and place it in a buffer + /// + /// # Arguments + /// + /// * `buf` - The buffer to place the result into + /// * `size` - The size of the buffer, including the trailing null + /// space + /// * `fmt` - The format string to use + /// * `...` - Arguments for the format string + /// + /// # Returns + /// + /// The number of characters which would be generated for the given + /// input, excluding the trailing null, as per ISO C99 + pub fn ub_snprintf( + buf: *mut c_char, + size: usize, + fmt: *const c_char, + ... + ) -> c_int; + + /// Format a string and place it in a buffer + /// + /// # Arguments + /// + /// * `buf` - The buffer to place the result into + /// * `fmt` - The format string to use + /// * `...` - Arguments for the format string + /// + /// # Returns + /// + /// The number of characters written into buf + pub fn ub_sprintf(buf: *mut c_char, fmt: *const c_char, ...) -> c_int; + } +} + +/// OS abstraction functions +pub mod os { + use super::*; + + extern "C" { + /// Access the OS open() system call + /// + /// # Arguments + /// + /// * `pathname` - Path to the file to open + /// * `flags` - Open flags + /// + /// # Returns + /// + /// File descriptor, or negative error code on error + pub fn os_open(pathname: *const c_char, flags: c_int) -> c_int; + + /// Access the OS close() system call + /// + /// # Arguments + /// + /// * `fd` - File descriptor to close + /// + /// # Returns + /// + /// 0 on success, negative error code on error + pub fn os_close(fd: c_int) -> c_int; + + /// Read a string from a file stream + /// + /// # Arguments + /// + /// * `s` - Buffer to store the string + /// * `size` - Maximum number of characters to read + /// * `fd` - File descriptor to read from + /// + /// # Returns + /// + /// Pointer to the string on success, null pointer on EOF or + /// error + pub fn os_fgets(s: *mut c_char, size: c_int, fd: c_int) -> *mut c_char; + } +} + +// Re-export commonly used functions at crate root +pub use uboot_lib::{ulib_get_version, ulib_init, ulib_uninit}; +pub use uboot_api::{ub_printf, ub_snprintf, ub_sprintf}; +pub use os::{os_close, os_fgets, os_open}; From patchwork Thu Sep 11 21:44:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 294 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=1757627114; bh=TnYfBX+7vHCe8r6M2rqZhPY5s2TJi+mZiTEh0seVOCQ=; 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=eMLpQOP2lqMuRdQ7sKJyo3x9LCpzdCz/IYV2u79kx98HT7x1SsFDrRwIQVZAGTveV ukMg1arpgmLOGYB5DChTvgy2okY0p0sVYHZYLEF2VTYQxXY9LzmT8OT2+Ek/Suz9s8 eDqWSsDknhQa2bjlm1NCgvcFvtSxikqWX4yUMWRXFD98PgvulKGqzE19RlbjjGIsni voCiwVRQ7Gh98JHIuKWky9qc2SaJPV/wBaJZMuSU6vXsLCe0RNYzOjIXktulhOB8Tc SZTIDYB+cu02ftBNYLeUvowrfBaymtiiK/3NYIXCud0xJQJhW4PG4zK01Rh6OBU32H SnLUqaMZ8fxQQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6600A67B0E for ; Thu, 11 Sep 2025 15:45: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 yDazA1R0puYh for ; Thu, 11 Sep 2025 15:45:14 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627114; bh=TnYfBX+7vHCe8r6M2rqZhPY5s2TJi+mZiTEh0seVOCQ=; 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=eMLpQOP2lqMuRdQ7sKJyo3x9LCpzdCz/IYV2u79kx98HT7x1SsFDrRwIQVZAGTveV ukMg1arpgmLOGYB5DChTvgy2okY0p0sVYHZYLEF2VTYQxXY9LzmT8OT2+Ek/Suz9s8 eDqWSsDknhQa2bjlm1NCgvcFvtSxikqWX4yUMWRXFD98PgvulKGqzE19RlbjjGIsni voCiwVRQ7Gh98JHIuKWky9qc2SaJPV/wBaJZMuSU6vXsLCe0RNYzOjIXktulhOB8Tc SZTIDYB+cu02ftBNYLeUvowrfBaymtiiK/3NYIXCud0xJQJhW4PG4zK01Rh6OBU32H SnLUqaMZ8fxQQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 556D167B06 for ; Thu, 11 Sep 2025 15:45:14 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627111; bh=YwF76ohU43KtVBkbyJBBQfQGeGQSXZ/qz79HPIGOW0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QZlewZXeERrU2FyJ2xihR0bOhTQe/TCZypk4bBwUCaermgqfjVtE8+FAfTs0ap7zY diurlz/iCBt/KsCkGChOl1/eXZhKD/3Qq+P/520KgS11+KDTXbhwkaL55QYdP47j6c lmSAXrmU3qm47lVdQuHWrXJiEl8mNmagbn+Gmqgh2PysUdQIUQTajGXlqQxxAwTX2i wfjDzW1KQ9hqsPrFQUVkiO0L8S5b1tyH7ThypAziogdRubJwZonTFAhSYryO/tYWVE YijUUoWqHz9P4TfqNJpWPgTiQjo/8qU9vzhE4PK1yQ8cYA5fT2sNrOTV1hej+Klsfk 6ElArA1Ww1m7w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E42CC67B0F; Thu, 11 Sep 2025 15:45:11 -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 I3p6i6gcHZi7; Thu, 11 Sep 2025 15:45:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627108; bh=937r0L67A9NapoL465KzG6CSoMCG47lNNfeUpqCesRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uPp52I7rrRXS3vIA1CnMY6Ghgj7QiqwMEqPns/VLNzk2Sjipdkb6A5lYpYVbYKkPE C5klrpDPzgnXJtW94C251Ojz7bF4F6Qja5EKtuE3lTHhHn80OPdcw4k/zienuu+0Zm wg5GBL+jq7uYSlaKeLnECkf+TKwq4jS+RmtGv34IcqTBXZksf7Dtkpk1KklXqqZkTA TBxq02gB8Ef8L++SbvqE9AmKso/OQaZfaAsHpjK0wMOqE7mW38D/hQnkwYCCZGx2D5 B8JSn2DXq71YnYRXul7t52g6TrZEI3AxG7OCT6ZJQ2nnGRajahfwxe1XKjJVfnGkyd roU9bxy2vKZVA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8EE6367A59; Thu, 11 Sep 2025 15:45:08 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:13 -0600 Message-ID: <20250911214425.3687188-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WHNUJ6VHS5XNDAHYWOBK5VVVUL5OLQFX X-Message-ID-Hash: WHNUJ6VHS5XNDAHYWOBK5VVVUL5OLQFX 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/14] doc: Fix a few nits in the ulib docs 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 TIdy up a few minor typos and grammar errors. Signed-off-by: Simon Glass --- doc/develop/ulib.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/develop/ulib.rst b/doc/develop/ulib.rst index d68ffcaa964..ccef5f36e3c 100644 --- a/doc/develop/ulib.rst +++ b/doc/develop/ulib.rst @@ -6,7 +6,7 @@ U-Boot Library (ulib) The U-Boot Library (ulib) allows U-Boot to be built as a shared or static library that can be used by external programs. This enables reuse of U-Boot functionality in test programs and other applications without needing to -build that functionality directly into U-Boot image. +build that functionality directly into a U-Boot image. Please read `License Implications`_ below. @@ -94,7 +94,7 @@ This is possible using the provided examples as a template. The ``examples/ulib` directory contains a standalone Makefile that can build programs against a pre-built U-Boot library. -The examples works as expected, but note that as soon as you want to call +The examples work as expected, but note that as soon as you want to call functions that are not in the main API headers, you may have problems with missing dependencies and header files. See below. @@ -104,11 +104,11 @@ Including U-Boot header files from outside ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ U-Boot has many header files, some of which are arch-specific. These are -typically including via:: +typically included via:: #include -and are located in the ```arch//include/asm/...`` directory within the +and are located in the ``arch//include/asm/...`` directory within the U-Boot source tree. You will need to ensure that this directory is present in the include path. @@ -204,7 +204,7 @@ out of memory or simple crashes during library init. Dependencies ------------ -When linking with the U-Boot library for sanbod, you may need these system +When linking with the U-Boot library for sandbox, you may need these system libraries: * ``pthread`` - POSIX threads @@ -341,7 +341,7 @@ The format rules are: * Lines starting with ``file:`` specify a header file * Indented lines (space or tab) define symbols from that header -* Use ``symbol=new_name`` for custom renaming, otherwise ``ub_`` a prefix is +* Use ``symbol=new_name`` for custom renaming, otherwise a ``ub_`` prefix is added by default. No space around ``=`` * Use ``#`` at the beginning of a line for a comment * Empty lines are allowed From patchwork Thu Sep 11 21:44:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 295 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=1757627117; bh=VD+LKlPkMNm+GaJi5ZXPehC/FCT12EdKfbt8EE74zW4=; 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=E1uBjClz1X5dFWn4YTFrx2O3lGiNE5wxXtsMDCxdf6SOzC2icx0GwyACUidZSO7JM u3TKRGfyzyd0Pl24azN1ahlf5OzWpw6hlKF7DJQcQCDofsOUgvqyy4Wa/cFOlP/6OY frPxfbixWC7u5BcNJ286dnSicORFmH4RiA9CyHWabMkko8nVaKJvcPobAD+mw7mb8Z f4aZbJPobJy5iqTt7tFg49y/8NwsApIZW1tPb33WnR65eIDtdP3AzHB0FyJDeiCUt/ 3dea7U4pac/ddlyGAS/K3B6rGNhWnye+5Rn5SHNqcgMMmpf3gGO4quXPhk9L7LROhQ pMSX/FPG/LNrQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D0C1F67B24 for ; Thu, 11 Sep 2025 15:45: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 a5p8ZSfMZkoq for ; Thu, 11 Sep 2025 15:45:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627117; bh=VD+LKlPkMNm+GaJi5ZXPehC/FCT12EdKfbt8EE74zW4=; 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=E1uBjClz1X5dFWn4YTFrx2O3lGiNE5wxXtsMDCxdf6SOzC2icx0GwyACUidZSO7JM u3TKRGfyzyd0Pl24azN1ahlf5OzWpw6hlKF7DJQcQCDofsOUgvqyy4Wa/cFOlP/6OY frPxfbixWC7u5BcNJ286dnSicORFmH4RiA9CyHWabMkko8nVaKJvcPobAD+mw7mb8Z f4aZbJPobJy5iqTt7tFg49y/8NwsApIZW1tPb33WnR65eIDtdP3AzHB0FyJDeiCUt/ 3dea7U4pac/ddlyGAS/K3B6rGNhWnye+5Rn5SHNqcgMMmpf3gGO4quXPhk9L7LROhQ pMSX/FPG/LNrQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BF42467B0F for ; Thu, 11 Sep 2025 15:45:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627116; bh=yoyzPr2sP7WPLmJDtucdKpI4YXTf4Q+rSqQIguxz4XI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YLIPSVB9lJlvRs/aIO0J5LAoddDMdG4AbLRArg/VP1LW9CPB7aNI1Q1AzX9UGosiK J4xmWIA+WdrHpOjmBfwmx3h9fnF+Imhvc/8e1pAlTteIghPGcdQjOftohT1n2dh9o8 BYjvaKYm/GdsTmrbQETt1huK/HweMi7vUojWvDpSGxfQiGCbAcZ//bBdbwqxoKBaCv OAGwmsi5hql9158NIQxk3lYQEXgaQ4kUwqILRprqFp//O1oNq+cfLy7nlXBQ6gZ8qy X3JUAF8+6C8yh5pAXYMoWGj5IKVGxyZ6pICP0OjhFF8bb8M8exQ8u+rRMWMAhG9oxC ewfuN8vxapDbw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B94E2679D6; Thu, 11 Sep 2025 15:45: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 gu--oCbqFoli; Thu, 11 Sep 2025 15:45:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627110; bh=TgSf0NXArYLq6ClY71eKQbl+NGUEg8fC83Pxyzpl+aY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ojNKSQwGtq/JeFscvsra+kkbOlibXLQtnqece2eEasJ1L3CWbCFlrOyd5Y47ZQTE1 NgUkJAyMcekAK9RfcwDmOPXYq5OA+ojCX6UxDzgWspnpInlFg5qDJY5O9U2eSLo0zE 0RAkdFlNtYUJjvcnqlHcN8ia0CTohA4HPjKLK2pMI/15RMcJG53W4qcPXc8uA+3qC+ GP+pmwJR1l/9QzBPuQkzB9fMRxgiGg5nKmbNWLTqtrJZep66DxrhjHxkK0USbNrzip Y/BsGNVc4BLJwRnZbFaD/kb2+iWveC9t2Zgx0ToAjYBdMJ7lIesOKGwEcpDV4ifBtM F/gRvAJpdVARA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 69D7767B16; Thu, 11 Sep 2025 15:45:10 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:14 -0600 Message-ID: <20250911214425.3687188-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WBXZ4A2FFWOQQQRHSGBEDUOOKCOZEH6L X-Message-ID-Hash: WBXZ4A2FFWOQQQRHSGBEDUOOKCOZEH6L 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/14] doc: ulib: Clarify calling functions in any header 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 It is already possible to call functions in any U-Boot header. Add more detail to explain what is meant in this 'future work' item. Signed-off-by: Simon Glass --- doc/develop/ulib.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/develop/ulib.rst b/doc/develop/ulib.rst index ccef5f36e3c..b2510a781aa 100644 --- a/doc/develop/ulib.rst +++ b/doc/develop/ulib.rst @@ -415,5 +415,6 @@ Future Work * Selective inclusion of U-Boot subsystems * API versioning and stability guarantees * pkg-config support for easier integration -* Support for calling functions in any U-Boot header +* Support for calling functions in any U-Boot header, without needing the source + tree * Improved symbol renaming with namespace support From patchwork Thu Sep 11 21:44:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 296 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=1757627120; bh=z9w+K6Ve65vVxl9eAKusTue2hH+3vFjg0yBlcevBTVE=; 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=PLjPSVZgtUo0e3fDfk+uWXxe5DnIUi5Iby9arAsqeqbaBOF5Ffvhpg9ZxNk1wFc62 dQot/Xmj0hPH/t/GTrgZE7j6VkaQnRxTc1TKpLhBwsTuQxuFw3UDe0OXHDJeFrkHij lCqsico9uqfCb7x9KfeSi1EZtS1IbVJf10q7l5wUgxEttQVT1rxvqd4Yt4ULcp9YvL pXm7pjiqjpIBH/gunWRZEfxJBRHCkFmXpEXZwistIVcJE1Edguqlbln427JI+08rfb nnX48jclX5acNXTaq4OpBqKBxC3gMIkCrBvmrEC/eY8V4tzo/W1+nAvqYefFYQidN2 kBmURyphM8JAg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 281B167B16 for ; Thu, 11 Sep 2025 15:45: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 QAYwQQPi_bST for ; Thu, 11 Sep 2025 15:45:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627118; bh=z9w+K6Ve65vVxl9eAKusTue2hH+3vFjg0yBlcevBTVE=; 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=Rdjh0wNIi+9AcFaHXx53Ctj6jlshLTvdCXfw/1O+h9FPdwGborfjJdvG5lIcFgC4j LzEqdUZBFmc8p53j7rxDeqPQlRLCcR4/K6BXVPbV0LOkX1p9cCee1TjrL3NTwItJQt i05pC4lwfauWh1Cu6cPa8X4n7B79XAIVTKVkvS/t/Wyl9S8iDQfY0fRVfFGKQNgo9Z Os79K2ZzEE7NpUVjpsD+s5uGw6+9/Q31PW7EEoHbY313bqLVRjqTQlXeDqQxhF5ohB 1KGrXtUL3hZ9a1Y4/zkJ+pWMpyejzzgm0q3t11+LNNRNcn3rcm0zhWeTqznnNv180l fu2TjugmXFYfA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 23C9F67B0E for ; Thu, 11 Sep 2025 15:45:18 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627116; bh=GswesU997Z5Tlh9WMe9WSmbsmBmU1yldh3ZOmdjqEBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Us0fgYQLKQNOSa30HmF9fL2exGT5Vx8ZkMGoR/3ibWlHExnOT52uCLeOcBi3R3S+O QDxubrGvOsiaKe0llQMaVi596qaFgu5eZeU9RHl884kmgISVl4B7K5BNGgf/uhlMeT MhW56hi8RmgY3xTh1Dw7hUNfGxaOAHqmKU4r160LcY2PZdOY44NZD1DnJ187gaY3UA 4TbQZSgUOpyC3xNhdRMWt16jc3EAk7ScHELbxjpEVDf0NzFYjiJL4KorNt/1kVBUEt bsr++Ov3AE2KtCaO/Ge6vgHar2Z+M09zQSgBbyo/9QpdEkOcipZknskACrvNAOmsR3 qJAGmCitoY8uQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C6FFF67B0A; Thu, 11 Sep 2025 15:45: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 ifRuf4npbv_y; Thu, 11 Sep 2025 15:45:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627115; bh=BSljZabfWyMQQrvcKi7mdLZfeD5B+smSgej6vDixMZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g1bMvivxg5o/CgZo2U92Qz0FzT27gPs+GAP0JAD7QWOnJmTgxFmf3FI7HaKgpDqhb 2UP78wQmBg6tikeTjoQ1MnPP31PvRkhyjzd9hXr6akdKUyneIg92pVGoWW9RdDeMLi UfuKBM11MWG5b7y9UjRnmEclCQnyMb/I/ei3NndwZW9e0P0njk2nihPbfqC/G/uNMV ZMdOtpmlTyuoIcUdZXu9b1VsyRs+0BLawOadnYwlVo8Bd1zu9r9gjzgXapYJq3vGLd ZN6hTk8o6hRgAVeHSAA/I3Ad62P3op+84htMWL4/OuvPT+A2XjU0wdoVgJ5qyuw+PM MA2TRYCNfK+qQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0C34567B06; Thu, 11 Sep 2025 15:45:14 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:15 -0600 Message-ID: <20250911214425.3687188-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TF47EDAYXUND25GI5PTPHP6YAKYSRU4V X-Message-ID-Hash: TF47EDAYXUND25GI5PTPHP6YAKYSRU4V 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 , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 11/14] doc: ulib: Add Rust examples documentation 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 docs for the Rust examples in the ulib documentation, covering: - Rust demo programs (dynamic and static linking) - Build instructions using both Makefile and cargo - u-boot-sys crate structure and FFI bindings - Building examples outside the U-Boot tree This provides parallel documentation to the existing C examples, making it possible to use either language with ulib. Co-developed-by: Claude Signed-off-by: Simon Glass --- doc/develop/ulib.rst | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/doc/develop/ulib.rst b/doc/develop/ulib.rst index b2510a781aa..56e4e437dbf 100644 --- a/doc/develop/ulib.rst +++ b/doc/develop/ulib.rst @@ -180,6 +180,66 @@ The Makefile supports both single-file and multi-object programs through the ``demo-objs`` variable. Set this to build from multiple object files, or leave empty to build directly from source. +Rust Examples +------------- + +U-Boot also includes Rust examples that demonstrate the same functionality using +the ``u-boot-sys`` crate: + +**Rust Demo Program** + +The ``examples/rust`` directory contains Rust examples: + +* ``demo`` - Dynamically linked Rust demo program +* ``demo_static`` - Statically linked Rust version + +These Rust examples demonstrate: + +* Using the ``u-boot-sys`` crate for FFI bindings +* Proper library initialization with ``ulib_init()`` +* Using U-Boot OS functions like ``os_open()``, ``os_fgets()``, ``os_close()`` +* Using renamed U-Boot library functions (e.g., ``ub_printf()``) +* Modular program structure with helper functions in ``rust_helper.rs`` +* Proper cleanup with ``ulib_uninit()`` + +**Building Rust Examples** + +To build and run the Rust examples:: + + # Make sure U-Boot itself is built + make O=/tmp/b/sandbox sandbox_defconfig all + + cd examples/rust + make UBOOT_BUILD=/tmp/b/sandbox srctree=../.. + ./demo_static + +Or using Cargo directly:: + + cd examples/rust + env UBOOT_BUILD=/tmp/b/sandbox cargo build --release --bin demo + LD_LIBRARY_PATH=/tmp/b/sandbox ./target/release/demo + +**Rust Crate Structure** + +The Rust examples use the ``u-boot-sys`` crate located in ``lib/rust/``, which provides: + +* FFI bindings for U-Boot library functions (``ulib_*``) +* FFI bindings for U-Boot API functions (``ub_*``) +* FFI bindings for OS abstraction functions (``os_*``) +* Proper Rust documentation and module organization + +The crate follows Rust ``*-sys`` naming conventions for low-level FFI bindings. + +**Building Rust Examples Outside U-Boot Tree** + +The Rust examples can be built independently using the ``u-boot-sys`` crate:: + + cd examples/rust + env UBOOT_BUILD=/path/to/uboot/build cargo build --release + +The examples demonstrate both static and dynamic linking approaches compatible +with the Rust toolchain. + Linking and the Linker Script ----------------------------- @@ -418,3 +478,4 @@ Future Work * Support for calling functions in any U-Boot header, without needing the source tree * Improved symbol renaming with namespace support +* Expanded features in the lib/rust library From patchwork Thu Sep 11 21:44:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 297 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=1757627124; bh=ikC2HriTfmvWvMDUxe00+Ufl60DdaIWWD1H1rZmQ6w0=; 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=db40ynoIb84YU0WNwsLkEoh/6zOEYN2oOIP/99n8w2d+rw1e85lugoRwJNFcgXkuB tIsFmPjyTLmdPsGK9nDdyAnJQtp1RrGedhafmyc16jNn2Tt0ZSNsz4wb7iWAG1z/mJ GlsJAUDzQJcBwBM53ZAP3QCpsBfaims/9Nmkw6FT7Dm7E1w0Z/cnvPJ4FrayKi/nww 8Mz49Qpnx710zSNFA6u8zwTSx4UVcVSiodlgLHIb+He/8kwoHO+BQnlaQ+Vb30X3OL PMFNP+LUNL2KUAAW7FFD9Y5/oA+kjAGKIjhyd6bF00YBnYgIgvrm2pzFdQBxDsUcqE RO+ijwgaCp5wA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B334267B0F for ; Thu, 11 Sep 2025 15:45: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 10024) with ESMTP id wZoOkMm49qQu for ; Thu, 11 Sep 2025 15:45:24 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627124; bh=ikC2HriTfmvWvMDUxe00+Ufl60DdaIWWD1H1rZmQ6w0=; 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=db40ynoIb84YU0WNwsLkEoh/6zOEYN2oOIP/99n8w2d+rw1e85lugoRwJNFcgXkuB tIsFmPjyTLmdPsGK9nDdyAnJQtp1RrGedhafmyc16jNn2Tt0ZSNsz4wb7iWAG1z/mJ GlsJAUDzQJcBwBM53ZAP3QCpsBfaims/9Nmkw6FT7Dm7E1w0Z/cnvPJ4FrayKi/nww 8Mz49Qpnx710zSNFA6u8zwTSx4UVcVSiodlgLHIb+He/8kwoHO+BQnlaQ+Vb30X3OL PMFNP+LUNL2KUAAW7FFD9Y5/oA+kjAGKIjhyd6bF00YBnYgIgvrm2pzFdQBxDsUcqE RO+ijwgaCp5wA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A3C0467A59 for ; Thu, 11 Sep 2025 15:45:24 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627122; bh=WNRo2Y64QY4uU87H9GCMOmPVnokwl4otJajtOpPG/ZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=emkNeozRDeOz8fNEEZ3k7YO8YnmwmLNX7WwuW+rEn/6y5bBRzYnLpETVCWrucfeTq PujkZa6xhgQ/5Ax28clez3b090F8MQiBVTke8Fpwvvl0eQtb3hCRKsRBrAxGk4MpzP +r1b/IvTD6c3/IwPg3af2PpbBGL+q1WxXKpXtKUk+x4h6gr0VdM1topj16CdqIDTwI 9qJJS2FfJh3W1W1Nk6EfOELxOJSF6M4k70zJh0JTKvvKW+tL0S2G1MVMFROJLJqCmj Hd4zFpeLRr/ihsE1Z2kT8AK/7IiwR2D5q44QQ372t/F93ieni9Xs5+nQx3d6vsdmGW 6ZUKY/Xy+E9bw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 62A04679D6; Thu, 11 Sep 2025 15:45:22 -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 nKiXP6C9kq6w; Thu, 11 Sep 2025 15:45:22 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627117; bh=xmwOeXstxRAHeVhRBK8M74DkM+3njJYSVvarR5aaMlA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F4KpMiLk4PuV/z9bJL8r/KHJ0g9kQHpuwt9vmSxXNkVFQ76tlM41YnAGonYp0DjJs xDcOtR8Ada2tNLPapwG3ItdS9FnbH9Ig5kg6gDmHZJHRgZMCN0mI8Mk2nzQ4pxga7A dhNR6WnfLOEB32vEq5/ZOy0VnGQbFEKMXU+MJrllKO5bCYYMWonfgS2n+WGucOqq8T mxmHgk7QWobp0dpdidsfma5rngcVRTcykFf6fjd5LHA1n9MQ+0N7hSyc0ICOCrteVY /9fd6P7D7P0WH7njI8YG0hHU9JiPOKiZ6LPiyKzRS3ya57mVwVaRVrND9c/vds9wHt FXhQE2lbW12Hg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 146C167B06; Thu, 11 Sep 2025 15:45:17 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:16 -0600 Message-ID: <20250911214425.3687188-13-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JRBLKHYRZRCNIG2W36KUFDHCCTV2BJY4 X-Message-ID-Hash: JRBLKHYRZRCNIG2W36KUFDHCCTV2BJY4 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/14] test: ulib: Add a test for the rust example 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 Provide a test which is similar to the ulib example, to make sure that the Rust programs can be built correctly. Signed-off-by: Simon Glass --- test/py/tests/test_ulib.py | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/test/py/tests/test_ulib.py b/test/py/tests/test_ulib.py index 76d40e1385c..9b8b7097db4 100644 --- a/test/py/tests/test_ulib.py +++ b/test/py/tests/test_ulib.py @@ -1,6 +1,8 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2025, Canonical Ltd. +"""Test U-Boot library functionality""" + import os import subprocess import pytest @@ -74,6 +76,31 @@ def check_demo_output(ubman, out): assert lines[i] == expected, \ f"Line {i}: expected '{expected}', got '{lines[i]}'" +def check_rust_demo_output(_ubman, out): + """Check output from the Rust ulib demo programs exactly line by line""" + lines = out.split('\n') + + # Read the actual system version from /proc/version + with open('/proc/version', 'r', encoding='utf-8') as f: + proc_version = f.read().strip() + + # Check individual parts of the output + assert len(lines) == 13, f"Expected 13 lines, got {len(lines)}" + + assert lines[0] == 'U-Boot Library Demo Helper\r' + assert lines[1] == '==========================\r' + assert lines[2].startswith('U-Boot version: ') and lines[2].endswith('\r') + assert lines[3] == '\r' + assert lines[4] == 'System version:\r' + assert lines[5] == f' {proc_version}\r' + assert lines[6] == '\r' + assert lines[7] == 'Read 1 line(s) using U-Boot library functions.\r' + assert lines[8] == 'helper: Adding 42 + 13 = 55\r' + assert lines[9] == 'Helper function result: 55\r' + assert lines[10] == '=================================\r' + assert lines[11] == 'Demo complete (hi from rust)\r' + assert lines[12] == '' + @pytest.mark.boardspec('sandbox') def test_ulib_demos(ubman): """Test both ulib demo programs (dynamic and static).""" @@ -107,6 +134,44 @@ def test_ulib_demos(ubman): out_dynamic = utils.run_and_log(ubman, [demo], env=env) check_demo_output(ubman, out_dynamic) +@pytest.mark.boardspec('sandbox') +def test_ulib_rust_demos(ubman): + """Test both Rust ulib demo programs (dynamic and static).""" + + build = ubman.config.build_dir + src = ubman.config.source_dir + examples = os.path.join(src, 'examples', 'rust') + test_program = os.path.join(build, 'test', 'ulib', 'ulib_test') + + # Skip test if ulib_test doesn't exist (clang) + if not os.path.exists(test_program): + pytest.skip('ulib_test not found - library build may be disabled') + + # Check if cargo is available + try: + utils.run_and_log(ubman, ['cargo', '--version']) + except (subprocess.CalledProcessError, FileNotFoundError): + pytest.skip('cargo not found - Rust toolchain required') + + # Build the Rust demo programs - clean first to ensure fresh build + cmd = ['make', 'clean'] + utils.run_and_log(ubman, cmd, cwd=examples) + + cmd = ['make', f'UBOOT_BUILD={os.path.abspath(build)}', f'srctree={src}'] + utils.run_and_log(ubman, cmd, cwd=examples) + + # Test static demo program + demo_static = os.path.join(examples, 'demo_static') + out_static = utils.run_and_log(ubman, [demo_static]) + check_rust_demo_output(ubman, out_static) + + # Test dynamic demo program (with proper LD_LIBRARY_PATH) + demo = os.path.join(examples, 'demo') + env = os.environ.copy() + env['LD_LIBRARY_PATH'] = os.path.abspath(build) + out_dynamic = utils.run_and_log(ubman, [demo], env=env) + check_rust_demo_output(ubman, out_dynamic) + @pytest.mark.boardspec('sandbox') def test_ulib_api_header(ubman): """Test that the u-boot-api.h header is generated correctly.""" From patchwork Thu Sep 11 21:44:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 298 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=1757627129; bh=5LYfzDfntRIyzGdyQGuFnfwITldovUeEaee5RFUV4mg=; 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=O8902/29iky4DfIEuKP4i6Prmkm17mc3Hu9Xe0hko3CNYdwkN7h2D8GjIn+JAGWo5 p89qeTlKxPGMbmPLV9xplHkqHBHlJon8gXJn5MQw5V70sDXat/seCcKZI4qdSrkN4p eDkN4cR1BgDU3cAfFY86g6LBJb0eEhi0A0sn0tkPW8qehICi9Qwenu25ctDw4lzPNl dzcPA/WuM7jvcnM/5IxeFxbOKYsrViMY/svHkPtRYoiVsPYnA4Lm2kQ1SHWcPw6Cwi QL/NDojB7FJuPumhMLd3QHL+JSUXS9petc4KWi/KoSKeJxkaidi+Khi8YFCD3V0zXf nxKRF/abzoPMA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 203C567B0F for ; Thu, 11 Sep 2025 15:45: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 0eyeZp_zFGBN for ; Thu, 11 Sep 2025 15:45:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627129; bh=5LYfzDfntRIyzGdyQGuFnfwITldovUeEaee5RFUV4mg=; 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=O8902/29iky4DfIEuKP4i6Prmkm17mc3Hu9Xe0hko3CNYdwkN7h2D8GjIn+JAGWo5 p89qeTlKxPGMbmPLV9xplHkqHBHlJon8gXJn5MQw5V70sDXat/seCcKZI4qdSrkN4p eDkN4cR1BgDU3cAfFY86g6LBJb0eEhi0A0sn0tkPW8qehICi9Qwenu25ctDw4lzPNl dzcPA/WuM7jvcnM/5IxeFxbOKYsrViMY/svHkPtRYoiVsPYnA4Lm2kQ1SHWcPw6Cwi QL/NDojB7FJuPumhMLd3QHL+JSUXS9petc4KWi/KoSKeJxkaidi+Khi8YFCD3V0zXf nxKRF/abzoPMA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1010967A59 for ; Thu, 11 Sep 2025 15:45:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627127; bh=RtEEn799boSGv7l0F6k0aKGwbx8BPLxfhD7SsYfydQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hAmnLD1W1Dzl1HHzj4nTyS+qjZQpzWyfrPUYhO05JJIBwvHnjQ/0+zG8BnTx/9TTq LfH3Yvj5Up7Ae2UoT6pHuH/4Peo6s8Z5boCoH51+tu21ytdGlWo0Ku0LvncWDJoAB8 /JA20f7yQUtEhFM8Lzh4y8HLYFSEHeWSrGwc8KscD/yR0jtUH7joCIxl55wLE854WL V6Dk7/p8CJ4V/+ihAIwzPjlUDodfvGUHlg4maa8Ajt6Y3gy78EF9QVXOd9rgS/yMev ugya1yK42lbzyWyJqREMncW4HeI67ltRBGwYYc+WY3+ZcilfiLPQg/t0eAfpqRtyXM 2uyagg3yKhETw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0A9E667A59; Thu, 11 Sep 2025 15:45: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 XpvPdyzief_n; Thu, 11 Sep 2025 15:45:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627121; bh=gCgh3Reel4R33aRoYBMtWWGAu8O34moSSz1+adSf3G4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=keMWSSOyaBxlf5RkYqCPvAynjYlSAu5sClUETkSMc9CUCTVb+xP9zO0n+lGrRB6Sb yauMqd8VZ2sbOj1GoPjCekkKe9c3MjCOkFcXde21KaH1ybjcJtznWgpFHrf/r6hztf +efRmIQWXGLyDr//8k4wmruGS8H2ieHpE8yYcT7dI74T0OcuxqXymt++YpTEwIItDU XCYbalurMPlTApGoMFSLQAtGaUQDcXEIlNXlSunSEnZFMP8XoXTOb4qXuuEXzzSeZt VpMs2H3pDVIJbBdHahEBIqyUsEJTzFHtL4SZklM9P6h3tW7P7DDabk4OMe4sUgE6T/ hlUq+z9Uc5nuQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id AB55667B0A; Thu, 11 Sep 2025 15:45:21 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:17 -0600 Message-ID: <20250911214425.3687188-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YP6DSLEXRBP7ROYCQDBZ4GHBWZ343Y6I X-Message-ID-Hash: YP6DSLEXRBP7ROYCQDBZ4GHBWZ343Y6I 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/14] doc: Provide a motivation for ulib 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 reason for providing a U-Boot library will not be obvious to many. Add a comment about this. Signed-off-by: Simon Glass --- doc/develop/ulib.rst | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/doc/develop/ulib.rst b/doc/develop/ulib.rst index 56e4e437dbf..e6ee5aa98c9 100644 --- a/doc/develop/ulib.rst +++ b/doc/develop/ulib.rst @@ -10,6 +10,44 @@ build that functionality directly into a U-Boot image. Please read `License Implications`_ below. +Motivation +---------- + +U-Boot contains a vast arrange of functionality. It supports standard boot, +native execution (sandbox) for development and testing, filesystems, networking, +all sorts of boot protocols, drivers and support for about 1300 boards, a full +command line interface, a configuration editor / graphical menu, good Linux +compatibility for porting drivers, a powerful but efficient driver model which +uses Linux devicetree and many other features. The code base is fairly modern, +albeit with some dark spaces. Unusually for firmware, U-Boot provides a vast +array of tests. It can boot EFI apps or as an EFI app. It supports most relevant +architectures and modern SoCs. + +But of course time marches on and innovation must continue. U-Boot will clearly +be part of the picture in the future, but what is next? + +Ulib is an attempt to make U-Boot's functionality more easily available to other +projects, so they can build on it improve it or even replace parts of it. Ulib +aims to open up the capabilities of U-Boot to new use cases. + +Ulib also provides the ability to write the main program in another language. +For now C and Rust are supported, but Python should also be possible, albeit +with a significant amount of work. + +Few can predict where boot firmware will be in 10 years. The author of this file +rashly believes that we may have moved on from U-Boot, EFI and many other things +considered essential today. Perhaps firmware will be written in Rust or Zig or +Carbon or some other new language. Our AI overlords may be capable of writing +firmware based on a specification, if we can feed them enough electricity. Or it +could be that the complexity of SoCs grows at such a rate that we just carry on +as we are, content to just be able to make something boot. + +Ulib aims to provide a bridge from the best (more or less) of what we have today +to whatever it is that will replace it. Ulib is not an end itself, just a +platform for further innovation in booting, to new languages, new boot protocols +and new development methods. + + Building the Libraries ---------------------- From patchwork Thu Sep 11 21:44:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 299 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=1757627130; bh=un2uzBcq2kJOAag4vVdvWS9WR1UGY/eIc+VWkORdCYU=; 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=O+2PKAMVcCO3oPtw6Cqiy1JaDjazX5smg9ZuX0zF81tMni5KnkuyILTBTujjaowge YibWaPHrFf5VuKxsgkpK9GzSx180moRNxeZoWD91IhD+hRpXKU5HBp8HBxdgcQj2qA hybiIubGQCfBa5CRyQvvNDcuNSb+7g9QKzepM+8SoUfriUZNqH+hYiOE4g5t5xcc5x INUfkTHnliz9fmRYz7MzD7yozzLWcN0EvPEg5WjBRqcVH7PjWzhYslGZEV4Q3QfKIZ Nw8s3M/xzl9YECgpecrZYyLZU3jmus9rZ0FOmW2hunfUqL7Ma158luMkaI0JAJxLQE Yp8duOspaTUbw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0A67267B16 for ; Thu, 11 Sep 2025 15:45: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 10024) with ESMTP id f-Nnwyp43T3Z for ; Thu, 11 Sep 2025 15:45:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627129; bh=un2uzBcq2kJOAag4vVdvWS9WR1UGY/eIc+VWkORdCYU=; 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=c5/fzAy88VlPNmHaMl/Z40A0Cm52/HTJRbYSNfpJZ6a6AeAPm3pmcVzd2malTaK6/ xDr8cuIzwWhXFUt15NcXusjsWP+e2vA4xmKU4fSePxjoXbzbwYWb7y8b9gaszIBg4u LU/OdqH42iP8SQ9dFcMK6e1c4MP/5e25oiU8vilG1ooLKrcG1GPJ50duoXeexHe52o DpB1QzMJj+9yIGOuSft42Y2i30xkQnFhWLJHstVxO862CXG1znD3a/EpAUoXfsk4qe tDoeV6o4KLL14J88OqRqFB9WRPYP4iBsx1OaNgQ/jprkH+YULigXYYgvj4iZ/IY/0F PcqoMgWsihDiw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E68A9679D6 for ; Thu, 11 Sep 2025 15:45:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627128; bh=j/DgmT4OCM/5lXIQXrfAW4q4GADVQQ/htMmncCEhJqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxQVhIfC12TvSgeGF4DUt0QvbsoSVyKaVRcdFySx/rKBxstjsDDdOHYyBkYY1+wQt NnTQN631mmCNIxO8SWv4kmoolIz8wNros3jad5VoW0tbymzRarSbcVr13BMr6z+ra/ 931U40EEi1CjK83aJZi7tJmbD4afjB9/boXr99nRDHeiLHL4gx9Jl9Ip8IH2t9PUJP nz3/ltDb5ZiKJFNIaNHouHFjDMWOxvOSLJecNe1NFHX9748H9ivDf4P0dG5t4K8J1Q y2qMkBc4KrGGIl9QMYUXPcNjY+AZAj/lVWcwnJyeYCPYXSHf0cn6V9pGNndOsVCLE2 pxafX3VHwaVNA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1029D67A5B; Thu, 11 Sep 2025 15:45: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 10026) with ESMTP id Yl365XuCIwPV; Thu, 11 Sep 2025 15:45:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757627126; bh=X7dMxWm/U3Cz4ahvBo78I/8/e3BoBnbHHpyQc9R7fYM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q1+R5zcANsd/sAhree63Xc1UJznl1xCyz4hROuyk5G0zwaa7Omw6ifX3ekOqIE0zS wRMHJa0aLWBou73P2hPjl2Xq/vzQvYxnPvGxFPISLky8sjyzdrsDRF/bbklwixYPM6 inlFa7dtfMonKd9jVE7gWpZV6y7hNrR8X1gKRBW2J7fDra469c9lc3uUOARLjaDT7+ UxpLsdWzrgj8viz8SnaNwuv7e/yqTSsCNEqDysNHbBwXEL2r9KWQmjc4OjlmAD1m4b hoZiyGWoYRTcS6KEYi00Tx9mXdtiDI+2OtlyyExqPke0QxISiBLoXRLu+0JeFAXuhA ER7ioPSQQ2Cuw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 46A0E679D6; Thu, 11 Sep 2025 15:45:26 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 11 Sep 2025 15:44:18 -0600 Message-ID: <20250911214425.3687188-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911214425.3687188-1-sjg@u-boot.org> References: <20250911214425.3687188-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RLVTCPMAJWIKIKMNROAPC45LX332FLWW X-Message-ID-Hash: RLVTCPMAJWIKIKMNROAPC45LX332FLWW 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/14] CI: Build the Rust 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 Add the Rust examples to the 'Examples' test suite, so that we can be sure they continue to build and run. Signed-off-by: Simon Glass --- .gitlab-ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3785e61ec3f..fbe56152d7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,12 +349,19 @@ Examples: ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox; set -e; - - echo "Building examples"; + - echo "Building C examples"; cd examples/ulib; make UBOOT_BUILD=${UBOOT_TRAVIS_BUILD_DIR} srctree=../.. - - echo "Running static"; + - echo "Running C static"; ./demo_static - - echo "Running dynamic"; + - echo "Running C dynamic"; + LD_LIBRARY_PATH=${UBOOT_TRAVIS_BUILD_DIR} ./demo + - echo "Building Rust examples"; + cd ../rust; + make UBOOT_BUILD=${UBOOT_TRAVIS_BUILD_DIR} srctree=../.. + - echo "Running Rust static"; + ./demo_static + - echo "Running Rust dynamic"; LD_LIBRARY_PATH=${UBOOT_TRAVIS_BUILD_DIR} ./demo # Template for running the 'make check' tools