From patchwork Tue Mar 11 12:31:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 872437 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp1449542wri; Tue, 11 Mar 2025 05:31:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFnZNWJ6VI3dsjciyd6CA2Rxywou0yi051m3bMLB1FR8XHqJHqzA12VImust8Xf5qj1yNj/Q==@linaro.org X-Google-Smtp-Source: AGHT+IFgbLbmlSVBx9cL+cIBBanB2txv6lmwkA+4ZyUw+5B8F5/5cSVe8yEkjelTlr96cCl7Tpxv X-Received: by 2002:a05:6902:2e0e:b0:e5d:ae04:1e42 with SMTP id 3f1490d57ef6-e63b519c761mr3914157276.22.1741696308628; Tue, 11 Mar 2025 05:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741696308; cv=none; d=google.com; s=arc-20240605; b=b1xjQk0qNcLb04qFUNbmm7eAXrPZbQf/tcqNs0PGO8/wEyLVIr92FZu6F39n51mu9Z DXxtwyxWDcmH77WWtyrSHJxb1dRH7zRde/Hx73KDrNwi/gK0aF5mudDzezPtOT/xgMm/ rPupKYYu7PetulwzQn3AuR33JJf650+MGeA0W8p64mcvczAsDTBcj+uiIeGrWnw2udmD UiW6OvPc2bMqcf842pg8Xsv++oB0QiPqQocUx1j0ihFjKMjPyL2ACZOiKZG40c+eDofq O7df5wsjxDaxGtRkhne9xkv86BIFDo1k1/LqrpJtCjqblgKYSx5lN2ouOTFeu2WUJKYy Qp/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=z/3ClAUq5OeyZrPp0KPwDjqnSKUyusmhbhdHu/gu5JI=; fh=gqvIHQeKdaIe2tsFEFpn0YRZc8i/1prD9HxPzRAgeCM=; b=ViF50nqJ0byPBuO7efcL/VtbjAiZc6tWs6e8jPsPuVhfPzVFGfC0CluT/UWG7uMv9w ZeWPmP2Of77r/6HS6kro4dOZ8Lhwqcr/C960Q0bvLhvDBPaPC3SZY5B7VXJRP1dPzv6v P1/u91r/LEkgH/FSUc1VzHwYa9CsaiPz1HKNZXLGZJNZPClH+EGxuJAlknXh99LOLasj Cceo8oYugby97EcBk+JYpO5gg01vouare8vGhMducTXQob+Yea28iWjLzfvM1/c+qNB5 xtiPSoHF9tpQxdf8vAIP95/fYJJq9vUPAMx67fOHbG4h64MHJQNvTcBgLYnnxlp8yByp 5fSg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e0l8azmK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 3f1490d57ef6-e634b8f4628si10068396276.510.2025.03.11.05.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e0l8azmK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F2EA81335; Tue, 11 Mar 2025 13:31:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e0l8azmK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B0A38083E; Tue, 11 Mar 2025 13:31:35 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 355B2807D7 for ; Tue, 11 Mar 2025 13:31:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4394a0c65fcso59105125e9.1 for ; Tue, 11 Mar 2025 05:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741696293; x=1742301093; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=z/3ClAUq5OeyZrPp0KPwDjqnSKUyusmhbhdHu/gu5JI=; b=e0l8azmKrb+J9Y2TBKyxd1shxxYU3QDyM5EOB84bGPa0eyPNty5Un20sE1fFFBEgwh MJDCvCUPKUMGReRzVynWvUPQ1c5VzB6EJVyUy5sY/uRkAAf1voNqR52s03MtZJYnyFTs hKXPVM48Q8xDng2L75Dw7bvLr7mLia0ieTS3R+ed6J1o0GY0kG2pee2ntBu+5QtwjDnl nGMmHlK40ZNWcglLEsuufcQS3pbgW1tJUz+rb65XP8jaw4sIJ62o9fVNKtjZvDn0qkVC focXBJqBMaY7gDrXn0fj2MKviBzEOO7sTGr80N5qX7zs4oyJz0X8h01P6JUJM4viFwaY MHrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741696293; x=1742301093; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z/3ClAUq5OeyZrPp0KPwDjqnSKUyusmhbhdHu/gu5JI=; b=XFws1lr/LzJIlmJXqDTALzNwhYW3lX/FG5YD3Ob2kjDHUIfCSdVNxlBz0srMTJRWK/ A2EgNlfjR7zHLM+8EjtgphfxR0zoTkxPtcBwKyyf6g6qgVXV3tAIlHdCt762Ki1SJAly I2DzJpyMi+ypwSh1T76IxrMDMkz8k0riX0p22MA1O1IWP1jRwnDtCT63uoztBxqdaGrY rtU1dMc2eBlk5JOdEhyMSvQ38XZSwNAQ8NLVmw8iP7EiRg1TwmLzZ1iB6+xD9zONils8 sByPmOFcyMYggOBkaspFEAcVgkLFZYbJzYJgbVpUWXAkWVE6FShqh4I5XaH7CSVzhfe2 5GbA== X-Forwarded-Encrypted: i=1; AJvYcCVjzmcSeBBTUhUuXFUADM1fYmKodFDEmLWGC67kfs2YmUQKiy7fyYzZSN+chjN64ESl71DJrxc=@lists.denx.de X-Gm-Message-State: AOJu0Yw/RUBCzsdUS2FonqcK1tj0dukGhETa7q71fvs7FfsnxcqIhdZP qAbzbhTP/7+v4cZsJyWZxPVgDb+pzdH5gBW3Ww3t44ys/esQR5lQ7xPdMPxqMMLkTvL84sV44hi ENLA= X-Gm-Gg: ASbGnct8/38BssLXmfQa6/X+S3lzDeWZ8Kp28U9mefx0yliLP90IBodp+2T85b6VOxr PWwqnaGu5E4DvKLBTKlJF2T8qiAJ2CizGwLz7hurDvlHRyppmCJQk3T5p2rEgNDplqEIs1Cubvh FEbm5tNclFBejOiZRZI02cu3kbOcOO3iFNfhDMoDhmDV65nxprHSGlraedQCOJZG0L/mA1E07ON WzODryKHKPCt+8wDSSTRqnkZdIZrTtxJE68f77akgDUzG5OoF/gYbN0AG4d1PfH1f7UY2fp2+AX KfanJpT6PmZi5s/thnQFZaGK+SiTnWB1CQ/kZ+Xdi7SSnmQPMnzFt5z++f3/5lphpapFknRK X-Received: by 2002:adf:9b84:0:b0:390:d82d:6d4f with SMTP id ffacd0b85a97d-39132db8b85mr12407344f8f.52.1741696292549; Tue, 11 Mar 2025 05:31:32 -0700 (PDT) Received: from toyger.rex.connolly.tech ([2a0a:ef40:1d11:ab01:f578:9a7d:3957:bef9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2f44sm17788586f8f.76.2025.03.11.05.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:31:31 -0700 (PDT) From: Caleb Connolly Date: Tue, 11 Mar 2025 12:31:16 +0000 Subject: [PATCH v2 1/4] board/qualcomm: introduce phone config MIME-Version: 1.0 Message-Id: <20250311-qcom-phones-v2-1-83dcd88a6a87@linaro.org> References: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> In-Reply-To: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> To: Caleb Connolly , Neil Armstrong , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Simon Glass X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3538; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=OimZ0f6C9wAt4PuxYJ8WzRz9KXKlABRuVoGG3PNW+LY=; b=owEBbQKS/ZANAwAKAQWDMSsZX2S2AcsmYgBn0C0higldwAIWVC18P3ddQtAdtl1EDsCpnw4HP ZRAqqfDHNKJAjMEAAEKAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZ9AtIQAKCRAFgzErGV9k tmcfEACJFNhs3jvYDPdACNHjymmXPWID0d8r/c8UfBhcXEE2p89R/YROOVg/LlAzn4/DxJ6LZd7 zWdpfTovGPqE63RvtqL5dd/IWKvKfvxGyKCxpt6cbcrsX9E8YU2skVUf/7ojMYG2nbtK7cMBFpg FCRWKIbaRjqlbeF6343WUev6FEnO1UYD8xXjvo0yN+iBHb/Y0OrC6Tg5+0v5FluzplL56iIeOGj pTlXvUamGqiMgyhB0UKXuEuZ9iDdJq7q0u0k8tW0+sMkGTV8VeqOgLBIRafPEqgIN4BDk3zR8Bl RwAgAf1ZKqZzZIOw38cQ8UR4DSV55M4Um1VyKoAicasCNPecoWCrVdipqLB78B7QtzPDbWjPdRI IWgCB/dMJZNGjE5TEvOaIPY1TJ2mN3BOWSrPvffYE8bdTBtotD5ynFhrpnSOkcv7SfSJTnVXvli qKx/O9s29nO5vbmHZwpps/72Y9xRKi8rAew6mHWLKzC/U1IvtOdB4PvYGbcl7laA5q6Rk0ImTco vBWPIyRwFjqc9LeboHbdFVCOkbWfQzjYZgq66HYPEupHKY7gr5CnU7cC7aU7N45XpfrIjVkN3EJ Wf/m5h0Hqf1J46Xks8+vD9W0edsqQ849i2Xl5PFXhApkENyqqSt0BnPwwSyVlu6a20u7xDnGPRx nuB/CYuf/vroOpw== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Phones don't have keyboards! Introduce a phone-specific config fragment and associated environment file to make U-Boot more useful on these devices. This allows for navigating via the buttons and enabling various USB gadget modes or displaying info about U-Boot. Reviewed-by: Simon Glass Signed-off-by: Caleb Connolly --- board/qualcomm/qcom-phone.config | 17 ++++++++++++++ board/qualcomm/qcom-phone.env | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/board/qualcomm/qcom-phone.config b/board/qualcomm/qcom-phone.config new file mode 100644 index 0000000000000000000000000000000000000000..a2aa882285b61746a243a7a1c7c384f33839f1b2 --- /dev/null +++ b/board/qualcomm/qcom-phone.config @@ -0,0 +1,17 @@ +# Settings for phones +CONFIG_DEFAULT_ENV_FILE="board/qualcomm/qcom-phone.env" +# Hang on panic so the error message can be read +CONFIG_PANIC_HANG=y +# We use pause in various places to allow text to be read +# before it scrolls off the screen +CONFIG_CMD_PAUSE=y +CONFIG_BOOT_RETRY=y +CONFIG_BOOT_RETRY_TIME=1 +CONFIG_BUTTON_REMAP_PHONE_KEYS=y +CONFIG_RETRY_BOOTCMD=y +CONFIG_FASTBOOT_BUF_ADDR=0x1A000000 +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_USB_FUNCTION_ACM=y + +# Many phones don't actually define a serial port in their DTS +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set diff --git a/board/qualcomm/qcom-phone.env b/board/qualcomm/qcom-phone.env new file mode 100644 index 0000000000000000000000000000000000000000..2a0791c888c62b9f2257448358dd196a02e4b6fb --- /dev/null +++ b/board/qualcomm/qcom-phone.env @@ -0,0 +1,49 @@ +bootdelay=0 +bootretry=1 +stdin=serial,button-kbd +stdout=serial,vidconsole +stderr=serial,vidconsole + +# Fastboot is keen to use the address from kconfig, but we +# allocate its buffer at runtime. +fastboot=fastboot -l $fastboot_addr_r usb 0 + +# Shortcut to enable USB serial gadget and disable bootretry +serial_gadget=setenv stdin serial,button-kbd,usbacm; \ + setenv stdout serial,vidconsole,usbacm; \ + setenv stderr serial,vidconsole,usbacm; \ + setenv bootretry -1; \ + echo Enabled U-Boot console serial gadget + +# bootretry will run this command over and over, if we fail once +# then bail out to the boot menu instead (with a pause to read +# the error message) +bootcmd=bootefi bootmgr; pause; run menucmd + +# When entering the menu (either from button press or failed boot) +# remap bootcmd so it will re-open the menu and we won't get stuck +# at the console with no way to type +menucmd=setenv bootcmd run menucmd; bootmenu -1 + +# Pause is used so the output can be read on the display +bootmenu_0=Boot=bootefi bootmgr; pause +bootmenu_1=Enable serial console gadget=run serial_gadget +bootmenu_2=Enable USB mass storage=ums 0 scsi 0 +bootmenu_3=Reset device=reset +bootmenu_4=Dump clocks=clk dump; pause +bootmenu_5=Dump environment=printenv; pause +bootmenu_6=Board info=bdinfo; pause +bootmenu_7=Dump bootargs=fdt print /chosen bootargs; pause +bootmenu_8=Enable fastboot mode=run fastboot +# Disabling bootretry means we'll just drop the shell +bootmenu_9=Drop to shell=setenv bootretry -1 + +# Allow holding the power button while U-Boot loads to enter +# the boot menu +button_cmd_0_name=pwrkey +button_cmd_0=run menucmd + +# Hold volume down to drop to a shell with the USB serial gadget +# enabled for debugging +button_cmd_1_name=Volume down +button_cmd_1=run serial_gadget From patchwork Tue Mar 11 12:31:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 872438 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp1449600wri; Tue, 11 Mar 2025 05:31:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsqPlEicHBdsAvmMHf2KtqdK/cy11ozfppRHK1lB84tBmXRBwiZOPDSsxN38UzcxzcxgdbPA==@linaro.org X-Google-Smtp-Source: AGHT+IHjy43QClboFEZoSOmue+Eq99lPX/0BOw5n4x6NfGnh+S/LeZQGrH65Lwbdj5RL4Pv/P98V X-Received: by 2002:a05:690c:4988:b0:6fb:4648:3425 with SMTP id 00721157ae682-6febf2b5e12mr251990167b3.16.1741696317728; Tue, 11 Mar 2025 05:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741696317; cv=none; d=google.com; s=arc-20240605; b=Z+sqQ2RsiX12FNrrnNkRe63nS5TH/UjFX54o+ym55xjeeFCIBZD9wTFxkOK4ThOuXI p6FFT/Wp+7ccH0j+FObce2bctQwWT001ZzWciiJbZ4wO6//fhlcBhH6schHIJXNNpXQo jrCngK7d/q41sLni2TwoH6WF/hFndYxVY1rlw42gxaZHGl36QBNLzkor6vnRvdjMbdoY aVzMQ57HBVrJdGS1CsomU89BVnhch28rb2v44Tt0+325M8QFpZh9TtAtcp4JvarpLzpj 7ubB9Bhmgqi2xXEeMoMKtqD7BDkXIiA5xTm/IWx52Q+GKbRw+my9gqGGvCuej+cx3Sar hUHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=jfnQ9P2LHwMNctM4rL26y4jTvPfZngOhgNrgDtSP5Ww=; fh=UAkWQPfVP2biooqrhFEmALO4gdsfn3R9c7pk76m3J8M=; b=KGyrzzlHUIhCUzV1mL56tt5iHAUUbRAQLFoJiYOXZNUuLP5/rLtoiqmDc29F7yK1z1 8XEMRJHLjCuEXclJxjishCN1I5IO+WaMf+QtnWDDjKAGwi6vNb+Lhm0fdlJWgHPYVxaV 7oO8SnsfyYMV8N58Ae+8R3EHsWcUESMog6ZlmrL3w4MPJI7DvKMIoq5C9avFfZebiamj UGrh7EjjYGnHmXz9vkCaVZclksNbD/SVTueYW2MBdmEUeBKbI6yEl50nQl5CcRqE27TC lj0xgSV7Di9sD3phi3L3QiBcPFi3zeZGvvl0XpgCo01AYqSSduyBQQ8hOJPya0IjBqun NZOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QN5Pk+LU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 00721157ae682-6fef7edb3d1si30288007b3.76.2025.03.11.05.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QN5Pk+LU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B3B5B801FB; Tue, 11 Mar 2025 13:31:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="QN5Pk+LU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D07B481671; Tue, 11 Mar 2025 13:31:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 C7F54801BE for ; Tue, 11 Mar 2025 13:31:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43bdf0cbb6bso31525795e9.1 for ; Tue, 11 Mar 2025 05:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741696294; x=1742301094; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=jfnQ9P2LHwMNctM4rL26y4jTvPfZngOhgNrgDtSP5Ww=; b=QN5Pk+LUK1DBoBpGfLNCtQ8fvBVIVBrpsuuE0orhfm0LzPz9yBrJq37+kGYfgENC0E 8Ge9lELylw20wJ1lkZgV+nmffO7TF9yHvV6Fagk/lrZ2uxhhfpsMmrotTLjoAuYUmRUu nTttDvjGw7+A00c2RTk1nShS2byd1YKlKyl786FkPj+GnF4Tw/MZ1KjElCuO6zpvXwBV 6ugFx2tTNkG86esxAq8kaHIPjLR4KDALKcWt6HcIgIzGYIUaC7l2cimSwTigznSAJVW7 21ALalDu0yWQDsuvngO/0GI53TwMTqNi2dvEBHsk54feHWBwtj0ApQJrbQFE0eNh1TsI SxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741696294; x=1742301094; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jfnQ9P2LHwMNctM4rL26y4jTvPfZngOhgNrgDtSP5Ww=; b=ipcrtwQjtUPCwiRU7PwmBz3EEgTNYfyGoTphaDbNCeh4hPbEcgKbWKqviYwoYeQgHV pfEHwqsd1/9RC3IkV95irlE4LzU7gqJOdwlqk62y6d3z9hJq/DkNBxDBGZbQHTwEHrD2 MVi6PHSHzyM9KjmJKy8V4eMWLhqSy079+npXYTBrXbdbhX6Yi8XMEeKCLAETV4p8NPDN 2IYFqz0Xz2QtW1YUtYMsekESMxJgmxFdE0V8QICHeIOQp8EVnakH9gboU8K5ucFZYIUn /Xuw2/uhUKnzC9Zj8R4YwYTXMlP8KyygyxE/yte8PcPffghYDParIj0SjJ68uptno+JX 2Pyg== X-Forwarded-Encrypted: i=1; AJvYcCWzaKLMT8DUIJCRISkiLqOLy1tQUjSaR+VQjzWbdGn84e60r1xfGgUzKAxJpJKSPJ0ObWOG+4g=@lists.denx.de X-Gm-Message-State: AOJu0YxHQFshaTpLB9l/gVVEdrszsCrNMbxVE9SQX5dPcRdGdhHFo1d2 XLEO9lrDP43e+58R2Q97N+PG7r7lS/Xu9ZuqXy2SMSiFO0dusxUifcK9dIJWU/M= X-Gm-Gg: ASbGnct/fbwVWlHwFjH6QL0TOPvqnsTJU34D94KQA8CQP4fCu9kvf5CCdiWYMZybPiO Yd0D6pAXoClDfiDmmGGX429/jNzOvqMyKTx27GnuryRQSkLarGQzFJclu+nCV5Cg+O9ocrSwee/ lKZbRpjvraZ2PhMBnzQieP6NIGgDAKcEKzZXlRk6GEviEzkJUBWx0PDhXIDU5FBDAU4qbu1yyUD FxLN13xLl9G8A/pZAUhLUuDiMEAEh8GXc2pc+yr1P9d9Lr2rx7xZvSVo3gpcIbG8XZpl7DPEsYU pDFgB7cbqfSa9bDgeG4vdDXTeVd59T9/lJueHvagdQXrLp41/KZdgPlpIwfn52OfRBF9e2kH X-Received: by 2002:a05:600c:1c17:b0:43d:79:ae1b with SMTP id 5b1f17b1804b1-43d0079b0c9mr68147495e9.14.1741696294211; Tue, 11 Mar 2025 05:31:34 -0700 (PDT) Received: from toyger.rex.connolly.tech ([2a0a:ef40:1d11:ab01:f578:9a7d:3957:bef9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2f44sm17788586f8f.76.2025.03.11.05.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:31:33 -0700 (PDT) From: Caleb Connolly Date: Tue, 11 Mar 2025 12:31:17 +0000 Subject: [PATCH v2 2/4] cli_hush: support running bootcmd on boot retry MIME-Version: 1.0 Message-Id: <20250311-qcom-phones-v2-2-83dcd88a6a87@linaro.org> References: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> In-Reply-To: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> To: Caleb Connolly , Neil Armstrong , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2437; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=/7P6Po9fxiPAx2TRlvKNfd+3f1Un5SDWI9b3ciDbAW8=; b=owEBbQKS/ZANAwAKAQWDMSsZX2S2AcsmYgBn0C0hMAnmOjLxS6t79aLMWeLX+r6RkrP7dZURA lemms7K9ECJAjMEAAEKAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZ9AtIQAKCRAFgzErGV9k tnAuD/0eyQcQvG2eq+yw76ClaY40xZAyoLk8i6iFcrBLxXUzkDHUsE88G2o9+D5zdtRseZPeSml ggo2UB4HasE4yvrvMPykuPnqawSXJQr7XTBFk4Z0J+4STV8tVb+aynE2Q0QAPMA8kXkMNDvwNWW 0KkGtPCxC087oCmuU1VWLR4YUKTn/PAylOG5mCxDMQ/RrQzShSYV0HWo/oquhLwEZVEE4SIgY5g Q/njH3rNxRtQMydf19ClsW6wugngjJqEsWnrP772rFRHTgon/S/rsaBar4w404CraiRkNHd94Sw YitH8lMhhkejSsvCTwlj/iWGPvKUsPWw9jBfCPGHTcX4a/rIODiikk3L/HQJSUNXKnV7qCht/iR x3EPjaLbxlZFdcvEw1me7vpxF2koRgZk1JpF5yzQWVCZKfVGAt7E1TPE7anMkxcWOe9Jb4empSJ a1ryYyf8gFwOZ4WmGYdMZlOVHuLNhNlXWyxeEUMVu+gOQMsoODrTOfK0mvDbQVsskxm+7yBmdXh tL6pU/EAEQv85QNYj87AwVoSVPktPd8OYw5NETn8mzzC9PcYFevjHlDGSLuLr/zpSAdBnYghTRJ pHjXRTd7r4TDGv+RWQEcB7ZdpmtetTRFdyqUDxqfg19ABrMrPDl+ZbuMIfl8hNpQj9qyzXtltOh 827iyElfOW+Y7FQ== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Introduce a new config option: RETRY_BOOTCMD. When enabled this causes hush shell to re-run "bootcmd" when the auto-boot counter times out. Signed-off-by: Caleb Connolly --- boot/Kconfig | 7 +++++++ common/cli_hush.c | 6 ++++-- common/cli_hush_upstream.c | 6 ++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index c09a98c3233ceb1c68024a193d7dafdce6b83903..4db13dcb9a51940c358f754d9ff91e88bebd96b1 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1711,8 +1711,15 @@ config RESET_TO_RETRY help After the countdown timed out, the board will be reset to restart again. +config RETRY_BOOTCMD + bool "Run bootcmd on retry" + depends on BOOT_RETRY && HUSH_PARSER && !RESET_TO_RETRY + help + If this option is enabled, the "bootcmd" will be run after the + countdown times out. + endmenu menu "Image support" diff --git a/common/cli_hush.c b/common/cli_hush.c index a6a8edce1f43cf4f28fdfc0d8da9b6e180c23cd4..bb134cce18dad8dddb54d7b038ca105853fc3eda 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -1027,10 +1027,12 @@ static void get_user_input(struct in_str *i) if (n == -2) { puts("\nTimeout waiting for command\n"); # ifdef CONFIG_RESET_TO_RETRY do_reset(NULL, 0, 0, NULL); -# else -# error "This currently only works with CONFIG_RESET_TO_RETRY enabled" +# elif IS_ENABLED(CONFIG_RETRY_BOOTCMD) + strcpy(console_buffer, "run bootcmd\n"); +# else +# error "This only works with CONFIG_RESET_TO_RETRY or CONFIG_BOOT_RETRY_COMMAND enabled" # endif } #endif if (n == -1 ) { diff --git a/common/cli_hush_upstream.c b/common/cli_hush_upstream.c index ab5aa5f9b36a91e09f8fcfcbb8b31afa0892e6bc..748ef60ac90b8af8052631c7ad3a6aed2629140b 100644 --- a/common/cli_hush_upstream.c +++ b/common/cli_hush_upstream.c @@ -2906,10 +2906,12 @@ static void get_user_input(struct in_str *i) if (n == -2) { puts("\nTimeout waiting for command\n"); # ifdef CONFIG_RESET_TO_RETRY do_reset(NULL, 0, 0, NULL); -# else -# error "This currently only works with CONFIG_RESET_TO_RETRY enabled" +# elif IS_ENABLED(CONFIG_RETRY_BOOTCMD) + strcpy(console_buffer, "run bootcmd\n"); +# else +# error "This only works with CONFIG_RESET_TO_RETRY or CONFIG_BOOT_RETRY_COMMAND enabled" # endif } # endif if (n == -1 ) { From patchwork Tue Mar 11 12:31:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 872439 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp1449667wri; Tue, 11 Mar 2025 05:32:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVRrvMDfSLUbEzKCYJtCdxEfjJrYetYKSgRp3XigWep4SiX5AsTLmdwQGd1P84Wj0KPIOCWoQ==@linaro.org X-Google-Smtp-Source: AGHT+IEcP16utNsr1hAlFMDlbgURP+jn0U/w5jrEp0AufF43L8GVh/1xjk2ShzV2AJuHd9VR/7HF X-Received: by 2002:a05:6902:1029:b0:e5b:43dd:cf18 with SMTP id 3f1490d57ef6-e63b51d7dcamr3197688276.22.1741696326636; Tue, 11 Mar 2025 05:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741696326; cv=none; d=google.com; s=arc-20240605; b=W23xdeDaA/iax0fgibpgCf3UCfKAjHh9fDfv1/hgJF8qzwOcJfTVlLB1dgtgD1N/RA LJzMKD7Dk2Zz/pEwAF19sblVyLeAr/NPB9Y3ft39pPKcm0tfyTgF+3if+x1WSgJbBt7A m+va5L7H5W7RJtDFrnbHbX1S2HrgYF1qs/pz/M8Mk8UbL2MkJa5uYM4vEr44XxECTnoU QVHvyC4pkDv7lQMqq80VfskecU1BM8gUS1tCFuXIItjL/zGpyrkJG3fG6IJdqJb+AFgp eThgIn+ftpS8uV8vkOUJtyD6N749U07VIybtvwQFYXTa8VDSTYTnm3p9qIR1TluRcNyE WUuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lg1GCr+aaE0AevH9o1zlxGBN+hCKIdxCsPW+0VbAXUo=; fh=tT0p9APl+/ekY6rjMClkCwB3bcA1dSvE6MiXDGPRBVg=; b=ShVdih4/Aj0hge3R6hmB02j89fePykynFwaR4CcktxGs26bqlBZFM7IpGLwJfZAT15 eq70Es7yNSUF2MPs1ML7HnUCd0vZUYvFxuFELFtYIjG/+k8PyI/1rbmMhUhEsiL1oC6D PIuDMLGtRzwF02hUku4MeYp5xjLOc+h0gZfZFcoanqwXcJFxIEmFZ21nyFBb/fW4gGbM hd3Ebf3DSLeVFhPNlsCStnAcjkLWBP3ix9MM5owlch2Y0UjfFG/9hBfkB/XnRHg5sT3A mHvjWr/LvgjCnjMegtrWFKyI2LqY/dDViua46MOGGjavRP/g7nlheI5ePbJ73lN9mg58 wAMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NRfrYqsF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 3f1490d57ef6-e634b90db08si9465724276.626.2025.03.11.05.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:32:06 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NRfrYqsF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06362807D7; Tue, 11 Mar 2025 13:31:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NRfrYqsF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4F025816AF; Tue, 11 Mar 2025 13:31:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 4A59D80F92 for ; Tue, 11 Mar 2025 13:31:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-390cf7458f5so5173644f8f.2 for ; Tue, 11 Mar 2025 05:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741696296; x=1742301096; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lg1GCr+aaE0AevH9o1zlxGBN+hCKIdxCsPW+0VbAXUo=; b=NRfrYqsFTnvR+2q9aJsfG1MlRKLKXWBg5Lp30Mb2vb2j5bIRClV89VcPBNWtFFMgat IlkhOmJomdDEaiyhBtKR98n/HqO9Tzr90CdDuBWUT6T6gCM2pOLpq1fLGnNZ1VwyB3Ve n4RnJbXHgf35rIpOjUPp9PEwSlHA91EMKE/4ncyHEswlLevdV7YoWH/RxuPDBoi/KI6o MRbrvDmAUD6g0FBOn+sWkXO/oejDCHM4NYRl1E0u88AaawXGtUWFmlh44pIEpMYjeriz ROKwOt0yB1q1f/5Ta+AKz+GgCX5OPJV0hK5bcd25effYI0LWdmrxD3NLyTEqlN1yMz8s WnvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741696296; x=1742301096; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lg1GCr+aaE0AevH9o1zlxGBN+hCKIdxCsPW+0VbAXUo=; b=JDzn/RwflTrUI/ujJlnhxUSBqYB6y+gMU0uHRWl+RiJUiWASr07AmtffbVxYqn3qH3 qMvtN9lIEpA77HI5vtjw0LfDHWQqjlzzFbJoZK4z6BmUF9tT9LaATg/XpR7ev7jROu2t xX1ck8NKaL+9YjyX9eg5Hnt57+ZyaEF3IgqQXg/1scQL5niyCH+NzU9PCd0gSRfKWdYo aBUKI22kQdgCr3Y95pRFVnSV1X+g/8tjRVpUW13pu2l0ok6x+7WGYMPvAT/iJxp2AgaO KeI36Rf9I0UFgEbe2xgVplG8l7U5c6xuWALI1+MYRn6yerqS7ibgBmwjmN+u1E5QI6Cw KoPw== X-Forwarded-Encrypted: i=1; AJvYcCXfrdQWJdJ3xVfSAFfdfw5sjbO0DrXSUii6LScRzX/PSIuVHf6wvOJEcirkIFf0PavV9c2KIHQ=@lists.denx.de X-Gm-Message-State: AOJu0YwyYS1G1dI35fuf9ZBSiR8HDVwyPXS6UJfoLQqtl9F+H1LoRGtN 6k/MthhT9suVkRX13m+CjyS7HsWGpkgfq1I6adQAl5//De/8Z+82C7M68MOxX4o= X-Gm-Gg: ASbGncvnsMY0TfVdKnd4/6nobc+nhvmE/YlRdOxPnVPkxfjI9qmDi0364kKcHiX4lPd coGOtZMHrp+KR7ANugzik8+DqnsNQaT3ORAyVlC24gMpSXaDp75mIOKBUvyRLydGV/zkL9m0czD YQ2raCYhzTbTwf7HGNJR1UKEua6JoMXJAfHczvTRBbDbZiIK+Xdul3uV3M2qAd4McxlZWYsmDVQ 6t/riItP4ozEJ/eLirqwrQCyq+NmdjYYzYiOmE+IyA2Ct9vLbYUSuxW2gv6bNHRS5WLRzGszwv+ qNcFsbNb0XTUINZUWU7YxnUvbUbGr70ZWRJ+kdyNyRywi2oYUfTVWL9Y6PHTFCo0uGx/nV0D X-Received: by 2002:a05:6000:1887:b0:391:2c67:7999 with SMTP id ffacd0b85a97d-39132db1bf2mr17663868f8f.48.1741696295584; Tue, 11 Mar 2025 05:31:35 -0700 (PDT) Received: from toyger.rex.connolly.tech ([2a0a:ef40:1d11:ab01:f578:9a7d:3957:bef9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2f44sm17788586f8f.76.2025.03.11.05.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:31:34 -0700 (PDT) From: Caleb Connolly Date: Tue, 11 Mar 2025 12:31:18 +0000 Subject: [PATCH v2 3/4] bootretry: check for bootretry variable changes MIME-Version: 1.0 Message-Id: <20250311-qcom-phones-v2-3-83dcd88a6a87@linaro.org> References: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> In-Reply-To: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> To: Caleb Connolly , Neil Armstrong , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1256; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=7aGOctiNDBsGQCXk6t7RWfyufw13wgNM/Mg3qxK2xnA=; b=owEBbQKS/ZANAwAKAQWDMSsZX2S2AcsmYgBn0C0hJUb4xNMSTgOmW5g0N3/HtS+8Xd5WkelfC zDZGA/Y+KOJAjMEAAEKAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZ9AtIQAKCRAFgzErGV9k thXWEACDFMFINHHwDy5/5jHiVFhkQBwlnOiQdb9lvoDuro17esGdn4QSvXzLfhkxo1YFYDQ5PxP 6gVG5anQzmbQNDvaqDjJhYNDfIDN4PhEkyzhrOorIZUnQlEfZDHAZcY889GOkxQcZJAM0Uvjj5p l7PmV6yVmDBeA4Ig7nwTYUZpKH0yzcIXyWfLHBhRVScPetE3lRq3UoyXC0Ipq0zPCKQaSlHfw59 CEin1if30amn6NOscTPo6s72MuadY0Rf7L4SHWrrM+MUlwMfCyeuEF668gqV/jU88aPmgo6jR1D XEBFILENAmW24ujWg+e404B8iZXEtuziwSEIb9MQdyhrE0GXAZu0+s+j9gnuxaXl42ErPsfDUKu A/mbyi7CrSXmfzvzq2JcG3ICFRuFJc7mHY0aUfmvB/CjAJ7bbIlb4W/tn+bYX/vz1GEWkRkweHr NFecbI8VzmQupCnOXOY1uuaMqAUgTrYWrM+JBzOkjt33Y2H4Onn+jeUedA+fa0FchNzJtcBIhfw X/nIyq70CMiALNtEyaD+cSZ9mA0wpLchJcgtD5Ew9YWw8n4aGlFE1Swlj5AASRq++BA5TufZ5dW ZM0uBloopNV6IIe4a4v29NDxAha5vDh+dsyEnB6hhFa93DUREfl1FAgSPTMZBDzQ/LCQR8wm1du aOmkDILyfj0MCPw== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean To enable more complex sequencing of the bootmenu, autoboot, and bootretry, handle changes to the bootretry variable between tries. This makes it possible to turn bootretry off (e.g. to drop to a shell) and then back on again. This makes it possible to have a persistent bootmenu (the only way to navigate U-Boot on devices like smartphones which lack a physical keyboard) by having bootcmd be defined to launch the bootmenu. This allows for menu options like enabling USB mass storage gadget to return back to the boot menu once the gadget is shut down. Reviewed-by: Tom Rini Signed-off-by: Caleb Connolly --- boot/bootretry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot/bootretry.c b/boot/bootretry.c index 587b2de7d6b08db07e1dea512a834cb5590c2d12..a60767eaa2ee51970e4695e487ce5651575079ba 100644 --- a/boot/bootretry.c +++ b/boot/bootretry.c @@ -36,8 +36,10 @@ void bootretry_init_cmd_timeout(void) * reset command line timeout to retry_time seconds */ void bootretry_reset_cmd_timeout(void) { + /* Parse changes to bootretry */ + bootretry_init_cmd_timeout(); endtime = endtick(retry_time); } int bootretry_tstc_timeout(void) From patchwork Tue Mar 11 12:31:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 872440 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp1449737wri; Tue, 11 Mar 2025 05:32:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURgpo7QqgkcvEO0tjYQ21nv7ascaZY9YAgmQ3Z4ojZq8065SCbDPeBq43Nl5KUt+VqEBh8JQ==@linaro.org X-Google-Smtp-Source: AGHT+IEDTMiOO/kAmCAm++MOWU1wGTOoKg22bqu8Wgnek04ur6QtKlGMiD7zj7In89iTbXDRfcgO X-Received: by 2002:a05:690c:6e0a:b0:6fd:4473:5184 with SMTP id 00721157ae682-6ff092b483emr48432617b3.35.1741696335630; Tue, 11 Mar 2025 05:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741696335; cv=none; d=google.com; s=arc-20240605; b=Rjl6p2wLFf2EP5wBTikRSfWGKE3vG/eXaNqJvdXKkCLhj495w7QSX8seVxByTFRcuJ tigvykXa/ulOM48tCqaXDFUDDfduAzqWQ8JaEnk/+v7ESpaUuueaMppYO6R1haybsflB XvhP77YFAeTZPxhzXmaRKTMR2EtqVS0T/ZdMqnh3nxfrWbmrVrDGwA2K9qDV78uX6FwQ WIZVqEYy1Dqg5/YRMpVxmi0B+AthXS901GHjsjYy8dRf/U2eHD8tUn6u1JsR00IdeVky T6IUMlngvA/luwxuGgI4wpNREaw+tvjajk/qT8Ni2Jv4RztbVTKJy6s4BkoJqx74694+ RaxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=LXKWFEA3RTPR8bp2OOouaWZul+3Id24Z2qdnUFM+ZYM=; fh=zusLEppQ43e0dqfyzbGJ0IxYFFcLYsKl43EPhk4vLxE=; b=GJqpeogJxMO4OujGFMHMmNCH5NZCbLUx0uQ3EHM+l97JNKCVuxWK4Mr723jfmB/0Yw QPVn7VKLlpNel9R6n+ddC+EZa4OfAeklX2vB3ChIIlWe3x9ciDqBtIOByaxkIQTkhaUY qg1/CDRAWK90ggFgEKzTexO0vNEWY8VB/FmfSv64kKySTn9tRaS16sG0m30gsROZhc8a XXULmwP6XxacrjhkVBgrNU0J9KZsvYAmVQ5rkmawydABBMe9ARaGrPF37YrxmRQ3y6aS A5IjM8zFGn33IYCvVq5fCsdxIrrZUUV31y0fcNwv/l+i1OPjLxAOTTnjBjaobhPRw3BA FPIA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A06YDzSe; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 00721157ae682-6fef1d3565dsi34320027b3.282.2025.03.11.05.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:32:15 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A06YDzSe; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F49D81782; Tue, 11 Mar 2025 13:31:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="A06YDzSe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 746FC811C1; Tue, 11 Mar 2025 13:31:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 E84EF8169D for ; Tue, 11 Mar 2025 13:31:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43cf0d787eeso23328885e9.3 for ; Tue, 11 Mar 2025 05:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741696297; x=1742301097; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LXKWFEA3RTPR8bp2OOouaWZul+3Id24Z2qdnUFM+ZYM=; b=A06YDzSeXpFcU7CtnxWfSw7wxpQcLE7nW2sfgBI9WANcXMCLVw5or3y5Cp6a9bjuP6 kqbkB09XmNkvfblJC8g5c9kbUDzQtBJe+lYIJs8hvQV3JnCmEnp+33RJf3b4LdVfE661 pVPf1sOpR90v6oWlG089SnLRhnZ/g/hg/3Gw5D8y24qjp63/WKruYYXjY4qP3KVAyFxv G/hz+0oGJWN60qI2eA89ZxXXAtyv2ycivvM90LNGsgur/24y8tcdNIIY0ujvFCiMZvhi lpXYVSNVH9cGVQST52JGxY3vrC3H+eBLXJwmZay1EcGtj3YGEIOWq+WSn2uTABYsGkqV UzVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741696297; x=1742301097; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LXKWFEA3RTPR8bp2OOouaWZul+3Id24Z2qdnUFM+ZYM=; b=K6F9S2+e56lz2uJR2UWTvF7YCXiYZ+wzn0AGjmMnBD+wjT8L0jpTMOfRgqIZvnLMKT IqfXWuQFw1DLjhXnt9PClbInWJNOBBou7Zwpsl3Vc78Mx/POH4q4nNBLNexGiJ99JEDn z+rCxuee02tujFRvCKVXlCE/H9JN7J3I07ZSncZxzB09VoLsOOQJmDhiOcXJib36u+Vp qEbuNK5H+VO43wuaKP8esSILPh+f2+78JoumnfgCk1EV/bz2Wx1LuB2SQ5RQRGc0p5iz HKriSL46QAKJytURZ4jgpdgmMQ7S8Bwc/0rNNnZo5dSB13oTHj+oZmREaevMLRwuVHkc MPSA== X-Forwarded-Encrypted: i=1; AJvYcCXfrwFEEYbycAlTtLDT3lrOPHv0DspfWA78legjRADGTAVN8U1/uAbxs9IGp5axmDp7ctRWLag=@lists.denx.de X-Gm-Message-State: AOJu0YwNXuVBdwXbHrPMei04jNTbfJ0pA82oxZQ9TZ0itX1SyuD5n/e4 8LzxIuJcXWFVl1dPeIP1XjHUeSiu6YA5nwA6FX4Zqu83MHlNE0WkgtUBLjQqLXhLfB7crzlZUBJ /X7s= X-Gm-Gg: ASbGncs6ZdPYXwuveFdllyd91jQHwTqQNsEMPJew5psuJPIQoUtxmPVRNyH0XUAICv1 VBJ+uowE+MXvfO1T29yOI9QiRE/njIyj1L+NBE3T9qOVMX8+VZIieUOKe97q7rom+HyLOGaDDD8 YaNljNfcZzFbG08Zp9oKO0eo5xxQ1ErWjTa7dmVmCwEFpuJ+OlFWHEZWDuK0NQYzKLMQ/HDMgkq ozsPo3BrXy4zoFH084hVjfaqUEyVVuQsAG4X/GV0dYPkLnWhF5uN6ZHv/aWPGxPy0VMeSlj7YaZ D69rHXpEG+QFj/sU2kdcaxB3jxWVid2cDqR7FyhTPJKeWZqCf5ZK+f+5OD7BYBWwM2ImXoSZ X-Received: by 2002:a05:6000:1867:b0:390:f987:26a1 with SMTP id ffacd0b85a97d-39132d885bcmr11453219f8f.29.1741696297188; Tue, 11 Mar 2025 05:31:37 -0700 (PDT) Received: from toyger.rex.connolly.tech ([2a0a:ef40:1d11:ab01:f578:9a7d:3957:bef9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2f44sm17788586f8f.76.2025.03.11.05.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 05:31:36 -0700 (PDT) From: Caleb Connolly Date: Tue, 11 Mar 2025 12:31:19 +0000 Subject: [PATCH v2 4/4] doc: board/qualcomm: describe phone support and bringup MIME-Version: 1.0 Message-Id: <20250311-qcom-phones-v2-4-83dcd88a6a87@linaro.org> References: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> In-Reply-To: <20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org> To: Caleb Connolly , Neil Armstrong , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Simon Glass X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7654; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=L/tAuYJFfDPRVAWBwa+C90Y1usOWEnRNv9NpP444+3I=; b=owEBbQKS/ZANAwAKAQWDMSsZX2S2AcsmYgBn0C0hzDBTG8F6klL7lKQ2QfcbAbVtLxMwDGHhH caZWjMsabWJAjMEAAEKAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZ9AtIQAKCRAFgzErGV9k tm5qD/kBErXU02w/XDFi25WoAmvlbSRPkkjkjWgHhi3H71s3iowbZ3eWYVQumtGhwweiWoUW1ID GpWTvatAbmo96ozQvuNDcabasgrPab5hBu6463o1YgXHCbxXprkDtXv3Lgsn83FPpYQ20pEuqPe 3rbp6sR8dBySjKvu0wCYhQCW8b+68YTnOnCW7lNVXwog5kmuSt8RJbYquN3zg0awt0cMxY3J7Ag eMNFo7tv6iW/Xt48jCBKNMqmydFw38TLriuyOl/ZTTVLKauFoyzX4r8ZMyDMjGwBKFYtpYzn5tj VPuuD5Zsx87VQCv9qWYNwxf/YaghJ6OAp/W6MxAxG9SRR0ByPMCdHeDnI6QgtEtV+uTrfJwL7Y6 IRo2EtO692vNZxwIA63lp2dBImAku8MDlnUre+x0zyPqzWTTEe3OFbZ0nJOdnvLfRb/DuqFt8Nn hELBLi7ttRYGQdHgYqN9FgqxFzS0qhhez/XErM6+iEtfEOI0AmTwh+BtP05zXU6z01CwsrFmdyi qH5vwxF23hU7l4G9MoNYFNq5yQevG26cSEoISfS5s1KQSklIdclw7mA52Ymnw6FUXK+o9dEOQMS L78kqY3l1zSTXLznlhjwhb07pLwMWBHbQ72abO/5GkNy3AaJK2fRrJcAiQbS/FZeC0HJZk213Ft 2hTlUldI2DxAw4g== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add some documentation which attempts to describe Qualcomm smartphone support with the qcom-phone.config fragment, as well as a high level debugging guide for diagnosing U-Boot issues when UART and framebuffer are unavailable. Reviewed-by: Simon Glass Signed-off-by: Caleb Connolly --- doc/board/qualcomm/board.rst | 5 ++ doc/board/qualcomm/index.rst | 1 + doc/board/qualcomm/phones.rst | 122 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+) diff --git a/doc/board/qualcomm/board.rst b/doc/board/qualcomm/board.rst index 4d793209f9e31e6447c696ccd07af206dba99645..003d59a18ebd3f19db568fa59e9fd06906e209f2 100644 --- a/doc/board/qualcomm/board.rst +++ b/doc/board/qualcomm/board.rst @@ -89,8 +89,13 @@ Or for db410c (and other boards not supported by the generic target):: make CROSS_COMPILE=aarch64-linux-gnu- O=.output dragonboard410c_defconfig make O=.output -j$(nproc) +Or for smartphones:: + + make CROSS_COMPILE=aarch64-linux-gnu- O=.output qcom_defconfig qcom-phone.config + make O=.output -j$(nproc) + - gzip u-boot:: gzip u-boot-nodtb.bin diff --git a/doc/board/qualcomm/index.rst b/doc/board/qualcomm/index.rst index 8c7969987a9704bd6044197574f8da16b3848bd4..db59b81134b84cd5865a07cd1a294de9bdf12c5f 100644 --- a/doc/board/qualcomm/index.rst +++ b/doc/board/qualcomm/index.rst @@ -9,4 +9,5 @@ Qualcomm dragonboard410c rb3gen2 board debugging + phones diff --git a/doc/board/qualcomm/phones.rst b/doc/board/qualcomm/phones.rst new file mode 100644 index 0000000000000000000000000000000000000000..d9a582f5abec7801cad997ccae464975dfb24ac3 --- /dev/null +++ b/doc/board/qualcomm/phones.rst @@ -0,0 +1,122 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. sectionauthor:: Caleb Connolly + +====================================== +Booting U-Boot on Qualcomm smartphones +====================================== + +About this +---------- + +This page attempts to the describe U-Boot support for Qualcomm phones, as a user guide but also a +technical introduction to How Stuff Works to help new porters. + +In broad strokes, U-Boot should boot if the SoC is supported, and the device is already capable of +booting an upstream Linux kernel. + +The list of supported Qualcomm SoCs changes often, for now it is best to look in +``drivers/clk/qcom/`` to get a rough idea. + +For building instructions, see :doc:`board`. + +Phone bringup +------------- + +It is usually easier to get Linux booting first, there are many good resources for this such as the +`postmarketOS wiki`_. Once the device can boot Linux with logs on the display and ideally USB gadget +support, it is highly likely that U-Boot will boot as well. + +For logs on display, you should have a simple framebuffer node defined in your DT, newer devices +require that this follow the downstream naming scheme (that the DTB is compiled with labels enabled +and the framebuffer reserved-memory region is labelled ``cont_splash``). Once this is working in +Linux it should also work in U-Boot. + +In practise, U-Boot still has many more papercuts than Linux, which can be sticking points when +porting a new device. In particular, drivers failing to bind/probe (especially pre-relocation) can +be tricky to debug without UART since U-Boot will simply panic with no way to inform you of +the error. As a result, bringing up a new device can be quite frustrating, but there are quite a few +things you can try. + +The phone config +^^^^^^^^^^^^^^^^ + +Since most phones lack a physical keyboard or serial port, a special config fragment and environment +file can be used to provide a more seamless experience. This can be enabled by generating the config +with:: + + make CROSS_COMPILE=aarch64-linux-gnu- O=.output qcom_defconfig qcom-phone.config + +The config and associated environment file can be found in board/qualcomm/. The main changes are: + +- Panic on hang (so the panic message can be read on the display) +- Boot retry (to automatically open and re-open the bootmenu) +- A boot menu with helpful shortcuts (including USB console gadget) +- Launch the boot menu if power is held during boot or on boot failure + +Hang/crash bisection +-------------------- + +Without a way to get logs, we can still get quite far with only a few bits of information: what +happens when you ``fastboot boot u-boot.img``? + +Does the device disconnect? +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This can be verified by watching ``dmesg -w``. If it stays connected, it likely means the boot image +doesn't match what the bootloader expected, use ``unpack_bootimg`` to compare it with a known-good +boot image (ideally one with an upstream kernel). + +Does the device hang? +^^^^^^^^^^^^^^^^^^^^^ + +If it stays on a black screen and does nothing, then that's a hang! Since ``qcom-phone.config`` +enables CONFIG_PANIC_HANG, this likely means that you're successfully executing U-Boot code (yay!), +but something is causing a panic. + +It could also be due to a bad memory or register access triggering a secure interrupt, it's worth +waiting for around a minute to see if the device eventually reboots or goes to crashdump mode. You +can also disable CONFIG_PANIC_HANG and see if that causes the device to reboot instead, if so then +it is definitely a U-Boot panic. + +With enough time and patience, it should be possible to narrow down the cause of the panic by +inserting calls to ``reset_cpu()`` (with CONFIG_PANIC_HANG enabled). Then if the device resets you +know it executed the ``reset_cpu()`` call. + +A good place to start is ``board_fdt_blob_setup()`` in ``arch/arm/mach-snapdragon/board.c``, this +function is called extremely early so adding a reset call is a good way to validate that U-Boot is +definitely running. + +You can then do a binary search starting from the end of ``board_init_f()`` / start of +``board_init_r()`` and work from there using the init sequences for reference. + +The Qualcomm RAM parsing code is a likely culprit, as ABL is known to sometimes give bogus entries +in the memory node which can trip U-Boot up. + +To rule out crashes that might be caused by specific drivers, it's a good idea to disable them and +re-enable them one by one. Here is a non-exhaustive list of drivers to disable: + +- pinctrl +- mmc +- scsi/ufs +- usb (dwc3) +- phy (usb, ufs) +- clk (remove clock references from your framebuffer node in DT) + +Ideally, it would be possible to use the framebuffer as an early console / debug output, at the time +of writing there are out of tree patches for this but they haven't been submitted upstream yet. + +Does the device reboot or go to crashdump mode? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +On many devices crashdump mode is disabled, so they will reboot instead (maybe after some delay). +The same approach as suggested above can be used to figure out where the crash occurs. + +If the device is rebooting, you can insert calls to ``hang()`` instead of ``reset_cpu()`` when +following the instructions above. + +The most likely cause of a crashdump is the pinctrl/gpio driver or the SMMU driver, ensure that the +``apps_smmu`` node in your SoCs devicetree file has one of its compatible strings referenced in +``drivers/iommu/qcom-hyp-smmu.c``, you can also try disabling the pinctrl driver for your SoC (or +``CONFIG_PINCTRL`` altogether). + +.. _`postmarketOS wiki`: https://wiki.postmarketos.org/wiki/Mainlining