Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 332F2606A31A for ; Wed, 2 Dec 2026 04:59:47 +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=rb3OE7UZ; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=TUyjzcRq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Uds7hWSz Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0F56780EBE; Wed, 2 Dec 2026 04:59:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ZpxxPApYy3G0; Wed, 2 Dec 2026 04:59:45 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 6773980E8C Authentication-Results: smtp1.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=1796187585; b=oLg0ZTppL2RdgYb7G7CRKE7LXcqcMqDCV5eFoGb3ZmgmIhNHb9SUF44EMLdlDwuDe0T9 xL/pXr1+YolFYyypd1Nb5M4dRhXWOuSmWO7K4pOS6K1snEaLfyl/mPvxCj65aD3mCM6tl ICatcKgC1URI2Pftx037sVHLGNcKprC2ha+ixd5Lsovvvt/M95YKkPk6P2xoZVqObNtEY fCFtBRm5AVnHzKf12K+KUyX5X8WXNoZsHWIIT2/YkxdOQ3za9OOqua7WNq9SxuK9bEWDS dr2oLh3Yb30gyaJAZw/LVRPak8K0l4ni+2fNf6m+8Fk+/nTgIaOPHEqONid6yQEHt/A== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796187585; 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:Received-SPF:Received:Received: DKIM-Signature:Received:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Errors-To; bh=LuLXwNuuubYrfGAkp7kg40h29xewTqyC5xqaDVgMhe4=; b=oI8ZevuBzqCRD/ToF+/yuTHmFMrvJc7CSRhvhM10monqK6aDmunXfnDcOLLhJn4iDERN +fNo19N9WHQau6j0e8rBR8OtmIVhNzArVhJuTlY1EDRG909lmsvQKcpc39JPixD1LMUd7 k3qqW6zXAPe9o/YmeSMDkQ6zIzw8weT3hhXThVAX/xjXP7TyigBTFL4Go3dBhY7SiE29h N5RjcFPlIZdSU4OmVuAqiD2qPBVW1oz4MHUZ8bQ442QcHQwmdSc3oFDpB2GaEY0DjFrg9 WpKMQCYMqs2HeDx1ZkW0c7cN5//i8mugK1JMb3XUEFUnSjnS1vRgcJI3jgWJ8/JXOyA== ARC-Authentication-Results: i=1; smtp1.osuosl.org; dmarc=pass header.from=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=TUyjzcRq; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Uds7hWSz; 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=1796187585; bh=LuLXwNuuubYrfGAkp7kg40h29xewTqyC5xqaDVgMhe4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rb3OE7UZAzLaQvhpBFLdVyIbdoTG64NJTrsDf8hT1X08NxBayVIUUI7S4puPe7k56 5vibV3rOiTy7VSBKbHKgSJbbIShC/WuGAuZsOY4sQMh62fiQ1HTLDPR12l91uy9PXv 03hvdWUlkQcGMv6lHv6XZuVTZAerbE1VkWMB8RxpNfOP+9hb4pJfz1Nsb9/5s+iJeE iJDgzOmg5ustpjY02mA8CGbTIfeDy7X58NR/2rZUzFBQiitzlil0drSZIRQuknHb9h MNFxWvyEifxLZs6dYJwvJxV2ojTDxNp0373MGB70U+8YGxNw40JGD7KukvjYjV5ub9 XoPCl5lgYis6g== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 6773980E8C; Wed, 2 Dec 2026 04:59:45 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 179F22FF for ; Wed, 2 Dec 2026 04:59:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0928580BB6 for ; Wed, 2 Dec 2026 04:59:44 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jDO19iwv3ufp for ; Wed, 2 Dec 2026 04:59:43 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 1329980E8C Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip=205.220.168.131 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=205.220.168.131; helo=mx0a-0031df01.pphosted.com; envelope-from=balaji.selvanathan@oss.qualcomm.com; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=TUyjzcRq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Uds7hWSz Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1329980E8C for ; Wed, 2 Dec 2026 04:59:42 +0000 (UTC) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B22txpj2665453 for ; Wed, 2 Dec 2026 04:59:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LuLXwNuuubYrfGAkp7kg40h29xewTqyC5xqaDVgMhe4=; b=TUyjzcRq6dOXoki/ qcEqFkMHpwzaY9z7bYc6H77LiNzjzChhFS8yvAwutTKDAWbIjL+nVSOMC4JTi9b0 ed9dOmLIhtM5mN3jcPrZ1DavYnQ48HSt4iBZZh/zIqMqpOT7wLoewo/d8A/FDNtR M9sMTTziD9yOq/duAcxRPewZBy9n4/6N/b6DB/KwF5qbgAcFkvU9ISeUX4D2mrtq 6VxW22Jf/5hN7YBPIY+B2N3o0Re6qgehSLsQeg3JqizmeIA1o8SwDcLYx0tzyXxz vuR9ktB0MieVF5LOitAQLzfXxmCHk3EhN8NT2/oOpDLll2N83IUnb0mB4MZ47S4C Io+pXA== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ja4m91sum-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Dec 2026 04:59:42 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-375bac6bd21so12015853eec.0 for ; Tue, 01 Dec 2026 20:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796187581; x=1796792381; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LuLXwNuuubYrfGAkp7kg40h29xewTqyC5xqaDVgMhe4=; b=Uds7hWSz5CdqxFUyO7hlyF8JJd7C5uAHbEPKG8dlIGfC9G2lkjayRyE2vOeHoYSWJu DCsjIPsNAuer2pS/Rc8oKHqhSLs2wUhBo8iDjwHE84vRzE0GmnatHApZ4sCTzBTm5CUc OT/W+j3SUf8b//A7gk4Y80k34gd7uwU5FXNmh4eiEb5HSYUsLBgz+/j2kUactcIB+ucl DcDHlwfaJ2sggjtccdnuCUP38PncpZKXbNhdUBvfDAskrELYh2z8PikAHHbwTbPLsLOn XRoxFQPRQfzLQYitxynlwVlI8PJqNJIrFmwCU7bSS5s1JEyiIcZ9V155qtdOiddLyPug PQqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796187581; x=1796792381; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LuLXwNuuubYrfGAkp7kg40h29xewTqyC5xqaDVgMhe4=; b=E+5eX2PnTFbdYizD2NoTsxlNE+dTpRiaW1Gcoe1MSQNGNNr71xJsXuy7CKGdQqwoju 3te3A0BiKxOR22h89oIW25WA+/Wrf3vALcyStZxq1UDYfQSlt/pgrNsb88Zgw9hYxBX/ 3aReR9dvymr0jLKbBFRegDp0riX4B/H02doidFr07xsRyttWgHIcIZy/ckiizKC4taKu 7YCiPm3RK9BbVYVTSCqRNgOlatovaVjMlyr3i9ioK3WyA+V/1A1LlcZo0l6cA7pxDp+Q agL5cy8L7jNDLM3aWuTp3+03q/RGqLrGmxDrUkrWKlxO6gEjv/OhOhPEknjy8qVg6j9Y 8JXA== X-Gm-Message-State: APuU4Z8mljnRNFAmlI0pvi6cMAF18HsIIL5zPuqVCOPbqxDF9os5S+7n ZbxfAPHImFx/BU8D4jsN6zzolKmmhzTCjjtrt4y0hnbv0hirudB70tVerY0gWmO6m9lStALWSyI XcqQymLpfH9S1jFPfabQkUI7rdNuDmmC1LrSzVhjAxscnFcwzOQnDInYXKQMGifp6xN23U8Q= X-Gm-Gg: AZFdTZeQ1+cqRtsyF0A4f70qPdRXFcQZd9jIoG/jbogL52Y1mmrbiQd8/qodc/dkx5y IWJYLA1ZW+EnlOSsQWWNroNP7Z35cv9Macduv/15UU52jhzORVNlPS+honwlVe+ZoKwJyrhZBjh pmpz5JUcRLWNY5wCBSMK36kK3Rk4+PoV4XQI7JJdHq1QDf+f2FSWpmJdtnUWpW+ln18k/8kLe9r lB2Sd9OV6cAHlPx8u+cPd1hINQpBzHrzH5vuwstw57I4xwEA135RNog++76QJz3SLnnUMXNTvyU x8sIsQhUhMVjLkwUs3htLLB3zl1V8eGb7gqIMMoSJzipXlXqooB9HkDoOuHYAMoKM1X+md0qPwx iWTgJDUfSYXOlQ9dIPI609gtQB2CzjDpwJ88kBIV+gz1Ph1RqPrNbzrM1U9mxlcz9mavldaK2nY kHj1HFRv4X2OHHl5Kq+E2ZWwIvToG84/HOZC2lBDADuePZt43UEuvT+pRRdOXryg1ZO1Er5CHKX tJEdA== X-Received: by 2002:a05:7301:7309:b0:382:2ae3:b1d0 with SMTP id 5a478bee46e88-384b3e788a3mr38320875eec.13.1796187581052; Tue, 01 Dec 2026 20:59:41 -0800 (PST) X-Received: by 2002:a05:7301:7309:b0:382:2ae3:b1d0 with SMTP id 5a478bee46e88-384b3e788a3mr38320854eec.13.1796187580457; Tue, 01 Dec 2026 20:59:40 -0800 (PST) Received: from hu-bselvana-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566fdce48sm121634180eec.14.2026.12.01.20.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 20:59:40 -0800 (PST) From: Balaji Selvanathan Date: Wed, 02 Dec 2026 10:28:53 +0530 Subject: [PATCH v12 7/7] doc: qualcomm: Add snagboot mode documentation X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-snagboot-v12-7-ecff58506766@oss.qualcomm.com> References: <20261202-snagboot-v12-0-ecff58506766@oss.qualcomm.com> In-Reply-To: <20261202-snagboot-v12-0-ecff58506766@oss.qualcomm.com> To: u-boot@lists.u-boot-project.org, Sumit Garg , u-boot-qcom@groups.io Cc: Rayagonda Kokatanur , Tom Rini , Ilias Apalodimas , Casey Connolly , Neil Armstrong , Johan Jonker , Tien Fong Chee , Michael Srba , Sumit Garg , Aswin Murugan , Simon Glass , Hongyang Zhao , Linus Walleij , Balaji Selvanathan X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796187532; l=4803; i=balaji.selvanathan@oss.qualcomm.com; s=20260213; h=from:subject:message-id; bh=6+Okl2nfPM9/vKKEHebyTBika1lb1qYZYg8cMoEXqxo=; b=D2kSQ2JytGz6gmK4CFdL9hz8QpsswiC8JFYSTZzBVTD67jo7qL5LMaexOa5nD6QXbMjpFRjbx 2aPhQcuhiuDAyRLWoKu3yViW1NVrX96D+VaaQkbkKM/K8QwOS5NEDlS X-Developer-Key: i=balaji.selvanathan@oss.qualcomm.com; a=ed25519; pk=CDpYiUU3SH7KGEtsBvY2tBGPiWfMxqWJF0p2LftOfnc= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDAxOSBTYWx0ZWRfX04EsHH+dpLyJ T/qS/K8+R8I5HxgkKSDAsFYixpial6ke0fr/2utzwWZ2Q/8LFkvo8DozPVGI4wOCBkeFkBb2+Ou VBqO6KS59BPPBn4K8dzpiChetEWLOZK1hKNCtVUsgZN5VWU2j+BMscIIyEwiqNe76wWjGocVUCL mDkaPpTIVitNhrsdMchAZTcDqhojkyKpCDye5I8Lrdid0OJMMbpzpu2CCRveLiPK/4IYyKz7Opc a4AdU/pfClYPxIvfJXJ6AS52UgJ8wMi5vvfe+PnR7erz8iWi3Wh1NniID6HiKmJeaX0PFQ4m44c FGV6f2rnvucDbZIGUqmOOst+P893OynkKzqrJ7+dgeq8akjv0UhfKDVDMCgqurcXR6iDKvsV09R d50Vm3Yl73C6bbro4DLs/M6PYlx+XeqJj9+kQlW0LRVw7fFdAVRVHzzxjlXWUZbMnlfXoaKSNed QzP+8+NSsXnR7siwtkA== X-Authority-Analysis: v=2.4 cv=S/ZMU4sP c=1 sm=1 tr=0 ts=6b0fa5be cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=NEAV23lmAAAA:8 a=D3gdSb3EAAAA:20 a=EUspDBNiAAAA:8 a=-mjFUTYrJJ_n1noAqFUA:9 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 a=bA3UWDv6hWIuX7UZL3qL:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDAxOSBTYWx0ZWRfX6TdfMWSlI2pC eEcG96yp2kG/e9mHw8rks9EmWjprU6RsRQAbJSS4IxRH0x0QT9kQ2uZIs/E/o0Shj1HHEq/eG9a osg0NOn9hhImRZ7jjiGOBcYG6tCq8Ww= X-Proofpoint-ORIG-GUID: XWBFCXGtGo-DYo_OLPvBhPybkHmKrFU7 X-Proofpoint-GUID: XWBFCXGtGo-DYo_OLPvBhPybkHmKrFU7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_01,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 malwarescore=0 phishscore=0 clxscore=1015 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020019 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=-23.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_PASS,USER_AGENT_GIT autolearn=ham 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 Document how to build and sign U-Boot for snagboot mode on Qualcomm platforms, using Lemans-EVK (also known as IQ9075) as the example, and how to add a snagboot defconfig for another board using the qcom-snagboot.config fragment. Signed-off-by: Balaji Selvanathan --- Changes in v10: - Fix the title underline length - Mention the IQ9075 name and point to the snagrecover documentation Changes in v8: - Point to the upstream Snagboot docs instead of describing the tool - Drop the "Why Snagboot?", architecture and EDL+Firehose comparison sections - Move the build and signing steps ahead of board enablement - Drop the list of Kconfig options selected/forbidden by QCOM_SNAGBOOT_MODE and the Lemans-EVK example section - Replace the signing prerequisites list with commands to fetch swiv_build_utility.py and qtestsign - Drop the "Expected result" and "Output" blocks Changes in v7: - Rebased on top of latest file Changes in v5: - Added build steps for U-Boot in Snagboot mode Changes in v4: - Newly added in v4 --- doc/board/qualcomm/index.rst | 1 + doc/board/qualcomm/snagboot.rst | 84 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/doc/board/qualcomm/index.rst b/doc/board/qualcomm/index.rst index 56b8d894c2a..b8bc37bb384 100644 --- a/doc/board/qualcomm/index.rst +++ b/doc/board/qualcomm/index.rst @@ -17,3 +17,4 @@ Qualcomm rdp signing spl + snagboot diff --git a/doc/board/qualcomm/snagboot.rst b/doc/board/qualcomm/snagboot.rst new file mode 100644 index 00000000000..faf5307e4bf --- /dev/null +++ b/doc/board/qualcomm/snagboot.rst @@ -0,0 +1,84 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Snagboot Mode for Qualcomm Platforms +==================================== + +`Snagboot`_ is a recovery and reflashing tool that can download a +bootloader to a device in its boot ROM recovery mode and then flash +images to it. On Qualcomm SoCs, snagrecover uses the Sahara protocol in +EDL mode to load XBL, which initializes DDR, and then loads U-Boot into +DDR. U-Boot enters fastboot mode and snagflash uses fastboot to flash +the system images. See the `Snagboot documentation`_ for how to use +the host tools. + +U-Boot built in snagboot mode runs directly from the address XBL loads +it to. It must cope with the MMU left enabled by XBL, and it cannot +rely on PSCI firmware or Command DB being set up. + +Currently supported platforms: + +* Lemans-EVK, also known as IQ9075 (``qcom_lemans_snagboot_defconfig``) + +The IQ9075 board setup and firmware are described in the "Qualcomm IQ9075" +sections of the `snagrecover documentation`_. + +.. _Snagboot: https://github.com/bootlin/snagboot +.. _Snagboot documentation: https://github.com/bootlin/snagboot/tree/main/docs +.. _snagrecover documentation: https://github.com/bootlin/snagboot/blob/main/docs/snagrecover.md + +Building +-------- + +First, setup ``CROSS_COMPILE`` for aarch64. Then, configure and build U-Boot for +the Lemans EVK platform:: + + $ export CROSS_COMPILE= + $ make O=.output qcom_lemans_snagboot_defconfig + $ make -j8 O=.output + +Additional tooling +^^^^^^^^^^^^^^^^^^ + +In order to generate a working image, ``swiv_build_utility.py`` and +``qtestsign`` are needed:: + + $ git clone https://github.com/qualcomm-linux/boot-firmware-ci + $ export SWIV_BUILD="$PWD/boot-firmware-ci/tools/swiv_build_utility.py" + $ git clone https://github.com/msm8916-mainline/qtestsign + $ export QTESTSIGN="$PWD/qtestsign/qtestsign.py" + +``qtestsign`` requires Python 3.7+ and the ``cryptography`` module, which +can be installed with ``pip install ./qtestsign``. + +Signing +^^^^^^^ + +Add the SWIV segment required for TZ-based signing:: + + $ python3 "$SWIV_BUILD" .output/u-boot-swiv.elf .output/u-boot.elf lemans + +Then sign the resulting ELF with test keys:: + + $ python3 "$QTESTSIGN" -v 6 -o .output/u-boot.mbn tz .output/u-boot-swiv.elf + +This generates the final ``.output/u-boot.mbn`` binary, that can then be +used with snagboot. + +Board Enablement +---------------- + +Common snagboot settings live in the ``configs/qcom-snagboot.config`` +fragment. A platform-specific snagboot defconfig includes it on top of +``qcom_defconfig`` and sets the platform values:: + + #include "qcom_defconfig" + #include "qcom-snagboot.config" + + # Address where XBL loads U-Boot + CONFIG_TEXT_BASE=0x1c100000 + CONFIG_REMAKE_ELF=y + CONFIG_FASTBOOT_BUF_ADDR=0xdb300000 + CONFIG_DEFAULT_DEVICE_TREE="qcom/" + + # Timer frequency for your platform + CONFIG_COUNTER_FREQUENCY=19200000 -- 2.34.1