Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 CD86D606A31C for ; Mon, 30 Nov 2026 17:01:13 +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=Psr2N4V1; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eG2xeYh1; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=P7mGm6hs Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AC82E40621; Mon, 30 Nov 2026 17:01:13 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id AkhCjxnPKiDR; Mon, 30 Nov 2026 17:01:12 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 7D663405FF Authentication-Results: smtp4.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=1796058072; b=cBdtmjUArE5Lwa/W1xFxIGPPnnbYLztEmN1OZ3tdwz8gUFUEoUmv51n8yDtMJffB7/NR yg/YoOgZeABGsWawJJsn1ueMmqVovK86LOxCnTHX4uHXPogxh0uC6PwK/LToTmTWfTaJm 4W+ui2z9fvfuN2jX3QBy7DEi0n09H9Kh49sMtdJ+TkYhj903V1qYllsSSpjwkAS8ZSVoN kMBL4hqo099Zl3lALwNfEzZ0y7NAOww4P1OaPUMkyTHf+QvWeM1hHF9jSAmdGdmpzNvxJ UrFi2bvAxOWykjveh0iandw6p3/IeCZr3LCOZP+aegv8FD58yO4qzWpxdnBvNlRnCvA== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796058072; 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-ORIG-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Spam-Info: X-Proofpoint-GUID:X-Authority-Analysis: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=se7CpfY5tRMedpTG+4EYFsVF+SiDnaZGrKxiexakrZb+G7RkBXLLOt8lzxQosGygWxay r3heQfyJjxe8JE1ynhOITseV9NzSrlyR1+0yRE62AYnLtscjlmUrI+4Us4H42IJhekj86 1repS7fGzY74xyVDuwGguHUW9SEJJ1NFE55aQj4Qu1Envu82PVjdGCYdgG/2EN5xzLPI0 2gfcIcnzfGvDE/OLtTTVEi8vFA3KWW42rzefTRYmvKJ+BC/fAXkZyb6jLNofhearT1XXy aIM1ewU0R4e5dg4566n2e/6nSaDq5WSxJv8b90lPXNlejEZftcdyuLomkuU7o0EmZSw== ARC-Authentication-Results: i=1; smtp4.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=1796058072; 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=Psr2N4V1r35oGNd/nXJ2+BwOm86Ot+P3HWS4PF1ygwyLkNoxZefzqbiYgpeedRKXX mXkzRcPd2wj0jVM5ecjEjpIlrtqcK0eLx/ar/3OVm9bFonm5pms+43Np9WXoXZMP2N hEQJWjNyNbHFq1+oY6sWoP0pXsCvfB5dWvogKh+TvHtmMXZvp8+yRYYe3oqbmPSu0z 1KvU08iRi9izSXFDZqtyz4F0KacKNfGLj1YJLRmCQwARQbRePYLFszfTbQe5hkKSRo GtxKKWp/NbU0ZtlYI/IIPorOXHBMNXKaO4Gopc8i199ONrMe0jDMbdSTrqYf09rEFY jVn1NxciutiIQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 7D663405FF; Mon, 30 Nov 2026 17:01:12 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id 4C47426D for ; Mon, 30 Nov 2026 17:01:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3251640281 for ; Mon, 30 Nov 2026 17:01:10 +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 EYQjgggX-F2Q for ; Mon, 30 Nov 2026 17:01:09 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp2.osuosl.org E7A1E4016D Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip=205.220.180.131 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=205.220.180.131; helo=mx0b-0031df01.pphosted.com; envelope-from=balaji.selvanathan@oss.qualcomm.com; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eG2xeYh1; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=P7mGm6hs Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by smtp2.osuosl.org (Postfix) with ESMTPS id E7A1E4016D for ; Mon, 30 Nov 2026 17:01:08 +0000 (UTC) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUG8FSF1251191 for ; Mon, 30 Nov 2026 17:00:43 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=eG2xeYh1NCHXvLJo TRYLbDZbTqLW+FuwTJt5W8adMdiYC67V+3lAjZqWpFwHK7ScHqSQSJ24JnuAK4FF 6EvaErpT7tZbhM/Deeb6Kf0Ue/6MiQyCpVHQPiBAvJjX7tgURTO+tvG2EtnvnuV6 tjtm7jfft73j7K/Y3qEkVu0dRTMci3tMWQ2cJOrWlCJ668bFaA7kgu8/nSokkEj4 esgCSz4KhT8Ogs6iZta4JQOd9cnLndPQGwVcBdqyGOTlhQh8xT3ucSnRmdkeaXx9 MoVNyBHpCTfEBFju0v/Bujjkktpu9EozxL433qY/0hsbkpuXhRd8pz0+0EkQqY/u jK6sVw== Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j9cd3g6r4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 17:00:42 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-1b5b2ee674cso1631096c88.1 for ; Mon, 30 Nov 2026 09:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796058042; x=1796662842; 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=P7mGm6hs1VAT4A5N5qsrBo9837C+8yd2dpnUOYhAYH+LkPUEswsm1vYGS+oYs6DbTh 332SHVFHGD+nhAv1XHcSY80JSud1e5k9weXSJkq3lSZA1K0utaefhooHehU0fqFgdPK0 nTEIRdocEj4PO3vMtyL4iAVolLkX2qQMUMDL2ARp6fSCYqE2eAfffV19C/MvYDuenFBq 3Jr52W3cVmQMK4emfYk8DoLSO9mSexTlZKoGmLawKYbALXkYd3dhhz87stIKb6Q4DKtM pzMSBta9F0evEArIaZLqn/JfMplb2Q5n7OEPX8B2JTFnsbr3We3t2oq+HporPen6doLM w4Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796058042; x=1796662842; 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=0Sza3fafYPFJX5/DMqVhCHmCrVsdWKZspFrrNeYSYPRKTBTlZD3H21AT7HGJ8vAoLr ywtVpr066UqHEjm6f6oKmcdZAErxA/FEHB2xl8yLD9mAyLSKOD/g8eafnmzPBQk+D1vu 1VybJl4Gk7tlqUAyjPcSJhn7gqd/4BLPXzXETxCUalFsRrtDOu5azQWPZ/rsinpYLnJ2 uNRReaOUqOtrfBBzhzkegh4dPv1m8MnnlJ4+X5P3HyJFWFcmQWKveVi6uGzH2xekguW1 wyVXRDmd+5BYotyGD4eBRtI2SM1b4Jk2pjDeZuL0ginNCiN27VvY+DqRAc6E0hlPSMJt +DRg== X-Gm-Message-State: APuU4Z+KQySCCLWFmzOPtNT/PFDrxa31+g2FfXcC/DrCncA4ewMw4P4Z +BGgqqN6GkAzMbp84MU9bByTQHtk/cSc+sPtHr+ppxNechXYeYKLkVAAB3hNgyCUX94skYJ4pYU yIShPNf8tV1rjZP4Nt79KhSOqIVMQvVQIO01BulzmBx0dZWP/9L2tPSbWOwMv9daQOlxZlz8= X-Gm-Gg: AZFdTZdqJuZYZc3sjxtuCtf649mFPUMNgswQ8VLBn3PoRWrcG5NSArPTsUfymHEjlK0 Jn8C9vOYtK0ts0cDllYVWxDiuB+7YuD1/ZsSGrkl5Q/nnkpOJQ2lwqJ1KxzMBYyKxu/pLCE0k5J Aaykq+C0EvFDmX1yS8ZDoLvACm2o/GseG7e3C98Mvwba4B8C/uuCe215XI2tq0XbTeZaCd9K6W5 Ck97mK3K5SD1WKnFRSGrsx1aBWwqCxQuXRvjPqZI5y4vhnxJPwFiK4t7vbVIYtyqEiI5+B8Wyoe GIlI62OkumtaNrUGo7fsB54ziWRJUPTUU/8TfrcgSvTRLJWh+zZnu0MEn0PpCv/fhxJvtIFI7eJ w515VBCqy0MTi10amK3rZEH/3AL3y9lhrja3QeOsNw6HuOCziD93Z/ol6ztHDHVkdJkB3FYEU5h zCezOq8+D/xgGOlrd1B6YfnyTLwzYYmRQAuMpsHbFvs9JXi7Qwo+5pwlys8JCSqIS+Vs68/nhek h8Q X-Received: by 2002:a05:701a:cc82:20b0:1b5:5a81:d388 with SMTP id a92af1059eb24-1b55a81ddfdmr27030955c88.4.1796058041634; Mon, 30 Nov 2026 09:00:41 -0800 (PST) X-Received: by 2002:a05:701a:cc82:20b0:1b5:5a81:d388 with SMTP id a92af1059eb24-1b55a81ddfdmr27030912c88.4.1796058040854; Mon, 30 Nov 2026 09:00: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 a92af1059eb24-1b556829d31sm128939534c88.9.2026.11.30.09.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 09:00:40 -0800 (PST) From: Balaji Selvanathan Date: Mon, 30 Nov 2026 22:29:48 +0530 Subject: [PATCH v11 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: <20261130-snagboot-v11-7-913401c07698@oss.qualcomm.com> References: <20261130-snagboot-v11-0-913401c07698@oss.qualcomm.com> In-Reply-To: <20261130-snagboot-v11-0-913401c07698@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=1796057990; l=4803; i=balaji.selvanathan@oss.qualcomm.com; s=20260213; h=from:subject:message-id; bh=6+Okl2nfPM9/vKKEHebyTBika1lb1qYZYg8cMoEXqxo=; b=yCpFnUIH++4hoGq2Rh5cfw5OQK3/siAY+oNd0JxMA1yLSOQC4tYLdxNkurZ3aIk+oYKqaBUa3 XhDjKtDS5neBKHPnXETogmGObUWGZlyT/4gn+S4StCyKRqo7/EXORRN X-Developer-Key: i=balaji.selvanathan@oss.qualcomm.com; a=ed25519; pk=CDpYiUU3SH7KGEtsBvY2tBGPiWfMxqWJF0p2LftOfnc= X-Proofpoint-ORIG-GUID: ncTIOdzw98RrzzOKXo38qZy-bupiMrzV X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA2NyBTYWx0ZWRfXzLyYWMyU+pdS fNipBUC2TqVRIJbTs+GDdi6iqppW2hneHaxsI2P6Bf4rGXWryxwidh1LVWsd9+XcOqS5gcRG3F2 AAVHEoJqrVWxFoemA6rZrsTBlMR0eGy1VKeIP/VnK8nhV4hMq+S/rZj8nOctTEzZhfU9vnPsjMu NyT/0XDGOxLLQLKDePZTUUBjKay04lpz22vJo9SaGbfY6yifJ50V7Vb7j+d2ku4QvHXbx9xY1tG rUrcq/ioGndfPcwBa2NMq953bsJk/oEoSjnsZrPc35Ttud/VwEEM3psnHIyLlfpMZjk+v8zUQKU wqCtPL5opnZNSDuE4Fer7t6iyDg6h7GYbPrHYevAfCpj8nffsg2uStqrj7vYwJkhoLhtntM58kb qfY6MTKtyuWrrEvaFE4dCaPrfM20tjxVk34EP618J1BxpQz8nXKM0HsO3uIDgcKxIR5bgIK5fEX gQ0ok+2C2xNj7gRWySw== X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA2NyBTYWx0ZWRfX/4V9r8gYaess p3Rgt21EOtroPL+zkOTscimriFPWo1gff15bO3VUeunVX8dbav7pKzQ+eB3zN4DwLnAwX2Hyx9g yyjgkyyECWvWfTA34+UlHuuPlE/e380= X-Proofpoint-GUID: ncTIOdzw98RrzzOKXo38qZy-bupiMrzV X-Authority-Analysis: v=2.4 cv=HIhWhYtv c=1 sm=1 tr=0 ts=6b0dabba cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=NEAV23lmAAAA:8 a=D3gdSb3EAAAA:20 a=EUspDBNiAAAA:8 a=-mjFUTYrJJ_n1noAqFUA:9 a=QEXdDO2ut3YA:10 a=vr4QvYf-bLy2KjpDp97w:22 a=bA3UWDv6hWIuX7UZL3qL:22 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-11-30_04,2026-11-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 phishscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300067 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