Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBBA2C433FE for ; Tue, 11 Oct 2022 15:49:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C62584D9F; Tue, 11 Oct 2022 17:48:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ckbWU3ir"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B92CB84F07; Tue, 11 Oct 2022 17:48:19 +0200 (CEST) Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 0255F84F0F for ; Tue, 11 Oct 2022 17:48:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id g13so7393549ile.0 for ; Tue, 11 Oct 2022 08:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=LKtSCkjdqjQAmAE+aw4+DPw0J4mhO7o/SALYbwgKuR0=; b=ckbWU3ir9uNfBAzIugEfdOD9E28/jPiC7YwAlIyAjkP8qOqkDjNb58NNkicfqr3tsc AStDLMgMfwJg+eA3CkUvlvEEzQRivvmTz+tvMQl8gYPlPzbHtmq788BwD3V34VwrFWPA O/C6mfmp1v304u9bFXfxgyGaXRpwhRRj3AahM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=LKtSCkjdqjQAmAE+aw4+DPw0J4mhO7o/SALYbwgKuR0=; b=k00MXO0YwGG8sD7PkRswJuEKW0F3H4yo4+ITSlnKLfolKzamrCLf7ZmjQEhRJXttZg gj+cQJfrPpfmezO8WeAudMruySM/44f2LEF50lmANG9/gDaH0BNeDmT5/dEbhkC+RVKt kvC+CzLoloQHWIS6sL2G5VNVNabhCGLuKPu2o2GPUhaodUHcj1dPsreWg3GiOTZ+O+qH B4BNKveA8o9y/b+SoIetEj2qUGIzT2oxKq+Vvf1E3GID8PHNLr3NQXwhP2tuDn1jOLHr vBHEOyEsU+wM68LAxQwB0nZ7rhUYftLq42mFSZ2cKo+ao/ujJE3Bq7b2jb6Tz5nVMljT StqA== X-Gm-Message-State: ACrzQf3/9QH4XVdaraucCEFmlmTYpxkd+XCRy62S8Jm70Wolv2yZgblS yBeryFfs3mEMAgfQnq5TPIL9+9EZkYGOSg== X-Google-Smtp-Source: AMsMyM4j/b4QsL/1rpEu4fFqS8DiIN6VR7x0AOfoZnSC4jSExuIEt2HOtmdRyC/tQSaOr7JtvBxfJw== X-Received: by 2002:a05:6e02:b27:b0:2fc:2925:ee8f with SMTP id e7-20020a056e020b2700b002fc2925ee8fmr6312092ilu.229.1665503293092; Tue, 11 Oct 2022 08:48:13 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id r12-20020a922a0c000000b002f9b55e7e92sm4988680ile.0.2022.10.11.08.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 08:48:12 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass Subject: [PATCH v2 08/14] sandbox: Support FDT fixups Date: Tue, 11 Oct 2022 09:47:14 -0600 Message-Id: <20221011154720.550320-9-sjg@chromium.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20221011154720.550320-1-sjg@chromium.org> References: <20221011154720.550320-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean Add support for doing device tree fixups in sandbox. This allows us to test that functionality in CI. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/lib/bootm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c index c1742f94de7..28f4a746fb6 100644 --- a/arch/sandbox/lib/bootm.c +++ b/arch/sandbox/lib/bootm.c @@ -50,8 +50,25 @@ int bootz_setup(ulong image, ulong *start, ulong *end) return ret; } +/* Subcommand: PREP */ +static int boot_prep_linux(struct bootm_headers *images) +{ + int ret; + + if (CONFIG_IS_ENABLED(LMB)) { + ret = image_setup_linux(images); + if (ret) + return ret; + } + + return 0; +} + int do_bootm_linux(int flag, int argc, char *argv[], struct bootm_headers *images) { + if (flag & BOOTM_STATE_OS_PREP) + return boot_prep_linux(images); + if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) { bootstage_mark(BOOTSTAGE_ID_RUN_OS); printf("## Transferring control to Linux (at address %08lx)...\n", -- 2.38.0.rc1.362.ged0d419d3c-goog