From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3101B606A322 for ; Sat, 5 Dec 2026 10:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=S3ceXIVN; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VcCSlYpj Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8C33760791; Sat, 5 Dec 2026 10:06:29 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ZPJcP4qFI4Qq; Sat, 5 Dec 2026 10:06:28 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org B08B760675 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796465186; b=pZtjjcJcX15EeiZIl3Ogl9TdqT0Hvy7fvyiSPWj4LWvvRJrdk2Dbt57LfwhCw8ymqPDF asYxZvzvIvVbwVMqEb/nd8atXosz/LlfENZWk+Eq64Kbn3bTiSXDwavOInL6ZMdnaUoTr u4rgtxVFM5cEMdpXLcuninW/aIAFuH/Hnqu3ktjENrGeNOO4JMGPRn3NxOfzTZ/yUkYTq AU5d8lyRCwTHk7zduu6cAAC8+eeNtnO5I5WS/fayoVfy7MiCAz93E3yCM/5fadK5tSjk0 w4fv4N3FjzIrYf8vIpQcu0f3Z+atvYjm9b1UlRHBRhJz9aXeGHmJdfh3+FAptSvvRNA== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796465186; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:X-Comment:Received:Received: Received:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Virus-Scanned:X-Virus-Status:X-BeenThere:X-Mailman-Version: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=Te15tvm4R/0DOEDC6Oxt4RuDxgu+n9HE2NW7SG+gpA4=; b=EeWqSA2/pbBoUexaZTh4x0Krwp5D/1AepWQM6UkE6kVpsFfeXevV6H4z6B2djJfExpbu colIXzKX6HHyuoyhdqeiTZsNK3637odo2/n4VWdL3onFdf+jUuUaud5HC6QsU6GonxEWy A9mLYJlA39RQl6PqmXR7i4KLdCcv4LpDn2vvj8kiZm1sXbwBu5ryhOtj48KIDN+rJHXhs Cnv+ABnFzVM+74lMhEbhpy/dfH6Dg5Dgy5h9z16VGdMFcMtZqRZqgTN+g1AYa8lfnnPQH zwrFLkEQsKj5EoCgKov/iTGIoD2cNxNnvoDY8Z0NxcylyzLniwrVk7+RW90jEFOYkEg== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796465186; bh=Te15tvm4R/0DOEDC6Oxt4RuDxgu+n9HE2NW7SG+gpA4=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=S3ceXIVN41obpoVYw/RwqeYeDzTqq1wfcujBYuQpzCB4Xs6GpSwec409sMPAJCS7J YiHz7GaLyaNw0piT7ifQp4KkrPkdxLbbCxYQmOle56AZbZvb97GF6r76A3fTNwq68I jUSVn5AysFRQU/FDvHyIJ3F22rdyMaxYWsmsDFaf98eTeNHd3R6/51eEdupvrVZyC1 BSQF1hBFYahVmNPAYfoxp460tKeOSDrXHCzshOerDue8+k1nedh69EiJVSVnIuUkWf 7a/qjIjCAzPjXW2vBzFO4C5kkWbxWhxCsVBiJnuIjHoUDqdY/FxagghpxkOsd1R/Yr ZgiWaVtMUBv+w== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id B08B760675; Sat, 5 Dec 2026 10:06:26 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 3AA62A0E for ; Sat, 5 Dec 2026 10:06:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3191340099 for ; Sat, 5 Dec 2026 10:06:24 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mUulFj9sOtQN for ; Sat, 5 Dec 2026 10:06:23 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp2.osuosl.org 1D1AB40081 Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip="2a01:238:438b:c500:173d:9f52:ddab:ee01" X-Comment: SPF check N/A for local connections - client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=clamor95@gmail.com; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp2.osuosl.org; spf=fail smtp.mailfrom=gmail.com Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VcCSlYpj Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1D1AB40081 for ; Sat, 5 Dec 2026 10:06:22 +0000 (UTC) Received: by phobos.denx.de (Postfix, from userid 109) id EFD49847F2; Sat, 5 Dec 2026 11:06:18 +0100 (CET) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0321C83B4B for ; Sat, 5 Dec 2026 11:06:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clamor95@gmail.com Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-c5127c7abd5so309763666b.3 for ; Sat, 05 Dec 2026 02:06:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796465171; x=1797069971; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Te15tvm4R/0DOEDC6Oxt4RuDxgu+n9HE2NW7SG+gpA4=; b=VcCSlYpj4Uw0MUU2Glird9/BxKxFCxcpyb/dnoRcl5ASUTtlwxSw7LPqidTr7jSzvE KFHIX65G+ZIWthozax6frVqezkJBtBm/YULVRszNPwOfdnnS/43MmHfeSWjKOJzOXK5Y 8D8SADcqUJE53WpsQYG6azuVGAYlvVlpLYJ25Yo1ns8s+gd9W/nKPAOMRxllbIQXOiUK 1zMZZXoLDvS9rzK2PWGESZP36TexIhowQTdaaipVHq7gMa2UPl84YxwocClSpJXdFNoG AInrbkbFwlVr2D9Q9yf4qAhsmC8J8uKCrqVfmI2ZSy3WXXHa1wRCwIqm3DhDZCekb7GQ uw9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796465171; x=1797069971; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Te15tvm4R/0DOEDC6Oxt4RuDxgu+n9HE2NW7SG+gpA4=; b=OxdjIIAqBBkcelDxhKrr+5/fFpMVanx9uPi0KdXlA0rZp5hgR9ZjbU2Y7i1WZ/eKzK X1DojvJ1n9pNXfQ2pwcl36i47ci26F1Hsy9M3s1p5tpBTNcqO45dluauW9r6PjfrhYV6 Fh0u1u6zyXwie6fOybUApP+FycWMYLHO/NlX37FRJkJVuHjglAGK8Z7qDamwA3kIa0On MSNNqUG1ZoRNu+Zg97eerpJ9vMukk9Y/14fxv6Nf4F6tf4yHlGTJAUDp3w25sGyfy0pe qGpLr3sB8QoXvZKr9IvkV0Q7O/iXhm/FJnRoL4GEkDfD2URcmTHK3c6RvlcSunnDXnGb E1UQ== X-Gm-Message-State: APuU4Z/41sGaQckg4ljrDt1/jB8wXVcqqm3OK4Yq+sCwNjz47UOgrf5X I3XdM2AVGkG6cFm9OzkcgwU2KOOP9Nnwn3tgRtU0PJYW5G3lPtgJY4bb X-Gm-Gg: AZFdTZcX4v8m1nVv8MTIrGNijh7Hxabki7gXqUQ6zpF3EOlUJaNm6lUwnK97bRuosnR YR7FI27h1WGPAw3MRooiWNTO2wEhXD19Phwiho0IFtNttPoE18M4WrISXHCR7DVincZWRe5H4PV h9/J3iFwvskq7fZd/tmsEMzzx1ls6gbTiqA4zGdR3YZLso1yi90Ka6zwCLrIkoI0rBD6sKTjpPP tXi6S9y2EurWXQmw0wgmNyMvuV3lioQ0f5amTtJeo9GGeIXGQM186Mr3xIutPJ1mfzvziGaetN8 4gEEl3rQtb5HQF4cYqW+DoO0zIDB4568RYvGWvYkDGLPSagPnTDm8xvijnidtXpc8bVxtTy9FQN ax8/0jYKl1/DcZnEggH9e3GCGWxozi+PdUcQfoEsBWw4pqCg6AyCpm7xHAwh5+YiBZkvYG2Qo89 Mc787IJLq5+Ag3e2f13rDhoEngLmXCL+yGJUjfNDrTlfVqhXvcTW9COsyXa5yMUzfsVGCAGZkOe PjN6drTXvfLgBnK9rY+UJQ0mwgV2FuieOxN8L+ChNW0sGWtaki/RiUojPTCN8HgHchU/mDDrCaj 0UePH8xn+v79lW0rf6RWCRJELimVStFqcUHXMsXHHkCGhTJz7jE2HYHMRdYUzRyJzOT93dR0GC9 4HcxfleWjkQ== X-Received: by 2002:a17:907:96a9:b0:c51:d157:a7f7 with SMTP id a640c23a62f3a-c526262ed2bmr325228066b.35.1796465171174; Sat, 05 Dec 2026 02:06:11 -0800 (PST) Received: from xeon ([188.163.112.54]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c525b64dd0dsm231759366b.83.2026.12.05.02.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 02:06:10 -0800 (PST) From: Svyatoslav Ryhel To: Svyatoslav Ryhel , Thierry Reding , Tom Rini , Ilias Apalodimas , =?UTF-8?q?Jonas=20Schw=C3=B6bel?= , Ion Agorria , Peter Geis , Mattijs Korpershoek , Guillaume La Roque Cc: u-boot@lists.denx.de Subject: [PATCH v2 0/9] ARM: tegra: Add custom fastboot flash handler Date: Sat, 5 Dec 2026 12:05:36 +0200 Message-ID: <20261205100545.106967-1-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-7.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_FAIL,SPF_HELO_NONE,TO_EQ_FM_DOM_SPF_FAIL, TO_EQ_FM_SPF_FAIL,USER_AGENT_GIT autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Add fastboot flash handler that allows boards to intercept fastboot flash/erase and modify/change behavior according to board specifics like AES encryption or RSA signing. Add board_fastboot_get_part_info to provide info as fastboot tool queries during flash/erase Refactor existing Tegra flash mechanisms to use new handler. --- Changes in v2: - rebased on uboot/next - switched returns to -ENOTSUPP (asked by Mattijs Korpershoek) - added more documentation and function descriptions --- Ion Agorria (9): fastboot: Add board_fastboot_flash/erase/get_part_info hooks ARM: tegra: Refactor BCT patching process ARM: tegra: Add custom fastboot flash handler configs: tegra: Enable TEGRA_FASTBOOT_FLASH option crypto: tegra_aes: Add support for Tegra124 ARM: tegra124: Add AES engine node and enable it for Mi Pad ARM: tegra: n1: Add bsev node board: tegra: Update ebtupdate usage doc: cmd: Update ebtupdate description and document bctupdate command arch/arm/dts/tegra124-xiaomi-mocha.dts | 4 + arch/arm/dts/tegra124.dtsi | 16 + arch/arm/dts/tegra20-samsung-n1-common.dtsi | 4 + arch/arm/mach-tegra/Kconfig | 18 +- arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/bct.c | 910 ++++++++++++++++++ arch/arm/mach-tegra/bct.h | 86 ++ arch/arm/mach-tegra/fastboot.c | 78 ++ arch/arm/mach-tegra/tegra124/Makefile | 1 - arch/arm/mach-tegra/tegra124/bct.c | 86 -- arch/arm/mach-tegra/tegra124/bct.h | 64 +- arch/arm/mach-tegra/tegra20/Makefile | 1 - arch/arm/mach-tegra/tegra20/bct.c | 84 -- arch/arm/mach-tegra/tegra20/bct.h | 55 +- arch/arm/mach-tegra/tegra30/Makefile | 1 - arch/arm/mach-tegra/tegra30/bct.c | 84 -- arch/arm/mach-tegra/tegra30/bct.h | 55 +- board/acer/picasso/picasso.env | 5 +- board/asus/transformer-t30/board-info.c | 6 - .../asus/transformer-t30/transformer-t30.env | 2 +- .../ideapad-yoga-11/ideapad-yoga-11.env | 2 +- board/samsung/n1/n1.env | 4 +- board/xiaomi/mocha/mocha.env | 4 - configs/endeavoru_defconfig | 1 + configs/grouper_defconfig | 1 + configs/ideapad-yoga-11_defconfig | 1 + configs/mocha_defconfig | 1 + configs/mot_defconfig | 1 + configs/n1_defconfig | 1 + configs/ouya_defconfig | 1 + configs/picasso_defconfig | 1 + configs/qc750_defconfig | 1 + configs/star_defconfig | 1 + configs/transformer_t20_defconfig | 1 + configs/transformer_t30_defconfig | 1 + configs/x3_t30_defconfig | 1 + doc/android/fastboot.rst | 28 + doc/usage/cmd/bctupdate.rst | 45 + doc/usage/cmd/ebtupdate.rst | 41 +- drivers/crypto/tegra/tegra_aes.c | 2 + drivers/fastboot/fb_command.c | 70 ++ drivers/fastboot/fb_getvar.c | 30 + include/env/nvidia/prod_upd.env | 66 +- 43 files changed, 1439 insertions(+), 428 deletions(-) create mode 100644 arch/arm/mach-tegra/bct.c create mode 100644 arch/arm/mach-tegra/bct.h create mode 100644 arch/arm/mach-tegra/fastboot.c delete mode 100644 arch/arm/mach-tegra/tegra124/bct.c delete mode 100644 arch/arm/mach-tegra/tegra20/bct.c delete mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 doc/usage/cmd/bctupdate.rst -- 2.53.0