From patchwork Tue Dec 15 12:32:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 1416429 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mlgf6qe4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CwJhq3CnPz9sPB for ; Wed, 16 Dec 2020 00:17:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E8D868298F; Tue, 15 Dec 2020 14:17:17 +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="mlgf6qe4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C0178293C; Tue, 15 Dec 2020 13:32:28 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 51C2D82976 for ; Tue, 15 Dec 2020 13:32:24 +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-x436.google.com with SMTP id i9so19688131wrc.4 for ; Tue, 15 Dec 2020 04:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=z9iUoQ4Wap4UDaUD9Nyn62MUTm5cihfXRRiq9AEQgeg=; b=mlgf6qe4S88imDnU/dtW/FEKtZrxQzMDx5FhOm01CnULODQzuWq9zrW6aKY7iDmwrt O7YuZzv0/tMoHli5oQMPVpdpEb/w9kjLNEDUNt51eI4BMBb5zO0l7e0UfdwAKKYPG8nS xryzoeRGdsB9OhKwLwgBGwSQKADyia67izve5T1Fyix5FraJXXX3zlqJiu8W49RfIDhC +fppLI7vGUhq18u0D/u72QW/Yv1VnNNXYaEQ93O18kKnA4ZOiAN6ORWID4DhECAjyBPP 6vAtLEsyKp4Sei/JdnVKW8CB4vGx+ktviMZu4Ad9mfoIZuFnKplRd/vs3pbqkUgagCXE xh5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=z9iUoQ4Wap4UDaUD9Nyn62MUTm5cihfXRRiq9AEQgeg=; b=H7pROZHW+yk0yjKIJgmnjqHJxtSNdivjK2sFXTPW6b6y8VXxYljNUW5sRwrmftOxPo 7Bn1O/xuxhxnfPFu2Ft8j1a0MKAXX+jP1nF5eN2WXLHF43IeFXrVCFuZXnRUftKw1JVS IVETig0ZqDfwiVaX/EyQ380/SGDKybC0xgriLn5GJszcAE8BeZr3LKWq+xHP2c9BsRD4 ebKVlloUNQ0KtBPdP75711K3YIrkQ7HFX5ChvSMULhSuSRDVD0flV7h3o8tln+e1/Z8z 74FeLNFUbr3kV4sSJXgF6WNP+dnZxD58p0HC3Ijkzri9FUVn9S3ptw7MR0GTafXdt0rX x4fQ== X-Gm-Message-State: AOAM533HxY2++cXG34meVLIhEXm/NWMOvq00hvZIaLVBPNSHDW6rIbZa arGAeYkufBDuMrS2DW0SqWg0aXJ/7wPglw== X-Google-Smtp-Source: ABdhPJyv0J94bRxM53cOCs2rYD+3cNvooroO96OVSRJtQ+vW6bjVrq+bfuyV8p8bf1ndRoePbZDmnA== X-Received: by 2002:a05:6000:1152:: with SMTP id d18mr2563143wrx.6.1608035543643; Tue, 15 Dec 2020 04:32:23 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id n3sm38488406wrw.61.2020.12.15.04.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 04:32:23 -0800 (PST) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Cc: Christian Hewitt Subject: [PATCH 3/3] boards: amlogic: update documentation for WeTek Core2 Date: Tue, 15 Dec 2020 12:32:14 +0000 Message-Id: <20201215123214.18661-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215123214.18661-1-christianshewitt@gmail.com> References: <20201215123214.18661-1-christianshewitt@gmail.com> X-Mailman-Approved-At: Tue, 15 Dec 2020 14:17:09 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Update the device matrix and add build instructions. Signed-off-by: Christian Hewitt --- doc/board/amlogic/index.rst | 3 +- doc/board/amlogic/wetek-core2.rst | 90 +++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 doc/board/amlogic/wetek-core2.rst diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index cba1c7b726..a585d857df 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -17,7 +17,7 @@ This matrix concerns the actual source code version. +===============================+===========+=================+==============+============+============+=============+==============+ | Boards | Odroid-C2 | P212 | Khadas VIM2 | S400 | U200 | Odroid-N2 | SEI610 | | | Nanopi-K2 | Khadas-VIM | Libretech-PC | | SEI510 | Khadas-VIM3 | Khadas-VIM3L | -| | P200 | LibreTech-CC v1 | | | | | Odroid-C4 | +| | P200 | LibreTech-CC v1 | WeTek Core2 | | | | Odroid-C4 | | | P201 | LibreTech-AC v2 | | | | | | +-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+ | UART | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | @@ -95,4 +95,5 @@ Board Documentation sei510 sei610 u200 + wetek-core2 w400 diff --git a/doc/board/amlogic/wetek-core2.rst b/doc/board/amlogic/wetek-core2.rst new file mode 100644 index 0000000000..d2aeb90c3d --- /dev/null +++ b/doc/board/amlogic/wetek-core2.rst @@ -0,0 +1,90 @@ +.. SPDX-License-Identifier: GPL-2.0+ +U-Boot for WeTek Core2 +====================== + +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) + - 32GB eMMC + - microSD + - SDIO Wifi Module, Bluetooth + - Two channel IR receiver + +U-Boot compilation +------------------ + +.. code-block:: bash + $ export CROSS_COMPILE=aarch64-none-elf- + $ make wetek-core2_defconfig + $ make +Image creation +-------------- + +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: + +.. 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 + $ git clone https://github.com/khadas/u-boot -b khadas-vim-v2015.01 vim-u-boot + $ cd vim-u-boot + $ make kvim2_defconfig + $ make + $ export FIPDIR=$PWD/fip + +Go back to mainline U-Boot source tree then: + +.. code-block:: bash + $ mkdir fip + $ cp $FIPDIR/gxl/bl2.bin fip/ + $ cp $FIPDIR/gxl/acs.bin fip/ + $ cp $FIPDIR/gxl/bl21.bin fip/ + $ cp $FIPDIR/gxl/bl30.bin fip/ + $ 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 + $ 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/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 + +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