From patchwork Mon Dec 18 07:24:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 755463 Delivered-To: patch@linaro.org Received: by 2002:adf:b181:0:b0:336:6142:bf13 with SMTP id q1csp746060wra; Sun, 17 Dec 2023 23:25:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxQyZJ3cBdfuP4jkkD9AOGdJ5rse/8/Qx3Pbw+LJJVEg75G0n2UQ3MyXZndMiWKpRAuKRv X-Received: by 2002:a05:6000:402c:b0:336:6d18:84a6 with SMTP id cp44-20020a056000402c00b003366d1884a6mr108586wrb.64.1702884351434; Sun, 17 Dec 2023 23:25:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702884351; cv=none; d=google.com; s=arc-20160816; b=rNAFOaKnggNzdN5xcVI5h7+UdfAhU4AdBfogpQkah9ZeG95aEld7Q8lc0u8m/qlzkw 1a6Zxa0HjSuC1NWUw2/pA6v0a5dv2k6Rx1nqFl/HQJnEtvm+W/+7MstViVv69L7o00p9 XNIplJJzxgwTaDDTuxRqSsD0ysGBvbDIxJCtzlK5NvRblnl0ij1N1dHJoOJACEmWI4jo 1n7myyWN4g+cg0CwMStgX2UxFUiPcCCOUUb56VwBjg6SLPbgvH7Y9vrOOp/7MfbNXGza pkC59Pk8wxGiY8wTi9EcRzuOKKDsX4DYIqEGjTKILaZJPuwQ8WyCeRxNdaJ/LXH3QBFL MTmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aKd8zKPaWd4l/PK9RYPjewh6HFEN9+PzrofUA1TQ2HY=; fh=EPAXKs+rTOunvfiRvsa3VTOJx1yl2mZQeEuTZH0yVZ0=; b=Du4e65yUFzooPvf4lmO15tTz2d4dCY2mFlVGAc18wxXmrvlPiKJlNPOe2Df8nR6qdj 4riwfFUcKfh6+wEzOPDSY2iU19POwrzCFigbdV/Nr1AeNk5NezJUt2PRSb0BPFRt5d9n wTKY3dSDsp5hsrqrXQX/YeFbJdTxwMWp4du+0g1AICC9Oj8uqmp/tkiPNCW58/Oz9a9Q 1dOtENPIJSaHTNXYY9LF4n8Egfs+1DdV0LJetC1hLw2yGrGKIV8eW4xXybl2bCIpHIEe TiEQ1nu12Ro/ubTz68cVFrlVQ+Q7ZpZQVCFD4x8nTAcw9lmU7PilJ13zbkrus5YzWLQJ ZUhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DY7hoNt0; 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 Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id n18-20020adfe792000000b00333331726fcsi945612wrm.269.2023.12.17.23.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 23:25:51 -0800 (PST) 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=DY7hoNt0; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4578C87DDF; Mon, 18 Dec 2023 08:25:17 +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="DY7hoNt0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0618F87DDD; Mon, 18 Dec 2023 08:25:16 +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=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0: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 EE68C87DE8 for ; Mon, 18 Dec 2023 08:25:12 +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=sumit.garg@linaro.org Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6d7750e2265so162792b3a.3 for ; Sun, 17 Dec 2023 23:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702884311; x=1703489111; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aKd8zKPaWd4l/PK9RYPjewh6HFEN9+PzrofUA1TQ2HY=; b=DY7hoNt0Ldbvg37+msMlKjkpx9hvTGZshFoRp6WOLatM9g514GzFwVqFWqaIuyC8uk CQIG3DqrXPIAZJnY3tR3imGOGmirW2Pt7bK/pS/+b6xOPI4MqWN11EMQazZjeLH6sPZI +QcnLEmbu8ILPmzYYP8mCq4cMj9/RP45B2BEYGG5w2HRGC9IEr8lFDsqWb5sy3BFXiIb Z/WhgdClJrWKXL4xil+CXqYAs4e760mAnHpX7jWGP8R60uKymGlf65Z8kAqp0QVFa+Ue /kJLubRy+YjfMIqk2J7WIhpVQMAm2aZLGQ/5cjTVyNVvetEoCOxTPfWtPBCnHXeWo9HM IBhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702884311; x=1703489111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aKd8zKPaWd4l/PK9RYPjewh6HFEN9+PzrofUA1TQ2HY=; b=nykCKV2XPvJg0rOk+J9GRcMXSU//K21qwZWndX6VgV+lSgNUnvn7TznWtntS+TQnSy FHVDx6uWPcx28TNOBOPZP7CMA4LGF5yZq3t2UqpXUhNDnnLUFElswQDIofFkOCFD8fC/ zdzMzj4uUQJ+a2FNQHWUMol++6HcQGgtBl3h6JOfXfKh7/nFJ6msYeKbUgHH2K3vozMS FvriWs2JB1+1xEeTUcBIra2AM2rLE/VMNIbGER4yZKW+ZXD9zE8qMe1o/TCEkGqdBRKp y6ra9UJVFfZw1zcQzrOJ/YZVEuoBod6VsxMPjYoN12NAHRLgHaqVd1eRfrWl45PpSyFW 4Elg== X-Gm-Message-State: AOJu0YwpcTtp3+rBguIMiyDblRq+Am7SCUPaYNkfO9br92EO4XXCdjW9 qN+GJcO25z8OvIgiuSMCpO0dggusts83GPhuQMA0dQ== X-Received: by 2002:a05:6a20:4285:b0:18b:9b41:eb90 with SMTP id o5-20020a056a20428500b0018b9b41eb90mr7975111pzj.10.1702884311138; Sun, 17 Dec 2023 23:25:11 -0800 (PST) Received: from sumit-X1.. ([223.178.213.6]) by smtp.gmail.com with ESMTPSA id nr21-20020a17090b241500b0028b8b269aedsm1038997pjb.57.2023.12.17.23.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 23:25:10 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de Cc: caleb.connolly@linaro.org, neil.armstrong@linaro.org, lukma@denx.de, seanga2@gmail.com, marex@denx.de, laetitia.mariottini@se.com, pascal.eberhard@se.com, abdou.saker@se.com, jimmy.lalande@se.com, benjamin.missey@non.se.com, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH 5/7] hmibsc: Enable RAUC support Date: Mon, 18 Dec 2023 12:54:26 +0530 Message-Id: <20231218072428.1802969-6-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218072428.1802969-1-sumit.garg@linaro.org> References: <20231218072428.1802969-1-sumit.garg@linaro.org> MIME-Version: 1.0 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 Signed-off-by: Sumit Garg --- include/configs/hmibsc.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/include/configs/hmibsc.h b/include/configs/hmibsc.h index 04052ed6dee..b614dec7870 100644 --- a/include/configs/hmibsc.h +++ b/include/configs/hmibsc.h @@ -16,4 +16,42 @@ #define PHYS_SDRAM_1_SIZE SZ_1G #define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#undef CONFIG_BOOTCOMMAND +# define CONFIG_BOOTCOMMAND \ + "setenv devtype mmc; setenv devnum 0; " \ + "test -n \"${BOOT_ORDER}\" || setenv BOOT_ORDER \"A B\"; " \ + "test -n \"${BOOT_A_LEFT}\" || setenv BOOT_A_LEFT 3; " \ + "test -n \"${BOOT_B_LEFT}\" || setenv BOOT_B_LEFT 3; " \ + "setenv raucslot; " \ + "for BOOT_SLOT in \"${BOOT_ORDER}\"; do " \ + " if test \"x${raucslot}\" != \"x\"; then " \ + " echo \"skip remaining slots...\"; " \ + " elif test \"x${BOOT_SLOT}\" = \"xA\"; then " \ + " if test ${BOOT_A_LEFT} -gt 0; then " \ + " setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1; " \ + " echo \"Found valid RAUC slot A\"; " \ + " setenv raucslot \"rauc.slot=A\"; " \ + " setenv raucpart A; setenv distro_bootpart 6;" \ + " fi; " \ + " elif test \"x${BOOT_SLOT}\" = \"xB\"; then " \ + " if test ${BOOT_B_LEFT} -gt 0; then " \ + " setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1; " \ + " echo \"Found valid RAUC slot B\"; " \ + " setenv raucslot \"rauc.slot=B\"; " \ + " setenv raucpart B; setenv distro_bootpart 7;" \ + " fi; " \ + " fi; " \ + "done; " \ + "if test -n \"${raucslot}\"; then " \ + " setenv bootargs console=ttyMSM1 root=PARTLABEL=rootfs_${raucpart} rw rootwait ${raucslot}; " \ + " saveenv; " \ + "else " \ + " echo \"No valid RAUC slot found. Resetting tries to 3\"; " \ + " setenv BOOT_A_LEFT 3; " \ + " setenv BOOT_B_LEFT 3; " \ + " saveenv; " \ + " reset; " \ + "fi; " \ + "load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} /boot/fitImage && bootm" + #endif