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 C2BAEC00528 for ; Sun, 30 Jul 2023 17:19:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5CF0986A9E; Sun, 30 Jul 2023 19:17:24 +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="YjJ9yhO9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BAB2C86A5E; Sun, 30 Jul 2023 19:17:17 +0200 (CEST) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 BCBFC8699C for ; Sun, 30 Jul 2023 19:17: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-x12c.google.com with SMTP id e9e14a558f8ab-3464c774f23so18984805ab.1 for ; Sun, 30 Jul 2023 10:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690737433; x=1691342233; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=75nUunv4C7dXHVZlRPUDRja76NWHNc7YaJOIvt+9Bt4=; b=YjJ9yhO9NX5K5IhLnr1dU6PE3/BAq0bngVMrsRrwVVL0spAa3LLmCiakxLFfbAuWOf HHMuJEfizgF9+VyyD7ATMru2OrcBH0vobRcJA5vOQL5fLeAhNeByyadHIT/ETuszdp+f HVwZhShKxCD12IkoIzyLzAsJUn9yvOwroZUcw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690737433; x=1691342233; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=75nUunv4C7dXHVZlRPUDRja76NWHNc7YaJOIvt+9Bt4=; b=Ao9wtQoDpgoi0w59NTJR+9rk5u3JFpJ0OTV+BC0tKHcMTSQC0oOjcVA8SaU1/XnYSd O/5izw2as2b55q3K2p/esV9kaKFFvkIqJAKdm21x62UUVbD+y/NkuafmKN2OnEfhkHQa o4lgkyHI3PUq9w1k53fq1eZOnZQJTXQE9kNQA3eckXZtbuor3yzAgIpudazJz3PtTAfO fMTQQkfymeB87YEzS3bSJlTSoppzqe5H32wEb2pkVgxunp2RbA7eTWtEAslRikITvDIL Lbwux3tK1Se7Ngcj6SAbTN9SYJPipLrMYkhRkAOSl1FIYshf22x/OjajghaA9DQJSNit 3vRw== X-Gm-Message-State: ABy/qLZnpQ49G74buwaSjPrHXHY6GfJrAGbviBpnuwaTua/mo0SRswdd 380vip8S/nYr/OHNTPZ9+g3Debzip6pOzJX4udk= X-Google-Smtp-Source: APBJJlEGrtdRffcE1CfuOmoRVVwYs0k0h84FXi5HbkwMmu/SM5cqM3BTegrApJo0qoCYqICwelumsQ== X-Received: by 2002:a05:6e02:1569:b0:347:70af:46ba with SMTP id k9-20020a056e02156900b0034770af46bamr6862297ilu.25.1690737433364; Sun, 30 Jul 2023 10:17:13 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id b24-20020a02a598000000b0041cd626ea0csm2537412jam.147.2023.07.30.10.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 10:17:13 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Alper Nebi Yasak , Simon Glass , Daniel Golle , Heinrich Schuchardt , Mattijs Korpershoek , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Safae Ouajih Subject: [PATCH 00/16] bootstd: Improve ChromiumOS support Date: Sun, 30 Jul 2023 11:16:46 -0600 Message-ID: <20230730171709.917352-1-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog 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.8 at phobos.denx.de X-Virus-Status: Clean The ChromiumOS bootmeth is fairly basic at present. It is able to boot only x86 kernels and contains quite a few hard-coded offsets. This series tidies it up by bringing in some vboot structures and adding support for ARM. It adds a few more features to bootstd, including display of x86 setup information. So far this does not actually boot correctly on any ARM Chromebook: jerry - hangs when booting kernel bob - Bad Linux ARM64 Image magic! with lz4-compressed kernel Further work can address these issues. Simon Glass (16): bootstd: cros: Correct reporting of I/O errors bootstd: cros: Move partition reading into a function bootstd: cros: Bring in some ChromiumOS structures bootstd: cros: Support a kernel on either partition bootstd: cros: Decode some kernel preamble fields bootstd: cros: Simplify setup and cmdline expressions bootstd: Move common zimage functions to bootm.h bootstd: cros: Add docs for the kernel layout bootstd: cros: Add private info for ChromiumOS bootstd: Add private bootmeth data to the bootflow bootstd: cros: Add a function to read info from partition bootstd: cros: Add a function to read a kernel bootstd: cros: Split up reading info and kernel bootstd: Allow display of the x86 setup information bootstd: Add a command to read all files for a bootflow bootstd: cros: Add ARM support arch/x86/include/asm/zimage.h | 37 ---- arch/x86/lib/zimage.c | 8 +- boot/Kconfig | 4 +- boot/bootflow.c | 15 ++ boot/bootm.c | 37 ++++ boot/bootmeth-uclass.c | 10 + boot/bootmeth_cros.c | 363 ++++++++++++++++++++++++++++------ boot/bootmeth_cros.h | 197 ++++++++++++++++++ cmd/bootflow.c | 47 ++++- doc/usage/cmd/bootflow.rst | 139 ++++++++++++- include/bootflow.h | 15 +- include/bootm.h | 47 +++++ include/bootmeth.h | 23 +++ 13 files changed, 836 insertions(+), 106 deletions(-) create mode 100644 boot/bootmeth_cros.h -- 2.41.0.487.g6d72f3e995-goog