Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216823/?format=api
{ "id": 2216823, "url": "http://patchwork.ozlabs.org/api/patches/2216823/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260327081418.550546-1-guodong@riscstar.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260327081418.550546-1-guodong@riscstar.com>", "list_archive_url": null, "date": "2026-03-27T08:14:18", "name": "[v2] doc: spacemit: add K1 SPL build and test guide", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e6f26375db60cd72ec8880a7a74b442875c2b2cb", "submitter": { "id": 89542, "url": "http://patchwork.ozlabs.org/api/people/89542/?format=api", "name": "Guodong Xu", "email": "guodong@riscstar.com" }, "delegate": { "id": 20174, "url": "http://patchwork.ozlabs.org/api/users/20174/?format=api", "username": "Andes", "first_name": "Andes", "last_name": "", "email": "uboot@andestech.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260327081418.550546-1-guodong@riscstar.com/mbox/", "series": [ { "id": 497732, "url": "http://patchwork.ozlabs.org/api/series/497732/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497732", "date": "2026-03-27T08:14:18", "name": "[v2] doc: spacemit: add K1 SPL build and test guide", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/497732/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2216823/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216823/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=riscstar-com.20230601.gappssmtp.com\n header.i=@riscstar-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=PFv/2VpQ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=riscstar.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=riscstar-com.20230601.gappssmtp.com\n header.i=@riscstar-com.20230601.gappssmtp.com header.b=\"PFv/2VpQ\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=riscstar.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=guodong@riscstar.com" ], "Received": [ "from phobos.denx.de (unknown\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhtkQ0V98z1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 19:15:42 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id D766083DA7;\n\tFri, 27 Mar 2026 09:15:28 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 568E783E7A; Fri, 27 Mar 2026 09:15:28 +0100 (CET)", "from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com\n [IPv6:2607:f8b0:4864:20::42d])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 7DBC583C14\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 09:15:25 +0100 (CET)", "by mail-pf1-x42d.google.com with SMTP id\n d2e1a72fcca58-824c9da9928so1641689b3a.3\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 01:15:25 -0700 (PDT)", "from localhost.localdomain ([45.142.165.89])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82c7d388d11sm4798615b3a.28.2026.03.27.01.15.18\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Mar 2026 01:15:23 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1774599324;\n x=1775204124;\n darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=OjwTP1Jf31hvFTCzlcMnQIE36DW6SY4uTRcMQbG5DCY=;\n b=PFv/2VpQA8Yozk0kgMJHlD9fG5DZ+9nu/UJ5q3BQxs2Esgbmf851OnGxohfdskQ8ap\n 1/iO1+W1jHV8hIbWVByYQMXE6stHYE2dL3tz3naNN0yk8mxnLYf3jElj9s8QgtrhDhBY\n NZrldhM+LdhrCTTwNATKSB0iRVGS41vIcHi0k2jyrVAtlzmyR1cxdom1kioutUGgDSST\n TaHyCOo9mgIXh1wVydYCMg0nv6Y0NPn6abJU4C691dLG8sCuBZi9b41P4QLqEMS4xHD1\n yIVdyR90hzdRGBUOTrvoaQsvwhAowGpc1P0syeDdJhocaVAyI3zgLdQeLIZSI1iRiM4t\n orVA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774599324; x=1775204124;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=OjwTP1Jf31hvFTCzlcMnQIE36DW6SY4uTRcMQbG5DCY=;\n b=Gyf1TrKl+7bGTAQfxcSppZIIAUSuYgOBPJ2N8GV/vhnHvWIqy4LP/E2xT54d0a1Okp\n FEHZE0VuUyNV60JoA2rpBVl/UuOh7aZJaFMEU1pX4IGJT3MTPkCLSbclTMhcqOSEQOLe\n w7CCrrtllltwGZTQbuKcnxhF+yEWZRyXgjbapgldC/W4jXVl6Amq4jwS1tR2dKicKpS2\n 2msq4QaaTy4tcJPHyVhqGpaRJYuSrsfMcPLDgZKlVJUBN+PgciYh1vYBd468+xMMaIqZ\n IEX90GxaTGCYJiOwEgQWC1E0DqFnh6PZH1mMNAkxCbUXCRPoeLma9eiaH26Lz1i+FqRT\n YqcQ==", "X-Gm-Message-State": "AOJu0Yxk54Nl1ebbFh9Zo8Ok63EIjzS5zegq+BQ1nGMbZechJEB4FFl9\n eHohGfFuWyl9tIvtU38rQrFa4aAApS+q0kZR0WtiPTVAOz96sdH29PbzWjAkf/J+ELNUD6i4qEa\n OSLzAnJsweeaB", "X-Gm-Gg": "ATEYQzxmWAWdhcdHOoiFZhhUL/s+bxWaXBaGxXxuoIE6MRAncYSPFbEDoqVW2VBEuBI\n 16s1Ri2oq1hQJUjOQcyW7/raX2YqQaAhotTQfrb4HJi35Hcbip6jN5WGOWNxww6Jdxwd36OJ24D\n BpXIWFeQuqvsP7kKwUhf9VsKYKxw6xzeD1nlfn3xqNJztLar3aWRcuYh1YfzIhuaZUl+XHsr4a7\n OI94EZsNIHT0Bsscqkd9dbappAo6XTyLzAe0Tj4+7gqnjj2bpvEKyUpR20OBgh1h7f9bFEHqgGH\n Wn/LoyYbz8ApHd8hoLRpXlKiSRhQyhkhBOrCdeJPiInxl+X1bl94Tv6z/xC6AMQ9x9xcyk7poQL\n 1VH0zn0OvizS+G9ecza0V/Cn2SytGi8ohTkWB4GjcUCJ+uN3gOW7eTssuO+7wlwqN28bQUHy+03\n HfHB/HVDkQhNgtjVuNz2Xj+p4bVOEAgmFFnYH5Zps9qB6viceIrgk4SHCF3eedJ3wcY2VFwP9yX\n kiq6HHQ", "X-Received": "by 2002:a05:6a00:1884:b0:82c:212a:8023 with SMTP id\n d2e1a72fcca58-82c95d42841mr1790272b3a.11.1774599323602;\n Fri, 27 Mar 2026 01:15:23 -0700 (PDT)", "From": "Guodong Xu <guodong@riscstar.com>", "To": "u-boot@lists.denx.de", "Cc": "trini@konsulko.com, heinrich.schuchardt@canonical.com, rick@andestech.com,\n ycliang@andestech.com, raymond.mao@riscstar.com, u-boot-spacemit@groups.io,\n Vincent Legoll <legoll@online.fr>, Guodong Xu <guodong@riscstar.com>", "Subject": "[PATCH v2] doc: spacemit: add K1 SPL build and test guide", "Date": "Fri, 27 Mar 2026 16:14:18 +0800", "Message-ID": "<20260327081418.550546-1-guodong@riscstar.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260325223232.1553212-1-raymondmaoca@gmail.com>", "References": "<20260325223232.1553212-1-raymondmaoca@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "The K1 SPL patchset requires DDR firmware integration and FSBL signing\nsteps that are not covered by existing documentation. Add a SoC-level\nguide so reviewers and developers can build and test on hardware.\n\nSigned-off-by: Guodong Xu <guodong@riscstar.com>\n---\nChanges in v2:\n - Update vendor U-Boot repo from bianbu-linux to spacemit-buildroot,\n and specify the k1-bl-v2.2.y branch\n - Fix fsbl.json path to board/spacemit/k1-x/configs/\n - Add mkdir -p for spl_bin directory in fsbl.sh\n - Replace verbose DDR training log with concise SPL boot output\n - Update expected output notes for SPI NOR availability\n\n doc/board/spacemit/index.rst | 1 +\n doc/board/spacemit/k1-spl.rst | 196 ++++++++++++++++++++++++++++++++++\n 2 files changed, 197 insertions(+)\n create mode 100644 doc/board/spacemit/k1-spl.rst", "diff": "diff --git a/doc/board/spacemit/index.rst b/doc/board/spacemit/index.rst\nindex e7d3d94e459..a5e35ee12ab 100644\n--- a/doc/board/spacemit/index.rst\n+++ b/doc/board/spacemit/index.rst\n@@ -6,4 +6,5 @@ SpacemiT\n :maxdepth: 1\n \n bananapi-f3\n+ k1-spl\n \ndiff --git a/doc/board/spacemit/k1-spl.rst b/doc/board/spacemit/k1-spl.rst\nnew file mode 100644\nindex 00000000000..6192cbe32b0\n--- /dev/null\n+++ b/doc/board/spacemit/k1-spl.rst\n@@ -0,0 +1,196 @@\n+.. SPDX-License-Identifier: GPL-2.0-or-later\n+\n+SpacemiT K1 SPL Build and Test Guide\n+=====================================\n+\n+This guide explains how to build and test U-Boot SPL on SpacemiT K1 based\n+boards. It covers building SPL with DDR initialization, generating the signed\n+FSBL image, and deploying via USB fastboot.\n+\n+Tested boards: Banana Pi BPI-F3, MusePi Pro.\n+\n+Prerequisites\n+~~~~~~~~~~~~~\n+\n+- A SpacemiT K1 board with USB Type-C and UART access\n+- USB-to-UART adapter (3.3V TTL)\n+- ``minicom`` or equivalent serial terminal, configured at 115200 8N1\n+- ``fastboot`` tool on the host\n+\n+Hardware Setup\n+~~~~~~~~~~~~~~\n+\n+**1. UART Connection**\n+\n+Connect a 3.3V USB-to-UART cable to the **J25** header on the BPI-F3.\n+Remove all other cables first, then attach UART::\n+\n+ BPI-F3 top view\n+ +--------------------------------------------------+\n+ | |\n+ | J15: USB-C [====] [FDL] [PWR] [RST] |\n+ | |\n+ | |\n+ | J25 (UART header) |\n+ | [TXD] [RXD] [GND] |\n+ +--------------------------------------------------+\n+\n+After UART is connected, attach the USB Type-C cable to J15 to power on.\n+\n+**2. Serial Console**\n+\n+.. code-block:: console\n+\n+ $ minicom -D /dev/ttyUSB0\n+\n+Default baudrate: 115200.\n+\n+Building U-Boot SPL\n+~~~~~~~~~~~~~~~~~~~~\n+\n+**1. Obtain the DDR training firmware**\n+\n+The DDR training firmware is a proprietary binary provided by SpacemiT. It is\n+not included in U-Boot and must be downloaded separately from:\n+\n+https://github.com/spacemit-com/spacemit-firmware/tree/master/k1/v0.2\n+\n+Download ``ddr_fw.bin`` from that directory.\n+\n+This binary is integrated into the SPL image at build time via the binman\n+framework. When the SPL image is loaded to SRAM (e.g., via USB fastboot),\n+the SPL executes the DDR firmware from SRAM to perform DDR initialization.\n+\n+**2. Build SPL**\n+\n+.. code-block:: console\n+\n+ $ export CROSS_COMPILE=riscv64-linux-gnu-\n+ $ export ARCH=riscv\n+ $ export DDR_FW_FILE=$(pwd)/ddr_fw.bin\n+ $ make spacemit_k1_defconfig\n+ $ make\n+\n+Output: ``u-boot-spl-ddr.bin`` in the build directory. This image contains the\n+SPL code and the DDR firmware blob packaged together via binman.\n+\n+.. note::\n+\n+ If ``DDR_FW_FILE`` is not set, the build completes with an empty\n+ placeholder. The resulting SPL will boot but cannot initialize DDR.\n+\n+**3. Generate signed FSBL image**\n+\n+The K1 BootROM requires a signed first-stage bootloader (FSBL). The signing\n+tool (``tools/build_binary_file.py``) is in SpacemiT's vendor U-Boot repository:\n+\n+.. code-block:: console\n+\n+ $ git clone -b k1-bl-v2.2.y https://gitee.com/spacemit-buildroot/uboot-2022.10\n+\n+The script uses ``fsbl_ddr.json`` which may not exist by default. If\n+``fsbl_ddr.json`` does not exist in\n+``uboot-2022.10/board/spacemit/k1-x/configs/``,\n+create it by copying ``fsbl.json`` and replacing the reference to\n+``u-boot-spl.bin`` with ``u-boot-spl-ddr.bin``:\n+\n+.. code-block:: console\n+\n+ $ cd uboot-2022.10/board/spacemit/k1-x/configs\n+ $ cp fsbl.json fsbl_ddr.json\n+ $ sed -i 's/u-boot-spl\\.bin/u-boot-spl-ddr.bin/g' fsbl_ddr.json\n+\n+Create the ``fsbl.sh`` script below in the ``uboot-2022.10`` directory.\n+Update the path variables to match your local setup:\n+\n+.. code-block:: bash\n+\n+ #!/bin/sh\n+ MAINLINE_UBOOT_IMG_PATH=\"{your path}/u-boot\"\n+ MAINLINE_SPL_IMG_PATH=\"{your path}/u-boot/spl\"\n+ FSBL_PATH=\"{your path}/uboot-2022.10/spl_bin\"\n+ KEY_TOOL_PATH=\"{your path}/uboot-2022.10/tools\"\n+ CONFIG_PATH=\"{your path}/uboot-2022.10/board/spacemit/k1-x/configs\"\n+\n+ mkdir -p ${FSBL_PATH}\n+ echo \"Clean binaries in ${FSBL_PATH}\"\n+ rm -f ${FSBL_PATH}/u-boot-spl-ddr.bin\n+ rm -f ${FSBL_PATH}/u-boot-spl.bin\n+\n+ if [ ! -d ${MAINLINE_SPL_IMG_PATH} ]; then\n+ MAINLINE_UBOOT_IMG_PATH=\"{your path}/build\"\n+ MAINLINE_SPL_IMG_PATH=\"{your path}/build/spl\"\n+ fi\n+\n+ cp ${MAINLINE_UBOOT_IMG_PATH}/u-boot-spl-ddr.bin ${FSBL_PATH}/\n+ python3 ${KEY_TOOL_PATH}/build_binary_file.py \\\n+ -c ${CONFIG_PATH}/fsbl_ddr.json \\\n+ -o ${FSBL_PATH}/FSBL.bin\n+\n+Then run:\n+\n+.. code-block:: console\n+\n+ $ chmod +x fsbl.sh\n+ $ ./fsbl.sh\n+\n+Output: ``FSBL.bin`` in the ``spl_bin`` directory, ready for deployment.\n+\n+Deploying via USB Fastboot\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+To enter BootROM fastboot mode:\n+\n+1. Disconnect USB Type-C cable from J15 (power off)\n+2. **Press and hold** the FDL button (see board layout above)\n+3. Reconnect USB Type-C cable while holding the FDL button\n+4. Release the FDL button\n+\n+The serial console should show a BootROM prompt indicating it is ready to\n+accept an image via USB.\n+\n+On the host:\n+\n+.. code-block:: console\n+\n+ $ sudo fastboot stage FSBL.bin\n+ $ sudo fastboot continue\n+\n+Expected Output\n+~~~~~~~~~~~~~~~~\n+\n+After successful SPL boot with DDR initialization, the serial console displays::\n+\n+ U-Boot SPL 2026.04-rc4-00543-g2ba03a569e61 (Mar 26 2026 - 16:48:44 +0100)\n+ Fail to detect board:-2\n+ vdd_core, value:900000\n+ vdd_1v8, value:1800000\n+ vdd_1v8_mmc, value:500000\n+ DDR firmware: [0xc08159c0]:0xf0227179, size:0x8d98\n+ DDR is ready\n+ SPL: Unsupported Boot Device!\n+ SPL: failed to boot from all boot devices\n+ ### ERROR ### Please RESET the board ###\n+\n+To walk through the key lines:\n+\n+- ``DDR firmware: [...], size:0x8d98`` - DDR firmware loaded successfully\n+- ``DDR is ready`` - DDR initialization completed\n+- ``SPL: failed to boot from all boot devices`` - expected at this stage,\n+ confirms that SPL with DDR init is working correctly\n+\n+.. note::\n+\n+ After DDR init succeeds, SPL proceeds to load U-Boot proper. Since\n+ SPI NOR storage driver support is not yet available, SPL cannot\n+ transition into U-Boot proper. When U-Boot stage support is ready,\n+ this document will be updated.\n+\n+If SPL hangs before printing DDR messages, verify that ``DDR_FW_FILE`` was set\n+during build and that ``ddr_fw.bin`` is not empty.\n+\n+References\n+~~~~~~~~~~~\n+\n+- `DDR firmware repository <https://github.com/spacemit-com/spacemit-firmware>`_\n+- `SpacemiT vendor U-Boot (signing tool) <https://gitee.com/spacemit-buildroot/uboot-2022.10>`_\n", "prefixes": [ "v2" ] }