From patchwork Sat Aug 1 16:08:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1339767 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=dkgrvK1s; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BJq0g4yP3z9sSt for ; Sun, 2 Aug 2020 02:12:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 84901821A3; Sat, 1 Aug 2020 18:09: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="dkgrvK1s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F34081FBD; Sat, 1 Aug 2020 18:08:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,LOTS_OF_MONEY,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (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 A062181EF5 for ; Sat, 1 Aug 2020 18:08:47 +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-oi1-x232.google.com with SMTP id 25so5947917oir.0 for ; Sat, 01 Aug 2020 09:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rbvbb5gI1N4/qQd0w5/YILMsysAgNOAaV0nDc439EuI=; b=dkgrvK1sq+Vgr80gj2xWnnpFUAAkZ90Sd7x5gW9uRob3pXgVNE0sdHedvdlZ0UEcwG Llu4/fkSI2DdoOQQgvnvpYXcWe+INbEGGo5IOTm8zNrnfbcdBZNbHwRP3PG8hlTSIxc9 E/AGhjpj82QlepP0Fg1W0TAkILg0NuPXCqNN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rbvbb5gI1N4/qQd0w5/YILMsysAgNOAaV0nDc439EuI=; b=QkFXPiGxQIraxpo/sLbhgxeMKnNsKhY3+W5hSU+nmup1QYu+7DEXMIWyKN+Rc2GWhK irpyiBACVwJcfq6RScIGceFom59i5na1uRi2auY3l6mPcfNL3ZsXYxLBtkXuvSO4mfSU tJr4vYLhO6f0I9cOnNxtumXdD3jFoBUsDeVf8Coa07n9IUTwhXCT4m8CEkGVzfs2f0ez uBf+dQQlo1X74qkBabslYt5yidtQw/C2U7az/OjNJpi0vWJYnxyyXEPFuLqExj61ImO8 cHCbOWEK0DrK2KZ0qAix3u2NHd6nKeXf+F17m+w8xn280wrG+wYVrbwf2FI0hHUX8P/a anUA== X-Gm-Message-State: AOAM531tmmZnZD0ueoJhO8aLwYR8qK9wxsyKBmbXqpsVZak55ys4RUAr PkiyGeEjcLqfiLgUOYxyuDDBFesk0PANXQ== X-Google-Smtp-Source: ABdhPJzE0UCqaSKgUrcZ1GFxvyX3ORkVoIaqjLcOTRezt5XOa/qziG3PFRHAK9804RrSyzsi3waIkA== X-Received: by 2002:aca:de42:: with SMTP id v63mr7073503oig.21.1596298126270; Sat, 01 Aug 2020 09:08:46 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id a14sm1911907otf.41.2020.08.01.09.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 09:08:45 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass Subject: [PATCH 16/16] cros: Add information about booting Chrome OS on x86 Date: Sat, 1 Aug 2020 10:08:24 -0600 Message-Id: <20200801160824.17486-17-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6-goog In-Reply-To: <20200801160824.17486-1-sjg@chromium.org> References: <20200801160824.17486-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Recent versions of Chrome OS do not have a kernel in the root disk, to save space. With the improvements to the 'zboot' command it is fairly easy to load the kernel from the raw partition. Add instructions on how to do this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- doc/README.chromium | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/README.chromium b/doc/README.chromium index c56545cb7ff..75f2f24042c 100644 --- a/doc/README.chromium +++ b/doc/README.chromium @@ -27,6 +27,9 @@ available: since many of them only support coreboot as the bootloader and have no bare-metal support in U-Boot. For this, use the 'coreboot' target. + - Running U-Boot and booting into a Chrome OS image, but without verified + boot. This can be useful for testing. + U-Boot with Chromium OS verified boot ------------------------------------- @@ -175,6 +178,35 @@ course the above sandbox feature provides a sort of functional test and can detect problems that affect the flow or particular vboot features. +U-Boot without Chromium OS verified boot +---------------------------------------- + +The following script can be used to boot a Chrome OS image on coral: + + # Read the image header and obtain the address of the kernel + # The offset 4f0 is defined by verified boot and may change for other + # Chromebooks + read mmc 2:2 100000 0 80; setexpr loader *001004f0; + + # Get the kernel size and calculate the number of blocks (0x200 bytes each) + setexpr size *00100518; setexpr blocks $size / 200; + + # Read the full kernel and calculate the address of the setup block + read mmc 2:2 100000 80 $blocks; setexpr setup $loader - 1000; + + # Locate the command line + setexpr cmdline $loader - 2000; + + # Start the zboot process with the loaded kernel, setup block and cmdline + zboot start 100000 0 0 0 $setup $cmdline; + + # Load the kernel, fix up the 'setup' block, dump information + zboot load; zboot setup; zboot dump + + # Boot into Chrome OS + zboot go + + TO DO -----