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: 1758983 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=IpSqyp45; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PgFCb4bpQz246f for ; Mon, 20 Mar 2023 23:58:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13CCB85CC3; Mon, 20 Mar 2023 13:56:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IpSqyp45"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3BA6F85B66; Mon, 20 Mar 2023 12:46:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 889F985B38 for ; Mon, 20 Mar 2023 12:46:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=christianshewitt@gmail.com Received: by mail-wr1-x434.google.com with SMTP id j2so10024914wrh.9 for ; Mon, 20 Mar 2023 04:46:19 -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=rfHXME/esifeiDg7SfA8rk45SYoXl+IceL9rOnpzDOA6NOC+IaaqP75vdbBdCombyS J44pIalcUFOq435PUg7EDU2384d/je50m5nyqQHRplOlPWxz6wzGdqlinRfUS6Fuvrh7 DSmFyigJhk2JhNT2B2lyTS1zF6j64W/30gohPYU8yugedXo7eZWzIUHjXLuAC8PmFO7A xFb3sg51iRy9deEAh6wa3yPwDtUXXRaG/JQToJh0hSMfUlCGN/F7JEv6w6T5K/K0JYmj rvsHCnC6gndfb+Q1/oTyOCxeyz2+gGsxPPukNJptbRKtMRMKYHFAX+aQAXQR04n8B29c dnRw== X-Gm-Message-State: AO0yUKXdfWtyhrNLoZCngkwbW7qnUVJ7U2gFu4Z3Mq4qQhf9Oj80H0iR 38Ehz7d/FkZpmJacFqXUYnzYvK/l+dpA/WDc 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 Cc: Christian Hewitt 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-Mailman-Approved-At: Mon, 20 Mar 2023 13:54:05 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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