From patchwork Mon Mar 20 11:45:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181073 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F6A0C6FD1D for ; Mon, 20 Mar 2023 11:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZVnBhGHP6yKVGaoSb6CM9HyoMC0XoxELRsYEy4tJH2E=; b=ycSwFZ/COSco1m /60MHpWno9nDxU5N9fEv6xP/GVTg2R3pH0NktguGFmAJkiz7MeRjFkkdJru/Q9R7jCwfaEclOQnsD qBe8am9VzqOhJUOePYcFCIdhAknFhsiP9FihfxaVJ9wpRcbIVaf5UPnwTW91kVarCi9ih3hC4z6J5 GPWDJ6Au+RIPD80yJWbWe53T09t4H8JwNfhlK88kjOjgb6E52RbbpYf53FXPNG9c4FdZN4Dahrp4s P1MeZVZWx0lcg4YJieOZ0ntPm/8jgMkmTcgW1SnASbWq2CH0V6hFNh//dl8xBLydADm9DjJsk3LKT oIH2xoyQSVqHK6x9NX4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy0-008rmW-0g; Mon, 20 Mar 2023 11:46:20 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDxw-008rkK-22 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:18 +0000 Received: by mail-wm1-x32e.google.com with SMTP id o32so892059wms.1 for ; Mon, 20 Mar 2023 04:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312774; 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=vAnpEYXiX4sB0kjK50ard/j1uHGPKqU9tsDeuY5SwEM=; b=bgKC3EdedGWe232tCj+P2FJvLxLlm9F6/WfOXxKTD0tcnxxUiGR0HlAfEbcpPqfq4V yKtVc/D8bxZ1eY9LV6uhxy+F342wJjMfkEJGYn1fitjsqpCZEKL6/DrKqRlWKHWIW7u2 JOotTqEZtWnA+XqiwEGFh1czsEbfb/3M5XjQhzJ4+W+ro5xZ2hmKo2rPWd0MNY52DVF5 h1SWUtRkBCtq/VgB4ZCVr6iOGgVyv5tpLJnrmi9kW6T0P87NGMBGvyMx28mlzHpl5MMC RTjr+JegC0jRW1kr3akgx8dYH7Ry4EjMzTtMmK+dJ5GG6V43lQ78va2kpr30TxLFrsaa XjJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312774; 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=vAnpEYXiX4sB0kjK50ard/j1uHGPKqU9tsDeuY5SwEM=; b=n2IoOg98YQgDX4IYes05hPtrgHoUnJMXElyFCSL5qd11q79Erz+AjAXT/IzQtgsER1 ntSr7SslZnAAPSEU+We1Y+/zjQuEsvdkWYj0gST3cS+0UYK1BpqnAi+ebmftB+NbSUil 2lI06XuWNiaUnouGWrlSiGQCQiUstW85WuAfxOVsiSR+vTNGVKJChtCQSSIbFA/2d8ZM K8Tz55WcHtEng6O/u/MfuKiXhLX21VpC4sI6IHBUWGhWy9Z7X/rWhFTjUkfQjBtTY1x0 GLb4fBMg1rYEVnsvnk2GnPSCb0ormTyuNwSx43VUvMR0BgH8utDHVC2vYWBCg1Gy/MdO zM3w== X-Gm-Message-State: AO0yUKUvHA6DBOsPT32aPw0kCBY1R6VIUtwFwxsN9gbmvTNLqk1h4VXv IwXa9HW3UMO+EEdbw3K89KO6GHdn6rlLT+Bx X-Google-Smtp-Source: AK7set/7QCSHfNyKSpsm1PL1IeKm621xYam0ijBVFkKVHBH/cHwASB2oh53U4iuFc+vtFk8eQxm4zw== X-Received: by 2002:a7b:c5d9:0:b0:3ed:8780:f265 with SMTP id n25-20020a7bc5d9000000b003ed8780f265mr9662392wmk.21.1679312774178; Mon, 20 Mar 2023 04:46:14 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:13 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 01/33] doc: boards: amlogic: update documentation for index page Date: Mon, 20 Mar 2023 11:45:37 +0000 Message-Id: <20230320114609.930145-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044616_670346_B1FDEFFC X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Notably we remove all the board names from the feature matrix to reduce table width. SoC types have been added to the titles in individual board documents so readers can still correlate a board against the features. This makes it easier to add new boards to to the document in the future. Signed-off-by: Christian Hewitt --- doc/board/amlogic/index.rst | 137 +++++++++++++++++------------------- 1 file changed, 64 insertions(+), 73 deletions(-) diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index e51b904582..3eb1cf46e0 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -10,74 +10,65 @@ An up-do-date matrix is also available on: http://linux-meson.com This matrix concerns the actual source code version. -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| | S905 | S905X | S912 | A113X | S905X2 | S922X | S905X3 | -| | | S805X | S905D | | S905D2 | A311D | S905D3 | -| | | S905W | | | S905Y2 | | | -+===============================+===========+=================+==============+=============+============+=============+==============+ -| Boards | Odroid-C2 | P212 | Khadas VIM2 | S400 | U200 | Odroid-N2 | SEI610 | -| | Nanopi-K2 | Khadas-VIM | Libretech-PC | JetHub J100 | SEI510 | Khadas-VIM3 | Khadas-VIM3L | -| | P200 | LibreTech-CC v1 | WeTek Core2 | | Radxa Zero | GT-King/Pro | Odroid-C4 | -| | P201 | LibreTech-AC v2 | | | | GSKing-X | Odroid-HC4 | -| | | JetHub J80 | | | | Odroid-Go- | BananaPi-M5 | -| | | | | | | Ultra | | -| | | | | | | Odroid-N2L | | -| | | | | | | BPI-M4 | | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| UART | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Pinctrl/GPIO | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Clock Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| PWM | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Reset Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Infrared Decoder | No | No | No | No | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Ethernet | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Multi-core | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Fuse access | **Yes** | **Yes** |**Yes** |**Yes** |**Yes** |**Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| SPI (FC) | **Yes** | **Yes** | **Yes** | **Yes** |**Yes** | **Yes** | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| SPI (CC) | No | No | No | No | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| I2C | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| USB | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| USB OTG | No | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| eMMC | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| SDCard | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| NAND | No | No | No | No | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| ADC | **Yes** | **Yes** | **Yes** | **Yes** | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| CVBS Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| HDMI Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| CEC | No | No | No | *N/A* | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Thermal Sensor | No | No | No | No | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| LCD/LVDS Output | No | *N/A* | No | No | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| MIPI DSI Output | *N/A* | *N/A* | *N/A* | No | No | No | No | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| SoC (version) information | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| PCIe (+NVMe) | *N/A* | *N/A* | *N/A* | **Yes** | **Yes** | **Yes** | **Yes** | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ -| Watchdog | *N/A* | **Yes** | *N/A* | *N/A* | *N/A* | *N/A* | *N/A* | -+-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+ ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| SoCs | S905 | S805X | S912 | A113X | S905X2 | S922X | S905X3 | +| | | S905X | S905D | | S905D2 | A311D | S905D3 | +| | | S905W | | | S905Y2 | | | ++===================+===========+==========+==========+==========+==========+==========+==========+ +| UART | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Pinctrl/GPIO | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Clock Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| PWM | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Reset Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Infrared Decoder | No | No | No | No | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Ethernet | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Multi-core | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Fuse access | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| SPI (FC) | **Yes** | **Yes** | **Yes** | **Yes** |**Yes** | **Yes** | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| SPI (CC) | No | No | No | No | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| I2C | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| USB | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| USB OTG | No | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| eMMC | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| SDCard | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| NAND | No | No | No | No | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| ADC | **Yes** | **Yes** | **Yes** | **Yes** | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| CVBS Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| HDMI Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| CEC | No | No | No | *N/A* | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Thermal Sensor | No | No | No | No | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| LCD/LVDS Output | No | *N/A* | No | No | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| MIPI DSI Output | *N/A* | *N/A* | *N/A* | No | No | No | No | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| SoC Rev/Info | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| PCIe (+NVMe) | *N/A* | *N/A* | *N/A* | **Yes** | **Yes** | **Yes** | **Yes** | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ +| Watchdog | *N/A* | **Yes** | *N/A* | *N/A* | *N/A* | *N/A* | *N/A* | ++-------------------+-----------+----------+----------+----------+----------+----------+----------+ Boot Documentation ------------------ @@ -85,8 +76,8 @@ Boot Documentation .. toctree:: :maxdepth: 1 - pre-generated-fip boot-flow + pre-generated-fip Board Documentation ------------------- @@ -96,12 +87,12 @@ Board Documentation beelink-gtking beelink-gtkingpro - jethub-j100 jethub-j80 + jethub-j100 + khadas-vim khadas-vim2 - khadas-vim3l khadas-vim3 - khadas-vim + khadas-vim3l libretech-ac libretech-cc nanopi-k2 @@ -115,9 +106,9 @@ Board Documentation p212 q200 radxa-zero - s400 sei510 sei610 + s400 u200 wetek-core2 w400 From patchwork Mon Mar 20 11:45:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181075 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 773C5C7618A for ; Mon, 20 Mar 2023 11:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lFGNoJnK8xVAMsIJ9Kipj3FAc8X7k2NmDJnuRiDVGzo=; b=gmH7U9oDyPvZXj djq07YqTeQil89JyTovfDZs/rgNDRgtQmrfcz8R4cxIPfTfhCMzd4FzxFfKX9f4QQwHdywlV3IgVD fYQARmxnGQQ42fDSRoDN6RmxzemyZ1yeOwU8K8xfE2x+jUnvlLo3hmKdrv4feL6maSff3DAOvvlsW juw7OLE504vcSOYlZjToB0eNxRnKPuid8A6czWsyQzAGnt8u1hkP5u3/HFyojGwJdma533QNj2Sjm EKzjXlFm0j8GoCvsk/zTwuXVM+47CGKlOzgdxVQo6AkHcHtoFpAT2jGmCFRuD9skwAag1z3Jynry7 4k9iPo18bbBwNQN2R5ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy4-008rp5-0G; Mon, 20 Mar 2023 11:46:24 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDxy-008rkn-0Z for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:21 +0000 Received: by mail-wr1-x42a.google.com with SMTP id j24so1127465wrd.0 for ; Mon, 20 Mar 2023 04:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312776; 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=nPc4uGn1eC+DLrvkciSKBLSftxTo1x7LcT00DweY+Rk=; b=LOKHoAN+7jADfDSFnUivXX51V9iDLc/kYrGJ/niZ521QkHBYQR8f0hf8p9jyo/wNgD FhKfORuo3HN0oXrUVYqcfPg+0eGaMVig1YS6goRph8/uk8m5/75CzS9uc/pwdjccDoHZ 61CT/oncEINfI8zMVntrddqBz4U+DwY6GuliQ2NPwI66RNHTkUe7iBnFes2Y+J9C5qLg XjNRXJyii2EC3OHPF+tyT6DDA7/2OP7lHhl/4eG0eLe38H9pYHFplvMr02zuXfaXspQb aIzp+W3bMEd0REgxmRw/4NAJo84mh/+275OEPcsBJj5eYrAo70YHq+nz5M1uDbvcDwUL esQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312776; 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=nPc4uGn1eC+DLrvkciSKBLSftxTo1x7LcT00DweY+Rk=; b=cKWO7QK5mLULlNUAa9g9XpgNn5Op4iKqODvoL9ELfASg3a4JmIbP848rK4mGEkzUYr xO8z1u8usLU/xstVmN5fGfe1uD0AECJ10E51ZEU2Ew3lzQFNsQN8jyxLqkmeTcJyHyi8 LaNb1tynEfFI8bkzFExrVSUJz/4GVFqqUbM/cldh3RCyf1oCRfeWq6KFXu+GZt44t2Ji o5MZcgIIlxXpoqAJH7oCXI5Hlsv6DRf998YbzVZMcNPLfnxqQ6S6Nvw7uj0P+ksLD/ld HJEQHTDWicQtyG+c3q1OSK3oR4cQnQIbtoKqw6elUMd/j9FRo8Pou9zDnSmiLwlk/jON Xucg== X-Gm-Message-State: AO0yUKUZooR5CoaK2LIfnP4Qw2CM78AotT8daHBkb775nIAAwHKGjB3v z3Jj1gWAa8Bfgs76DZPaBDT3PmuFot2KO/oq X-Google-Smtp-Source: AK7set/JBgF54+wzF1FVL7XZ5EK3oQtTlEFg97L4kT0gzBFceQskhiJRfN4ziTe48SIsOWmqGlZxYA== X-Received: by 2002:adf:e4c5:0:b0:2cf:ea38:973 with SMTP id v5-20020adfe4c5000000b002cfea380973mr13505002wrm.43.1679312775754; Mon, 20 Mar 2023 04:46:15 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:15 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 02/33] doc: boards: amlogic: update documentation for boot-flow Date: Mon, 20 Mar 2023 11:45:38 +0000 Message-Id: <20230320114609.930145-3-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044618_218480_5EB37DCA X-CRM114-Status: GOOD ( 21.62 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/boot-flow.rst | 178 ++++++++++++++++---------------- 1 file changed, 90 insertions(+), 88 deletions(-) diff --git a/doc/board/amlogic/boot-flow.rst b/doc/board/amlogic/boot-flow.rst index 2049672b1b..041297c512 100644 --- a/doc/board/amlogic/boot-flow.rst +++ b/doc/board/amlogic/boot-flow.rst @@ -3,132 +3,134 @@ Amlogic SoC Boot Flow ===================== -The Amlogic SoCs have a pre-defined boot sequence in the SoC ROM code. Here are -the possible boot sources of different SoC families supported by U-Boot: +Amlogic SoCs follow a pre-defined boot sequence stored in SoC ROM code. The possible boot +sequences of the different SoC families are: -GX* & AXG family +GX* & AXG Family ---------------- -+----------+--------------------+-------+-------+---------------+---------------+ -| | 1 | 2 | 3 | 4 | 5 | -+==========+====================+=======+=======+===============+===============+ -| S905 | POC=0: SPI NOR | eMMC | NAND | SD Card | USB Device | -| S905X | | | | | | -| S905L | | | | | | -| S905W | | | | | | -| S912 | | | | | | -+----------+--------------------+-------+-------+---------------+---------------+ -| S805X | POC=0: SPI NOR | eMMC | NAND | USB Device | - | -| A113D | | | | | | -| A113X | | | | | | -+----------+--------------------+-------+-------+---------------+---------------+ ++----------+-------------------+---------+---------+---------+---------+ +| | 1 | 2 | 3 | 4 | 5 | ++==========+===================+=========+=========+=========+=========+ +| S905 | POC=0: SPI NOR | eMMC | NAND | SD | USB | +| S905D | | | | | | +| S905L | | | | | | +| S905W | | | | | | +| S905X | | | | | | +| S905Y | | | | | | +| S912 | | | | | | ++----------+-------------------+---------+---------+---------+---------+ +| S805X | POC=0: SPI NOR | eMMC | NAND | USB | - | +| A113D | | | | | | +| A113X | | | | | | ++----------+-------------------+---------+---------+---------+---------+ POC pin: `NAND_CLE` -Some boards provide a button to force USB BOOT which disables the eMMC clock signal -to bypass the eMMC stage. Others have removable eMMC modules; removing the eMMC and -SDCard will allow boot from USB. +Some boards provide a button to force USB boot by disabling the eMMC clock signal and +allowing the eMMC step to be bypassed. Others have removable eMMC modules; removing an +eMMC module and SD card will allow boot from USB. -An exception is the lafrite board (aml-s805x-xx) which has no SDCard slot and boots -from SPI. The only ways to boot the lafrite board from USB are: +An exception is the Libre Computer AML-S805X-XX (LaFrite) board which has no SD card +slot and boots from SPI. Booting a LaFrite board from USB requires either: - - Erase the first sectors of SPI NOR flash - - Insert an HDMI boot plug forcing boot over USB + - Erasing the first sectors of SPI NOR flash + - Inserting an HDMI boot plug forcing boot over USB -The VIM1 and initial VIM2 boards provide a test point on the eMMC signals to block -the storage from answering and continue to the next boot step. +The VIM1 and initial VIM2 boards provide a test point on the eMMC signals to block the +storage from answering, allowing boot to continue with the next boot step. -The USB Device boot uses the first USB interface. On some boards this port is only -available on an USB-A type connector and needs an special Type-A to Type-A cable to -communicate with the BootROM. +USB boot uses the first USB interface. On some boards this port is only available on a +USB-A type connector and requires a special Type-A to Type-A cable to communicate with +the BootROM. -G12* & SM1 family +G12* & SM1 Family ----------------- -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| POC0 | POC1 | POC2 | 1 | 2 | 3 | 4 | -+=======+=======+=======+===============+===============+===============+===============+ -| 0 | 0 | 0 | USB Device | SPI NOR | NAND/eMMC | SDCard | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 0 | 0 | 1 | USB Device | NAND/eMMC | SDCard | - | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 0 | 1 | 0 | SPI NOR | NAND/eMMC | SDCard | USB Device | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 0 | 1 | 1 | SPI NAND | NAND/eMMC | USB Device | - | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 1 | 0 | 0 | USB Device | SPI NOR | NAND/eMMC | SDCard | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 1 | 0 | 1 | USB Device | NAND/eMMC | SDCard | - | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 1 | 1 | 0 | SPI NOR | NAND/eMMC | SDCard | USB Device | -+-------+-------+-------+---------------+---------------+---------------+---------------+ -| 1 | 1 | 1 | NAND/eMMC | SDCard | USB Device | - | -+-------+-------+-------+---------------+---------------+---------------+---------------+ - -The last option (1/1/1) is the normal default seen on production devices. ++-------+-------+-------+------------+------------+------------+-----------+ +| POC0 | POC1 | POC2 | 1 | 2 | 3 | 4 | ++=======+=======+=======+============+============+============+===========+ +| 0 | 0 | 0 | USB | SPI-NOR | NAND/eMMC | SD | ++-------+-------+-------+------------+------------+-------------+----------+ +| 0 | 0 | 1 | USB | NAND/eMMC | SD | - | ++-------+-------+-------+------------+------------+------------+-----------+ +| 0 | 1 | 0 | SPI-NOR | NAND/eMMC | SD | USB | ++-------+-------+-------+------------+------------+------------+-----------+ +| 0 | 1 | 1 | SPI-NAND | NAND/eMMC | USB | - | ++-------+-------+-------+------------+------------+------------+-----------+ +| 1 | 0 | 0 | USB | SPI-NOR | NAND/eMMC | SD | ++-------+-------+-------+------------+------------+------------+-----------+ +| 1 | 0 | 1 | USB | NAND/eMMC | SD | - | ++-------+-------+-------+------------+------------+------------+-----------+ +| 1 | 1 | 0 | SPI-NOR | NAND/eMMC | SD | USB | ++-------+-------+-------+------------+------------+------------+-----------+ +| 1 | 1 | 1 | NAND/eMMC | SD | USB | - | ++-------+-------+-------+------------+------------+------------+-----------+ + +The last option (1/1/1) is the normal default seen on production devices: * POC0 pin: `BOOT_4` (0 and all other 1 means SPI NAND boot first) * POC1 pin: `BOOT_5` (0 and all other 1 means USB Device boot first * POC2 pin: `BOOT_6` (0 and all other 1 means SPI NOR boot first) Most boards provide a button to force USB BOOT which lowers `BOOT_5` to 0. Some boards -provide a test point on the eMMC or SPI NOR clock signals to block the storage from -answering and continue to the next boot step. +provide a test point on eMMC or SPI NOR clock signals to block storage from answering +and allowing boot to continue from the next boot step. -The Khadas VIM3/3L boards embed a microcontroller which sets POC signals according -to its configuration or a specific key press sequence to either boot from SPI NOR -or eMMC then SDCard, or boot as an USB Device. +The Khadas VIM3/3L boards embed a microcontroller which sets POC signals according to +its configuration or a specific key press sequence to either boot from SPI NOR or eMMC +then SD card, or boot as a USB device. -The Odroid N2/N2+ has a hardware switch to select between SPI NOR or eMMC boot. +The Odroid N2/N2+ has a hardware switch to select between SPI NOR or eMMC boot. The +Odroid HC4 has a button to disable SPI-NOR allowing boot from SD card. Boot Modes ---------- - * SDCard + * SD -The BootROM fetches the first SDCard sectors in one sequence, then checks the content -of the data. The BootROM expects to find the FIP binary in sector 1, 512 bytes offset -from the start. +The BootROM fetches the first SD card sectors in one sequence then checks the content of +the data. It expects to find the FIP binary in sector 1, 512 bytes offset from the start. * eMMC -The BootROM fetches the first sectors in one sequence, first on the main partition, -and then on the Boot0 followed by Boot1 HW partitions. After each read, the BootROM -checks the data and looks to the next partition if it fails. The BootROM expects to -find the FIP binary in sector 1, 512 bytes offset from the start. +The BootROM fetches the first sectors of the main partition in one sequence then checks +the content of the data. On GXL and newer boards it expects to find the FIP binary in +sector 1, 512 bytes offset from the start. If not found it checks the boot0 partition, +then the boot1 partition. On GXBB it expects to find the FIP binary at an offset that +conflicts with MBR partition tables, but this has been worked around (thus avoiding the +need for a partition scheme that relocates the MBR). For a more detailed explanation +please see: https://github.com/LibreELEC/amlogic-boot-fip/pull/8 - * SPI NOR + * SPI-NOR -The BootROM fetches the first SPI NOR sectors in one sequence, then checks the content -of the data. The BootROM expects to find the FIP binary in sector 1, 512 bytes offset -from the start. +The BootROM fetches the first SPI NOR sectors in one sequence then checks the content of +the data. It expects to find the FIP binary in sector 1, 512 bytes offset from the start. - * NAND & SPI NAND + * NAND & SPI-NAND These modes are rarely used in open platforms and no details are available. - * USB Device + * USB -The BootROM sets the USB Gadget interface to serve a custom USB protocol with the -USB ID 1b8e:c003. The Amlogic `update` utility is designed to use this protocol. It -is also implemented in the Amlogic Vendor U-Boot. +The BootROM supports a custom USB protocol and sets the USB Gadget interface to use the +USB ID 1b8e:c003. The Amlogic `update` utility uses this protocol. It is also supported +in the Amlogic vendor U-Boot sources. -The open-source `pyamlboot` utility https://github.com/superna9999/pyamlboot also -implements this protocol and can load U-Boot in memory in order to start the SoC -without any attached storage or to recover from a failed/incorrect image flash. +The `pyamlboot` utility https://github.com/superna9999/pyamlboot is open-source and also +implements the USB protocol. It can load U-Boot into memory to start the SoC without the +storage being attached, or to recover the device from a failed/incorrect image flash. -HDMI Recovery -------------- +HDMI Recovery Dongle +-------------------- -The BootROM also briefly reads 8 bytes at address I2C 0x52 offset 0xf8 (248) on the -HDMI DDC bus. If the content is `boot@USB` it will force USB boot mode. If the content -is `boot@SDC` it will force SDCard boot mode. +The BootROM also reads 8 bytes at address I2C 0x52 offset 0xf8 (248) on the HDMI DDC bus +during startup. The content `boot@USB` forces USB boot. The content `boot@SDC` forces SD +card boot. The content `boot@SPI` forces SPI-NOT boot. If an SD card or USB device does +not enumerate the BootROM continues with the normal boot sequence. -If USB Device doesn't enumerate or SD Card boot step doesn't work, the BootROM will -continue with the normal boot sequence. +HDMI boot dongles can be created by connecting a 256bytes EEPROM set to answer on address +0x52, with `boot@USB` or `boot@SDC` or `boot@SPI` programmed at offset 0xf8 (248). -Special boot dongles can be built by connecting a 256bytes EEPROM set to answer on -address 0x52, and program `boot@USB` or `boot@SDC` at offset 0xf8 (248). - -Note: If the SoC is booted with USB Device forced at first step, it will keep the boot -order on warm reboot. Only cold reboot (power removed) will reset the boot order. +If the SoC is booted with USB Device forced at first step, it will retain the forced boot +order on warm reboot. Only cold reboot (removing power) will reset the boot order. From patchwork Mon Mar 20 11:45:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181074 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C89BC7618D for ; Mon, 20 Mar 2023 11:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GLd+TC1G3WxJsWpMXAqJ22k5XsYdy58zHaIaHkrN6vQ=; b=vC2D8FPRqr/LoC qESwE1UMWHiCPu1L6ep1c2PaO3jzgEOrxaXCMzBqHBxMh2Y1x5VAUQWT60EhG4DJdhXd2maeaH38w /8rISSle9b2RQ86rDpNHknzyNfFnSk+PNHGQdoYgpJ51R73whnbHPWiWKqEvGuRfR/4cJl7yC7bDl usAukpNKrB44Y/kilmmj1vNDnyt2KONQVQpWjmgwh1K8P1jaZBagy9m1SoWRmoGr89IX9LhjI3n8B NFSJTCiz0dxKf6LmIVhSSdh62BOI32ZQ2ApadmC6yeHkRQ8VHBPxEYvedd4Pj6Z1UXT7fpg0a/r5M xvs9wcw8FMDqsowI25oQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy1-008rnY-21; Mon, 20 Mar 2023 11:46:21 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDxx-008rjz-3D for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:19 +0000 Received: by mail-wr1-x431.google.com with SMTP id j24so1127557wrd.0 for ; Mon, 20 Mar 2023 04:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312777; 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=PtLZz3+pquEcU8HzOf+k36RUHv2uWugpdgCBCali/z8=; b=TdYNIQY65NwCkccTwR/6PQbHYtoBny7zsJjU8rkn/98eqEW7+s5nptS8uR4t+9OZD8 YWB6hacVStLjykFDMxWj1uuQ03zV158F5ubtYFm6P3yjaPrLQiuTQdjc1NecAM60oL3Z DVeE/D6/DuV5g/bNmGCClScVF+EhYZ22QOc2AbxAa1EL4ktRjzTWRNO9gKvKisLyCFgg ovhaNBn3dUZrE22FfFy/fxUM13k/LmWy/6OsyFsTSh40djh0OP24Na+jK5HFtrYTyqXQ NF1lYXw2FRcXaywj6BN/Y9XNAofp2kPbKVDp+64Z0QeXZy+y4k59GDHibHD9GvjC9aas juEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312777; 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=PtLZz3+pquEcU8HzOf+k36RUHv2uWugpdgCBCali/z8=; b=QVKdcojVDAssSsGdIEhnN80SGz2X8ceRhSFR4LDQ9sNbxyn42TvJ/YZKp5iLJ/XPtn AdpU6fDf1BxjJTNaofVanFt2CHo1uUVktqSyRo+5zlfloqitemLj4Zx1Wq6gHO7pvwgj cNyOvKox4Bn8taPmHY4c+AGRxuEXaJEeN6FVBRXMkiIJn3Cs3PguvreC9OGjB+XRXwuF vV8LVEBlojitRNBmq/pdxUJ8A/Thfl6k6ndVSk4REdZ/GXulLP7XkuBN57T4G5zpxr2a PiNVyng4e0Ft9ln8Kf0gQMTAPN+vlH3CANAjtK4hZjwCxoebMcKEGGRCLJ3qJKniQ/uj uvfQ== X-Gm-Message-State: AO0yUKUh54ZuiC8+WiXAvj0GVKxyiF5Dv2m3jRTvl3/Ml9fc/Pdv0mBE twRe51y6qnR9zLOUIauYs3Y= X-Google-Smtp-Source: AK7set/r8yj2UwEc/KtkoH4Brxyb0Au/D6PQZQDvyeue2mv9RpUje8T/bdM0fSF2m95eLKp0S4VJxA== X-Received: by 2002:adf:f84f:0:b0:2cf:e645:aa60 with SMTP id d15-20020adff84f000000b002cfe645aa60mr13349409wrq.19.1679312777472; Mon, 20 Mar 2023 04:46:17 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:17 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 03/33] doc: boards: amlogic: update documentation for pre-generated-fip's Date: Mon, 20 Mar 2023 11:45:39 +0000 Message-Id: <20230320114609.930145-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044618_068233_D7DF293F X-CRM114-Status: GOOD ( 16.29 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/pre-generated-fip.rst | 138 +++++++++++++++--------- 1 file changed, 88 insertions(+), 50 deletions(-) diff --git a/doc/board/amlogic/pre-generated-fip.rst b/doc/board/amlogic/pre-generated-fip.rst index c63ea616b8..6a43d776d4 100644 --- a/doc/board/amlogic/pre-generated-fip.rst +++ b/doc/board/amlogic/pre-generated-fip.rst @@ -1,24 +1,57 @@ .. SPDX-License-Identifier: GPL-2.0+ -Pre-Generated FIP file set -========================== +Pre-Generated FIP File Repo +=========================== -The Amlogic ARMv8 based SoCs uses a vendor variant of the Trusted Firmware-A -boot architecture. +Pre-built Flattened Image Package (FIP) sources and Amlogic signing binaries for many +commercially available boards and some Android STB devices are collected for use with +distro build-systems here: https://github.com/LibreELEC/amlogic-boot-fip -You can find documentation on the Trusted Firmware-A architecture on: https://www.trustedfirmware.org/projects/tf-a/ +Using the pre-built FIP sources to sign U-Boot is simple, e.g. for LePotato: -The Trusted Firmware-A uses the following boot elements (simplified): +.. code-block:: bash + + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh lepotato /path/to/u-boot/u-boot.bin my-output-dir + +Then write U-Boot to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 + +Files Included +-------------- + +Amlogic ARMv8 SoCs use a vendor modified variant of the ARM Trusted Firmware-A boot +architecture. See documentation here: https://www.trustedfirmware.org/projects/tf-a/ + +Trusted Firmware-A uses the following boot elements (simplified): + +- BL1: First boot step implemented in ROM on Amlogic SoCs + +- BL2: Second boot step used to initialize the SoC main clocks & DDR interface. BL21 + and ACS board-specific binaries must be "inserted" into the BL2 binary before signing + and packaging in order to be flashed on the platform + +- BL30: Amlogic Secure Co-Processor (SCP) firmware used to handle all system management + operations (DVFS, suspend/resume, ..) + +- BL301: Amlogic Secure Co-Processor (SCP) board-specific firmware "plug-in" to handle + custom DVFS & suspend-resume parameters -- BL1: First boot step, implemented in ROM on Amlogic SoCs -- BL2: Second boot step, used to initialize the SoC main clocks & DDR interface. The BL21 and ACS board-specific binaries are "inserted" in the BL32 binary before signing/packaging in order to be flashed on the platform. -- BL30: Amlogic Secure Co-Processor (SCP) firmware used to handle all the system management operations (DVFS, suspend/resume, ...) -- BL301: Amlogic Secure Co-Processor (SCP) board-specific firmware "plug-in" to handle custom DVFS & suspend-resume parameters - BL31: Initializes the interrupt controller and the system management interface (PSCI) -- BL32 (Optional): Is the Trusted Environment Execution (TEE) Operating System to run secure Trusted Apps, e.g. OP-TEE + +- BL32 (Optional): Is the Trusted Environment Execution (TEE) Operating System used to + run secure Trusted Apps, e.g. OP-TEE + - BL33: Is the last non-secure step, usually U-Boot which loads Linux -Amlogic provides in binary form: +Amlogic sources provide the following binaries: - bl2.bin - bl30.bin @@ -26,10 +59,50 @@ Amlogic provides in binary form: - bl31.img - bl32.bin -And for lastest SoCs, Amlogic also provides the DDR drivers used by the BL2 binary. +For G12A/B and SM1 Amlogic also provides DDR drivers used by the BL2 binary: + +- ddr4_1d.fw +- ddr4_2d.fw +- ddr3_1d.fw +- piei.fw +- lpddr4_1d.fw +- lpddr4_2d.fw +- diag_lpddr4.fw +- aml_ddr.fw + +The following files are generated from the Amlogic U-Boot fork: + +- acs.bin: Contains the PLL & DDR parameters for the board +- bl301.bin: Contains the DVFS & suspend-resume handling code for the board +- bl33.bin: U-boot binary image + +The acs.bin and bl301.bin files use U-Boot GPL-2.0+ headers and U-Boot build system and +are thus considered to be issued from GPL-2.0+ source code. + +Amlogic alo provides pre-compiled x86_64 and Python2 binaries: -The licence of these files wasn't clear until recently, the currently Amlogic distribution licence -is the following: +- aml_encrypt_gxb +- aml_encrypt_gxl +- aml_encrypt_g12a +- aml_encrypt_g12b +- acs_tool.pyc + +The repo replaces the pre-compiled acs_tool.pyc with a Python3 acs_tool.py that can be +used with modern build hosts. + +The repo also provides the following files used with GXBB boards: + +- bl1.bin.hardkernel +- aml_chksum + +The repo also supports the open-source 'gxlimg' signing tool that can be used to sign +U-Boot binaries for GXL/GXM/G12A/G12B/SM1 boards: https://github.com/repk/gxlimg + +Licensing +--------- + +The licence of Amlogic provided binaries was not historically clear but has now been +clarified. The current Amlogic distribution licence is below: .. code-block:: C @@ -56,38 +129,3 @@ is the following: // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The following files are generated from the Amlogic U-Boot fork: - -- acs.bin: contains the PLL & DDR parameters for the board -- bl301.bin: contains the DVFS & suspend-resume handling code for the board -- bl33.bin: U-boot binary image - -The acs.bin & bl301.bin uses the U-Boot GPL-2.0+ headers & build systems, thus those -are considered issued from GPL-2.0+ source code. - -The tools used to sign & package those binary files are delivered in binary format -for Intel x86-64 and Python 2.x only. - -A collection of pre-built with the corresponding Amlogic binaries for the common -commercially available boards were collected in the https://github.com/LibreELEC/amlogic-boot-fip -repository. - -Using this collection for a commercially available board is very easy. - -Here considering the Libre Computer AML-S905X-CC, which codename is `lepotato`: - -.. code-block:: bash - - $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 - $ cd amlogic-boot-fip - $ mkdir my-output-dir - $ ./build-fip.sh lepotato /path/to/u-boot/u-boot.bin my-output-dir - -and then write the image to SD with: - -.. code-block:: bash - - $ DEV=/dev/your_sd_device - $ dd if=my-output-dir/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=my-output-dir/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 From patchwork Mon Mar 20 11:45:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181076 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4ACDC7618E for ; Mon, 20 Mar 2023 11:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n13PPSKP6MzwRNY8kMeHC3t7QwYHfQOQM1a8XFfw6OY=; b=1N7pl+v6wkTQsM H9xUKk5b6rtLjKiXo/y6P/5J2CqvTtOI/Wl7ECMy14L92IMUFIgRJFmutiWEI+8pY0TPRInofT1lM poYeYaQR7ub4Hu1FvhtQNCsyhWN8M3cd2OzfBseLO5UT8w4YMd5eP2XzT+5dgAXLFUcAjvor0aGqP 0jmWw18PJWth//vt9xZmHWFU9WFye/iB1qBHnsBm4WchrSOF2o5o9eruOD7sv3NSP6yjSak/ECQLh joXaYlPimp7+TLVceA4dEW2k8rg5B55SOPCIJipYEwT18JTjgVgO5iRO+WxBZeBUN8hyEGVr1Zraa 0i9WXdRpZrjTeQKHuCHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy4-008rpQ-1X; Mon, 20 Mar 2023 11:46:24 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy0-008rmM-2n for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:22 +0000 Received: by mail-wr1-x432.google.com with SMTP id i9so10045494wrp.3 for ; Mon, 20 Mar 2023 04:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312779; 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=MGszLQhz+ukONY+m+KL8QiBbUNTXcMZFNhCjnvm98bU=; b=IpSqyp45p4SuKKwfu+deQAjdPLOjQLKpvHwxrRwyXQqYImtcX05eLeHlRkMv4RRnxh 8SsyP8f5itE+Q1skxtI2NeGKzuFCkPGx2qYrm0tPdNIul8jeABwcuhJgWFpz6FjbGs8r D+VJEJE0CFOHPrCIJQB8MXP920y7LnZwp2bXNgeL+fAe74bhMZDCXuoaK3QDu8h+grtG BtIj9zXVD9aKL3HZWmSex8mAb7f9lX72uvVWfhHAsBVSMa5P/Ooyu8eAWBUTNlD0K5pG plGSNfV/fb428Tn00e46+1CrsOFyqa2ZxmHZT+y4RKlLLOn6hQT4yEksFfLjjCG/8bmS PONQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312779; 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=MGszLQhz+ukONY+m+KL8QiBbUNTXcMZFNhCjnvm98bU=; b=5iSq9KvRSF9bpopjUtthGWPiyTVYnNzHjLB+DvZixB328/DHIK4oJgKbqcZpQ9iqEz nVKfIuYpYI1QJih5C3/eSm8T9zHdB2ClN8v7oLTsy/qQH5n9G3OIKvkbLDAClUs2OHOi OV5MxuTEAVt3A/9TbHVfAVNocoTzHGwQysdjF3idTyisscRBd3kTkC5f/v/E5WpYL3VY z751Lbsf3CH5mgoaq532fM8+stG4vJarwKVVp3fkaasioh28ZdyKkhLtSkA5MBuZb5Cv yAldAzHhpS8ldcVyA6Do24ZjszAUHFqrkSeCEdO/2N2BqhqpxTU/DIA1D4MhsvBSuDyg EMSg== X-Gm-Message-State: AO0yUKUGce7ooYf7/R+cqUiM27sIBZfnxKQ2xNKmbZU4oAjFMVl3Ef4z iUQC/DamEH48n0h+HkfzDvQ= X-Google-Smtp-Source: AK7set/Pv/HjZIkjOGA6A5BlLOPsZC3xmAKm0J6uuxgSz5ysSz6QLeLWAGiN4XTV3dbvkWIPKpTsSQ== X-Received: by 2002:a5d:4e11:0:b0:2ce:ad17:9242 with SMTP id p17-20020a5d4e11000000b002cead179242mr12157170wrt.7.1679312778992; Mon, 20 Mar 2023 04:46:18 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:18 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 04/33] doc: boards: amlogic: update documentation for Beelink GT-King Date: Mon, 20 Mar 2023 11:45:40 +0000 Message-Id: <20230320114609.930145-5-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044620_905510_EEEF725B X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/beelink-gtking.rst | 120 +++++++++++++-------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/doc/board/amlogic/beelink-gtking.rst b/doc/board/amlogic/beelink-gtking.rst index 2fb50c5f7b..342887d584 100644 --- a/doc/board/amlogic/beelink-gtking.rst +++ b/doc/board/amlogic/beelink-gtking.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Beelink GT-King -========================== +U-Boot for Beelink GT-King (S922X) +================================== -The Shenzen AZW (Beelink) GT-King is based on the Amlogic W400 reference -board with an S922X-H chip. +The Shenzen AZW (Beelink) GT-King is based on the Amlogic W400 reference board with an +S922X-H chip and the following specifications: - 4GB LPDDR4 RAM - 64GB eMMC storage @@ -18,10 +18,10 @@ board with an S922X-H chip. - IR receiver - 1x micro SD card slot -Beelink do not provide public schematics, but have been willing -to share them with known distro developers on request. +Beelink do not provide public schematics, but have been willing to share them with known +distro developers to assist with development. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -30,21 +30,21 @@ U-Boot compilation $ make beelink-gtking_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -Amlogic does not provide sources for the firmware and for tools needed -to create the bootloader image. Beelink have provided the Amlogic "SDK" -in their forums, but the u-boot sources included result in 2GB RAM being -detected. The following FIPs were generated with newer private sources -and give correct (4GB) RAM detection: - -https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh beelink-s922x /path/to/u-boot/u-boot.bin my-output-dir -NB: Beelink use a common board config for GT-King, GT-King Pro and the -GS-King-X model, hence the "beelink-s922x" name. +U-Boot Manual Signing +--------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `beelink-s922x` +Beelink released an Amlogic "SDK" dump in their forums, but the U-Boot sources included +result in 2GB RAM detected. The following FIPs were generated with newer sources and +detect 4GB RAM: https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x .. code-block:: bash @@ -61,57 +61,57 @@ Go back to the mainline U-Boot source tree then: $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ fip/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ fip/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ fip/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ fip/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ fip/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ fip/aml_encrypt_g12b --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181077 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8261AC6FD1D for ; Mon, 20 Mar 2023 11:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1Y507Ow6M1afuD3NVI8NgcK9VnLZNkDD9fTaaZ6FhME=; b=Eoy6CzaZf6Esyr b1ZhaXmWgFNkelwsp/IMo7HsBhkZG2Q4zxR+/Zguco27BspF8WtajR1n5xqsj10lhldb3G/zZkIUi +0IuILEZbmoQJSlFdMx20v90xn/zv0X8EoZMeXrk1jx6SbfDQ+7QGMYSq7WZ0e5jYogxNJTVBeW37 I0X/1AUaA+bOxQ1GcADDjBZNoL2EG72JAJG254Eref5W2JDWMqes/9r1TB/kkXjwv+MqiGyRHGfF+ Tgy0PIC5sfs5SDKcw6vXn+9N9VV3UN5fPZ/bV6KzUQtD1T5QULi1/bQ6cZC0aYZRyqmEba9N45piF Hmtd2dFRqUCc80NwjisQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy5-008rqj-2w; Mon, 20 Mar 2023 11:46:25 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy2-008rnC-32 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:24 +0000 Received: by mail-wr1-x42d.google.com with SMTP id y14so10041966wrq.4 for ; Mon, 20 Mar 2023 04:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312780; 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=pIelX5cDcYvZ2BR37oAOKw+1iFz4JqaD5QMst5RKypY=; b=csi7G6B4XNOqrJLgNY/qXrq4OJhKM37D1M8nJAtim+1Dvo12kebIqRDbpQ5tTxzHbt NwvT1pB5gIUmEojxd38is+SAetgOtDW/5yH82hwMxeLmfbwbaG5ugR43xtq28rU7vFAu 7Dj/9WlpdTK0zXU/J2NHzBicmoGQB56qq1r0QPM7gqS3ZvKrW0LMgL1ZqZ91TZS51lSK ZvsRh0zSGxvIR1k6WsWx2D2rjjqgJLHUOaAU/Rg8DBfZZsqkTfB1DIZ8lFbAO5/IxEAe WUDuiBVSDLAaovprpGlNKXP8rqPgm47YVDDZ+PbJOKkyBdKFvlsVpOzF7mKx1jjusc0V tWdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312780; 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=pIelX5cDcYvZ2BR37oAOKw+1iFz4JqaD5QMst5RKypY=; b=cL5CcvSbssZV9Tldf1aTktgIML3F3iowqXJNvLhdtnLbH4qm60c5c8PX2yBQlb9JQM M9Gmjtfn9lqF1+5sXdN8sTZQFY7Q4OMS5j84OQtEW0AMbLwARO1NWTsikj0FtAQGiQm6 LppjAziv8Lg6MczoDqGdZb/fUxmiwz/ZoO287LbLHCFj1IHkXFvqKmccDbwOAkmR+0M1 wXwKJeiluGQl8tr5xY1PCpplFGh+7SnduZWW80Ih+nnsxw5mJymcCN2K3kRwpRO3jJM8 UrzO0vezz99+ZlQ/2vlcBOz4uAhWqmJWPLYlT4QK4er366dLvDJDaY2eODwpqa/nQ3ag A+7A== X-Gm-Message-State: AO0yUKWOXCUzLgusVlLYPbT6qHrmKJNBDVcYqmaL/vr/vvt9raZQLsDA X9rJP1lIPib6UltfucL1dCM= X-Google-Smtp-Source: AK7set//RQvc4FWDU3FKp/4vjc+w491miWR48rdgjvoZ3MjlRziiN6o7IWSfHuxKW5n7x4A96wF+Lw== X-Received: by 2002:a5d:4a4c:0:b0:2d0:cf21:a40e with SMTP id v12-20020a5d4a4c000000b002d0cf21a40emr13143208wrs.30.1679312780612; Mon, 20 Mar 2023 04:46:20 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:20 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 05/33] doc: boards: amlogic: update documentation for Beelink GT-King Pro Date: Mon, 20 Mar 2023 11:45:41 +0000 Message-Id: <20230320114609.930145-6-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044622_976144_C8B3CAAC X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/beelink-gtkingpro.rst | 120 ++++++++++++------------ 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/doc/board/amlogic/beelink-gtkingpro.rst b/doc/board/amlogic/beelink-gtkingpro.rst index 07bb04bb36..541938b103 100644 --- a/doc/board/amlogic/beelink-gtkingpro.rst +++ b/doc/board/amlogic/beelink-gtkingpro.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Beelink GT-King Pro -============================== +U-Boot for Beelink GT-King Pro (S922X) +====================================== -The Shenzen AZW (Beelink) GT-King Pro is based on the Amlogic W400 reference -board with an S922X-H chip. +The Shenzen AZW (Beelink) GT-King Pro is based on the Amlogic W400 reference board with +an S922X-H chip and the following specifications: - 4GB LPDDR4 RAM - 64GB eMMC storage @@ -19,10 +19,10 @@ board with an S922X-H chip. - 1x SD card slot - 1x Power on/off button -Beelink do not provide public schematics, but have been willing -to share them with known distro developers on request. +Beelink do not provide public schematics, but have been willing to share them with known +distro developers to assist with development. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -31,21 +31,21 @@ U-Boot compilation $ make beelink-gtkingpro_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -Amlogic does not provide sources for the firmware and for tools needed -to create the bootloader image. Beelink have provided the Amlogic "SDK" -in their forums, but the u-boot sources included result in 2GB RAM being -detected. The following FIPs were generated with newer private sources -and give correct (4GB) RAM detection: - -https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh beelink-s922x /path/to/u-boot/u-boot.bin my-output-dir -NB: Beelink use a common board config for GT-King, GT-King Pro and the -GS-King-X model, hence the "beelink-s922x" name. +U-Boot Manual Signing +--------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `beelink-s922x` +Beelink released an Amlogic "SDK" dump in their forums, but the U-Boot sources included +result in 2GB RAM detected. The following FIPs were generated with newer sources and +detect 4GB RAM: https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x .. code-block:: bash @@ -62,57 +62,57 @@ Go back to the mainline U-Boot source tree then: $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ fip/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ fip/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ fip/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ fip/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ fip/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ fip/aml_encrypt_g12b --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181078 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B170C7618D for ; Mon, 20 Mar 2023 11:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vdeyuFJFjBIW1M0YM14p1khSBpCMzI1s1Ck3S/FV1hE=; b=JU1iZ4LeZ8eOcs k0H3c9JBoNxvdUdkUTXzVP8VnKr9liYA3AFq8CIr2wWkfZDXOIJgZiKPcVX7tDd0nqhDJAD4EP3Fa 72IlpY3posqYersyIUewta0tLghcWiF1UjgHMrF1c5mKeHsM6a6VVanueLtQy9Az2GxeJlkQW9q2Y /6CwIsjhpl3XUrqxjWH+NvOzXgH4vMofKcJAsknPmvoKDp6nlBk0u5a47A8fX7asAlbpaHqCSDbmd lhWxhJmZ1naDgHDZYxYBg4t/YTYSZnN+h2vdkPDGzbXXaCdrCExApMcSCIOlnXlFpAmAlUMyn2NWm 1zupycrt2e8O2B+RzLYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy7-008rsA-1K; Mon, 20 Mar 2023 11:46:27 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy4-008ro6-1P for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:26 +0000 Received: by mail-wr1-x436.google.com with SMTP id v1so3932885wrv.1 for ; Mon, 20 Mar 2023 04:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312782; 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=wPKSZKQAkxfQwjhbzG6pHQxSwGjcBFMBCf2hvSJPr+s=; b=dVf0vTeyD08DnCj6xy18uRRWYK5s8/g/T062gOM/YBcifxWIDDFZ2ydKffKFTfI0n4 JDFmHIZ8dP9IvZnHddTIrx6Q922DmI4hLZc0/pNrwc91uYsa+i3DuLose53fq1rav09h YHny1QRoRQ1ZSJMtWyXRTlmU+QsOnyBSQIdDdMcTfPCaJw0uS9Nh8jXbGmz56d7hdCRL LA/MQWzXLpcJsBsiumQYk90TrIbd5t4f9xhzPNj8KhnPygKppjQ5pKpIEeLdSyeso9ib NRbJ69VqtNTL/k8Y1uKXnewR5rq7ddjtgYGGjuhQq4wFH5qxNsm0swKtsQ5H6JEFp8JO VbQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312782; 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=wPKSZKQAkxfQwjhbzG6pHQxSwGjcBFMBCf2hvSJPr+s=; b=Zo5/aUUV8tPx6WA4zgGS+78AoCWMNODZxkmEaS8Pyt2OQ8gg2rzUyL3zFnSSLpntX9 jxrkH02WPgNoGPGzosdCKvYJEALuSZSM5GORAsxadClTdyXFWupem4Lt2nkLyKmYzTpZ EyRGlMahf/R/459VFSZzTahA1Pv6zgdSKmTrfbO4JtiApxrbw4GPYmWmhLQugvm2fOjZ qO6SCRu7t2qrWlgaliyAfpZ7t05pXJTYe62zLHDgth1FSTjdHuX/8OOn7rGxEFeS2KIC oZl4WaHZOXhpsMLURXhJcOiBaEpo9kYTukYrfdKbFvSuT1ltjNtA6U43sPiqGTFQA9VT uIrA== X-Gm-Message-State: AO0yUKXT1FQsrY9NugFiVEKNGxjU4QXiOWkE8H8OuZePPfaKcw6RhiXJ VoGJ7c5cHgdP71dl1eDVl0M= X-Google-Smtp-Source: AK7set9HS+qeowDa72fVoskrtqSi5s4lw8RXvx/KjDroYTmv1mDVN6riS6h3GIm2mgKZjg3YM00Nbw== X-Received: by 2002:a5d:67c4:0:b0:2d1:5b75:28f0 with SMTP id n4-20020a5d67c4000000b002d15b7528f0mr13156361wrw.39.1679312782154; Mon, 20 Mar 2023 04:46:22 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:21 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 06/33] doc: boards: amlogic: update documentation for JetHub J100 Date: Mon, 20 Mar 2023 11:45:42 +0000 Message-Id: <20230320114609.930145-7-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044624_472775_C6B616C0 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/jethub-j100.rst | 66 ++++++++++++++++--------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/doc/board/amlogic/jethub-j100.rst b/doc/board/amlogic/jethub-j100.rst index dd1ed68b9c..0d63976789 100644 --- a/doc/board/amlogic/jethub-j100.rst +++ b/doc/board/amlogic/jethub-j100.rst @@ -1,11 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for JetHub J100 -======================= +U-Boot for JetHub J100 (A113X) +============================== -JetHome Jethub D1 (http://jethome.ru/jethub-d1) is a series of home -automation controller manufactured by JetHome with the following -specifications: +JetHome Jethub D1 (http://jethome.ru/jethub-d1) is a home automation controller device +manufactured by JetHome with the following specifications: - Amlogic A113X (ARM Cortex-A53) quad-core up to 1.5GHz - no video out @@ -22,16 +21,15 @@ specifications: - DC source with a voltage of 9 to 56 V / Passive POE - DIN Rail Mounting case -Basic version also has: +The basic version also has: - - TI CC2538 + CC2592 Zigbee Wireless Module with up to 20dBm output - power and Zigbee 3.0 support. + - TI CC2538 + CC2592 Zigbee Wireless with upto 20dBm output power and Zigbee 3.0 - 1 x 1-Wire - 2 x RS-485 - 4 x dry contact digital GPIO inputs - 3 x relay GPIO outputs -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -40,14 +38,20 @@ U-Boot compilation $ make jethub_j100_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j100` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh jethub-j100 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain binaries -from the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -55,7 +59,7 @@ from the git tree published by the board vendor: $ cd jethub-u-boot $ export FIPDIR=$PWD -Go back to mainline U-boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -90,27 +94,27 @@ Go back to mainline U-boot source tree then : bl2 $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ $FIPDIR/j100/aml_encrypt_axg --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $FIPDIR/j100/aml_encrypt_axg --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc --level v3 + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc --level v3 -and then write the image to eMMC with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_emmc_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181079 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CCF6C7618D for ; Mon, 20 Mar 2023 11:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6D40scd9MswEj8o9VN23v65lxXwQpQ5IWReD/B29nLc=; b=qeblohyGlkxuR6 vf+QrCX4sy+E3+Ej+MaCvSDThbCqv3ZWIKyk7VuvxAKrjEJtVGyH7FQWhbBCcKJs06nhmwYRkbSLa ABA0c6c9aGOfpbu2LDsNWIpAxJixpTkJCPVKMDjUsUM539BhE/xrxdSrA2/LK5LDVJznjlOQGpZ9G YeUM4PJclE4VTNnsdo5AP16gLdU4h+DyfNWWINStYy6BNfZd6/P3Zy6XsVT2gQp/yjQkDwbBozs2h fc1TcIBEHZmv0uctEfcCaxCWrmY1VJBckIvao+WFBkVAzrhRmG+QFmeeqJSoeA87K6FhBpuBVUYdw wGCL1Cz5hqQOQsmX2yiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDy9-008ru8-2o; Mon, 20 Mar 2023 11:46:29 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy5-008rp7-2J for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:27 +0000 Received: by mail-wr1-x42e.google.com with SMTP id o7so10042887wrg.5 for ; Mon, 20 Mar 2023 04:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312783; 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=MDDPokm7BWMRXPNQJsOsLQ6+Agr/JtPpcM2AM4ODhyQ=; b=qAqxy0pI6FTuUZrUueK5qMIGhQytoskBnXtNXVPU5tUvbTcZaYUImnihylriZzJsdW qJA0EhJUR5vvILeiOQ274JxFCPOmitFC7Kt6aPdGuM4KInxI91e8EoB67mFloywhQoif UVjcFG2w0eZH4CCKluKPSwErOQwxhOoLYaA6BS0+3YBFCJ4IRr9HMxOLKcEjE72o5Zz0 eFakHzmTbTyvpQkOYXQUphStuGfHIHH4pCZvEmm3TqAPnsuCfP86DZHZegRERUOFbUxu MZuN5/+OxlDKqSC+BQhl/6DgXHoI0wybthjscYscHGquArdwMQOZA+gp6miHWiPNSPp0 9x9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312783; 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=MDDPokm7BWMRXPNQJsOsLQ6+Agr/JtPpcM2AM4ODhyQ=; b=jbLvR7M5hVW1q5zNI8Jkq6O+mc/voVVjtrC/yh+4Uq/q+ZLHphxQM8DssZQqRbbShQ eYApfUkzOJv/DGIPsK+ziKfGEvRlPXZybMMSAyn6G+4AnX4hGLgL1vmYWqFvi/TnVtA4 N7VXelpe5Mgbhc4wm2CUvpOMAP7mmV9Bmtp1d2Xx/h1WPE90Y07C0fqzUKdSipvg/EXy dg3XO9ysUnjuhJIanC6aoftM2XpGB2qiYmQN7zdqGL1nADljbjG+pTp+kdn/i4Xns+w1 qWa418IYwNd/Y6elCuCy+N0n3cge9bAunghYEsnjqtyFBIauWhO0WMwgvUJ3n4Y2Kzcu NjKQ== X-Gm-Message-State: AO0yUKXp+MPLbbGZ4LsyzbiqcQkgLaPPGnKewGJhLZLSDCeuXJRy5Lso M4rYL5t/2pVzkCsxF5JB4FI= X-Google-Smtp-Source: AK7set84B2F+4sNgZiEFVNGrsnDDvoV35xZcfWmyfFZoQzKtAAkFmFIIRWrhyNto5sH3f1Y+2DaCMQ== X-Received: by 2002:adf:dec9:0:b0:2d4:e032:6322 with SMTP id i9-20020adfdec9000000b002d4e0326322mr5580832wrn.31.1679312783699; Mon, 20 Mar 2023 04:46:23 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:23 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 07/33] doc: boards: amlogic: update documentation for JetHub J80 Date: Mon, 20 Mar 2023 11:45:43 +0000 Message-Id: <20230320114609.930145-8-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044625_752551_4B382832 X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/jethub-j80.rst | 46 ++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/doc/board/amlogic/jethub-j80.rst b/doc/board/amlogic/jethub-j80.rst index f669a0118d..d20fbad4c5 100644 --- a/doc/board/amlogic/jethub-j80.rst +++ b/doc/board/amlogic/jethub-j80.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for JetHub J80 -====================== +U-Boot for JetHub J80 (S905W) +============================= -JetHome Jethub H1 (http://jethome.ru/jethub-h1) is a home automation -controller manufactured by JetHome with the following specifications: +JetHome Jethub H1 (http://jethome.ru/jethub-h1) is a home automation controller device +manufactured by JetHome with the following specifications: - Amlogic S905W (ARM Cortex-A53) quad-core up to 1.5GHz - No video out @@ -21,7 +21,7 @@ controller manufactured by JetHome with the following specifications: - DC source 5V microUSB - Square plastic case -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -30,14 +30,20 @@ U-Boot compilation $ make jethub_j80_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j80` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh jethub-j80 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain binaries -from the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -45,7 +51,7 @@ from the git tree published by the board vendor: $ cd jethub-u-boot $ export FIPDIR=$PWD -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -84,16 +90,16 @@ Go back to mainline U-Boot source tree then : $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl33.bin --compress lz4 $ $FIPDIR/j80/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $FIPDIR/j80/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -and then write the image to SD/eMMC with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181080 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 658D7C6FD1D for ; Mon, 20 Mar 2023 11:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PQd18kU+23cF/3sEBc8KTue8mPjn6ajOoBJ81Z10YKU=; b=Cl7BJrUeLCIC4u JffOcz/yd99lALxT5jXOsxW0vtduQYCKKhJVsHUDKeFSIODmDn8hFQwKVxkzChFH9sB1lu2ePOAnZ 2lCAgSsS5C7ND0Z0UexYzEuNiZcsBJkllw5ORTtkRBZMAf8gNOq6NtP2S2n/oVtcVp3LQYuLtCRrj JcwlOSpMdQp32h/BNf/KSF/8yovYpZ22NY5rdHk4A0mNijcXvc2nPF97s3cof7vsBCvfCG0rcCdwE xkEhvAD2IEyEvaT0bSBGw2LuGU7/Osh6Mu2wD4bOL4s6Z/ALASXYK1E8L58YmE/6tftwQToQvLsyb P/6adUxltW4nBa+lD4Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyA-008ruR-0f; Mon, 20 Mar 2023 11:46:30 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy6-008rqP-1M for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:27 +0000 Received: by mail-wr1-x432.google.com with SMTP id l12so10027846wrm.10 for ; Mon, 20 Mar 2023 04:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312785; 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=eO4DLMa8pve8yBOZZSy2SbTPcwEaMc25HFl7WBtOZkQ=; b=fq03gNkl/3QMUef8M4c2UvAB1ZEaQwG//1Droz/0lHYyy8gHUfSBChvsdCDuy9nQk8 s82VgqY3HzIY0IP+YIDR8UfgTCgQ3Wr+0jo6pF1t1E1vsInKCc7kjq2PcWdiJ90X5C1r 40KVFwJziEL/4cYxhJpEMlzuDtF/6mI99uFB7kSESpG8m5oBqbVX+GmyrT/YYAswS+HK qu2NBPTVBUg0pYK8KJiWYNJcp7zy3lNr5CDQDhyvraGNET2scmQRs9wjElNNjC8S3o93 /iD/vPhfB556OTlPcPOLdNQ2vCNsAzdeixMAUr3mU+4d+xRyRn8gfGh2Y7iow/YwGnDu lZsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312785; 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=eO4DLMa8pve8yBOZZSy2SbTPcwEaMc25HFl7WBtOZkQ=; b=guWfmWcw6IFT7+C1kIemBRk4CvEwKRvXhyFHuYdCk+wlAZW7L9OaLLq/s+ffqNp23p vzy8+w6y+KGUzCLR/k12UwuS38OooLyiPL6OI8yq/qciF4RFR9fi5W7TqIkHhIhuP4Mz M9q+EvrTFv/Dqcfd5lBiA6oSD1b2i7I56+3mk7QRcfWgtQHCo0XIV5FEbMULGVuEgx89 S4uoC8byJV5fvDcVh2TtfCjV4jfWDlBiHSF8SvtT1Kmif0qmWCoqFzuKafD2UoAK0u0R e8rXliy1yukGLB4F1I3XpOd9ZNR8QXGxMOyQ1V36WUyDvKKt6rIjY6czlCzqTe9gqIgC O44w== X-Gm-Message-State: AO0yUKXVv4GW3kTqVghjsH6INwWDS1Su6h3rHIECe97NAgIX2gT3dN61 CoY37g/nChGELhoI0Mf2dPw= X-Google-Smtp-Source: AK7set98q8LF1h5KQ3DwBVzdWslbOnaNfjRV2G76E4naHpjKVCZMRDqhS5hGWDCo9wMqZzZQKxAIvA== X-Received: by 2002:adf:e406:0:b0:2d6:405f:8b16 with SMTP id g6-20020adfe406000000b002d6405f8b16mr3936589wrm.66.1679312785232; Mon, 20 Mar 2023 04:46:25 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:24 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 08/33] doc: boards: amlogic: update documentation for Khadas VIM Date: Mon, 20 Mar 2023 11:45:44 +0000 Message-Id: <20230320114609.930145-9-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044626_469154_933DFC09 X-CRM114-Status: GOOD ( 10.32 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/khadas-vim.rst | 76 +++++++++++++++++--------------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/doc/board/amlogic/khadas-vim.rst b/doc/board/amlogic/khadas-vim.rst index 04025d737c..f1fbe1a8a6 100644 --- a/doc/board/amlogic/khadas-vim.rst +++ b/doc/board/amlogic/khadas-vim.rst @@ -1,24 +1,24 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Khadas VIM -====================== +U-Boot for Khadas VIM (S905X) +============================= -Khadas VIM is an Open Source DIY Box manufactured by Shenzhen Wesion -Technology Co., Ltd with the following specifications: +Khadas VIM is a Single Board Computer manufactured by Shenzhen Wesion Technology Co. Ltd +with the following specifications: - Amlogic S905X ARM Cortex-A53 quad-core SoC @ 1.5GHz - ARM Mali 450 GPU - 2GB DDR3 SDRAM + - 8GB/16GB eMMC - 10/100 Ethernet - HDMI 2.0 4K/60Hz display - 40-pin GPIO header - 2 x USB 2.0 Host, 1 x USB 2.0 Type-C OTG - - 8GB/16GBeMMC - microSD - SDIO Wifi Module, Bluetooth - - Two channels IR receiver + - Two channel IR receiver -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -27,14 +27,20 @@ U-Boot compilation $ make khadas-vim_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh khadas-vim /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -64,40 +70,40 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181081 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88B84C7618A for ; Mon, 20 Mar 2023 11:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=218r3w0TQNqXuwr+nsvKyE83dfqjJ8puud8HcJkoR+4=; b=1GDkjAK63QJFcD YgeRQ3EsVV5yql2AVsjYpcHfBtTQrrgMsa7oYMIr2LyDwecupi/zw82XARVsSktlwWfqAFKqo8x2v 4rWasDMfOE3XGEn5UOZYEx0rewyB/oStU0xUEIf46ML4NpuVhJWQrWk+tCv5Ioe26g0O2Y5Aua3mA X8WxyhLRjNW0hYJCqE0PczXOLde7+WDY8blg3sdpkamnIycjpX727mbC9epPhcY6IRm5zvAS8Scen L+QxexXoayAdU2buBPziMFkyFKCzV/fez5lPlQqw7ACpbJNLvrVhDVVZKYAOHTmXMh2/yK/QlYnhT G91f5roBY+1Rd/9yskMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyC-008rwa-22; Mon, 20 Mar 2023 11:46:32 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy8-008rsN-29 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:30 +0000 Received: by mail-wr1-x42b.google.com with SMTP id l27so1719899wrb.2 for ; Mon, 20 Mar 2023 04:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312787; 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=a9MwXvf+flhTQSJUpZFWyNrBWTEpWDup8ZklCGcRg7Y=; b=Lvk3881Fg8L26vamATTqBXKfs0MCW6Tbb+AqIlVBiqG7axe8CNJ4Fnf53akwXjQfMj mwXPES6KvBbl7PRpuZ/tR+cuA/WbPB6o80UtKJAxuwmeXMsUQtaMeTO0IrUmDV5rjEeh 0QYGxqQOWnRAmq5Bbb5HeYktM5vbeiMISwRB8pe5VH+yCo1SzeJKPg6XJe98SBYSLBNx xHwrRPK4nR2u7p67espVh/KYzwmK1OPwgsNp51vTj30/PCgKLcQykkwvTmPuzbuRc06V wzOpAVLKq2pOiqftb3OM7ldWNJdo2uUnEn45SSTPznNJV6z2HhZLaqv2cYzj+LdQUpf3 MrPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312787; 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=a9MwXvf+flhTQSJUpZFWyNrBWTEpWDup8ZklCGcRg7Y=; b=lJba0VFBqBSiWuYBDxU/Y1GR/zPp6KjlSej9p1piJ0Cpp4jaFOneAHrIfgCwEovFlz 4Nqr6Jx0Gts6Igowsfz+fFzyfQY7FKA/qofDorJ6QT4EKtVbnU85NK129V5Qic455hDf yqvahBVkrUJQJXi5kJRsgNFuHc3WZ7g/r/ML81ANYyemxL9tC0f86pPIER5VCtneaRiU wQbtJfXY6ZJxmuGPBeFuaxDltuftDcgjNfQfjKHNn8/CktALve4YcYbn1OHYB0oNdpUz /8YgwQ9okm7FzuYf3m8buG67mPOhMOXs7t5oXVVrCNXPTvrs691iJfK64sjDjYRDQ5h3 Y9Rw== X-Gm-Message-State: AO0yUKUmf1OS+xTQ0j+orVPJiuiWlH6ZvpIvX9PK0FGCOeq8wft+N2mW Cwkt8wMw+C7FPi3cOg1fDZM= X-Google-Smtp-Source: AK7set/ZQ7zS4cj/Snwuzh6H7mhwsI8C1Wy7w+uvG45SEgJsSQ1nmmLt7AqZP4pGdzdcertRKA1gDw== X-Received: by 2002:adf:f607:0:b0:2cb:c474:7597 with SMTP id t7-20020adff607000000b002cbc4747597mr12911062wrp.66.1679312787021; Mon, 20 Mar 2023 04:46:27 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:26 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 09/33] doc: boards: amlogic: update documentation for Khadas VIM2 Date: Mon, 20 Mar 2023 11:45:45 +0000 Message-Id: <20230320114609.930145-10-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044628_709575_FE137EBF X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/khadas-vim2.rst | 76 +++++++++++++++++-------------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/doc/board/amlogic/khadas-vim2.rst b/doc/board/amlogic/khadas-vim2.rst index 7ac3bdcbaf..78d47f93fe 100644 --- a/doc/board/amlogic/khadas-vim2.rst +++ b/doc/board/amlogic/khadas-vim2.rst @@ -1,25 +1,25 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Khadas VIM2 -======================= +U-Boot for Khadas VIM2 (S912) +============================= -Khadas VIM2 is an Open Source DIY Box manufactured by Shenzhen Wesion -Technology Co., Ltd with the following specifications: +Khadas VIM2 is a Single Board Computer manufactured by Shenzhen Wesion Technology Co. Ltd +with the following specifications: - Amlogic S912 ARM Cortex-A53 octo-core SoC @ 1.5GHz - ARM Mali T860 GPU - - 2/3GB DDR4 SDRAM + - 2GB/3GB DDR4 SDRAM + - 16GB/32GB/64GB eMMC - 10/100/1000 Ethernet - HDMI 2.0 4K/60Hz display - 40-pin GPIO header - 2 x USB 2.0 Host, 1 x USB 2.0 Type-C OTG - - 16GB/32GB/64GB eMMC - 2MB SPI Flash - microSD - SDIO Wifi Module, Bluetooth - Two channels IR receiver -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -28,14 +28,20 @@ U-Boot compilation $ make khadas-vim2_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh khadas-vim2 /path/to/u-boot/u-boot.bin my-output-dir -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim2` +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -50,7 +56,7 @@ the git tree published by the board vendor: $ make $ export FIPDIR=$PWD/fip -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -65,40 +71,40 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash $ DEV=/dev/your_sd_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181082 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 121A3C7618E for ; Mon, 20 Mar 2023 11:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AceUbMsK0jiMEO6mW9+BHzSZu908fC5+NqekfFdNMNA=; b=y3q9/IFJWB2J6q 7+fbuXzpiQUu9RfuzSsQuK78CkLs68mfS2szp/a0g30rZwX74bQAXGEmDzcWxI059nvZKmufSytfq rMdGA/J/Pw/QQx1Zq4mVsEw0nR2ZjcPJoRVKluYcqFpH2CTNrqx3YMtdMUoWffmYy0BlZ9dY8szFZ 2g+2C2lLdqQAEK+/LrviRoxVArlxY/xGZyH8pauAaTKWd1eY6+2qW9/Q8fj+0G30LJbUa/8PkqMhE 7oEUh7T5bHfkA9xEqa40hrYqh2xjzFrCVC/933TPQJ+LImqa6n2JuhthvScy8V439ohqyPmnECq0I iC025J/vUY1oz9Jx1Xug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyD-008rwq-07; Mon, 20 Mar 2023 11:46:33 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDy8-008rqP-3C for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:30 +0000 Received: by mail-wr1-x432.google.com with SMTP id l12so10028012wrm.10 for ; Mon, 20 Mar 2023 04:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312788; 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=tsncpsLbv6Sdy2201gEVqEmK6Z5ULiz02P3xkFi5QSI=; b=SKmNseR7A3WoUf51Rxt7ISgUi4LE52+OM0M0yWCvNALl9QyT2e2OK5XOfrn8EpswOd KGekvTkZs/FTaca4J0V4esMu4akjRWRtMGM2B1uAlsMbrlb0BwcgZN4ITINUDjN5ZO86 g+j79zt9WFME6eYa9ri4Kt2rqy+o4Pl46+9vRqH0rf0mgX6mKyPQp2Rn0mdGO6Qn4SKk zVnCAAFC1Wfq4wI6yw5knkzpM77gtw7UsFFWMMzqYzAxh1OYyO+6ioV/P+6rDyUAdfw+ MfU2Zmv5UF8Bo6OE+iHpHhZ9Cd72hwT8c8F6x+PJCmhPQsjamBuyBbLUHCUIkOOvy0mN kwrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312788; 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=tsncpsLbv6Sdy2201gEVqEmK6Z5ULiz02P3xkFi5QSI=; b=B90Ob2uAtiF7X+wQlfEcKbD1MQKy+jwdwvgx72bglPUjePv39wkmL4x7R0AAlEqbrc b9hLvkDS5HcKz6NVZlFBIBOi+3nL1+RnOEKuuJVKYpeNOUqFB1rCfhDIqGSH2g4V6vzx 5P5Xf63n+PL8eDYuA0EnKI407R4dOSyp2PKGv6/HOZivC22aAuE98MIKBElOBLolzSIE 2P637Jigno26JHCG10Y88+EoRgqkhCgJ7OAD3e8fpvC9g6kGqWaGTvreuLs2VlwEH18u xW/FgzYxVfES/gdOe8nkVM0mQ/7LKdyCv302Dq4FpgifBvGBoOnD0ZaboQ1DiWNTgHYQ q4HQ== X-Gm-Message-State: AO0yUKWUl9ICqctQW+GIGL4zHqJfxKAqPBQUy/AxCfGEpz4d0+Xs5ien AkJxR+Kupu2iNp1lA8uL6Nc= X-Google-Smtp-Source: AK7set/K+u8uwOn01vM4wyVwem1g/I0oD9ZvwbY87NeLevhBa+drDS5MNlyqmDUS260fatLX7qygLA== X-Received: by 2002:a5d:4c81:0:b0:2c5:67e3:808d with SMTP id z1-20020a5d4c81000000b002c567e3808dmr8715552wrs.35.1679312788587; Mon, 20 Mar 2023 04:46:28 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:28 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 10/33] doc: boards: amlogic: update documentation for Khadas VIM3 Date: Mon, 20 Mar 2023 11:45:46 +0000 Message-Id: <20230320114609.930145-11-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044629_067955_7A6CEBE2 X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/khadas-vim3.rst | 137 +++++++++++++++--------------- 1 file changed, 68 insertions(+), 69 deletions(-) diff --git a/doc/board/amlogic/khadas-vim3.rst b/doc/board/amlogic/khadas-vim3.rst index 73dc32b79b..88f2e0ebbe 100644 --- a/doc/board/amlogic/khadas-vim3.rst +++ b/doc/board/amlogic/khadas-vim3.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Khadas VIM3 -====================== +U-Boot for Khadas VIM3 (A311D) +============================== -Khadas VIM3 is a single board computer manufactured by Shenzhen Wesion -Technology Co., Ltd. with the following specifications: +Khadas VIM3 is a Single Board Computer manufactured by Shenzhen Wesion Technology Co. Ltd +with the following specifications: - Amlogic A311D Arm Cortex-A53 dual-core + Cortex-A73 quad-core SoC - 4GB LPDDR4 SDRAM @@ -20,32 +20,27 @@ Schematics are available on the manufacturer website. PCIe Setup ---------- -The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential -lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between -an USB3.0 Type A connector and a M.2 Key M slot. -The PHY driving these differential lines is shared between -the USB3.0 controller and the PCIe Controller, thus only -a single controller can use it. -To setup for PCIe, run the following commands from U-Boot: +The on-board MCU can mux the PCIe/USB3.0 shared differential lines using a FUSB340TMX USB +3.1 SuperSpeed Data Switch between a USB3.0 Type-A connector and an M.2 Key M slot. The +PHY driving these differential lines is shared between the USB3.0 controller and the PCIe +Controller, thus only a single controller can use it. + +To setup for PCIe run the following commands from U-Boot then power-cycle the board: .. code-block:: none i2c dev i2c@5000 i2c mw 0x18 0x33 1 -Then power-cycle the board. - -To set back to USB3.0, run the following commands from U-Boot: +To revert to USB3.0 run the following commands from U-Boot then power-cycle the board: .. code-block:: none i2c dev i2c@5000 i2c mw 0x18 0x33 0 -Then power-cycle the board. - -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -54,14 +49,20 @@ U-Boot compilation $ make khadas-vim3_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh khadas-vim3 /path/to/u-boot/u-boot.bin my-output-dir -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim3` +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -72,16 +73,14 @@ the git tree published by the board vendor: $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH $ DIR=vim3-u-boot - $ git clone --depth 1 \ - https://github.com/khadas/u-boot.git -b khadas-vims-v2015.01 \ - $DIR + $ git clone --depth 1 https://github.com/khadas/u-boot.git -b khadas-vims-v2015.01 $DIR $ cd vim3-u-boot $ make kvim3_defconfig $ make CROSS_COMPILE=aarch64-none-elf- $ export UBOOTDIR=$PWD -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -105,58 +104,58 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ bash fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ bash fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 --compress lz4 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --ddrfw9 fip/lpddr3_1d.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --ddrfw9 fip/lpddr3_1d.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181083 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13A10C761AF for ; Mon, 20 Mar 2023 11:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=58Oa8wxW96auyVyH+Xls4GQqTAaSiGdwHzdR8gmr2WE=; b=VDUZkt7mHfcrZL bOnxNRiKXFujV3Swj0CTAlb5do4btqkww4L7pcvAvMAti8qoYKP90pXruvSu1S25Q+4XYhGq/WYwV 7Pknd6tO+gLBBaJDjzNCfZDx3+ma6fC3SkHY5flNLXEAV1tiErtVSZfHzeYo9IVvpRAXkyTwRpAir 2a8SCFRiJredAQtyWqq5VQjENhBpEhCuuh3XwNVLfqnRXXIp0HFWu7DTZIA/jMA0a/rcghhjj2r0/ N8ZqIB1rBtL2kmudoSQa/3JtC5Qnz3dwJY7C55Z0bmOvXo8xlM08xzPv/157ZsAZf31Isbfmgp3eQ 3hX04AHDoGvb6krpGlbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyE-008rxx-2Q; Mon, 20 Mar 2023 11:46:34 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyC-008rv3-02 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:33 +0000 Received: by mail-wm1-x329.google.com with SMTP id p16so7274674wmq.5 for ; Mon, 20 Mar 2023 04:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312790; 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=UXxkF+XbVbc4FJBnwx+bZ4z+3Rqpu6bv55HLEWO0AlI=; b=gZfN6ARN5/zMky3GK8v7su3CaiqX8Pf/cUtrb1nHIn3i9OULU9rda+X62KjmPdG3O9 /arAdmhO3WJxCBuFw7g3dpOEAd+tUAvPdE2s2LKR7QZl43RdB6N60RzeGUnqRLJXHGv/ GQwJT18gbFpd7N/sxNVoqBTGAeeHQdE1veA8SbWeW8ZNoVKQ+fyorVoiF+bVcvKPA7Ca ViOXvMAQAt5BIMhuRKGb8uDCDjROb6ZewvwOEZXX3QUDjioFj4ZrlZnSyUexEAoeD56I H2HZRl//Tu0Z+fYje7Ua4n7S440Qfe9xZKkoAA0ZAiPur805SMfXZn2NnQAiHb94C7oo Xk1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312790; 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=UXxkF+XbVbc4FJBnwx+bZ4z+3Rqpu6bv55HLEWO0AlI=; b=OtsltXasv6iHL5PjK8tooPWHrgFW5z010g4KWuyRCESd15moXyQOoElI5BL224gTg5 j/IH0ZOvwlIKxyljolwIBUb9gtOxp1k37m+JPOKzAZF9pqM1mkAQxKZvRu3KBTXYKN1U loF3kXGLE7Gjsl3xia1EkbOqu7uJ1wy5je7NBsFbagPAtQQgaTjy8hXxJn7v3BtzLj0D 7jjFeC7y7DHYUGaWKGF4VNiTLrzOG9kQHRE6cG3Upd4si8t/xgdfIUZcogUlrfdkGeUd SSVBOd8k8+o396yom/yHJAaa6YrumtdOJFRC2GrqUHT9qKCPMlH0MJKygihBfenOLhv9 X5AA== X-Gm-Message-State: AO0yUKVQwabZq9o0qjqJoGU++EmaVtz8+j/iIgNuK0lyPo2XfqwAiQqJ s7t1uOCX/tT7fSRj2VAXxew= X-Google-Smtp-Source: AK7set8jdLrJIbmP0AeM27peovxv/uOECV5j81qTYMrvU630U3PBy2+XvOgoXinMNQQA6dAzI709ew== X-Received: by 2002:a05:600c:3b8e:b0:3ed:290b:dc68 with SMTP id n14-20020a05600c3b8e00b003ed290bdc68mr24009919wms.12.1679312790135; Mon, 20 Mar 2023 04:46:30 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:29 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 11/33] doc: boards: amlogic: update documentation for Khadas VIM3L Date: Mon, 20 Mar 2023 11:45:47 +0000 Message-Id: <20230320114609.930145-12-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044632_053031_5F3826DC X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/khadas-vim3l.rst | 137 ++++++++++++++--------------- 1 file changed, 68 insertions(+), 69 deletions(-) diff --git a/doc/board/amlogic/khadas-vim3l.rst b/doc/board/amlogic/khadas-vim3l.rst index 692ab3d21d..935f43c725 100644 --- a/doc/board/amlogic/khadas-vim3l.rst +++ b/doc/board/amlogic/khadas-vim3l.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Khadas VIM3L -======================= +U-Boot for Khadas VIM3L (S905D3) +================================ -Khadas VIM3L is a single board computer manufactured by Shenzhen Wesion -Technology Co., Ltd. with the following specifications: +Khadas VIM3L is a Single Board Computer manufactured by Shenzhen Wesion Technology Co. Ltd +with the following specifications: - Amlogic S905D3 Arm Cortex-A55 quad-core SoC - 2GB LPDDR4 SDRAM @@ -20,32 +20,27 @@ Schematics are available on the manufacturer website. PCIe Setup ---------- -The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential -lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between -an USB3.0 Type A connector and a M.2 Key M slot. -The PHY driving these differential lines is shared between -the USB3.0 controller and the PCIe Controller, thus only -a single controller can use it. -To setup for PCIe, run the following commands from U-Boot: +The on-board MCU can mux the PCIe/USB3.0 shared differential lines using a FUSB340TMX USB +3.1 SuperSpeed Data Switch between a USB3.0 Type-A connector and an M.2 Key-M slot. The +PHY driving these differential lines is shared between the USB3.0 controller and the PCIe +Controller, thus only a single controller can use it. + +To setup for PCIe run the following commands from U-Boot then power-cycle the board: .. code-block:: none i2c dev i2c@5000 i2c mw 0x18 0x33 1 -Then power-cycle the board. - -To set back to USB3.0, run the following commands from U-Boot: +To revert to USB3.0 run the following commands from U-Boot then power-cycle the board: .. code-block:: none i2c dev i2c@5000 i2c mw 0x18 0x33 0 -Then power-cycle the board. - -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -54,14 +49,20 @@ U-Boot compilation $ make khadas-vim3l_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh khadas-vim3l /path/to/u-boot/u-boot.bin my-output-dir -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim3l` +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -72,16 +73,14 @@ the git tree published by the board vendor: $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH $ DIR=vim3l-u-boot - $ git clone --depth 1 \ - https://github.com/khadas/u-boot.git -b khadas-vims-v2015.01 \ - $DIR + $ git clone --depth 1 https://github.com/khadas/u-boot.git -b khadas-vims-v2015.01 $DIR $ cd vim3l-u-boot $ make kvim3l_defconfig $ make CROSS_COMPILE=aarch64-none-elf- $ export UBOOTDIR=$PWD -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -105,58 +104,58 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ bash fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ bash fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 --compress lz4 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --ddrfw9 fip/lpddr3_1d.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --ddrfw9 fip/lpddr3_1d.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181084 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6265C7618A for ; Mon, 20 Mar 2023 11:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jTx1Ra9VzwY+SY73GPksBUzXnGMZ/jQ4iGN+7KnHd3Q=; b=4+fQEtMn+DSGJF MC4HuZKNmcktFCV4bRyPVrzQi924mZZb3uhp8c4a3HCVxxTdVHskmYQ02M3txQXOd3J7tEt4MVFCl 1tBu47eSy8Iw3RqNuvqbkiyqHxSQI1Hkt+6VpcD2o4+drc7SP7TyZlD+GxPZfoKss3abf98p8qpAG xESbRfrSbsac7svLeuthxqXLS1/gBZ7ACuEatdhbPLRw0piPmn5h3pqfEdYpcG42bGJU3L03qektc REjTT83UczmAwbk+ZL56Dfy/TyxYzyyPG6lFjf32gKBkWC0yxaoPfY+lVr/zuN01X4J8HuWT/sH/K zNXGaSXitveVGG1JI3Rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyH-008s0a-0q; Mon, 20 Mar 2023 11:46:37 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyD-008rwA-1T for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:35 +0000 Received: by mail-wr1-x42c.google.com with SMTP id j2so10025624wrh.9 for ; Mon, 20 Mar 2023 04:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312791; 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=fIu2nkbZaeeSZVf/VpVNuKVvrHd1Zd4yr37NWjQNMt4=; b=o3tI3BPpIXyp9grPdHmQSJfOlQf1+8vIspFRes5hu7hgDI0EsE+/IZEM+Nf/jTM/Vt iaThXmlyOpswiIi2fMcxjivTyACJce5XV8B3JnZd3Pap4Jdi/IeHY0jwLuqdBLuxa20B jD2qxRJ03cOlCssa5uxkvp3WBukL/IwIvhK82eHv7Vgj2quRkMWcfuv5xzA7Cb86oIx8 /eN57tnYNFLBBTZeWYOGYc/PRogdBJYIfBTwxF2lRXOPGBH9RhDT3sCgNhO2Stfjxm6S XT22a6QR/AA4Y4gNTES9H/8m70d22H6l6XNeLO6jj3ezV+VeP1YJm9/mNIUOlS83V5mt X1eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312791; 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=fIu2nkbZaeeSZVf/VpVNuKVvrHd1Zd4yr37NWjQNMt4=; b=evBP7x8ZZti7h/3BoZF6fHrzCfM5IS4jcUZNd4mVPOh2pIK/X3mcpldv6U9QEZGB03 ClfnlMbSfiZNV+cauiA5LcPRjsdfJYfNHThTpGpRO82YF+BE6mKMKV0jnlbX7LYtxKOD hP8AuXWx6PTOC9bEm0MoKIs9ZGPWz4JLNxogVVhapTcQ/E2XW4f4HC86wbUa9ESGgAIN y1EEJPfjNHk5xu1a0XM1CcGnNMrsQWve5HGzN05q0VXsSg9DqEM10dRgfoX+NyfZCrXw mUUJ2JVyB3xDP3RLeOXOJV5zi+YKX3lb6QvaDG9L0t2hjhx5Kx5zlJqBVTUAgIW9wGaz FyzQ== X-Gm-Message-State: AO0yUKXk+f7NNwZRq8B1U0lnl9FOFf4CxwCAwFIZ+7jttfl6v0YGBZPa QFrf0JcXGNMbNHPtTrkToXM= X-Google-Smtp-Source: AK7set+4700uyCBz5nTpBowAK1xG46/wTZah1K8ec7Bq4QkcxXZXQzk3gXSQSD9kV9YcdRj419g18w== X-Received: by 2002:adf:eb0e:0:b0:2d7:1ec1:9e46 with SMTP id s14-20020adfeb0e000000b002d71ec19e46mr2024285wrn.47.1679312791696; Mon, 20 Mar 2023 04:46:31 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:31 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 12/33] doc: boards: amlogic: update documentation for LaFrite Date: Mon, 20 Mar 2023 11:45:48 +0000 Message-Id: <20230320114609.930145-13-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044633_497874_F8F1AF0D X-CRM114-Status: GOOD ( 10.67 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/libretech-ac.rst | 77 ++++++++++++++++-------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/doc/board/amlogic/libretech-ac.rst b/doc/board/amlogic/libretech-ac.rst index 7a915f9f26..6ebb7f646d 100644 --- a/doc/board/amlogic/libretech-ac.rst +++ b/doc/board/amlogic/libretech-ac.rst @@ -1,9 +1,9 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for LibreTech AC -======================= +U-Boot for LibreTech-AC 'LaFrite' (S805X) +========================================= -LibreTech AC is a single board computer manufactured by Libre Technology +LibreTech-AC aka 'LaFrite' is a Single Board Computer manufactured by Libre Computer with the following specifications: - Amlogic S805X ARM Cortex-A53 quad-core SoC @ 1.2GHz @@ -13,12 +13,13 @@ with the following specifications: - HDMI 2.0 4K/60Hz display - 40-pin GPIO header - 4 x USB 2.0 Host - - eMMC, SPI NOR Flash + - SPI NOR Flash + - Removable eMMC module - Infrared receiver Schematics are available on the manufacturer website. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -27,14 +28,20 @@ U-Boot compilation $ make libretech-ac_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `lafrite` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh lafrite /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -50,7 +57,7 @@ the git tree published by the board vendor: $ make $ export UBOOTDIR=$PWD -Download the latest Amlogic Buildroot package, and extract it : +Download the latest Amlogic buildroot package and extract it: .. code-block:: bash @@ -58,7 +65,7 @@ Download the latest Amlogic Buildroot package, and extract it : $ tar xfz buildroot_openlinux_kernel_4.9_fbdev_20180418.tar.gz buildroot_openlinux_kernel_4.9_fbdev_20180418/bootloader $ export BRDIR=$PWD/buildroot_openlinux_kernel_4.9_fbdev_20180418 -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -73,40 +80,40 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ sh $UBOOTDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ $BRDIR/bootloader/uboot-repo/fip/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ sh $UBOOTDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $BRDIR/bootloader/uboot-repo/fip/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $ $BRDIR/bootloader/uboot-repo/fip/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $ $BRDIR/bootloader/uboot-repo/fip/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $ $BRDIR/bootloader/uboot-repo/fip/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $BRDIR/bootloader/uboot-repo/fip/gxl/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -and then write the image to SD with: +Then write U-Boot to USB or SPI-NOR with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181143 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10DBEC7619A for ; Mon, 20 Mar 2023 13:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XiE25hBeRlZgycrIdOaa1/awWJo+5cayGamvKtNu63g=; b=pfG52MagAE7kmA eVYYFVNGFISNcltLEVwv39s7gz3Nl13g0DenIYOu9jpSoDlla0etMm6C8RxDubVqWsCWIyzvMXgCX lFa1Yf5ejaB6Lm9QzpL4uWzQ2N33Eae4UzSrxsksPRlL9TnWVWm6gFB44YDZb7uRXNL6ak8n5pqf/ 1WRjPqtllmC4cUdr19I4bEQTT5+OaeorWBPclWGwJZRVANcKgk2DzetfoFAaUmjmfCayeCwa3rYi2 D1GEY/1sE4oLbVCb3ostg6ndF4AcgKYSjGC01xZHUNBZh8q2g+kgFoGuuGMAcIU5ig1rTRDusepAz iARzKWO5Xyp31essv/CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7a-00928J-39; Mon, 20 Mar 2023 13:00:18 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyE-008rxh-2U for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:36 +0000 Received: by mail-wr1-x42d.google.com with SMTP id d17so1608488wrb.11 for ; Mon, 20 Mar 2023 04:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312793; 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=G/1NGisBICDWKySTthh8leLs4mxW+Mpv+VVXG9ecVfo=; b=RTOji96/oYV6kpRrT9EEicTs7jEAbtTfreSo0mosAjuVZRoIqYAZVFjwDO6fal6lq1 vA9yftIpzbWRcbIwUyHJQG4jh1ij2QEeRGdbQoiYWAQo4xfiGXalUGEn9q4U4Q4Muxmh FrihhCHypXoc0zj+XFUV7ArpSI1rAyyFNlugWbjoXOCTv2SYsrpHMEjgsk6Jf3jHiMdk 1J680ld10dajPk98gOlh8Y0XQWFnzg+PFZluGtu2v2ikRqv/bqei4xGJPN7qBwjGIwHA JbVga9qwrO/oA8Pk3/swnw94tgyDaJ4gvVRysoSXxwZxArvhtccEya3S02RyKyyRJWj+ l81w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312793; 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=G/1NGisBICDWKySTthh8leLs4mxW+Mpv+VVXG9ecVfo=; b=fcgq0VeaYxPqEbXPW0/bNAua+PahKccZ+cUolTS8Gg3NwNzZ1bE3uYQMKvt6h8cg/x M08SeLkdDSkUwdL+ZC2tDtoZi4A4KA5z+Wgktyv9Hwk2VVCLnr1TXUHBHnVxoJmfEHzQ 7OJdlcoufkLav83rxjyLe2mkwFfQichuMAvRb3CXR+fyiLpp4d7JSqyLixc74F4kiNI1 Op4y9P+9TRe3NXvTSWbJpuTsei59IpKgGSrTY7o9R7tAKUhUUUVt+vF8XiRLHfstFds3 ylJwJcpO9ma/z2PXWO3h1dQO1lanyMo3pTmvZBIq0VT8lHOide4klYVZfDPKeW9I4Nfb jM6w== X-Gm-Message-State: AO0yUKU22qKNo4lwYBZ5JA8ZE/gZoKVflKWjIiipz+nDLUdqg05i8Sdj nvR9kWZNysE1J9KLtdrHG5RBFjNYZ89XVli/ X-Google-Smtp-Source: AK7set+ABEis4YSYwMD8CUNGligpDKxcDmJxcDFufGLuaJNhRJA52jJE8D3weIa6U8uaCHP6XbVfrQ== X-Received: by 2002:adf:eb0f:0:b0:2d6:6af:4891 with SMTP id s15-20020adfeb0f000000b002d606af4891mr4079244wrn.3.1679312793584; Mon, 20 Mar 2023 04:46:33 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:33 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 13/33] doc: boards: amlogic: update documentation for LePotato Date: Mon, 20 Mar 2023 11:45:49 +0000 Message-Id: <20230320114609.930145-14-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044634_816475_24280407 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/libretech-cc.rst | 109 +++++++++++------------------ 1 file changed, 40 insertions(+), 69 deletions(-) diff --git a/doc/board/amlogic/libretech-cc.rst b/doc/board/amlogic/libretech-cc.rst index 596ce45dc4..d1d3ce49f6 100644 --- a/doc/board/amlogic/libretech-cc.rst +++ b/doc/board/amlogic/libretech-cc.rst @@ -1,12 +1,12 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for LibreTech CCs -======================== +U-Boot for LibreTech CC 'LePotato' (S905X) +========================================== -LibreTech CC is a single board computer manufactured by Libre Technology -with the following specifications: +LibreTech CC is a Single Board Computer manufactured by Libre Computer Technology with +the following specifications: -V1: +v1: - Amlogic S905X ARM Cortex-A53 quad-core SoC @ 1.5GHz - ARM Mali 450 GPU @@ -19,14 +19,14 @@ V1: - Infrared receiver - Jack for CVBS and Audio -V2: +v2: - Added SPI NOR - Removed Jack Schematics are available on the manufacturer website. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -37,36 +37,20 @@ U-Boot compilation Use libretech-cc_v2_defconfig for v2. -Image creation --------------- - -To boot the system, u-boot must be combined with several earlier stage -bootloaders: - -* bl2.bin: vendor-provided binary blob -* bl21.bin: built from vendor u-boot source -* bl30.bin: vendor-provided binary blob -* bl301.bin: built from vendor u-boot source -* bl31.bin: vendor-provided binary blob -* acs.bin: built from vendor u-boot source - -These binaries and the tools required below have been collected and prebuilt -for convenience at . These -apply to both v1 and v2. - -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `lepotato` - -Download and extract the libretech-cc release from there, and set FIPDIR to -point to the `fip` subdirectory. +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- .. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh lepotato /path/to/u-boot/u-boot.bin my-output-dir - $ export FIPDIR=/path/to/extracted/fip +U-Boot Manual Signing +--------------------- -Alternatively, you can obtain the original vendor u-boot tree which -contains the required blobs and sources, and build yourself. -Note that old compilers are required for this to build. The compilers here -are suggested by Amlogic, and they are 32-bit x86 binaries. +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -81,9 +65,7 @@ are suggested by Amlogic, and they are 32-bit x86 binaries. $ make $ export FIPDIR=$PWD/fip -Once you have the binaries available (either through the prebuilt download, -or having built the vendor u-boot yourself), you can then proceed to glue -everything together. Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -98,51 +80,40 @@ everything together. Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 - -Note that Amlogic provides aml_encrypt_gxl as a 32-bit x86 binary with no -source code. Should you prefer to avoid that, there are open source reverse -engineered versions available: - -1. gxlimg , which comes with a handy - Makefile that automates the whole process. -2. meson-tools - -However, these community-developed alternatives are not endorsed by or -supported by Amlogic. + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181137 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C090C7618A for ; Mon, 20 Mar 2023 13:00:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5hKpayawMJX5vpMQwmhaI7+vJo9pWF3LscIPEePOkTM=; b=tiUk34ilRNJrNy 0nyF3lL4CROGbjEH8yZorZ8ptIkmEKmPxUJGgXzamyjhBt6Yfj9GaGWqttt2PbBMHZXv6qWNFFlU3 PRG685REjD4t9cweLveNAnXnYNJK1hgwJuj/fvwzj9yDEowId4MbFceiN4CJohHWhRYIyfysC/AX1 6HQZBK+fItZOVzRzhYpu86Gfc8tBjMG3zVmuFtNsZo8VnbG9L3YULptfzR4ws9a77sX7vl2NQ2HGw VR2ZRbDuOf2FGj6fsbPO5kTW0+ZUMDjCQVt4fTEg8Azyk1xlmwogHrrT6qELjR5ZwbQywnMGebfT3 NsY1sjFJt2haUJABgqtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7b-00928O-0y; Mon, 20 Mar 2023 13:00:19 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyF-008rjz-22 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:37 +0000 Received: by mail-wr1-x431.google.com with SMTP id j24so1128529wrd.0 for ; Mon, 20 Mar 2023 04:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312795; 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=HxnHVYKNCE/GVy5zjfpoO6N7DVnCQIkYWWe8AnYCmdM=; b=fnSboEXCJulyFxFta06RIg6NksExFjstwLMrC71YYz2tA7+Dona8D09KXndbpVD1r4 FjAsw8yarbYPLWYgP88IlB0m15Kpt937eVhQWkSCOONdrb85weV0bc6wzSGxWeVSzkRb dRETCFYClXARixjI32/l5HmIiNiFCHg9fti7i6FeVr0kEUwsblNGhXiIth0h8i7jkesC qNOJihnT4xCAFKChNYvenroosKFPbGr8RZGW9JvBgT8a3M9KDKYi5JLsfQXueFKZKalH bDCiYe7RV8fYXlwWSAAviPV/ljx7v3Vsm3+0Iow/Pvf/zB87IcnQBvruPBc2ignPRofY 5CUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312795; 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=HxnHVYKNCE/GVy5zjfpoO6N7DVnCQIkYWWe8AnYCmdM=; b=pDFICZ3X/98fz9hYy8ozeC+/RsMesSpn0R5fcNyThJ8FEVrLIcXICA6d2pV/bNF88h fqsuCpys/8TCT8+RndItXPLJ9/1l9Si0nUnx9BmpxoB/7mVvQskCw97FZmKLwcfHLwOY k0e2hp7kZm/GqXgtJipyfrHcKoLZacyYhucO8CUq/RCid2GV6OWTxVMpvQvV/lzuQ2Au iSQM2lP52q1641df8oNdxFudXIrWsVHS2MnPVcNaVyQg51vf87EdgVZ6LScOAFPeXcQV O+7ZhY+bje8p8/VXRtsbipEeiN8J4BwLLtr4qMXWze+hRU+bevgOPiQZSKd2JfxB/Sxx sufA== X-Gm-Message-State: AO0yUKXtxoahj8laWdW90qosj0V5muG74xUO9yZQTTsyoQZ2Lsmwf6pP 6wG1iJVDboujw7UEKjvtcqA= X-Google-Smtp-Source: AK7set/JMo8sS9q2FAdmp66axHFTTwmNmzCaiwiYZl8AzosPf6xvjHn0V+O6lIxFj11SrwIfFyy3IQ== X-Received: by 2002:adf:f711:0:b0:2ce:a893:e45f with SMTP id r17-20020adff711000000b002cea893e45fmr13230768wrp.15.1679312795148; Mon, 20 Mar 2023 04:46:35 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:34 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 14/33] doc: boards: amlogic: update documentation for NanoPi-K2 Date: Mon, 20 Mar 2023 11:45:50 +0000 Message-Id: <20230320114609.930145-15-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044635_675938_90E0974F X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Notably we can now support U-Boot install to the removable eMMC storage module in addition to SD cards. Signed-off-by: Christian Hewitt --- doc/board/amlogic/nanopi-k2.rst | 93 +++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 39 deletions(-) diff --git a/doc/board/amlogic/nanopi-k2.rst b/doc/board/amlogic/nanopi-k2.rst index 76ff874434..2316dae0ec 100644 --- a/doc/board/amlogic/nanopi-k2.rst +++ b/doc/board/amlogic/nanopi-k2.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for NanoPi-K2 -==================== +U-Boot for NanoPi-K2 (S905) +=========================== -NanoPi-K2 is a single board computer manufactured by FriendlyElec -with the following specifications: +NanoPi-K2 is a single board computer manufactured by FriendlyElec with the following +specifications: - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz - ARM Mali 450 GPU @@ -18,7 +18,7 @@ with the following specifications: Schematics are available on the manufacturer website. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -27,14 +27,20 @@ U-Boot compilation $ make nanopi-k2_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `nanopi-k2` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh nanopi-k2 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -43,7 +49,6 @@ the git tree published by the board vendor: $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH - $ git clone https://github.com/BayLibre/u-boot.git -b libretech-cc amlogic-u-boot $ git clone https://github.com/friendlyarm/u-boot.git -b nanopi-k2-v2015.01 amlogic-u-boot $ cd amlogic-u-boot $ sed -i 's/aarch64-linux-gnu-/aarch64-none-elf-/' Makefile @@ -52,7 +57,7 @@ the git tree published by the board vendor: $ make $ export FIPDIR=$PWD/fip -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -65,42 +70,52 @@ Go back to mainline U-Boot source tree then : $ cp $FIPDIR/gxb/bl301.bin fip/ $ cp $FIPDIR/gxb/bl31.img fip/ $ cp u-boot.bin fip/bl33.bin + $ wget https://github.com/LibreELEC/amlogic-boot-fip/raw/master/nanopi-k2/bl1.bin.hardkernel fip/bl1.bin.hardkernel + $ chmod +x fip/bl1.bin.hardkernel + $ wget https://github.com/LibreELEC/amlogic-boot-fip/raw/master/nanopi-k2/aml_chksum fip/aml_chksum + $ chmod +x fip/aml_chksum $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 - - $ $FIPDIR/fip_create \ - --bl30 fip/bl30_new.bin \ - --bl31 fip/bl31.img \ - --bl33 fip/bl33.bin \ - fip/fip.bin - + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + + $ $FIPDIR/fip_create --bl30 fip/bl30_new.bin \ + --bl31 fip/bl31.img \ + --bl33 fip/bl33.bin \ + fip/fip.bin + + $ sed -i 's/\x73\x02\x08\x91/\x1F\x20\x03\xD5/' fip/bl2.bin $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ cat fip/bl2_new.bin fip/fip.bin > fip/boot_new.bin $ $FIPDIR/gxb/aml_encrypt_gxb --bootsig \ - --input fip/boot_new.bin - --output fip/u-boot.bin + --input fip/boot_new.bin + --output fip/u-boot.bin -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device - $ dd if=fip/u-boot.bin of=$DEV conv=fsync,notrunc bs=512 seek=1 + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 conv=fsync + $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 seek=9 skip=8 count=87 conv=fsync,notrunc + $ dd if=/dev/zero of=fip/u-boot.bin.gxbb bs=512 seek=8 count=1 conv=fsync,notrunc + $ dd if=bl1.bin.hardkernel of=fip/u-boot.bin.gxbb bs=512 seek=2 skip=2 count=1 conv=fsync,notrunc + $ ./aml_chksum fip/u-boot.bin.gxbb + $ dd if=fip/u-boot.gxbb of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.gxbb of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181085 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F61DC6FD1D for ; Mon, 20 Mar 2023 11:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VzNRUiHw++Qv4drXGbPoTvNor3UzzuSiCUme0fb+6cM=; b=DQe6aHa7Ao0zRF 5+xtHKmAk02tY2r6bHOUFhJ6FVTC7+oBtV6vC2o5mojEXmIeo0iz9UNkDZt92koBt6z+LNJkarF8S OgzI4OlKzwRAk/GVoin2KNXOYObN7ViATyrNFpKlEAtajjJFDo2vY7r1clybP+1V5HCNp/AQ9bGjV hvA77hRl8D9RGhQM48RXxHa1hVluKL9/pXRAusHBh2VHFcXjssr37oubtEoKekpm6JDvXa3PTJhbV X5M7HOsCjGnIYQM4AdJ6FuHxjZaRGQmq+J91kLYRgpSzTKNFzv8NLYtr3Mo/9G5Bz1O9aaVvB72Kl jNvwejIOel4Lc3iUA+qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyN-008s57-0P; Mon, 20 Mar 2023 11:46:43 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyI-008s0j-2J for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:41 +0000 Received: by mail-wm1-x335.google.com with SMTP id az3-20020a05600c600300b003ed2920d585so8971320wmb.2 for ; Mon, 20 Mar 2023 04:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312797; 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=YTDW0SCqpNfpSHS0rXT+ze4p7/dNzF26TO6fxVNniNc=; b=N80UnbmLnO7fZ+2Rfqx2YXlz/Mf4DRMbP0vesJg1dDF4WsV68qmGqzlHBO2wKzby+l yny8EgifxdCiCRCKVxUHc8ON5OIatZITR31VSop4WBWUYvZnNMBCEzfFWk0SD1jV0xOO lqltDDnFKtvuIvBhS2mdXd1IeoK+HNFdsw6UYgRlME1Rm844XwI9rpNpdcxCnc1ecQ2a Ac6p4PXMB8Q7Xjurkpvxpr/MYDeRuxmJ8MdtR1BCQiJs3Jaq3IKd2tEzModPJ0RKXRTV 36flo9HSXga1pWd92WqXUG62abjrKITwYcDznhPMeuinxkwk0dKnWQ70UMxJFlDKrzn7 SXpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312797; 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=YTDW0SCqpNfpSHS0rXT+ze4p7/dNzF26TO6fxVNniNc=; b=Afy7u6Wh1UlH+f0Hm4fWE1R+mmYW+OGLxXhgdjSLkTj/66Lxz8p9umgEowVAxFJcgV 2UcAPOk83tJF47lWlpDzRCUUL8pwXgU4RGwD1Lb3BPiJo7Tb/OcRLl1LuDbEnL8LaxPT I1qj112mgFZs4xQKU/iWvESbHHy2bInx7y2cUliBSmYs2+ntbtqL8cveUws7jdfAk8HG rT5W4Q5oJwK3zB8jAyADajVQMD9QtiKMbVDOJZXRXJNiAGf121hqRxV9thxzJVKed6bg uuFMlkBns4VguDLREWnlDKt4FkjWh3U7DRdlnltt2aVvaiTo+Ngi2UXEB6pCeLuvtX5d MFZg== X-Gm-Message-State: AO0yUKWHwHwHKWeaHY9XoCvDq3u1bAYrZsJuX5+D02J6Y+BjaqnC2vdf kBi2TnU7i+cXqBuntr8+dgc= X-Google-Smtp-Source: AK7set8H5dccekDb8PtlPXSlBa8GKZfp4GeOilUwC3/UBsubiTv+1X9FjAtYhMiBamzd3ERvUcGTjQ== X-Received: by 2002:a05:600c:4752:b0:3ea:e834:d0d1 with SMTP id w18-20020a05600c475200b003eae834d0d1mr32964840wmo.36.1679312796864; Mon, 20 Mar 2023 04:46:36 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:36 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 15/33] doc: boards: amlogic: update documentation for ODROID-C2 Date: Mon, 20 Mar 2023 11:45:51 +0000 Message-Id: <20230320114609.930145-16-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044638_760393_F1777185 X-CRM114-Status: GOOD ( 10.06 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/odroid-c2.rst | 54 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/doc/board/amlogic/odroid-c2.rst b/doc/board/amlogic/odroid-c2.rst index 8a1be4bf55..82eea3820e 100644 --- a/doc/board/amlogic/odroid-c2.rst +++ b/doc/board/amlogic/odroid-c2.rst @@ -1,12 +1,12 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for ODROID-C2 -==================== +U-Boot for ODROID-C2 (S905) +=========================== -ODROID-C2 is a single board computer manufactured by Hardkernel -Co. Ltd with the following specifications: +ODROID-C2 is a single board computer manufactured by Hardkernel with the following +specifications: - - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 2GHz + - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz - ARM Mali 450 GPU - 2GB DDR3 SDRAM - Gigabit Ethernet @@ -16,9 +16,9 @@ Co. Ltd with the following specifications: - eMMC, microSD - Infrared receiver -Schematics are available on the manufacturer website. +Schematics are available on the manufacturer website: https://wiki.odroid.com -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -27,38 +27,44 @@ U-Boot compilation $ make odroid-c2_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-c2` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh odroid-c2 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash $ DIR=odroid-c2 - $ git clone --depth 1 \ - https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 \ - $DIR + $ git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 $DIR + $ $DIR/fip/fip_create --bl30 $DIR/fip/gxb/bl30.bin \ - --bl301 $DIR/fip/gxb/bl301.bin \ - --bl31 $DIR/fip/gxb/bl31.bin \ - --bl33 u-boot.bin \ - $DIR/fip.bin + --bl301 $DIR/fip/gxb/bl301.bin \ + --bl31 $DIR/fip/gxb/bl31.bin \ + --bl33 u-boot.bin \ + $DIR/fip.bin + $ $DIR/fip/fip_create --dump $DIR/fip.bin $ cat $DIR/fip/gxb/bl2.package $DIR/fip.bin > $DIR/boot_new.bin $ $DIR/fip/gxb/aml_encrypt_gxb --bootsig \ - --input $DIR/boot_new.bin \ - --output $DIR/u-boot.img + --input $DIR/boot_new.bin \ + --output $DIR/u-boot.img $ dd if=$DIR/u-boot.img of=$DIR/u-boot.gxbb bs=512 skip=96 -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/your_boot_device $ BL1=$DIR/sd_fuse/bl1.bin.hardkernel $ dd if=$BL1 of=$DEV conv=fsync bs=1 count=442 $ dd if=$BL1 of=$DEV conv=fsync bs=512 skip=1 seek=1 From patchwork Mon Mar 20 11:45:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181086 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5809AC7618D for ; Mon, 20 Mar 2023 11:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Me8TD6Fg2M/0/mDw6FhLe15J55AsszKV+satQj+/opw=; b=M3l2PjFJIWqzuj OzZtFjdz9Zv122fre6qIuBM6kHUUFKr9O+XCEke7EyYzT8Z3Xr2y4aRA96aVLEiBrtsoqY57eIBxz 8lnyyH255D4CPt/oT2raImUDH4DS8nKhg01BpCibt/h/fdZN5dXaMAqKBId5Q3Cr8OpeBxbujK3dE /MtqBS3uXTaQacxzmyTvPABqlQ5NNA+zAa3FnKKQTwGXgsA7gxqCt3O8CgtwP1BCtorkZJjfvluBE OJ23g7mGL/A6M4A/UwgoaVgmoVCqcvQCrRJqwMyyZXKPHq2wpDBNYnPSi39MekkxL0zRWvkH+rLUl Laqg+VQtEnnu8DoV4IWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyQ-008s7x-1H; Mon, 20 Mar 2023 11:46:46 +0000 Received: from mail-wm1-f44.google.com ([209.85.128.44]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyK-008s28-1R for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:42 +0000 Received: by mail-wm1-f44.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso7315309wmo.0 for ; Mon, 20 Mar 2023 04:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312798; 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=gAPjc+wftc1KWbsSLasANfXAMogdqoGMpHyLr7Kq5OU=; b=Ubbb42P0tUB0e/2/FJdvBuI8/Blt7CIlj5zO67QUPjUJqfu0zh+rgYMBknHCkpJPyW fTCh4Y2kP3QKdIW1H4dTOyEARdcwP0aRm6GZTGYCiIyu2doc5LC7cpG7aDbyuugHIdbI W7+fwwudQIBKKVSa6NP/g1fMZgp6TZJ9r8sqk/plMBCiclfw+Wgm66WlOD9V3yhVcX09 f/7blStQfTjRGU/5baoh4OUJBc/ey677cGekZBK1/ah7cV0kl8zFmDP8D2uAk2rEphus HWUwY2VVfIl1O5G8mlggTykzbJPIxb0WdspaKEgZ9lIJooUEJEd9Fz7HjOJI6u+eJSiD t3TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312798; 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=gAPjc+wftc1KWbsSLasANfXAMogdqoGMpHyLr7Kq5OU=; b=IBlnUbMjmn6D+dF7bStJkKZATXfTf6TgA4b2mKUwqADijWz/FKoha0Q5/gmFCBCS4y meChMptebax2sNEAGC1TRRzPOs6H/vAw5N7Esib027yPgL+IC32+Kn+eLQUFX9+SX/9T 6r3ToEIEUOLmOJcyKjJksK9MUyQxkadjJx98P/FpEAHdKl70IQZDMyaAx+gg9fbvFdek 50w5h6Iqk0m3rnU34gitZ5bi6AWSQsyHYJxWRe6LlzvwPALXhgeqD/c/nLWebXiENhlU EMtphONevWizEIQaLhdKP3OyHzJRk7AIiaKnky1Ox2yAAcjXheWW72G0XyoJviZE7XEw 6d3A== X-Gm-Message-State: AO0yUKXjNkXusG+CyZBCUOPNPqBHqRuAcyA6L3N07tsX5v24/XBFpK1a 2ySpcPoyorh6edABGiRwivA= X-Google-Smtp-Source: AK7set9JOfRF8mFwlxlZwZB+dozSQra04LoYj0R2LevmwB73UTz+DSG62SQG9iBSkZspj1m9eqVK3w== X-Received: by 2002:a05:600c:201:b0:3ed:e715:1784 with SMTP id 1-20020a05600c020100b003ede7151784mr3566004wmi.15.1679312798421; Mon, 20 Mar 2023 04:46:38 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:38 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 16/33] doc: boards: amlogic: update documentation for ODROID-C4 Date: Mon, 20 Mar 2023 11:45:52 +0000 Message-Id: <20230320114609.930145-17-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044641_144960_68C27BCC X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Notably drop references to the ODROID-HC4 board as its support has evolved and we will add an HC4 specific document in a later patch. Signed-off-by: Christian Hewitt --- doc/board/amlogic/odroid-c4.rst | 117 ++++++++++++++++---------------- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/doc/board/amlogic/odroid-c4.rst b/doc/board/amlogic/odroid-c4.rst index b512c6a3d8..89198cda91 100644 --- a/doc/board/amlogic/odroid-c4.rst +++ b/doc/board/amlogic/odroid-c4.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for ODROID-C4 -==================== +U-Boot for ODROID-C4 (S905X3) +============================= -ODROID-C4 is a single board computer manufactured by Hardkernel -Co. Ltd with the following specifications: +ODROID-C4 is a Single Board Computer manufactured by Hardkernel with the following +specifications: - Amlogic S905X3 Arm Cortex-A55 quad-core SoC - 4GB DDR4 SDRAM @@ -17,12 +17,9 @@ Co. Ltd with the following specifications: - UART serial - Infrared receiver -The ODROID-HC4 is a variant with a PCIe-SATA controller, the same commands -applies for HC4. - Schematics are available on the manufacturer website. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -31,14 +28,20 @@ U-Boot compilation $ make odroid-c4_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh odroid-c4 /path/to/u-boot/u-boot.bin my-output-dir -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-c4` or `odroid-hc4` +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -58,7 +61,7 @@ the git tree published by the board vendor: $ make $ export UBOOTDIR=$PWD -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -82,58 +85,58 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 --compress lz4 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --ddrfw9 fip/lpddr3_1d.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --ddrfw9 fip/lpddr3_1d.fw \ + --level v3 + +Then write the image to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181139 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 445AEC7618D for ; Mon, 20 Mar 2023 13:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4EHXPQvqrvSs3QAIoixdR+XU0xcYTSDHtSjVSfDsoGE=; b=kq7RvGcREAszbs iXKn8SivPC210ieGkWfuoI4cZtz5ig8pT33WnRWpxAHnQECLpMavcxUFqaxwOtVT0RWtAe0hYvio5 djjUtOdZ6yxGkGBrIOHrYPUu9gXlzu5Rr/nhVDsP9tQqQ4MVuchnSdnh0ju4fIRMkrCbQs12eBcVF pFrHpalJItG0kcT2Xq9o0l72ciT+5qcXvwMPomKfVy0sTtcLFfzrDEB1KxJOCD2KSNta3iSpOY1NI oqEP7h0QFHDMFM4QghbaDkycbmXXcT1KRXPFC0gu7Q5aTUQikhSkuDfv/2XYdWPhGLTjR3nrZL5yu 1MZmkJ62yx2MuEltXx/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7c-00928q-0s; Mon, 20 Mar 2023 13:00:20 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyT-008sA1-10 for linux-amlogic@bombadil.infradead.org; Mon, 20 Mar 2023 11:46:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=K8RZphyBX8i1O0montdtL5/Jas1xXVgSIZdOxXX4/e0=; b=A6bcaCqtnO7nWAjyJXOI8Vv3yu koCm5Z/ZlD8uSjhvsoxGTPzsgSc2Cye/LKCEWHHgJRIc4tDPa5tX+eKSRvy+g71oyJemPBdkrBddg VdZHYGtk3ahAMIB9FJCdGguFd/+uWY+rrXC000pmGSP2AIUMHF1+rcb6Q57H1w48GDcVQdJW5Sar9 fqz3kWmRQ3mUVRJhAlWCkTuwWj4Z54C3jz/ulrvvzm8v0DD/WWdMDJXcNZuU9vbeSbiOsi0jnvOa1 cqc8Il8sFWrmtja1cJKgJujNKhF0hOcEqLNiYgqqT7Jt3PBHh5ZETYj9wmhEVFhkLB9EBG1hfw6T/ Szo4FJFw==; Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyO-003uDy-2Z for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:47 +0000 Received: by mail-wm1-x329.google.com with SMTP id iw17so1943416wmb.0 for ; Mon, 20 Mar 2023 04:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312800; 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=K8RZphyBX8i1O0montdtL5/Jas1xXVgSIZdOxXX4/e0=; b=VY9XJ+CGZDVB3V3QR7JXxW499vtk1P2wkMT1TLNEvjXV/nHRj6B719no8+r/e1X8zF +1+YgHFn1DGVN8ZEmqv394mO4vjAk3hrGG7ZApaeTFhEIX/VkTcGNpkhVlg+H397Msch n+JOtQNq/8pHOUoW9CP8FZukUSdw7FsYutrNnESNGrNz3CSkZ8TpPBiSkHfNOycJjzbC hNQ6X2TV5DvoEul4O1UmpRFAXr9VwJe/cE57zfZxjgoLIBdDfx11iRinQ/1gTpTtNIyj SaQSAHy81XV6ahfbVlC1Afp7TUvnibggPUTJU8z+azMQoIcJUin84EhxEUbhyOwTdaXw beHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312800; 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=K8RZphyBX8i1O0montdtL5/Jas1xXVgSIZdOxXX4/e0=; b=eAaCy3bPncyh//qLUs6jLSCvAQds0TnKgpOYjUasAt0wb5BRfkd2Dr1ClyE0ahsL0n JResFu2OS02WBleYt9hfKGzYFR66TjC2SbK11dwG34RcHp3nWtwAiccuN8j6p1nL1NT8 8WfKIkNokxNjpzFZk9ZkgJZTmE99kY1vKPh+F6m6GOOv+zw2eI64zHnFZD8SJX5aYou1 +daAO2fi/rrpPQ7a5NV0Qn7fWHiszNRwfQQx1k3VCI5g+kUvys+g9p3zrMJGthnuRVTa aUQ3sELHobseszyQtlevR4LwTXGgO+oOBfpkJopbUCx+yRhMri1aNwxqvBJ/C1tT71rw 1tog== X-Gm-Message-State: AO0yUKWECcvzAulx6UEHK0utBQwAV2N7t85xQXfWm8oSRF57dLZwur+P WG19nihzC/D1uwnsVFsQZFQ= X-Google-Smtp-Source: AK7set/LcodvJfuvwQe0xgAbjvoh1I2lS79YV4RIfRg+IphvsKGMB9pZsgDCbdd1nBNzWC0kJT+1Jg== X-Received: by 2002:a05:600c:d0:b0:3ee:36f:3485 with SMTP id u16-20020a05600c00d000b003ee036f3485mr1631695wmm.8.1679312799936; Mon, 20 Mar 2023 04:46:39 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:39 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 17/33] doc: boards: amlogic: update documentation for ODROID GO ULTRA Date: Mon, 20 Mar 2023 11:45:53 +0000 Message-Id: <20230320114609.930145-18-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_114645_095665_1F99CA3B X-CRM114-Status: UNSURE ( 7.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/odroid-go-ultra.rst | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/doc/board/amlogic/odroid-go-ultra.rst b/doc/board/amlogic/odroid-go-ultra.rst index 8df9e0cb79..50d91394d4 100644 --- a/doc/board/amlogic/odroid-go-ultra.rst +++ b/doc/board/amlogic/odroid-go-ultra.rst @@ -1,10 +1,9 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for ODROID-GO-ULTRA +U-Boot for ODROID-GO-ULTRA (S922X) ========================== -The Odroid Go Ultra is a portable gaming device with the following -characteristics: +The ODROID GO ULTRA is a portable gaming device with the following characteristics: - Amlogic S922X SoC - RK817 & RK818 PMICs @@ -19,7 +18,7 @@ characteristics: - 2x ADC Analog Joysticks - USB-C Port for USB2 Device and Charging -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -28,7 +27,19 @@ U-Boot compilation $ make odroid-go-ultra_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -Pleaser refer to :doc:`pre-generated-fip` with codename `odroid-go-ultra` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh odroid-go-ultra /path/to/u-boot/u-boot.bin my-output-dir + +Then write the image to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181087 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B09AC7618A for ; Mon, 20 Mar 2023 11:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HhrEX4/Qh/5YalJOukuec6HtGyjpeW69x3Q4+6323dI=; b=zs1RCEaGCd181V JW4ba1jv9WLzS4z6jARAComY5vWzvLCOYi8DA+xoAw60UJiXtZXAp91PZfyVQjcZhg9SIE4H4BLcU VXKM/ZcIXr59onsqBa+Ha7XVh+k61ZjNxGIeGbcbBqNPJeooeBbgbOq4+GoD5TqdkLhNlgwc1g90b rxC4YmSDkbB3QjSntm3FMd95rube7nlV7GHL1PF0Nc9MowrvnS7Xp6WkmBvOjmQ/8k3TJZDmESKBx 8cNv7MJWeoZ/VEkcMN8/XdCmhs2vdAgLNA4cpl5CUnbiXK8cSDi/x0L3Xc5LdMDoknNAJokPl+2AY fLiAsl5+D65x6D8aNM1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyQ-008s8H-2P; Mon, 20 Mar 2023 11:46:46 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyM-008rsN-09 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:44 +0000 Received: by mail-wr1-x42b.google.com with SMTP id l27so1720619wrb.2 for ; Mon, 20 Mar 2023 04:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312801; 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=dInwRiaov3eW4SnMIasTLftHInE4mNys6ha30787nX8=; b=Hh0e6DaOovqv7E6R0PTGQqbHKSEu2LwS34zJ+QS384hkfA6hHAmT2ivA1jDFt70W+i MfBlgjbsZZGE/SkQHfp92KgWtVxmu52Ttz5NeNMs8TcEjIyDKEl9oT50LO0NUTsyzNNj DDP85cyb8a5aJ4e3YGo+s9XY6X87fJxrouClhGpV1A+CiOjO68B4hJTilkuC7UtIveNk 8vwMxv9TE+P1SaRSA2FCKubd9caChKk19wQXVlnHlIbA+8jdcXeWCtrcHLh38FNlVQa9 wIM90bZSmRRVwruJFzRwhq9M9ntekavlJVgQ/n6B2Xduu6viFXyyyWqJtsA+hRLDtvyP rlAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312801; 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=dInwRiaov3eW4SnMIasTLftHInE4mNys6ha30787nX8=; b=APA8en6U9757CRzEVhkzaeCAaUtvDuegRIVrOsvX2YF1LCQD1K02ItjHEEfGAy6nk4 3OfpNP/S5k/ae2q1xN+YrGAjsez8bTve9DeRRshQsu+jP+4pkhDbsyIkrqHpINpQvmTI XpzWM9RFgbrow1tlP5f9nlX0PwlUE7rdkgTJOwbFQzOs3ayx/jjFJVmVu5rqlQJb73eB 78EbrIqE2RS7OW89Rj6lUe5sL4BjQRusG3z7ymSgNU8QGrCHRR16THlgRDGCdf65iF/l HBoSlguI8QFzD/o248OrBZ+d6F9kUQwtjKLTAog5lbn+urTA6U2bWjsyZs88F82MC/7M 0O/A== X-Gm-Message-State: AO0yUKVzs5vNFPAwVxhkTFy0qZHnLsFoQnweqFfWx0hCbWss5fMz5Sb8 OfZ2JC8HFmN3FIPYPQXj1m0= X-Google-Smtp-Source: AK7set9tWu2fjiZXFtrHKWjSVbzc7Nc7lshPLHnhGdSmZiBQyaOc47p7vEvdCtLwjpx7H3r7RdnR2Q== X-Received: by 2002:a5d:6b0e:0:b0:2c3:db98:3e87 with SMTP id v14-20020a5d6b0e000000b002c3db983e87mr14106386wrw.20.1679312801559; Mon, 20 Mar 2023 04:46:41 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:41 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 18/33] doc: boards: amlogic: update documentation for ODROID-N2/N2+ Date: Mon, 20 Mar 2023 11:45:54 +0000 Message-Id: <20230320114609.930145-19-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044642_096018_FBEDD6DB X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Notably mention the ODROID-N2+ and the option to use FDTDIR not FDT for automatic device-tree selection. Signed-off-by: Christian Hewitt --- doc/board/amlogic/odroid-n2.rst | 122 +++++++++++++++++--------------- 1 file changed, 65 insertions(+), 57 deletions(-) diff --git a/doc/board/amlogic/odroid-n2.rst b/doc/board/amlogic/odroid-n2.rst index 7aad36e003..8ca1f89699 100644 --- a/doc/board/amlogic/odroid-n2.rst +++ b/doc/board/amlogic/odroid-n2.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for ODROID-N2 -==================== +U-Boot for ODROID-N2/N2+ (S922X) +================================ -ODROID-N2 is a single board computer manufactured by Hardkernel -Co. Ltd with the following specifications: +ODROID-N2 and ODROID-N2+ are a Single Board Computers manufactured by Hardkernel with the +following specifications: - Amlogic S922X ARM Cortex-A53 dual-core + Cortex-A73 quad-core SoC - 4GB DDR4 SDRAM @@ -15,9 +15,13 @@ Co. Ltd with the following specifications: - eMMC, microSD - Infrared receiver -Schematics are available on the manufacturer website. +ODROID-N2+ uses Rev-C silicon allowing higher CPU opp-points. U-Boot contains logic to +read the model detail from SARADC and select the correct device-tree file if FDTDIR is +used instead of an FDT reference to a specfic device-tree. -U-Boot compilation +Schematics are available on the manufacturer website: https://wiki.odroid.com + +U-Boot Compilation ------------------ .. code-block:: bash @@ -26,14 +30,20 @@ U-Boot compilation $ make odroid-n2_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh odroid-n2 /path/to/u-boot/u-boot.bin my-output-dir -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-n2` or `odroid-n2-plus` +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -44,16 +54,14 @@ the git tree published by the board vendor: $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH $ DIR=odroid-n2 - $ git clone --depth 1 \ - https://github.com/hardkernel/u-boot.git -b odroidn2-v2015.01 \ - $DIR + $ git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidn2-v2015.01 $DIR $ cd odroid-n2 $ make odroidn2_defconfig $ make $ export UBOOTDIR=$PWD - Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -76,57 +84,57 @@ the git tree published by the board vendor: $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 --compress lz4 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181140 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E4B7C6FD1D for ; Mon, 20 Mar 2023 13:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vbOE/885c1qra67vu9i49exZuN6N1E3eiR8FNU2Pjng=; b=Z6jwH8JT7xw/Iu CvXFo7Sle1CkTJGzIvy6BmakZkoFZdJhx4CaJ3tsdPQaZp4oTGqxRxrTqEQaNlCpYLVww1r073G43 lzB6yTbFi5B5EU44DWpXTJ/8EjSohOVXkKvQJ8N/3WA99skhtru/p8+rUeBZH0rzEwU20Zhv96zVd 0B1N/qa/5LmA2Bc+jjusMz7zqQy/R5Fd/ybL1eLH8PeR8n8UfVfTsLroQ5RykYgyRghgHxYXigFUj ZajYKRtaqGVTdu4RsvMfPavwMl6+Jnd/8TmuAAjYMXvR0esVRe1b2reeB0kZaX6GOVHCi4l0+mJf/ c6OUpEw63djtkOQyh3RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7b-00928V-20; Mon, 20 Mar 2023 13:00:19 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyN-008rqP-2L for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:45 +0000 Received: by mail-wr1-x432.google.com with SMTP id l12so10028815wrm.10 for ; Mon, 20 Mar 2023 04:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312803; 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=cCUlzkd+ZiUVoODVUj+CDP7kcBJvcDYrO0Lw0y8ZFBw=; b=k7ltuPeuVkrAen+lIpq9si4Pj3SgyStetVbU0fJ6sFbf5kGvyjEqI7cAzCtXTAKpdb YE6s7rtq1EV5LZf2wzrcKJFhjXY/mJBjfpsCQwnwnylgoJjx7RKKB0Y3D9H/4AaymKIx jTk2S4FbC8H+UF0CfSpw06mbaAmb2ig3WnNUJA//8CM+TuIcFdcuNQul2RRsts/d4KJF /SqmnSbyrsWxFfzrGWtI61W8JfjAtZW5Pa1mZAVPyGoCW8mDUbJhtL9CoBhnvQWGp8Ms Uxbr/qARsA4gnMneMpVgRhclQN+UgcaCg2eyj44GVCS/cOFNF1MgeGEivujzw4YRcezy o6wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312803; 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=cCUlzkd+ZiUVoODVUj+CDP7kcBJvcDYrO0Lw0y8ZFBw=; b=KAO/7iV3y89dNy3YNEq4wjLxHjnIbME9NAg0B42jPRmZDsRi4b4mwY/CYKj6gyrsRE WGR7Sc4oWbkbKjxs7+EsiBQiS2eGjJO6yoD8oLohF8OfVT6OnbuMHjkOPxx0JNOpk078 hUNExrjGOFWnPjLE4yfcdRg/tfw4bRTsvi7OGN3osTacJyjZ6hhWiYionI2Sjwlfgaus RjWypjTCr6/PIxIP5F9JmAbq001ssSBUQ5toqnHmcpy/jOF0JS6uvhUMSfFisv37kAwd Isq82kEKWJatHw6hCoJsMn4k1wq1eVmb2jkP9yiQGLQJBPZaYxbZEgcD/qqDvuf52pcs krFg== X-Gm-Message-State: AO0yUKXDoXg6RwKYTd7PwqPBaIolXitzlGcLROmJXqvILktlXpRd1Xdf rGorFrbmtT6hB423GN/PuhM= X-Google-Smtp-Source: AK7set+cu8/Sooexo1ycGHzJnbhIdwi1lW/fxCkwMOT2WzK3wIS42mkuYW4STAI8Bm8KEpuDJUP/3A== X-Received: by 2002:adf:f947:0:b0:2d2:f3e3:115d with SMTP id q7-20020adff947000000b002d2f3e3115dmr9372020wrr.59.1679312803300; Mon, 20 Mar 2023 04:46:43 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:42 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 19/33] doc: boards: amlogic: update documentation for ODROID-N2L Date: Mon, 20 Mar 2023 11:45:55 +0000 Message-Id: <20230320114609.930145-20-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044643_764003_BEBB2534 X-CRM114-Status: UNSURE ( 7.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/odroid-n2l.rst | 33 ++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/doc/board/amlogic/odroid-n2l.rst b/doc/board/amlogic/odroid-n2l.rst index afd4409d1b..b264ace7f5 100644 --- a/doc/board/amlogic/odroid-n2l.rst +++ b/doc/board/amlogic/odroid-n2l.rst @@ -1,22 +1,23 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for ODROID-N2L -===================== +U-Boot for ODROID-N2L (S922X) +============================= -ODROID-N2L is a single board computer manufactured by Hardkernel -Co. Ltd with the following specifications: +ODROID-N2L is a Single Board Computer manufactured by Hardkernel with the following +specifications: - Amlogic S922X ARM Cortex-A53 dual-core + Cortex-A73 quad-core SoC - 4GB DDR4 SDRAM - HDMI 2.1 4K/60Hz display - 40-pin GPIO header - - 1 x USB 3.0 Host, 1 x USB USB 2.0 Host + - 1x USB 3.0 Host + - 1x USB 2.0 Host - eMMC, microSD - MIPI DSI Port -Schematics are available on the manufacturer website. +Schematics are available on the manufacturer website: https://wiki.odroid.com -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -25,7 +26,19 @@ U-Boot compilation $ make odroid-n2l_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-n2l` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh odroid-n2l /path/to/u-boot/u-boot.bin my-output-dir + +Then write U-Boot to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181141 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 693DFC77B61 for ; Mon, 20 Mar 2023 13:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DrRsMo7uuSgSPaPCH3E3kbRpVlfLePGnUtF6lfGY8+c=; b=Sfy/iTCz1dUn8u j0H0R5bBOl4NUkL8M1e8VG3Ccb+iFCz0nuViJ0Ogc+f9lLpwbzWLlP9F39u4n2LDr2URg9ncSVcjd hQWIncsjh0F16/kedxU7VsJSYeDoClw+UjWi6j0mb20mXiUb/FZjAlp+oq+xxQFfzI9edGB2fPpn6 q8bafn4dffFSMCJVSuCHVRDB0OqDNMjFXuF2zKNTFlalmPA5XBN8ZAibKwlsq4zR37GVDzSQWOjcU 2DSxNGitQNjyLaqcW01ERuWz336BKxwBZXItTr7DAzh0r6+9prhgUgYYlRfJJhJusOe/Pc7DO3a6q q2YpCmZL1sg8oBFsfqXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7b-00928h-32; Mon, 20 Mar 2023 13:00:19 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyP-008rp7-18 for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:47 +0000 Received: by mail-wr1-x42e.google.com with SMTP id o7so10043990wrg.5 for ; Mon, 20 Mar 2023 04:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312805; 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=YPxxmWcR46ur14NKsEcVWS/WLKmARgpHeR6EHeDbDc8=; b=Esb4FgqVInGJ1WHHC7+XazAfEC7bAkZoXA2ebFMJwgDYpXSQEPS2jsrRJDphIJgJVx IcZ4sJtjkViShyy+EaPp+BA0auDXOlJ70O8WQ92vDapFU3LA+CGCaPIGbgVjo4hKMNcR F/7w9v0U+538WbZ0m3RaglvvgZF4uAlJLLaylMjrCkrivu7Un3R7nFZKdpZ+ZXMZxU3a lwZJV5effnyeJo4dO5G9CxE3lZy0ouixCJC/M5jdSYXUYThyiLjVZvuxQGE5KFSfQGF3 0vjPyFAYIG28rFFx6mYm4GCZA5fhAX8KFX4YOT4DDk+w9Unzyp1zRCZuXFn84Ym7VCdw 1QcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312805; 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=YPxxmWcR46ur14NKsEcVWS/WLKmARgpHeR6EHeDbDc8=; b=dPevyjl7fHcYcdI32Tqh98cZWTyVztZzI2S5jJqCOlnDTWQbxMwt54d2g1Cr8pye/q i6sfUVuMXbXevbL6GqHzq4DXQeXyjmN3fNCl5tyFXGEntR8yerWekr9Rkd5PsIQceUuo Ei2g3m8MJJHTfoSiOtEAoMVDvlFxK9XBvEo0jd2oMz+USM3iLtt5WgBy1TnVPH08DNlZ RnQ7BOIlFlomJfqqWnLM8W08NAYlBkpMfSmp8RxKnSBSAVsS5l1eoJT3rgjimYeSp9xM pFO0dlxsoM6LZKLY/fcm9qs9OqT7SOCKrcxmUiAq+4kv0fFb7gmWXe8bK0cOMLZJWnVq ncPA== X-Gm-Message-State: AO0yUKVLeZD/lX7jjDok5gRKsI7yi+pL6klSPCoYc86RZfrDZNJwgCFM DICaDuJ/0OKCpPAf2XDuU7E29wH5LgQMrAPL X-Google-Smtp-Source: AK7set+dql9H+EmVTWMGUlRDkv5qcNsGyIYqCqr/mDO6F6MGgLraew+VSkJr2HyhNp3NcS+D+qyOQA== X-Received: by 2002:adf:ee4f:0:b0:2cf:ef5d:4ee7 with SMTP id w15-20020adfee4f000000b002cfef5d4ee7mr13294187wro.69.1679312804846; Mon, 20 Mar 2023 04:46:44 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:44 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 20/33] doc: boards: amlogic: update documentation for P200 Date: Mon, 20 Mar 2023 11:45:56 +0000 Message-Id: <20230320114609.930145-21-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044645_440798_7EC8169A X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Notably we can now support U-Boot install to the internal eMMC storage in addition to SD cards. Signed-off-by: Christian Hewitt --- doc/board/amlogic/p200.rst | 87 +++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/doc/board/amlogic/p200.rst b/doc/board/amlogic/p200.rst index 5e7c6b0276..b5c6ad096e 100644 --- a/doc/board/amlogic/p200.rst +++ b/doc/board/amlogic/p200.rst @@ -1,25 +1,24 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic P200 -======================= +U-Boot for Amlogic P200 (S905) +============================== -P200 is a reference board manufactured by Amlogic with the following -specifications: +P200 is a reference board manufactured by Amlogic with the following specification: - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz - ARM Mali 450 GPU - 2GB DDR3 SDRAM - Gigabit Ethernet - HDMI 2.0 4K/60Hz display - - 2 x USB 2.0 Host + - 2x USB 2.0 Host - eMMC, microSD - Infrared receiver - SDIO WiFi Module - - CVBS+Stereo Audio Jack + - CVBS + Stereo Audio Jack Schematics are available from Amlogic on demand. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -28,14 +27,20 @@ U-Boot compilation $ make p200_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `p200` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh p200 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image but sources have been shared by Linux development contractor, Baylibre: .. code-block:: bash @@ -50,7 +55,7 @@ the git tree published by the board vendor: $ make $ export FIPDIR=$PWD/fip -Go back to mainline U-boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -63,37 +68,51 @@ Go back to mainline U-boot source tree then : $ cp $FIPDIR/gxb/bl301.bin fip/ $ cp $FIPDIR/gxb/bl31.img fip/ $ cp u-boot.bin fip/bl33.bin + $ wget https://github.com/LibreELEC/amlogic-boot-fip/raw/master/nanopi-k2/bl1.bin.hardkernel fip/bl1.bin.hardkernel + $ chmod +x fip/bl1.bin.hardkernel + $ wget https://github.com/LibreELEC/amlogic-boot-fip/raw/master/nanopi-k2/aml_chksum fip/aml_chksum + $ chmod +x fip/aml_chksum $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 - - $ $FIPDIR/fip_create --bl30 fip/bl30_new.bin --bl31 fip/bl31.img --bl33 fip/bl33.bin fip/fip.bin + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ $FIPDIR/fip_create --bl30 fip/bl30_new.bin \ + --bl31 fip/bl31.img \ + --bl33 fip/bl33.bin \ + fip/fip.bin $ cat fip/bl2_new.bin fip/fip.bin >fip/boot_new.bin - $ $FIPDIR/gxb/aml_encrypt_gxb --bootsig --input fip/boot_new.bin --output fip/u-boot.bin + $ $FIPDIR/gxb/aml_encrypt_gxb --bootsig \ + --input fip/boot_new.bin \ + --output fip/u-boot.bin and then write the image to SD with: .. code-block:: bash - $ DEV=/dev/your_sd_device - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 conv=fsync + $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 seek=9 skip=8 count=87 conv=fsync,notrunc + $ dd if=/dev/zero of=fip/u-boot.bin.gxbb bs=512 seek=8 count=1 conv=fsync,notrunc + $ dd if=bl1.bin.hardkernel of=fip/u-boot.bin.gxbb bs=512 seek=2 skip=2 count=1 conv=fsync,notrunc + $ ./aml_chksum fip/u-boot.bin.gxbb + $ dd if=fip/u-boot.gxbb of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.gxbb of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181144 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3875DC77B60 for ; Mon, 20 Mar 2023 13:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0/XeOf7N6eRQvfMtOEq3r/F0622VPFjK5aykUzjdc4A=; b=0Hou87MF6J47DM LA4YASC6oQUnMFB9kRVqTzePFH7TPYLSwt/EyJCHPCNfk5WmfOue7ZRM/l0IXmEVzxQZXpAdJCUHA 7LEfu+KUF+H8Dn2VF3Aw0ciKiWJS3I6Pu/WgH/Yxz99AJb5Jdo0IDyY7fzDYmffgEJbkYXmhNDqM8 Ckmk6F9FhA8tKZ3uZEObmTGJ/61SnWa797k7ayGBgCLYuA8E5+HQz5o0IQdfQuBwUhdQocBFN1wut kChLhlJoqdKewjC4J3rGmC90JbrDE34n7/2gi8GFKb5mxws/9eJVdToSJ94+watWxmfampWXKKhoo 47JN/q0CQ7PlVVoumwbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7c-00929D-1u; Mon, 20 Mar 2023 13:00:20 +0000 Received: from mail-wr1-f51.google.com ([209.85.221.51]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyS-008s8h-0l for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:49 +0000 Received: by mail-wr1-f51.google.com with SMTP id o7so10044053wrg.5 for ; Mon, 20 Mar 2023 04:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312806; 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=Q1j0pT0rKRqAnlEnQeXBE7k3l8qsVlNzG8h9gMj7DWs=; b=PQrApTLRE61ivCIyBZd6lx5aRXW34D4mUxpmI8Qco1rGy57Wt93drJf4lKRQNrtUgJ eS53AaOnOYOgGVzXCrRfIW0aO4miIGLiH+XXFrqhAmY+ft3t511UAlfFgdjZhybhfEK4 1Jv0pcmPTuDUgYi7ozz5em506IF/aRLU+uJfKkYo4KzvooGImQZ+HwFwPAboOyTLdk3L VB2qY25WbyRMjOy/Ti5BYw9+WJFdLVAzH1OvLTL12LB5vfH+pIllETD93WA/Je4nZDJo lA51Fwfu8L71oz8VgkAPoasARDbHKqmdmFO/x0jN5LwMZ8FUNZGYopEcmynodFwZeGvv ewSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312806; 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=Q1j0pT0rKRqAnlEnQeXBE7k3l8qsVlNzG8h9gMj7DWs=; b=alsqL2Lft4ox0bn9tSh5Py7k1wc5dn64vLfwd2grJrpJxLUW5m8c8YwKsRB/vjciQ9 2fSa83urwZLmv3uGK7twT233QIWfKwSV3+OLm3lzwgadSLQLsFnhHt9zyHIjEI7vqcDe rIEkovuMN6kk5Gx7wWVTtlvibE1tvhIFCWoxn5yZjKULn5GUNUw53b186AESUOiN0AqX 80aRmnHEqv7pzFB9qErrBr9phLth1s56Yu2olQtV0+buuwdifcb5qwbItiSAKl/SUG72 bmqT+22k6xyjez+rolvRw2KlZJARAtRt6kLzQmYIT8LZ5vz8eAKlmHvZ3C6Jt6Ff859p buTA== X-Gm-Message-State: AO0yUKXZc0Dedo/QJ/0Ymn7QNXTxOmhAI9hOcd1g9XAwScdF40dgm0Hp 8mRGXzlrcpBNZjuNYZycg3g= X-Google-Smtp-Source: AK7set+vvwlWJ1TgnCRtC5HeKOCtDRzQTw8H63/unaGSGD9M6r/W9eodQXouxM5WZgcOKB86QcRJpA== X-Received: by 2002:adf:e348:0:b0:2cf:e70a:ad9e with SMTP id n8-20020adfe348000000b002cfe70aad9emr12317927wrj.46.1679312806401; Mon, 20 Mar 2023 04:46:46 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:46 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 21/33] doc: boards: amlogic: update documentation for P201 Date: Mon, 20 Mar 2023 11:45:57 +0000 Message-Id: <20230320114609.930145-22-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044648_273930_C06E5775 X-CRM114-Status: GOOD ( 10.37 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Notably we can now support U-Boot install to the internal eMMC storage in addition to SD cards. Signed-off-by: Christian Hewitt --- doc/board/amlogic/p201.rst | 87 +++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/doc/board/amlogic/p201.rst b/doc/board/amlogic/p201.rst index 2cd236582a..b3dce4204e 100644 --- a/doc/board/amlogic/p201.rst +++ b/doc/board/amlogic/p201.rst @@ -1,25 +1,24 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic P201 -======================= +U-Boot for Amlogic P201 (S905) +============================== -P201 is a reference board manufactured by Amlogic with the following -specifications: +P201 is a reference board manufactured by Amlogic with the following specifications: - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz - ARM Mali 450 GPU - 2GB DDR3 SDRAM - 10/100 Ethernet - HDMI 2.0 4K/60Hz display - - 2 x USB 2.0 Host + - 2x USB 2.0 Host - eMMC, microSD - Infrared receiver - SDIO WiFi Module - - CVBS+Stereo Audio Jack + - CVBS + Stereo Audio Jack Schematics are available from Amlogic on demand. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -28,14 +27,20 @@ U-Boot compilation $ make p201_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `p201` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh p201 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image but sources have been shared by Linux development contractor, Baylibre: .. code-block:: bash @@ -63,37 +68,51 @@ Go back to mainline U-boot source tree then : $ cp $FIPDIR/gxb/bl301.bin fip/ $ cp $FIPDIR/gxb/bl31.img fip/ $ cp u-boot.bin fip/bl33.bin + $ wget https://github.com/LibreELEC/amlogic-boot-fip/raw/master/nanopi-k2/bl1.bin.hardkernel fip/bl1.bin.hardkernel + $ chmod +x fip/bl1.bin.hardkernel + $ wget https://github.com/LibreELEC/amlogic-boot-fip/raw/master/nanopi-k2/aml_chksum fip/aml_chksum + $ chmod +x fip/aml_chksum $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 - - $ $FIPDIR/fip_create --bl30 fip/bl30_new.bin --bl31 fip/bl31.img --bl33 fip/bl33.bin fip/fip.bin + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ $FIPDIR/fip_create --bl30 fip/bl30_new.bin \ + --bl31 fip/bl31.img \ + --bl33 fip/bl33.bin \ + fip/fip.bin $ cat fip/bl2_new.bin fip/fip.bin >fip/boot_new.bin - $ $FIPDIR/gxb/aml_encrypt_gxb --bootsig --input fip/boot_new.bin --output fip/u-boot.bin + $ $FIPDIR/gxb/aml_encrypt_gxb --bootsig \ + --input fip/boot_new.bin \ + --output fip/u-boot.bin -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 conv=fsync + $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 seek=9 skip=8 count=87 conv=fsync,notrunc + $ dd if=/dev/zero of=fip/u-boot.bin.gxbb bs=512 seek=8 count=1 conv=fsync,notrunc + $ dd if=bl1.bin.hardkernel of=fip/u-boot.bin.gxbb bs=512 seek=2 skip=2 count=1 conv=fsync,notrunc + $ ./aml_chksum fip/u-boot.bin.gxbb + $ dd if=fip/u-boot.gxbb of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.gxbb of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181088 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 818BCC7618A for ; Mon, 20 Mar 2023 11:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lgY40a4SuCC56F8EH1FGeKMiyNUaOzewl+pXynp8STQ=; b=XgezkAKUpQrSeO ZWND123WUAygM2OGYVD+Ea7ceqI1kKTZaQDnhRNQyBk0aMKcHsbvq5hh51mD9jmqZ7xnjwHQL8RPL Dx3RyG7OkurZF8oqhuB0OuB8SrGXAIw6Dghb7Jcpe/CLvX7xzE5qSiuQZeJ2N7+GS/858AP6t0aX9 Zbp40/7qxiemrVZW9FBc/zMDt6sqHFRs/rvWpxkvLzNqPkqP3reY8PpEzWgqikMhQ0ta0GS7X8YS+ o2lOcOIFMMTGfBIYjTnjlMs3/HjqRjarLVrQYEzyk7+tpb4KaXhh95baPZuOwhBdSmHF1mndUo+N1 eh3KsvSGzV8ktlKEBFeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyZ-008sEl-2M; Mon, 20 Mar 2023 11:46:55 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyS-008rwA-2R for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:51 +0000 Received: by mail-wr1-x42c.google.com with SMTP id j2so10026519wrh.9 for ; Mon, 20 Mar 2023 04:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312808; 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=Atcu05uLW0E88v6JSwvj9fA2sSk5Aok0ROhgBvPOm2I=; b=g5/cPjWuMR0nNDgt0w5e7OWk9a8phhD9XO8WdCMKHuPWkqmAt01zEysRrx4ZON5cf+ 5noUhZc6cnRAEg3gDFrqQUteLaXhRrO56pEyywLfz0zLV5caaOBJshRNgi0hBsARTaSP iz/ZjQmExa9c5pzp/6T9WB+IuTvTInnZEZ6d1JiIrPprP9JJyxklCgbvugXtw/npIHiw HOfZCX9rhZgXxpspxCy9ZEq1TEBJxCmcbMNhJW+nNqpB3NrqaRwNOQZBBnn+TJ3ah+xu RcjFxT+qQ9dWk41yGYxMUj4p7WbO5Yk93IKn+4FdZLdBra3wUpdGsNoLimoIvuqtqG28 x9Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312808; 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=Atcu05uLW0E88v6JSwvj9fA2sSk5Aok0ROhgBvPOm2I=; b=297hFZuK5S7rCdIFWx/EdTrReT6QtiHhCrmQT4gYVYDzhCxxdRIer4G2ZWvb5a0Qr5 UO0LX0nLBaLwbTzAqmvmerArNCLw4f4Xurf1ht1iSy3cxZiEJI+5DUjM7lRYxTBvw6Tp bIkUmJ0fU6lo/vlw7VWyGNYgY526Do4UwbbVOETZFgzJ2PKleXTncxWPw3nz7XPZkoB4 zbsj8kfdnD3S7wIMzpMcrXDhf/8f7KmwOkmapdkbL1JF25RMCpxklDBEV60DNPatf5wM BgAnGeGx3oGJdyK5J8glymzlB0zuWaK0lXbfMr/lI6krM1d9Rql/k+GShkPzpLDwRhGy TXCA== X-Gm-Message-State: AO0yUKVgna1V0jcv7WjDdfFUD2wgm3N03Kwb6vBhdvSqU6LuFXgduPat OytB6UjzC9Pqk70Cr/YAQt4= X-Google-Smtp-Source: AK7set8OWvYQe+2g2L30IBomuI7D1rm+yMt7EdlTegz7zZOe0xhSW2j7e5RBsbiTKuRKg/oHapuUHg== X-Received: by 2002:adf:f150:0:b0:2c9:70a4:4f94 with SMTP id y16-20020adff150000000b002c970a44f94mr14651167wro.18.1679312808328; Mon, 20 Mar 2023 04:46:48 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:48 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 22/33] doc: boards: amlogic: update documentation for Q200 Date: Mon, 20 Mar 2023 11:45:58 +0000 Message-Id: <20230320114609.930145-23-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044648_813219_BF0865FE X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/q200.rst | 76 +++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/doc/board/amlogic/q200.rst b/doc/board/amlogic/q200.rst index 3ac4116be4..c304980579 100644 --- a/doc/board/amlogic/q200.rst +++ b/doc/board/amlogic/q200.rst @@ -1,24 +1,24 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic Q200 -======================= +U-Boot for Amlogic Q200 (S912) +============================== -Q200 is a reference board manufactured by Amlogic with the following -specifications: +Q200 is a reference board manufactured by Amlogic with the following specifications: - Amlogic S912 ARM Cortex-A53 octo-core SoC @ 1.5GHz - ARM Mali T860 GPU - 2/3GB DDR4 SDRAM - 10/100/1000 Ethernet - HDMI 2.0 4K/60Hz display - - 2 x USB 2.0 Host, 1 x USB 2.0 Device + - 2x USB 2.0 Host + - 1x USB 2.0 Device - 16GB/32GB/64GB eMMC - 2MB SPI Flash - microSD - SDIO Wifi Module, Bluetooth - IR receiver -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -27,12 +27,20 @@ U-Boot compilation $ make khadas-vim2_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh q200 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image but sources have been shared by Linux development contractor, Baylibre: .. code-block:: bash @@ -47,7 +55,7 @@ the git tree published by the board vendor: $ make $ export FIPDIR=$PWD/fip -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -62,40 +70,40 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:45:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181142 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DF5AC76195 for ; Mon, 20 Mar 2023 13:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XHNUFeuSjMfLgGgRE3KAsXpAjk7lWpFU3mwCJ4i4qWg=; b=L8vHuSzjsmEaNj t+kY5lFxuFVTx/4l2yifkrEOWMYjR7KXSqDOXH1kX59YaR2VgAZUz2PCa95s+8mkbkPJZFeEHmUh9 4Lbdf9T7Lpe+fvofMaboKr4ZztQTR5t5Gdf+xLDO8xygMK5iLmrKO1nRgGLLnw2s65pozD7RignxT ido//tqldL/BPm4ldvm5lFA2EtsN5xkRvof8QXzyrqqUgB87/f8mV2VQkczF9KYxibfqjsJoJlxJC O1+AokEC3lnRWoKWwUc4QlOYAnLSmPj0fNJe78cKnmiMi4TTUnjC6rk9eOId9386H1AKk52AnO26+ bwo1vRUlTqZGNzOso5pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7c-00929R-2z; Mon, 20 Mar 2023 13:00:20 +0000 Received: from mail-wr1-f52.google.com ([209.85.221.52]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyd-008sBt-2H for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:01 +0000 Received: by mail-wr1-f52.google.com with SMTP id r29so10019084wra.13 for ; Mon, 20 Mar 2023 04:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312810; 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=S7cjgEYI29KMpo57s2rb53lbtSRPUWD30me1nYvBnTc=; b=FnN/BII+srkmdFKf94GZ/ZocC6Tdd5uk6upz+b/KabXgMVGSwGzdAzQISOmTUiB4aT i5WYeSUrHDcE24OJab2R55h3m9xXSpRSegESwQjz+m0LyZsjkCQ4XReoxolwpY49tv5R 09Pj0tJ8efu5tOrYLlnQp2g3iqUGy6kH4xhyyoo8jOjJtOSPDdT4Slo/OkhcAgsPpONA 5HameRJfIAVVtUNDACCgSnp8MGITp77B1NXVFhZSY0aB+7ukLu63BmaR1aQFQOgkj4+F GMJ3Tthi+tc1i5pVHypcZb5zVI/djWeTNaZKiCgMpMjjju2uO/fcOwnChJ3W7QrwyhlW n6GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312810; 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=S7cjgEYI29KMpo57s2rb53lbtSRPUWD30me1nYvBnTc=; b=4krGiO5tcfSbcJuaIrg9FfNg7yZ8hgpeBB39dPAlqNL7YRlw7gbFwncVm6OMP8b5tV 47QV+00qTHUZWbhIRex4vQRWd0iesuLpKWF++N3diSf9AhFAhuU56cshVWmMcHHK3FFU P8ZpXitPF1l+V2PDjlW4VL2ULBEJgk+8bBRpRcDDDBEA6CZ1L1Yn/quJXO4jlT0sB1yV W4S7Thet93ttifomUIsav/Cz9KNkssGFOmigdghLZteK7iNb0Pu67OYnJ6AjD9lFJU5d XxNhe1KFit7kI40pYk9hUwXsWLrEQN1u46vbRaBKZL6yrG9by99pKvVAlfkhZgMR9Bxr k9rA== X-Gm-Message-State: AO0yUKUNPvnN0pj4CW6fLaCVZYcPiRnVFDc2AWFGpO1oRFdQvdBLN080 z6H2Heu5xsn8pEpRbSxnnsM= X-Google-Smtp-Source: AK7set8UPFMlWkGrlRcOaDbSIR9mfI60G8U7O+O4rpZH4BbkKphUPIPpyuiwBTfc2nw9T1AQCb0wog== X-Received: by 2002:adf:f3c9:0:b0:2cf:9889:8428 with SMTP id g9-20020adff3c9000000b002cf98898428mr14357338wrp.35.1679312809848; Mon, 20 Mar 2023 04:46:49 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:49 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 23/33] doc: boards: amlogic: update documentation for Radxa Zero Date: Mon, 20 Mar 2023 11:45:59 +0000 Message-Id: <20230320114609.930145-24-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044659_767326_B1B31EBA X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/radxa-zero.rst | 45 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/doc/board/amlogic/radxa-zero.rst b/doc/board/amlogic/radxa-zero.rst index f5611f52ec..e8a8d87320 100644 --- a/doc/board/amlogic/radxa-zero.rst +++ b/doc/board/amlogic/radxa-zero.rst @@ -1,14 +1,13 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Radxa Zero -===================== +U-Boot for Radxa Zero (S905Y2) +============================== -Radxa Zero is a small form factor SBC based on the Amlogic S905Y2 -chipset that ships in a number of RAM/eMMC configurations: +Radxa Zero is a small form factor SBC based on the Amlogic S905Y2 chipset that ships in +a number of RAM/eMMC configurations: -Boards with 512MB/1GB LPDDR4 RAM have no eMMC storage and BCM43436 -wireless (2.4GHz b/g/n) while 2GB/4GB boards have 8/16/32/64/128GB -eMMC storage and BCM4345 wireless (2.4/5GHz a/b/g/n/ac). +512MB/1GB LPDDR4 RAM boards have no eMMC and BCM43436 wireless (2.4GHz b/g/n) while the +2GB/4GB boards have 8/16/32/64/128GB eMMC and BCM4345 wireless (2.4/5GHz a/b/g/n/ac). - Amlogic S905Y2 quad-core Cortex-A53 - Mali G31-MP2 GPU @@ -18,11 +17,9 @@ eMMC storage and BCM4345 wireless (2.4/5GHz a/b/g/n/ac). - 1x micro SD Card slot - 40 Pin GPIO header -Schematics are available on the manufacturer website: +Schematics are available on the manufacturer website: https://dl.radxa.com/zero/docs/hw -https://dl.radxa.com/zero/docs/hw/RADAX_ZERO_V13_SCH_20210309.pdf - -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -31,14 +28,20 @@ U-Boot compilation $ make radxa-zero_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh radxa-zero /path/to/u-boot/u-boot.bin my-output-dir -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `radxa-zero` +U-Boot Manual Signing +--------------------- -Amlogic does not provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -git trees published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -61,16 +64,16 @@ git trees published by the board vendor: $ cd ../fip/radxa-zero $ make -This will generate: +This will generate the signed U-Boot binaries: .. code-block:: bash $ u-boot.bin u-boot.bin.sd.bin u-boot.bin.usb.bl2 u-boot.bin.usb.tpl -Then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181089 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 331EAC6FD1D for ; Mon, 20 Mar 2023 11:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aX2KxzS1G3Pqiz5ngpduuPMdZsvlV9h7suLWghI6wJ0=; b=WPhQXwJ11D/8Zt 13phKOf+GFxcNf9rSZZbL6rRz7qLWB7AQPz4JhC95lhgMa5XaFe5ag09BGep9O5Uq84STpaEOjIeq UmQ6LfMYwHEkroswMd2zLft0PMwarrkh8xWT0MCqJVyUE6wxcA1dT1UtBe8MVAnPAT7SHKEIHYNVN LRzDHXMfaPZHyTj8uEKxuwkdv1qJbS5rx+bO1mReFryfIpUTxGpjFV57r/oEPXdGobAztIqdrIBe2 2ZbxUpSnujfc7yxDNhtyk6TEixzhO2w11N5Tlxx9IDmfKWC6XKjztchHmuYcjYaJ3mygiCLZ8q4zw fs715tnjGtSB2ywOTGrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDya-008sF2-0U; Mon, 20 Mar 2023 11:46:56 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyV-008rqP-2q for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:53 +0000 Received: by mail-wr1-x432.google.com with SMTP id l12so10029245wrm.10 for ; Mon, 20 Mar 2023 04:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312811; 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=jleqg1TxYhdSHi2FXGuYOR0T5CjWp5CMTfwWaNHKtDY=; b=DOqDDE1wgCrnCRU0Q0Y1B8Hp4TepJulv0RpyfuGyXkPVc7REb5lQJCejYAPjUBa8W6 jpSZglffbv2Sg8KlsKmq3KmVi/WKzusljQR7imz0NPJIEWvnTuQWc/24jQ/7iHQ2uDC3 VMih+4lqCee+uQJBVkO5L/kpvmu95WvazW8ZZzGDEgSogj3frQqYLciydg8XEUpggQXO k3hUencfO8UNImP9WirucRSY93s536z++jik9GrXzsV9pjLSCY+PNBYRlwtHJqocDiQz BwtMDGqlb01XArqA4XZXIl3bG85xHgK059BtpJflXyxjbUh5jaxp6yok2hd7FdThRBcy xoow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312811; 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=jleqg1TxYhdSHi2FXGuYOR0T5CjWp5CMTfwWaNHKtDY=; b=z3SajaHGQzEVPSdxvQMRFasiAsBqtMCk50XzMGv0mutczMYAekECz1AoTUdnIjg6vs NY4ArOMnZQgUXn/lowTqpoBNFES9DtKa8qrQONLGqcHofuWTme8gxJ7k9uEsioZYpu+o NAFP239XuhrgkCRDoVkRaMc5lQl7GvJ3Qgcvsp1hbWKK/F1G9YJblKbIzLaEwUkJacwM YB8UcqTve/k3pem7Hqm2He9g7SflMxlWPrzF1lmvmfNxsD+L3bO/jnLrWkgkEsUM9ccp 0Z1ftayLULCxDMWJ/XNGHpUH2xXP1iN1dOK3m9XTGnlA3AgOZ5lWM2PDURDj9ZT4nZsp u3BQ== X-Gm-Message-State: AO0yUKWnAhKKt2n/BWv5H6sNsNwrarNDGB5DfKynm+cg9hpwXRiBcRAW Y+mlRB/DemnMZd5YyMLVBxk= X-Google-Smtp-Source: AK7set/cDTAZGoFQCF+25lALm2Z5fDcVdpFmZ536F4gEr903gZWJ99k5KHH/bkabXEgMo/iOIeZ14A== X-Received: by 2002:a5d:668d:0:b0:2d4:99f:6701 with SMTP id l13-20020a5d668d000000b002d4099f6701mr6621837wru.58.1679312811413; Mon, 20 Mar 2023 04:46:51 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:51 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 24/33] doc: boards: amlogic: update documentation for S400 Date: Mon, 20 Mar 2023 11:46:00 +0000 Message-Id: <20230320114609.930145-25-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044651_977296_5899AD9B X-CRM114-Status: GOOD ( 10.12 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/s400.rst | 89 ++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/doc/board/amlogic/s400.rst b/doc/board/amlogic/s400.rst index c92817b421..b00fe64e1b 100644 --- a/doc/board/amlogic/s400.rst +++ b/doc/board/amlogic/s400.rst @@ -1,15 +1,14 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic S400 -======================= +U-Boot for Amlogic S400 (A113X) +=============================== -S400 is a reference board manufactured by Amlogic with the following -specifications: +S400 is a reference board manufactured by Amlogic with the following specifications: - - Amlogic A113DX ARM Cortex-A53 quad-core SoC @ 1.2GHz + - Amlogic A113X ARM Cortex-A53 quad-core SoC @ 1.2GHz - 1GB DDR4 SDRAM - 10/100 Ethernet - - 2 x USB 2.0 Host + - 2x USB 2.0 Host - eMMC - Infrared receiver - SDIO WiFi Module @@ -19,7 +18,7 @@ specifications: Schematics are available from Amlogic on demand. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -28,14 +27,20 @@ U-Boot compilation $ make s400_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `s400` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh s400 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image but sources have been shared by Linux development contractor, Baylibre: .. code-block:: bash @@ -65,47 +70,47 @@ Go back to mainline U-boot source tree then : $ cp u-boot.bin fip/bl33.bin $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/axg/aml_encrypt_axg --bl3sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $FIPDIR/axg/aml_encrypt_axg --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $FIPDIR/axg/aml_encrypt_axg --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ $FIPDIR/axg/aml_encrypt_axg --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $FIPDIR/axg/aml_encrypt_axg --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc --level v3 + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc --level v3 -and then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181091 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8195C7619A for ; Mon, 20 Mar 2023 11:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a2KEka13ZgO9+tBh7nd/SU9SLj1O7GTEfBXHi7w3YiM=; b=jOa7wsncYzv3kQ Gs6qhDnU41+QCATmWR21Jzrd90zYLPf1MMVjYQLB8K51pks4Hz4v/UJrbjEzs2ZKa6El+vik/G4BU oEHaQiZ6cgnONmdZG9J1O8f3V6mzyMqe58tnjJ9i97ZItHJ/zEbms2kHKZggS+94HndB3EQBD0gi2 zlHbxonBzb5JnI337RtplSbQJyptwMGB0HtRIxELKvJPF36/SunL8r5gLkVC8tSdREqnw4T5o+08X k2/8mUGrxNmXd8VT6HqtK0iIUSEUuHH8ilKxCOHl9yB1vBQfvcT4/lo9i6IPZjvQUvoCPnZ9RRzKW cZHzybtohQeXkmnhl8vw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyb-008sG4-1u; Mon, 20 Mar 2023 11:46:57 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyX-008rkn-1S for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:55 +0000 Received: by mail-wr1-x42a.google.com with SMTP id j24so1129401wrd.0 for ; Mon, 20 Mar 2023 04:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312813; 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=94HmntJfhtzEnhOObGr9eOswGC99lf/O0pDaQvj/vrk=; b=HcHc342EA1BiU6J/8nQI7mDcfnEKDgTZtZ+iYawBXpuNxn/6ISKZLGqRsfHXZ6g9Jg 4eGeGeVIw6fjDZ0h6ehiBDmSJhBf5x6ZrsiHAIAhEd6oE/Y3rnMS+ck5Mww2+LE3pIdu XENkL1nEscW7ZsiergN8bmfsxm/qumvmwVbpJwxJTWHBCWGenn/O83PKh508n761GPHp LNaPc8dtfn6xvFTmO3aiNysu7Xyuge+2Udjw7knVX74ZSTuNebV/ATfqio8BSrP7I5u3 EFwwN4Zs5uGaa5tAxERYeAC7o38BX6o5gVbLuFYqKXHzWlln7xGMVXzh16mrw6j9xS61 o+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312813; 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=94HmntJfhtzEnhOObGr9eOswGC99lf/O0pDaQvj/vrk=; b=LSN0o9/r0poPY3H6u6lx0sGfm1xetex6sc+ZKHFoNZNb5mMOka718T3MBwZmELGjiw 8/iDK7M/hFwEBKeTFWodTisWYO0h+HG0/YtDSe+ldj051mPHHKjDfwkADVqY6AMtek7w HjhcZpP7/JDMlokBzM2PIc7pduTcANVpjoBrYX16P1Jar5aT4UpuhJRXumEYOifhVok6 w8Zyym5OMqu7zkqU84FItbh5Y2WPQwNkCBeWm7dVJcqD4Ax+C3ZvpLgUa41q/jFVqY3l zJulfWWfaGWXCusoCSwlsbwBiGps7ZMe8s/Ff51yS1r6yMqDd7ENGXscfGuCM1Oe8c/q 99kg== X-Gm-Message-State: AO0yUKVSmG7XnigjSsd84VFkQUfz3zbK9oLv3/iSD/MFCBrc09gCWUBs QUjJGROP95JvLBk0nTuJdiA= X-Google-Smtp-Source: AK7set9nA7nadx6Ld/U+TL+QFBStuJF/mI8vOLVOD3ifjJ1rCjAA5VbWn3Zrzz30W6jeuP5cQTFt0A== X-Received: by 2002:a5d:638b:0:b0:2cf:f312:86dd with SMTP id p11-20020a5d638b000000b002cff31286ddmr12841368wru.18.1679312812924; Mon, 20 Mar 2023 04:46:52 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:52 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 25/33] doc: boards: amlogic: update documentation for SEI510 Date: Mon, 20 Mar 2023 11:46:01 +0000 Message-Id: <20230320114609.930145-26-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044653_507356_02EFD9BE X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Signed-off-by: Christian Hewitt --- doc/board/amlogic/sei510.rst | 113 ++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 54 deletions(-) diff --git a/doc/board/amlogic/sei510.rst b/doc/board/amlogic/sei510.rst index c55e778494..09b0f53e16 100644 --- a/doc/board/amlogic/sei510.rst +++ b/doc/board/amlogic/sei510.rst @@ -1,21 +1,20 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic SEI510 -========================= +U-Boot for Amlogic SEI510 (S905X2) +================================== -SEI510 is a customer board manufactured by SEI Robotics with the following -specifications: +SEI510 is a customer board manufactured by SEI Robotics with the following specification: - Amlogic S905X2 ARM Cortex-A53 quad-core SoC - 2GB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - - 1 x USB 3.0 Host + - 1x USB 3.0 Host - eMMC - SDcard - Infrared receiver - SDIO WiFi Module -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -24,14 +23,20 @@ U-Boot compilation $ make sei510_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `sei510` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh sei510 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -46,7 +51,7 @@ the git tree published by the board vendor: $ make $ export UBOOTDIR=$PWD -Download the latest Amlogic Buildroot package, and extract it : +Download the latest Amlogic Buildroot package and extract it: .. code-block:: bash @@ -55,7 +60,7 @@ Download the latest Amlogic Buildroot package, and extract it : $ export BRDIR=$PWD/buildroot_openlinux_kernel_4.9_fbdev_20180706 $ export FIPDIR=$BRDIR/bootloader/uboot-repo/fip -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -77,56 +82,56 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ $FIPDIR/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $FIPDIR/g12a/aml_encrypt_g12a --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181090 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B326C7618E for ; Mon, 20 Mar 2023 11:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/UjcvVuei+D1kpGEnnWmnFAvZHn1c97X9SpAsX9UwlM=; b=RK+au1yxZeGqqb U20znqIggZEXwPp9JQqhonRhi00odIUsKixmT4cttGfJ8xYerNL5+k8A/GeH127fuM1/ppD2v0YyA Npo/MQKEdZ2pz9o6YlRmsF2V5PjTbXcSufG3GDWaWmA4O12pS4r5+DN0UGiNtRImHMq16A5XnQn1v P8izOmB4AdtaRNnHVqWbc7SLbvgBNFvi+TT45n4ZTAUKQ5XX3wu/zARAkDYP7lVUEr9+7MyHZstQY Cx6v/bffOspzmzvThyUWJf2zqHVtD/kGKu/v2k/9V2bloHwmyXjifSHj8X5FfJxOhd4/rPqJgcD+/ eid9STwkIyIFDU/MKfew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyb-008sGm-31; Mon, 20 Mar 2023 11:46:57 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyY-008rnC-2r for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:56 +0000 Received: by mail-wr1-x42d.google.com with SMTP id y14so10043696wrq.4 for ; Mon, 20 Mar 2023 04:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312814; 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=vAtnln5Ywi5ePclZoX20T/TmZufEC2pp0oMOI8VQoEk=; b=bvOd/rEcJjOoDtiEErlMGACkOHq2Qm1X68QqDBX122FBiljfMNsPZAAbL15/ohCnY9 0Kegu6JOK2QTtMslncC/L11N7R7DN1hxJ5OXYqMkW27aAiSsvBBqC1MY6mVC1uLoGl27 XpLe9JNUyhWAYgHLzVKbXnGGRQuW2YgasQHN7LD4SwR8k/vbZ82H8euMB+usY6LeRhIB eOiWCuckF/bdSAClu+xVXX8t5qRtDLDXdeHBt9Nr/4EUn12UTD8EfmqpX+zJi6OoeH30 bWXCYhpsRP28mkJ87KU39REtpwP7pzy2eEBgYrAUwjmEvi3snEV51tM/JxexHD3DSboY LW6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312814; 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=vAtnln5Ywi5ePclZoX20T/TmZufEC2pp0oMOI8VQoEk=; b=rbxlzCahiCIyB9YUGR7AKMcNsm28iATSF8sA5sGdxnoQ5wzIqsA+299AHrqB64Owah DXKIT6lkOzFec/e3xEJ0/gKtFUwFXL7p81EBhTnlwUjh9t2AYZTc9MfY+PY8rTR1Z8C3 KtIYg0UqRrTGoM/0BpF+Avw57I5bnU1evLcAHvxbek+ZN7IxrNaLREmshexvCEU+sH4d mDTBMjYYbyCR5LnYgBs6cDX5SVNBt+aDDrbFTvpm7ovBSfs6Ux0K4riBKDHyiSHKdhGu yJ3Uv2T7p3vKG763w7ruNkSPjg4raxBUJqtD2JwtOQh4BFVNeUmJBzW80OeAVPLuL0ZR RBlQ== X-Gm-Message-State: AO0yUKUhqWc++hJYffYdZ4kKtG2Cv7x6e607Ukv1E3dpbFiUd2j01W+m GQGej7ItPBvMzdlpRT1E67M= X-Google-Smtp-Source: AK7set9rchtCQXyRgPIQFl4jRIWjsYXNwhyqjJnLL+YX6B39rXhRxyhLNLdkgwciNOl5e0mYWjHhhw== X-Received: by 2002:adf:ee91:0:b0:2ce:ae7d:f818 with SMTP id b17-20020adfee91000000b002ceae7df818mr14240210wro.23.1679312814462; Mon, 20 Mar 2023 04:46:54 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:54 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 26/33] doc: boards: amlogic: update documentation for SEI610 Date: Mon, 20 Mar 2023 11:46:02 +0000 Message-Id: <20230320114609.930145-27-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044654_920675_E88DAAC3 X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/sei610.rst | 118 ++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/doc/board/amlogic/sei610.rst b/doc/board/amlogic/sei610.rst index 2d754497cc..84aaeff4ed 100644 --- a/doc/board/amlogic/sei610.rst +++ b/doc/board/amlogic/sei610.rst @@ -1,23 +1,22 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic SEI610 -========================= +U-Boot for Amlogic SEI610 (S905X3) +================================== -SEI610 is a customer board manufactured by SEI Robotics with the following -specifications: +SEI610 is a customer board manufactured by SEI Robotics with the following specification: - Amlogic S905X3 ARM Cortex-A55 quad-core SoC - 2GB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - - 1 x USB 3.0 Host - - 1 x USB Type-C DRD - - 1 x FTDI USB Serial Debug Interface + - 1x USB 3.0 Host + - 1x USB Type-C DRD + - 1x FTDI USB Serial Debug Interface - eMMC - SDcard - Infrared receiver - SDIO WiFi Module -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -26,14 +25,20 @@ U-Boot compilation $ make sei610_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `sei610` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh sei610 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -48,7 +53,7 @@ the git tree published by the board vendor: $ make $ export UBOOTDIR=$PWD -Download the latest Amlogic Buildroot package, and extract it : +Download the latest Amlogic buildroot package and extract it: .. code-block:: bash @@ -57,8 +62,7 @@ Download the latest Amlogic Buildroot package, and extract it : $ export BRDIR=$PWD/buildroot-openlinux-A113-201901 $ export FIPDIR=$BRDIR/bootloader/uboot-repo/fip -Go back to mainline U-Boot source tree then : - +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -80,56 +84,56 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ $FIPDIR/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $FIPDIR/g12a/aml_encrypt_g12a --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181096 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15FF6C6FD1D for ; Mon, 20 Mar 2023 11:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vtynN2VKg+u5R8tk9k6tgBd8OYZR3vsYCHHU6M/MfG0=; b=DhdLhu5mycJt5F amXtf2pFrOAy9d2kbry6XvxyAo+nj3jx7qE70z6OxDXQa0FWjD0VRJgFuyFl1tdJyqh0zK8cnFgVK bX6Wys7OsrZ4A4FkxS69xqk7FatiB8ukQQgyn6rbh9BECcH+qOosn26/lBqXBQLXG32XdaR9css5n 4KRBZdGXkzBkCUicGMmj/lh/ZDCKYZHGqNXRm1sSVXeZtdrU+IasT0q+ZT0Qb/oSAF9IrOvxHs17w QkxQPv9vD0jMmARQG1Zcukz+RLxW6g/v2K9MTf1UKWx1SKtL2flTU3onHMEkSkFkm9/7V4dlG1UzI XBNgMdz6kz0B/slHWRLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyo-008sQ9-16; Mon, 20 Mar 2023 11:47:10 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyl-008sFI-0h for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:09 +0000 Received: by mail-wr1-x429.google.com with SMTP id h17so10028148wrt.8 for ; Mon, 20 Mar 2023 04:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312816; 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=ZmcVnpXoBYjxiK6PzinhKQ1A5neoyZ/06WqfZdqy/O4=; b=lvCSbjLvNehou79aEj41MlM42kMjhSe+Vx02tFHzWxYyJIi6eg7G7eqqHSwfnjRm9p HnRyuOm3F5kZ1spTthm5LvF9XTZy4QmHbpcTX62VCreJzZQKP24KLDZYHIDqWx32/+73 +UmR5mBL1+szcxRJn1W+WaK1CKftlBsUnoQEgzoWdyDln6QTeMNHSHsSD9Ae57kezSgo NE9gU6KCAD5RmBmwIJTDXt8UEqwfG9aVknnv2le6csvQHse3qAV6QTKmIJp6xcr1IBxc Krp14ikh7GU0LioUvoDYGLJ7826qE37y3EsQM6vMBX7+PvjOTpVwReR6D8i/7cHOnj00 L2SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312816; 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=ZmcVnpXoBYjxiK6PzinhKQ1A5neoyZ/06WqfZdqy/O4=; b=X2gqtw+Sb71J1oz76mLgSKRiRm6Omt5keUe7ejkyA7ITIxjcCoFZ7OqOUwZV/SIOQk Gqx6cA8b1Lymlnc6/cvBuiCLl57LzyGc5z6jajlwoKn30pb2UGU0ZBSBBC4r8sojkRyA pmUtS5CgMfRQsX0Wy5lSJBdzykln/9zKZJZ3PRsewOVRc4/o/jTPyOGWDhT/qOtenaU4 /92iVW9YPV2qhEdyAaOHLe2dnr6t9LxifdRBoqWCPGLGq3MjPAAYw583q87sz7mU08nv 0OYXj2epB8GavVFX2No3soktDNtIpuayf2KjEL1TZGmCePshk15lJ5LydkFulONnwRVZ 1LzQ== X-Gm-Message-State: AO0yUKVM5Qbw/p7RtqDAwGpWaNoor4CRl/6qrkzEkuDhY94HKLlbkemw 8urILM/BT0K/8rSCWow59Uk= X-Google-Smtp-Source: AK7set/MNDRNwT+T+Uv7GhUKfTgQaYyz+kimCUgwOmmSiF8QF5kCiQReq/bJu8j06V677NedDY7nNg== X-Received: by 2002:adf:dcca:0:b0:2c5:4db8:3dde with SMTP id x10-20020adfdcca000000b002c54db83ddemr13643515wrm.70.1679312815967; Mon, 20 Mar 2023 04:46:55 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:55 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 27/33] doc: boards: amlogic: update documentation for U200 Date: Mon, 20 Mar 2023 11:46:03 +0000 Message-Id: <20230320114609.930145-28-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044707_255244_9B3A42E0 X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Signed-off-by: Christian Hewitt --- doc/board/amlogic/u200.rst | 113 +++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 54 deletions(-) diff --git a/doc/board/amlogic/u200.rst b/doc/board/amlogic/u200.rst index 53213fdb68..6d1d66b4ea 100644 --- a/doc/board/amlogic/u200.rst +++ b/doc/board/amlogic/u200.rst @@ -1,15 +1,14 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic U200 -======================= +U-Boot for Amlogic U200 (S905X2) +================================ -U200 is a reference board manufactured by Amlogic with the following -specifications: +U200 is a reference board manufactured by Amlogic with the following specification: - Amlogic S905D2 ARM Cortex-A53 quad-core SoC - 2GB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - - 1 x USB 3.0 Host + - 1x USB 3.0 Host - eMMC - SDcard - Infrared receiver @@ -20,7 +19,7 @@ specifications: Schematics are available from Amlogic on demand. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -29,14 +28,20 @@ U-Boot compilation $ make u200_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `u200` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh u200 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -51,7 +56,7 @@ the git tree published by the board vendor: $ make $ export UBOOTDIR=$PWD -Download the latest Amlogic Buildroot package, and extract it : +Download the latest Amlogic buildroot package and extract it: .. code-block:: bash @@ -60,7 +65,7 @@ Download the latest Amlogic Buildroot package, and extract it : $ export BRDIR=$PWD/buildroot_openlinux_kernel_4.9_fbdev_20180706 $ export FIPDIR=$BRDIR/bootloader/uboot-repo/fip -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -82,56 +87,56 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ $FIPDIR/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $FIPDIR/g12a/aml_encrypt_g12a --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181092 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B354C6FD1D for ; Mon, 20 Mar 2023 11:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/sMLNyViBqbuBH6owd+xH4WVsYp6awX+hD35XWGBLLM=; b=MHRHS7bWuz5S6v qWSJh4PprigRNWKvwNKREaWudjuP4m7OtZ9ssalAPfhxqk9UdeamiQO2Pu8Ly0N/d3Mc7Szkr/Lsy XFMbTQqCZy3s5IsGD3njAk0dIIgvhM3GQwr2ci+hj1vODioT+UxYR+nKLyBuG6t3xo7eUlwT4FWRx 17hf4nOzR7csAOL4XejiW756/nkB06pjI89ISlgeHuVacQCnC953oChYtlkk/vHoQ5euipuJsQ7On hAZDuVRSvkgGGSERdH0uhshVWN5O0YKfYDqxa1yvc4tCnUoYkRtGapDVjJzfkO+kl9REMAbIo0VHz HPYsWh9ZgWT2OJSfM1UA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDye-008sIu-1C; Mon, 20 Mar 2023 11:47:00 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyc-008rjz-0U for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:46:59 +0000 Received: by mail-wr1-x431.google.com with SMTP id j24so1129623wrd.0 for ; Mon, 20 Mar 2023 04:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312817; 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=bugdDMHDRSrJ0SoWYmfBOUKMC6hXV0hF4DSwnKaEycw=; b=PymzN8ZDc0V0y27EX4+AH7pL9qAairBwP+7pLRF2gcz+e/ynD0tIWMh4G+GKV5kZj2 /3wcV7IIev9Ys8q3EcXsnjBM/5oIoup2NNAN+C3xn+Io1Ysytp14acP1uYVe3jNlOtgC hWdcmq8G8GGvkq8XrrGR+9edES1sq30TNWzj/tree6kZ1sbXVOAJV8MheR4YzBh1oI1q zRx9JQd2L3wD0bVUxqvgWQGqA5CyoVfhJzXqHPB6fsH03TMvHXwJWuLDUYIbYMcXcp/F qLMnJ9LJ0B3vlemkjJJXLM+5cLai/vsslKKnQxWQX0e9TRNc12jhYAfYED8CA6qJGEJm 2Oiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312817; 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=bugdDMHDRSrJ0SoWYmfBOUKMC6hXV0hF4DSwnKaEycw=; b=Jz6AGJGgoxRZAzji8MG6TM1IPAl2q2XIHqA0ovQ+xB3ELhRDNikZxDh3kR6FU/gyCA cJU0nJmeZF9IhLZHdpjXPloa/eOpyZKWAG8DlJS50auoY51mjiaRHnxI6StNya9vY/7n Q71O8yVZszicn7XAl6FELAbA/7Ah8M+bgAaICm0svU91x0M0tQrFP+vVGL7/FGm/5VJf 9UH/B45N8Dzoh9cUysR2pwwg4y34IiDW4gI2TDvCzvw/xfgCZyvKQDBDjb6qys1GuI6o a4vtTqzkqWfkeqwJwA+noJ50MTIfnW+YC27Kz10HG/ckReGunwOakwvWBDabK5e3aWZq un/w== X-Gm-Message-State: AO0yUKWETbFUqHew12gYJac92W1tXW73eTW3ZAkuYl/tKY6bPSb4e+MH XfH1V6U1VMcHBo1tbQ55JUI= X-Google-Smtp-Source: AK7set/7qmK/l7O1KqA1nFXd8+iLVc2UqEUHF2Uq7xq0VEVweBRYLBtgPMygadDqpakvjeBzNAng7Q== X-Received: by 2002:adf:f711:0:b0:2ce:a893:e45f with SMTP id r17-20020adff711000000b002cea893e45fmr13231405wrp.15.1679312817623; Mon, 20 Mar 2023 04:46:57 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:57 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 28/33] doc: boards: amlogic: update documentation for W400 Date: Mon, 20 Mar 2023 11:46:04 +0000 Message-Id: <20230320114609.930145-29-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044658_208156_DE790420 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/w400.rst | 115 ++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 54 deletions(-) diff --git a/doc/board/amlogic/w400.rst b/doc/board/amlogic/w400.rst index 38dbf52fb9..634fe1298d 100644 --- a/doc/board/amlogic/w400.rst +++ b/doc/board/amlogic/w400.rst @@ -1,15 +1,14 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for Amlogic W400 -======================= +U-Boot for Amlogic W400 (S922X) +=============================== -U200 is a reference board manufactured by Amlogic with the following -specifications: +W400 is a reference board manufactured by Amlogic with the following specification: - Amlogic S922X ARM Cortex-A53 dual-core + Cortex-A73 quad-core SoC - 2GB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - - 1 x USB 3.0 Host + - 1x USB 3.0 Host - eMMC - SDcard - Infrared receiver @@ -20,7 +19,7 @@ specifications: Schematics are available from Amlogic on demand. -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -29,12 +28,20 @@ U-Boot compilation $ make w400_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -Amlogic doesn't provide sources for the firmware and for tools needed -to create the bootloader image, so it is necessary to obtain them from -the git tree published by the board vendor: +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh jethub-j100 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: .. code-block:: bash @@ -49,7 +56,7 @@ the git tree published by the board vendor: $ make $ export UBOOTDIR=$PWD -Download the latest Amlogic Buildroot package, and extract it : +Download the latest Amlogic buildroot package and extract it: .. code-block:: bash @@ -58,7 +65,7 @@ Download the latest Amlogic Buildroot package, and extract it : $ export BRDIR=$PWD/buildroot_openlinux_kernel_4.9_fbdev_20180706 $ export FIPDIR=$BRDIR/bootloader/uboot-repo/fip -Go back to mainline U-Boot source tree then : +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -81,57 +88,57 @@ Go back to mainline U-Boot source tree then : $ cp u-boot.bin fip/bl33.bin $ sh fip/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 $ sh fip/blx_fix.sh \ - fip/bl2.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/acs.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 $ $FIPDIR/g12b/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ - --output fip/bl30_new.bin.g12a.enc \ - --level v3 + --output fip/bl30_new.bin.g12a.enc \ + --level v3 $ $FIPDIR/g12b/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ - --output fip/bl30_new.bin.enc \ - --level v3 --type bl30 + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 $ $FIPDIR/g12b/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ - --output fip/bl31.img.enc \ - --level v3 --type bl31 + --output fip/bl31.img.enc \ + --level v3 --type bl31 $ $FIPDIR/g12b/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ - --output fip/bl33.bin.enc \ - --level v3 --type bl33 + --output fip/bl33.bin.enc \ + --level v3 --type bl33 $ $FIPDIR/g12b/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ - --output fip/bl2.n.bin.sig + --output fip/bl2.n.bin.sig $ $FIPDIR/g12b/aml_encrypt_g12b --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc \ - --ddrfw1 fip/ddr4_1d.fw \ - --ddrfw2 fip/ddr4_2d.fw \ - --ddrfw3 fip/ddr3_1d.fw \ - --ddrfw4 fip/piei.fw \ - --ddrfw5 fip/lpddr4_1d.fw \ - --ddrfw6 fip/lpddr4_2d.fw \ - --ddrfw7 fip/diag_lpddr4.fw \ - --ddrfw8 fip/aml_ddr.fw \ - --level v3 - -and then write the image to SD with: + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181138 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED28AC6FD1D for ; Mon, 20 Mar 2023 13:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/WGP39JJHbr60hEL6vyT7Jk1+jnIgdUqLdtfQA6iiko=; b=sz4ItXEPHFJYaV bR4RgX6DDuCtQNGay1Vw42bKYTCbSk94MCkqf4Kpi4al/amtMOFJbnX69ZfkKQ7LQ2H7ZkLYnTyDY scevxFSfNHfYHvfEjClvSY1nJA1z0KyHUbA6jRYP3IF1q0fhv4key1k1yynl92s1rCtebU0U7ldZk OEs0/pWC9NKCtx6IZBZc0I69sda31cX9fIWO45DQ5dmQpVZzRS+/FvD2pV2cMOs98PcMonlYMrgs9 XyM3ijbJ7rt4pj4+ib8Sc5OVDH74zh5uA/1W0XRyEaEbVMouCYzy8n+KdqDYQ45xOYUQJFIj7Z/PY IX4H/ZoYtGKwOnzMijXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peF7d-00929n-0r; Mon, 20 Mar 2023 13:00:21 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyd-008rqP-2W for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:01 +0000 Received: by mail-wr1-x432.google.com with SMTP id l12so10029656wrm.10 for ; Mon, 20 Mar 2023 04:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312819; 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=oaJQuomWRLKQE+KLyYWHiJ+/lNL7h9a/2ACaktG++Y8=; b=U/kATEcEU9ZVL6Htx5y1Bq6qyB++v97Z/XpiZttOL92NCul02iCwnqbxzbzxknNiVX YP5spkhamRU+xkGG3RM+dvyrTMB8n0FoL8K3X/GN4UE+16RAe8XFqNaAMhFT672mbvdd ioeprti0chDQP8wpnvijedHaPpbxaZHS2JXC5rpCDndDtVMinvoRXmNtkcRcU+hN/PjA UgcQ05M4CSNjtj0m4bGXSBXKWEIKfVYjWH6nSG17RNRX/9uLFa+2BZB/bwzgHqdvTZXj qXXAYKJtZ4owYuJUDA/tR/MyrgbHZBTkbsRENavE0D9geKNtnofoGKC/v3gsiSEKY9oD F3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312819; 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=oaJQuomWRLKQE+KLyYWHiJ+/lNL7h9a/2ACaktG++Y8=; b=bcvlZP7+U0/g3P0Tg1p8I53rorJWtjWa4zUPmeLh8sjFlFoV0Tq2Qmrr5qJnWNsmCE MqwyCsvtKKuk2BbWw9wqPsL9EWXIbtzau75snbRb5rxOxiw+seKpUzN3XmeIgze5D9eS Bqk7n0zR8eAiphrrwl4D4tlLShd7PYlTniqK016liG91cy4Wspyk7u7O4+9qa+HPl5Tn wwPYXB81hV0wbCGQSDLwCxqhmF86X1FeE5KJ9DwedTF8lGGDz6D8ItOZjdsgJdgtkM0a G1QUvud23QM0+UcOitgcpfVY3B96S5XOdtCsvhaTMehpP0C7g3lM+ht+A67/6Acr3FMc 7X1g== X-Gm-Message-State: AO0yUKX8fMItnppsLIz7SDUauiQSVMayRTEzadNEONYEcg02M7fRtKiq Df8GzruIvCrXvRwk35ZJY9k= X-Google-Smtp-Source: AK7set8oeWdVk4E8dYfhqBgKIE44HgvZA1KoLjB1rpzwH3R25ZQz7+mkvzp986SFGQ23fIzDv04MXg== X-Received: by 2002:a5d:4ace:0:b0:2cf:f279:378f with SMTP id y14-20020a5d4ace000000b002cff279378fmr13437190wrs.44.1679312819131; Mon, 20 Mar 2023 04:46:59 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:46:58 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 29/33] doc: boards: amlogic: update documentation for WeTek Core2 Date: Mon, 20 Mar 2023 11:46:05 +0000 Message-Id: <20230320114609.930145-30-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044659_821045_58BF90D9 X-CRM114-Status: GOOD ( 11.47 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Improve documentation. Signed-off-by: Christian Hewitt --- doc/board/amlogic/wetek-core2.rst | 83 +++++++++++++++++-------------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/doc/board/amlogic/wetek-core2.rst b/doc/board/amlogic/wetek-core2.rst index 0147d5fbe2..5eba566af4 100644 --- a/doc/board/amlogic/wetek-core2.rst +++ b/doc/board/amlogic/wetek-core2.rst @@ -1,23 +1,24 @@ .. SPDX-License-Identifier: GPL-2.0+ -U-Boot for WeTek Core2 -====================== +U-Boot for WeTek Core2 (S912) +============================= -WeTek Core2 is an Android STB based on the Q200 reference design with -the following specifications: +WeTek Core2 is an Android STB based on the Q200 reference design with the following +specifications: - Amlogic S912 ARM Cortex-A53 octo-core SoC @ 1.5GHz - ARM Mali T820 GPU - 3GB DDR4 SDRAM - 10/100 Realtek RTL8152 Ethernet (internal USB) - HDMI 2.0 4K/60Hz display - - 2x USB 2.0 Host, 1x USB 2.0 OTG (internal) + - 2x USB 2.0 Host + - 1x USB 2.0 OTG (internal) - 32GB eMMC - microSD - SDIO Wifi Module, Bluetooth - Two channel IR receiver -U-Boot compilation +U-Boot Compilation ------------------ .. code-block:: bash @@ -26,15 +27,21 @@ U-Boot compilation $ make wetek-core2_defconfig $ make -Image creation --------------- +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- -For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `wetek-core2` +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh wetek-core2 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- -Amlogic does not provide sources for the firmware or the tools needed -to create the bootloader image, and WeTek has not publicly shared the -precompiled FIP binaries. However the public Khadas VIM2 sources also -work with the Core2 box so we can use the Khadas git tree: +Amlogic does not provide firmware sources or tools needed to create the bootloader image +and WeTek has not publicly shared the precompiled FIP binaries. However the Khadas VIM2 +sources also work with the Core2 box so we can use the Khadas git tree: .. code-block:: bash @@ -49,7 +56,7 @@ work with the Core2 box so we can use the Khadas git tree: $ make $ export FIPDIR=$PWD/fip -Go back to mainline U-Boot source tree then: +Go back to the mainline U-Boot source tree then: .. code-block:: bash @@ -61,38 +68,42 @@ Go back to mainline U-Boot source tree then: $ cp $FIPDIR/gxl/bl301.bin fip/ $ cp $FIPDIR/gxl/bl31.img fip/ $ cp u-boot.bin fip/bl33.bin + $ $FIPDIR/blx_fix.sh \ - fip/bl30.bin \ - fip/zero_tmp \ - fip/bl30_zero.bin \ - fip/bl301.bin \ - fip/bl301_zero.bin \ - fip/bl30_new.bin \ - bl30 + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 + $ $FIPDIR/blx_fix.sh \ - fip/bl2_acs.bin \ - fip/zero_tmp \ - fip/bl2_zero.bin \ - fip/bl21.bin \ - fip/bl21_zero.bin \ - fip/bl2_new.bin \ - bl2 + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \ - --output fip/u-boot.bin \ - --bl2 fip/bl2.n.bin.sig \ - --bl30 fip/bl30_new.bin.enc \ - --bl31 fip/bl31.img.enc \ - --bl33 fip/bl33.bin.enc + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc -then write the image to SD with: +Then write U-Boot to SD or eMMC with: .. code-block:: bash - $ DEV=/dev/your_sd_device + $ DEV=/dev/boot_device $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 - $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 From patchwork Mon Mar 20 11:46:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181093 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15F7AC7618A for ; Mon, 20 Mar 2023 11:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zQAizW9xJT7nUvQc20vAAnGSF0XIo3d7UhoM/35PR1Y=; b=twMQogBxL6nKqk ieNmVXKVb+KPoAOBvwgeBQq00u4GfHHMqoEM1Vcel358kQoDkCMwZRJXWIp80U/3VFm6PY8Pt8BSc vtdqQ0sr9quqjvmvwalXfbn3CGz5mn/tVpScwijCmjlk7j2KKDWBIJClHSD7M3W+yA91dIS0eio7B 0i73Hg7Zj5J7btFCDLgPFp1qmsWbCCjSAw6SYeEVryZslMIC2MisiPGoX1DbnUSll920RA8RmCEF6 xvg1W7KJJ1hpiTkqPukS4ybD31bDYjyJ+gpyI+J2x0q12h00HNO4lnndEDN3bAMDbOm4Hamxwiwpy Jci9pofFBDzKouZWjdMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyi-008sLx-37; Mon, 20 Mar 2023 11:47:04 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyf-008rnC-0G for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:03 +0000 Received: by mail-wr1-x42d.google.com with SMTP id y14so10043993wrq.4 for ; Mon, 20 Mar 2023 04:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312820; 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=HB+d4E0cfzUuNXDX2irleo3J76K7B2sR0N8tgKAsICI=; b=IvZQIo5/ckHQvjWJOFQY14PslFiPKOG2jQ3ctH/6K67ATI5NT2070jSJB0J2+WgdY7 ymS2yprSxPABfHQWRLd6VOKPxyxzq/sCjgkkfC2daOaDfOwtNxgikPlj3ko0h2MzEzWp 6NV0QmbM/mXmJfZm3FTzG038zOY/e4CGGdVg1jwkrIQTrnk8i935EhGgj8drFEittYlL ccEaIp6mR57UWS9bWAZ93CVcTZGwptkNyuUmSR+5vUVEv1RdoABRbNvfXGreyxAI42Kd ErwInMa89S/AFaoIkcDoZNy07BrHNrdps1pZ3isL7Ozkc4I0SZn5wJXwtbOjcTlkhNIK 9cbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312820; 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=HB+d4E0cfzUuNXDX2irleo3J76K7B2sR0N8tgKAsICI=; b=HX61VxfEQlVHQu9YSKPS98MQrXe7mR8hIB6/Xx3X2eBaHtKYH5IjQggpjnvHNAuFPG JKD94UwqZrMkPtCe/4uXUvHWCoIfxgQn1LIhkAXbmQidwMIpleD7GrRMjp4KNLebeZCj 2rciH7pSmUZzXAQcUijZQ96sSXGypGpYi2uhpB0J66uQQVCkaIPn/oVGew36WnhIMIoV VXi32poP7Nmgb24qV5Pu/Nbd4suVx0ygIYuD9YnGjfBz1TvOp3yzViZ/YUUn8/406Qra 1LZQWO2rhowBS9koOJSO/b4JiXHj43kYRmxRDoYnAwRxFy6LD8OAwgUFge9/b+7oUz6b 2WUw== X-Gm-Message-State: AO0yUKXFYCuFfRbaHJAonSklu/Am10Q48rqR0+7zc9cmJcVGD2X3vzVJ 04pXgdTQJW+2sth0SmY5ZqE= X-Google-Smtp-Source: AK7set+2tfFpMrDEf+aj4MIkPJHb6vWh0A3sahT7kgnpg8pcQ8NMKk3D1VqDRWcFJdugknvR852SPw== X-Received: by 2002:adf:fb8e:0:b0:2cf:e77e:2eef with SMTP id a14-20020adffb8e000000b002cfe77e2eefmr14313257wrr.8.1679312820667; Mon, 20 Mar 2023 04:47:00 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:47:00 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 30/33] doc: boards: amlogic: add documentation for BananaPi CM4IO Date: Mon, 20 Mar 2023 11:46:06 +0000 Message-Id: <20230320114609.930145-31-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044701_153047_393EF41F X-CRM114-Status: GOOD ( 15.58 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Add build instructions for the BananaPi BPI-CM4IO carrier board with BPI-CM4 module. Signed-off-by: Christian Hewitt --- board/amlogic/u200/MAINTAINERS | 1 - board/amlogic/w400/MAINTAINERS | 2 + doc/board/amlogic/bananapi-cm4io.rst | 152 +++++++++++++++++++++++++++ doc/board/amlogic/index.rst | 1 + 4 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 doc/board/amlogic/bananapi-cm4io.rst diff --git a/board/amlogic/u200/MAINTAINERS b/board/amlogic/u200/MAINTAINERS index 7535e489d1..47cec234a1 100644 --- a/board/amlogic/u200/MAINTAINERS +++ b/board/amlogic/u200/MAINTAINERS @@ -4,7 +4,6 @@ S: Maintained L: u-boot-amlogic@groups.io F: board/amlogic/u200/ F: configs/u200_defconfig -F: configs/bananapi-cm4-cm4io_defconfig F: configs/bananapi-m5_defconfig F: configs/radxa-zero_defconfig F: doc/board/amlogic/u200.rst diff --git a/board/amlogic/w400/MAINTAINERS b/board/amlogic/w400/MAINTAINERS index 96ccda2001..26a4c2c587 100644 --- a/board/amlogic/w400/MAINTAINERS +++ b/board/amlogic/w400/MAINTAINERS @@ -3,4 +3,6 @@ M: Neil Armstrong S: Maintained L: u-boot-amlogic@groups.io F: board/amlogic/w400/ +F: configs/bananapi-cm4-cm4io_defconfig F: doc/board/amlogic/w400.rst +F: doc/board/amlogic/bananapi-cm4io.rst diff --git a/doc/board/amlogic/bananapi-cm4io.rst b/doc/board/amlogic/bananapi-cm4io.rst new file mode 100644 index 0000000000..aabe2ef197 --- /dev/null +++ b/doc/board/amlogic/bananapi-cm4io.rst @@ -0,0 +1,152 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for BananaPi CM4 with CM4IO (A311D) +========================================== + +BPI-CM4 is a system-on-module board manufactured by Sinovoip. It follows the Raspberry Pi +CM4 interface specification but with a single HDMI port and a single DSI output: + + - Amlogic A311D Arm Cortex-A53 dual-core + Cortex-A73 quad-core SoC + - 4GB DDR4 SDRAM + - 16GB eMMC + - NPU + - HDMI 2.1 display + - Gigabit Ethernet + - RTL8822CS WiFi (a/b/g/n/ac) + BT 5.0 + +BPI-CM4IO is a carrier board for the BPI-CM4 module with the following specification: + + - CM4 interface + - HDMI interface + - MIPI CSI interface + - MIPI DSI interface + - Ethernet interface + - PCIe interface + - SD (micro) + - SIM (micro) + - 26-pin GPIO + - UART serial + - 1x USB-C (power) + - 2x USB 2.0 + +Schematics are available from the manufacturer: https://wiki.banana-pi.org/Banana_Pi_BPI-CM4 + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make bananapi-cm4io_defconfig + $ make + +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh bananapi-cm4io /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: + +.. code-block:: bash + + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH + + $ DIR=bananapi-cm4io + $ git clone --depth 1 https://github.com/Dangku/amlogic-u-boot.git -b khadas-g12b-v2015.01-m2s $DIR + + $ cd $DIR + $ make bananapi_cm4_defconfig + $ make + $ export UBDIR=$PWD + +Go back to the mainline U-Boot source tree then: + +.. code-block:: bash + + $ mkdir fip + + $ wget https://github.com/BayLibre/u-boot/releases/download/v2017.11-libretech-cc/blx_fix_g12a.sh -O fip/blx_fix.sh + $ cp $UBDIR/build/scp_task/bl301.bin fip/ + $ cp $UBDIR/build/board/bananapi/bananpi_cm4/firmware/acs.bin fip/ + $ cp $UBDIR/fip/g12a/bl2.bin fip/ + $ cp $UBDIR/fip/g12a/bl30.bin fip/ + $ cp $UBDIR/fip/g12a/bl31.img fip/ + $ cp $UBDIR/fip/g12a/ddr3_1d.fw fip/ + $ cp $UBDIR/fip/g12a/ddr4_1d.fw fip/ + $ cp $UBDIR/fip/g12a/ddr4_2d.fw fip/ + $ cp $UBDIR/fip/g12a/diag_lpddr4.fw fip/ + $ cp $UBDIR/fip/g12a/lpddr3_1d.fw fip/ + $ cp $UBDIR/fip/g12a/lpddr4_1d.fw fip/ + $ cp $UBDIR/fip/g12a/lpddr4_2d.fw fip/ + $ cp $UBDIR/fip/g12a/piei.fw fip/ + $ cp $UBDIR/fip/g12a/aml_ddr.fw fip/ + $ cp u-boot.bin fip/bl33.bin + + $ sh fip/blx_fix.sh \ + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + + $ sh fip/blx_fix.sh \ + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ $UBDIR/fip/g12b/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ + --output fip/bl30_new.bin.g12a.enc \ + --level v3 + $ $UBDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 + $ $UBDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ + --output fip/bl31.img.enc \ + --level v3 --type bl31 + $ $UBDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 + $ $UBDIR/fip/g12b/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ + --output fip/bl2.n.bin.sig + $ $UBDIR/fip/g12b/aml_encrypt_g12b --bootmk \ + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --ddrfw9 fip/lpddr3_1d.fw \ + --level v3 + +Then write the image to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index 3eb1cf46e0..e3ed1158df 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -85,6 +85,7 @@ Board Documentation .. toctree:: :maxdepth: 1 + bananapi-cm4io beelink-gtking beelink-gtkingpro jethub-j80 From patchwork Mon Mar 20 11:46:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181097 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D19A8C7618A for ; Mon, 20 Mar 2023 11:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L+onjLHxixmzlks57V9EhpdFL9bj3osTsUCOhOQC058=; b=Tqi8XEOnrQz3+i vItP1IKajB8QRopAPJOEgMWjm9/FUvJUDuHP1tY05Cp0v8Aiw6BI3u0JOc/u/FebPQXlmFzB986Zl zWuMhvjp5RZWi7CmDqyEsIB+tIoTFIW4kPlmYo1c9rJ3OGAlum2JAtRvyIxfcFvA1XqhKv2hriCwi Cppf2BjRjGNWVdhiv2yKr9SZaslML3O1geL/J3rKuntCzJnLnHrlg+JUya4fU217TjtnrNtaOsrHV Ydh3RImJaO8eqmuxz07vmD5m5E8c5/SCHEPcgJy+aT6I4N16dFsT6u4BGbXmLrMTBt9Uxlzbjlr/H CuSvYue37Qu1OGl7M6XQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyr-008sRz-2m; Mon, 20 Mar 2023 11:47:13 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyo-008sKf-1D for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:12 +0000 Received: by mail-wr1-x42f.google.com with SMTP id v1so3934931wrv.1 for ; Mon, 20 Mar 2023 04:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312822; 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=9xkFOBT9a7E5jsB06XKcP3k1R6qx8QP/tgBp+DQ2wCY=; b=AovXahGYJIa6JZssaQCc+Ac+39TGzHC+KSvJTDsmfMUqaoaHxHoyI8DD2RyrAzCUIq Dx+fEHeGE/1culBSCpHNbIWsdo/Nke4fcfFdoNzgmEOhIiupDOt8cKriwaKEQo8Fsb5o feDii5zPGKO2HCVW5nppbgSLEBNBPjXnsfrWibS2QBlxc4rbAaMivKd3WrB9dNrr1TDL JeV2VkjvXB4i/c35eTgBqdbOqpxmQxyQLJ2kmVsSqCMuYGDBlLF6+7rXM/MTfBKZLQ4A 8H+EmnouZEN3FLdul9cSbiwwu8NU0U6KGcxkwUMmzDUaKaRh0dOQEa4/p1gNUXVA6xuY uVrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312822; 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=9xkFOBT9a7E5jsB06XKcP3k1R6qx8QP/tgBp+DQ2wCY=; b=PQbxSFrIsa/z/NoSRrA+4Cqvr9CCVD7FF8s6EH4R65SBIlF0NIC7IhRE4jpeP05f6u DieEtywrDdp1/0PlgaWuQBnuIgyUTFiaXXsJDqigbylsX9GwPpdvXdkDKjY36cpUw1OE MU7XES7v0UtKOt1XsVLYQcAmPzhnitvkTMYnIGOE20l7nVrsXKF2w6cGQNS8d0qs2YKk PVgZGjGq1IlQbapFn+GJu7K8wEh5kYEoNZrBdJpIoFA+NTFugmEPvAd39mD1xvg5EDSw +xvOXq/ldE1HUp20k9iQ8G0DeNtJqRtb6/Z5Id2fENxV4ZBNN1rStQm0UHr4tSoFSxbr tlHg== X-Gm-Message-State: AO0yUKVby0CShqv/mQpj82tTiZGlNwCxHNPBFrmdxAFDKFIRCMoH7XK9 09B+mM8dSyNoRjXwipQBwJk= X-Google-Smtp-Source: AK7set8GSY5+CBW7X5CvlS3W3CafwQlw7wPo0OLwuWzYDY2YS5RKpGxcCxxm0byl5iM+7ryMKuhHpw== X-Received: by 2002:adf:e406:0:b0:2d6:405f:8b16 with SMTP id g6-20020adfe406000000b002d6405f8b16mr3937781wrm.66.1679312822237; Mon, 20 Mar 2023 04:47:02 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:47:01 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 31/33] doc: boards: amlogic: add documentation for BananaPi M5 Date: Mon, 20 Mar 2023 11:46:07 +0000 Message-Id: <20230320114609.930145-32-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044710_435036_303636A7 X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Add missing build documentation for the BPI-M5 board. Signed-off-by: Christian Hewitt --- doc/board/amlogic/bananapi-m5.rst | 141 ++++++++++++++++++++++++++++++ doc/board/amlogic/index.rst | 1 + 2 files changed, 142 insertions(+) create mode 100644 doc/board/amlogic/bananapi-m5.rst diff --git a/doc/board/amlogic/bananapi-m5.rst b/doc/board/amlogic/bananapi-m5.rst new file mode 100644 index 0000000000..ddc14b4eef --- /dev/null +++ b/doc/board/amlogic/bananapi-m5.rst @@ -0,0 +1,141 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for BananaPi BPI-M5 (S905X3) +=================================== + +BananaPi BPI-M5 is a Single Board Computer manufactured by Sinovoip with the following +specification: + + - Amlogic S905X3 Arm Cortex-A55 quad-core SoC + - 4GB DDR4 SDRAM + - 16GB eMMC + - Gigabit Ethernet + - HDMI 2.1 display + - 40-pin GPIO header + - 4x USB 3.0 Host + - 1x USB-C (power) + - microSD + - UART serial + - Infrared receiver + +Schematics are available from the manufacturer: https://wiki.banana-pi.org/Banana_Pi_BPI-M5 + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make bananapi-m5_defconfig + $ make + +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh bananapi-m5 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: + +.. code-block:: bash + + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH + + $ DIR=bananapi-m5 + $ git clone --depth 1 https://github.com/Dangku/amlogic-u-boot.git -b odroidg12-v2015.01-c4-m5 $DIR + + $ cd $DIR + $ make bananapi_m5_defconfig + $ make + $ export UBOOTDIR=$PWD + +Go back to the mainline U-Boot source tree then: + +.. code-block:: bash + + $ mkdir fip + + $ wget https://github.com/BayLibre/u-boot/releases/download/v2017.11-libretech-cc/blx_fix_g12a.sh -O fip/blx_fix.sh + $ cp $UBOOTDIR/build/scp_task/bl301.bin fip/ + $ cp $UBOOTDIR/build/board/bananapi/bananpi_m5/firmware/acs.bin fip/ + $ cp $UBOOTDIR/fip/g12a/bl2.bin fip/ + $ cp $UBOOTDIR/fip/g12a/bl30.bin fip/ + $ cp $UBOOTDIR/fip/g12a/bl31.img fip/ + $ cp $UBOOTDIR/fip/g12a/ddr3_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/ddr4_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/ddr4_2d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/diag_lpddr4.fw fip/ + $ cp $UBOOTDIR/fip/g12a/lpddr3_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/lpddr4_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/lpddr4_2d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/piei.fw fip/ + $ cp $UBOOTDIR/fip/g12a/aml_ddr.fw fip/ + $ cp u-boot.bin fip/bl33.bin + + $ sh fip/blx_fix.sh \ + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + + $ sh fip/blx_fix.sh \ + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ + --output fip/bl30_new.bin.g12a.enc \ + --level v3 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ + --output fip/bl31.img.enc \ + --level v3 --type bl31 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ + --output fip/bl2.n.bin.sig + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bootmk \ + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --ddrfw9 fip/lpddr3_1d.fw \ + --level v3 + +Then write the image to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index e3ed1158df..808c857622 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -86,6 +86,7 @@ Board Documentation :maxdepth: 1 bananapi-cm4io + bananapi-m5 beelink-gtking beelink-gtkingpro jethub-j80 From patchwork Mon Mar 20 11:46:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181095 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17DB7C7618E for ; Mon, 20 Mar 2023 11:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DaIPcQnI3hxnHo3whtm1b28gioi8MKYHnrbymlk0aTE=; b=gR0u2KHL69Zpic 3NNApzs2gUam3eLEhhHsn2XlBok4hLiV+wAhgohG6oGsfX+zxnxtfAFT30K4zTocnaYc05ljR7VSE 0vaw/nrNv/0sQ7/t3XkN/HaJbnMK+BLhkkcp61U058HI60sdLUZpqZSt1DVew85ulouSGp4ZgrnO7 iA8mc8HyB94A8KJFYz0sZsHOx46V97eLpNogma+QiRioaoSahYeiwBWNYCBkjOD3EJdZtg9fcYPeF M0QspGexmvC82BedJZsjotYR9ufgP3DDLRyssi9lBnAjNIx9nAtZ3XxCS9KS+XqMoq/QLAHefbMS9 Pq5l70vy6PAn9wWRBklw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDyl-008sOD-1a; Mon, 20 Mar 2023 11:47:07 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyi-008rwA-0p for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:06 +0000 Received: by mail-wr1-x42c.google.com with SMTP id j2so10027349wrh.9 for ; Mon, 20 Mar 2023 04:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312823; 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=VcpHorJlJda5nW//a0yVnoGJJXcKO2Y9Lk0g22JcFtE=; b=MQP62o7Uwihx4W/czKQHpX8N4RbqpjB4JI17TRrTXKtwuADXQALHgSKm8MuhN7EsIg z/MahH2YCuUvW2VmQs2anCFBLc+gQJAe8K2JDoHkfCZJe/IqMAwmStcVhKzwTHaiydQu mGe2zX+MOx4zKRSVuJHGGmTFBxZ4wBMSdu5IGqslJPIa6OMyODyIlqjEKOZWpR1oTfSU 90F+RfkdHXcYYMt0rzQFrRndLlXA9GVaw0YsQkWPoqdX2tlXgkHW0UdjUXdVAFFwj60d DaMwSQ5SmcWrygOL9Am2vg3oi9Cj5lHvDrIixKl9GYR8ckO6tYHIOTfzckwC38GhtWu+ ueiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312823; 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=VcpHorJlJda5nW//a0yVnoGJJXcKO2Y9Lk0g22JcFtE=; b=K3LtcA4Y9Ht4PJsaO8eYwbND/sto3riFKlfAKCZXjj1NYOJ8CcDCkJdejhjzdb6yIG f+LSV2eL/GsSAWimFPHPakMQIJlNiBQIPz2NQlZVC0JkWM2UadywIM/vQgCubJwMj2by RRTtAHLqWZLyQIUrIUer2bcfJyF2o0NXscEvTtYIqt6dkZyAHDSu4lY5gyNO7dy1ehzH pS8TKvqlVJiKUEp5EVNtiqkHxeXHoOMjhtmOVD+vnM8OD1jqZMZeHIPn7Fbez0lITfTP DRLuMu+vgNSqUyS2ZG/ZgdKqglfob8LWf0kgEbfjYV0460iodGS61NfK2VbS8eY1WM14 S1ZA== X-Gm-Message-State: AO0yUKW3I2PaM3TfOMSMD36sYW5eNQTUI5B6BEt6+1fyeJQDFjJMniBD x+/pDk6G7fTX8hzHqBcqIes= X-Google-Smtp-Source: AK7set8lKZepeViQWoGUxmwRN5+BQSxhe08rEfy1YR3MKwwIfij038d9m/TG8Z5rc9qNEH/nF6GQoQ== X-Received: by 2002:adf:d844:0:b0:2d1:5698:3f70 with SMTP id k4-20020adfd844000000b002d156983f70mr9106101wrl.29.1679312823830; Mon, 20 Mar 2023 04:47:03 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:47:03 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 32/33] doc: boards: amlogic: add documentation for GS-King-X Date: Mon, 20 Mar 2023 11:46:08 +0000 Message-Id: <20230320114609.930145-33-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044704_391239_A0AD53D0 X-CRM114-Status: GOOD ( 15.05 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org GS-King-X is also supported with the beelink-s922x FIP sources and can use the GT-King defconfig. Add a board document with instructions. Signed-off-by: Christian Hewitt --- board/amlogic/beelink-s922x/MAINTAINERS | 3 +- doc/board/amlogic/beelink-gskingx.rst | 121 ++++++++++++++++++++++++ doc/board/amlogic/index.rst | 1 + 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 doc/board/amlogic/beelink-gskingx.rst diff --git a/board/amlogic/beelink-s922x/MAINTAINERS b/board/amlogic/beelink-s922x/MAINTAINERS index 47b622765a..8dddeb91d5 100644 --- a/board/amlogic/beelink-s922x/MAINTAINERS +++ b/board/amlogic/beelink-s922x/MAINTAINERS @@ -3,8 +3,9 @@ M: Christian Hewitt S: Maintained L: u-boot-amlogic@groups.io F: board/amlogic/beelink-s922x/ +F: configs/beelink-gsking-x_defconfig F: configs/beelink-gtking_defconfig F: configs/beelink-gtkingpro_defconfig -F: configs/beelink-gsking-x_defconfig +F: doc/board/amlogic/beelink-gskingx.rst F: doc/board/amlogic/beelink-gtking.rst F: doc/board/amlogic/beelink-gtkingpro.rst diff --git a/doc/board/amlogic/beelink-gskingx.rst b/doc/board/amlogic/beelink-gskingx.rst new file mode 100644 index 0000000000..987d358c77 --- /dev/null +++ b/doc/board/amlogic/beelink-gskingx.rst @@ -0,0 +1,121 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for Beelink GS-King-X (S922X) +==================================== + +The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference board with an +S922X-H chip and the following specifications: + +- 4GB LPDDR4 RAM +- 64GB eMMC storage +- 10/100/1000 Base-T Ethernet +- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) +- HDMI 2.1 video +- S/PDIF optical output +- 2x ESS9018 audio DACs +- 4x Ricor RT6862 audio amps +- Analogue headphone output +- 1x USB 2.0 OTG port +- 3x USB 3.0 ports +- IR receiver +- 1x micro SD card slot (internal) +- USB SATA controller with 2x 3.5" drive bays +- 1x Power on/off button + +Beelink do not provide public schematics, but have been willing to share them with known +distro developers to assist with development. + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make beelink-gsking-x_defconfig + $ make + +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh beelink-s922x /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Beelink released an Amlogic "SDK" dump in their forums but the U-Boot sources included +result in 2GB RAM detected. The following FIPs were generated with newer sources and +detect 4GB RAM: https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x + +.. code-block:: bash + + $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip + $ unzip master.zip + $ export FIPDIR=$PWD/amlogic-boot-fip/beelink-s922x + +Go back to the mainline U-Boot source tree then: + +.. code-block:: bash + + $ mkdir fip + $ cp $FIPDIR/* fip/ + $ cp u-boot.bin fip/bl33.bin + + $ sh fip/blx_fix.sh \ + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + + $ sh fip/blx_fix.sh \ + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ fip/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ + --output fip/bl30_new.bin.g12a.enc \ + --level v3 + $ fip/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 + $ fip/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ + --output fip/bl31.img.enc \ + --level v3 --type bl31 + $ fip/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ + --output fip/bl33.bin.enc \ + --level v3 --type bl33 + $ fip/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ + --output fip/bl2.n.bin.sig + $ fip/aml_encrypt_g12b --bootmk \ + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --level v3 + +Then write U-Boot to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index 808c857622..7c4c161e0d 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -87,6 +87,7 @@ Board Documentation bananapi-cm4io bananapi-m5 + beelink-gskingx beelink-gtking beelink-gtkingpro jethub-j80 From patchwork Mon Mar 20 11:46:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13181094 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F4B5C6FD1D for ; Mon, 20 Mar 2023 11:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U8Av4rVcURyOHkvp0Oy+itY1AAJ8jJE1rUrXH9nvReo=; b=A1EFgfZLH6EoFA 7RGZG3k3jR5ZDByaIdGdpdpmuJ3OXglvfg4/PT4XGIMq7MHIYH/wBATuqMG5oITuplovtXaOXoxF+ VphqQY+i0Ny+fe7K9vJtnf3WMFI8cIF0nPLhRlS7vyPdo0B/HyHeWc6zLwLEbTh86xDHxZgpfuFDS c1c6UEktpH8vtmUGhREdLhqY+4b9sj688SPGri+tma3UTi/Xy0ZILsFM+rpSd3u3JuRSZSD4PnUIw flvfFh7JpkdJPLVAjv810BD4nMRp8zH1deQOcyTmPYVMe70jEYnZOxkhpfaJpLdj0jnmwILkJ3+LW UHZv/xMyDbejvjR+eW8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peDym-008sP8-33; Mon, 20 Mar 2023 11:47:08 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peDyj-008rqP-2k for linux-amlogic@lists.infradead.org; Mon, 20 Mar 2023 11:47:07 +0000 Received: by mail-wr1-x432.google.com with SMTP id l12so10029977wrm.10 for ; Mon, 20 Mar 2023 04:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312825; 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=vtzEjnqGRdFn/CH1z8MTrNU5zbERfjr+pOykLChRQ04=; b=BEGLFd/hT4H6FI8+yY2GEvin/zoPNE5H0D0xMvpSN1ChyNZif8tjqHM2mwb2miyIKK AUiszhMnqWoGe8UYXqI1hsbQ/PdqG0Z+UnQHAWg/NdCQOTLgs0lyztcR7cqvI/GozNE+ FoSs2M6BThm9EEp0dHOvVaqa3NTnLb9fJseKvr8VQSdK0mVCclV+2sViOxoG38vXn6us +71gUHyL6h32lViRcz4z9BzSXSkuPZS3NoQiM3RN1RBrdQMdt/eyk36rU+sSjzoY/6ly 1CqrYHK68OZPgnCXiuRNB+1NRqRe76PyRzY1GJi4dgKFXg7XB++U6leoKXQrx/DuU+BJ 92eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312825; 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=vtzEjnqGRdFn/CH1z8MTrNU5zbERfjr+pOykLChRQ04=; b=02PsSBVi4T6Lf11gGCuFk2VtN4rKw4zhXt3W0/rG9kyHrUX9Mq3Bl6meXDF1yHzgdy E+wAscBQi8Cxncj2+fo/852EX+jhp28dAznThliiBF2QqiU7e5+58VkjgJNVk9EqDm20 wZndRLfbWZTc1u6uFYKzgz3MOgG/tGrtGkSMD+o/9aVzMd4ulc1hQX+o4biQ90bLInCj 9/3bdnou/pciPBX1fTeWaLbvk6w7UarKeqSnRCUNPlnOgM6mguMK2AzzXQywYoiRz5RK JLDcqu4fneeKbAPRNrQKfHrbgsdvP45Fl2zzEnVwIDhAbH4pmheq0uIsNNrX2P6N5CUL g0YQ== X-Gm-Message-State: AO0yUKXXOTlx4l1hwyGJHvPliXsWBYDr/u2k4UQ8RogelAf9zdbjFeAE d9iYG5L4qdHfGkzUZMBMozNq4a14rEReglAj X-Google-Smtp-Source: AK7set/MtG0PFQr2uuJ1G1iRiJfw0HwuytAwOGW1eBkmcuCr0KbDyaVwr6IwQwOcty1fcbfV9ZlhqA== X-Received: by 2002:a5d:66ca:0:b0:2cf:e3d8:5df9 with SMTP id k10-20020a5d66ca000000b002cfe3d85df9mr12814300wrw.58.1679312825401; Mon, 20 Mar 2023 04:47:05 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:47:05 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Subject: [PATCH 33/33] doc: boards: amlogic: add documentation for ODROID-HC4 Date: Mon, 20 Mar 2023 11:46:09 +0000 Message-Id: <20230320114609.930145-34-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_044705_917404_7588C343 X-CRM114-Status: GOOD ( 14.19 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Add separate documentation for the ODROID-HC4 board to ensure users build U-Boot using the HC4 defconfig that enables PCIe SATA boot. This avoids user frustration trying to boot after using the C4 recipe which only works from SD card. Signed-off-by: Christian Hewitt --- doc/board/amlogic/index.rst | 1 + doc/board/amlogic/odroid-hc4.rst | 141 +++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 doc/board/amlogic/odroid-hc4.rst diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index 7c4c161e0d..9b76bca427 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -101,6 +101,7 @@ Board Documentation nanopi-k2 odroid-c2 odroid-c4 + odroid-hc4 odroid-n2 odroid-n2l odroid-go-ultra diff --git a/doc/board/amlogic/odroid-hc4.rst b/doc/board/amlogic/odroid-hc4.rst new file mode 100644 index 0000000000..94c3312022 --- /dev/null +++ b/doc/board/amlogic/odroid-hc4.rst @@ -0,0 +1,141 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for ODROID-HC4 (S905X3) +============================== + +ODROID-HC4 is a variant of the ODROID-C4 single board computer manufactured by Hardkernel +with the following specification: + + - Amlogic S905X3 Arm Cortex-A55 quad-core SoC + - 4GB DDR4 SDRAM + - 16MB XT25F128B SPI-NOR flash + - Gigabit Ethernet + - HDMI 2.1 display + - 7-pin GPIO header for OLED display and RTC + - 1x USB 2.0 host (micro) + - 2x SATA ports via ASM1061 PCIe to SATA controller + - microSD + - UART serial + - Infrared receiver + +Schematics are available on the manufacturer website. + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make odroid-hc4_defconfig + $ make + +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh odroid-hc4 /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Amlogic does not provide sources for the firmware and tools needed to create a bootloader +image so it is necessary to obtain binaries from sources published by the board vendor: + +.. code-block:: bash + + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH + + $ DIR=odroid-hc4 + $ git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidg12-v2015.01 $DIR + + $ cd odroid-hc4 + $ make odroidc4_defconfig + $ make + $ export UBOOTDIR=$PWD + +Go back to mainline U-Boot source tree then: + +.. code-block:: bash + + $ mkdir fip + + $ wget https://github.com/BayLibre/u-boot/releases/download/v2017.11-libretech-cc/blx_fix_g12a.sh -O fip/blx_fix.sh + $ cp $UBOOTDIR/build/scp_task/bl301.bin fip/ + $ cp $UBOOTDIR/build/board/hardkernel/odroidc4/firmware/acs.bin fip/ + $ cp $UBOOTDIR/fip/g12a/bl2.bin fip/ + $ cp $UBOOTDIR/fip/g12a/bl30.bin fip/ + $ cp $UBOOTDIR/fip/g12a/bl31.img fip/ + $ cp $UBOOTDIR/fip/g12a/ddr3_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/ddr4_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/ddr4_2d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/diag_lpddr4.fw fip/ + $ cp $UBOOTDIR/fip/g12a/lpddr3_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/lpddr4_1d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/lpddr4_2d.fw fip/ + $ cp $UBOOTDIR/fip/g12a/piei.fw fip/ + $ cp $UBOOTDIR/fip/g12a/aml_ddr.fw fip/ + $ cp u-boot.bin fip/bl33.bin + + $ sh fip/blx_fix.sh \ + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + + $ sh fip/blx_fix.sh \ + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \ + --output fip/bl30_new.bin.g12a.enc \ + --level v3 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \ + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \ + --output fip/bl31.img.enc \ + --level v3 --type bl31 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \ + --output fip/bl33.bin.enc \ + --level v3 --type bl33 --compress lz4 + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \ + --output fip/bl2.n.bin.sig + $ $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bootmk \ + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --ddrfw9 fip/lpddr3_1d.fw \ + --level v3 + +Then write U-Boot to SD or SPI-NOR with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440