From patchwork Tue Jul 25 21:08:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1812858 X-Patchwork-Delegate: trini@ti.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=KuDpvjfr; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R9V5D091Zz1yZv for ; Wed, 26 Jul 2023 07:09:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7CDF586768; Tue, 25 Jul 2023 23:08:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="KuDpvjfr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5BA8C8602A; Tue, 25 Jul 2023 23:08:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-vk1-xa34.google.com (mail-vk1-xa34.google.com [IPv6:2607:f8b0:4864:20::a34]) (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 BCA2C8602A for ; Tue, 25 Jul 2023 23:08:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vk1-xa34.google.com with SMTP id 71dfb90a1353d-486198c70adso950827e0c.0 for ; Tue, 25 Jul 2023 14:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690319329; x=1690924129; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=hAPB9FqjYVehQtcI43N91S92rZMntDP+OOE9P3jOpek=; b=KuDpvjfrjuGYlrsLYdE2GLUVKbw3i5ANHqJGQieaG9orThNaJsDldmVuLESPmRixIJ d1rTZcECLychEQxicTwwdo853Cu6xMfC9MkOKNlcMk/cAjyxiWqYfNj1tjAHlJUxYYco CfCb90rkt+Eriqcd2chWyd0/rrgKDpKD6Kx2M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690319329; x=1690924129; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hAPB9FqjYVehQtcI43N91S92rZMntDP+OOE9P3jOpek=; b=heUUxZX+vC6yiiFnVc59PCufIWXej/joDfoQKTt79yNSORWRilh97q9zZP7sk5XZ3Q CyPIbL89vXQmFNP0APPRVRw5dxPzOuwbYrPEu7BxFY6hg4Xltzhrw9Jj/n7WWh2hRpN4 Xaabb9ixWhEdTVr4Al8j20pv5EejNs1to/NZ5qLDN1IZunSI4JBnI+DeWwF3v7MX1FAl sVPXF2kv8zB/s9fUi+9vcQkoSz/Y0UGh7Dsx9TeIZwGFXoADJufo8rdFa0QHW9EFCBhF FOznOvsgGsB3VUq+jn9JBuKc4qfRC6UMP5SnCeLsXNjLp9tR8qMDo9xgl1IgXRehr1Tu eyqA== X-Gm-Message-State: ABy/qLYUA6b8ESlago8QQ2C8ANFaS9g9ad4ZnFdf1ovb5cIUOYAzSV88 hQxkLTZs5irGHf60uXcMf2MI1R3WRkEuStFgiqFy+w== X-Google-Smtp-Source: APBJJlEmswNLc66F5OUDiD9GBzsGhMGJhxwqkYkhoLnlOtpG0P8Ihlc/LncELCC6n0kdFpa47w62iA== X-Received: by 2002:a67:e3cb:0:b0:444:e9a0:13f7 with SMTP id k11-20020a67e3cb000000b00444e9a013f7mr174361vsm.5.1690319329277; Tue, 25 Jul 2023 14:08:49 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-b236-e3a5-57be-379d.res6.spectrum.com. [2603:6081:7b00:6400:b236:e3a5:57be:379d]) by smtp.gmail.com with ESMTPSA id z26-20020ab0565a000000b0078f3657faa5sm366825uaa.36.2023.07.25.14.08.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 14:08:48 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [u-boot-test-hooks 1/4] bin/flash.sdwire_common_mount: Switch to sourcing the next writer script Date: Tue, 25 Jul 2023 17:08:44 -0400 Message-Id: <20230725210847.1472585-1-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 Rather than invoking the script that will write to the mounted directory as a binary, source it as a script so that it has access to more than just two parameters. This will allow us to have the same flexibility in our writers that other flash methods have. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- bin/flash.sdwire_common_mount | 3 ++- bin/writer.rpi3_mount | 19 +++++++------------ bin/writer.zynq_mount | 15 +++++---------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/bin/flash.sdwire_common_mount b/bin/flash.sdwire_common_mount index 6c763e62f47d..b76add064fb0 100644 --- a/bin/flash.sdwire_common_mount +++ b/bin/flash.sdwire_common_mount @@ -52,7 +52,8 @@ if ! mountpoint -q ${mount_dir}; then exit 1 fi -writer.${flash_writer} ${mount_dir} ${U_BOOT_BUILD_DIR} +# Perform the write, pass along as much environment as possible +. writer.${flash_writer} complete=false for i in {0..9}; do diff --git a/bin/writer.rpi3_mount b/bin/writer.rpi3_mount index 97f24a5ac694..a63e7999e57b 100755 --- a/bin/writer.rpi3_mount +++ b/bin/writer.rpi3_mount @@ -20,23 +20,18 @@ # Writes rpi3_b to the board -# Args: -# $1: Mount point of the sdcard when board is off -# $2: U-Boot build directory - set -ex -mount=$1 -build=$2 +build=${U_BOOT_BUILD_DIR} -echo "Writing to ${mount} from build at ${build}" +echo "Writing to ${mount_dir} from build at ${build}" # First make a copy of the original files if we haven't already -if [[ ! -e ${mount}/config.orig ]]; then - cp ${mount}/config.txt ${mount}/config.orig +if [[ ! -e ${mount_dir}/config.orig ]]; then + cp ${mount_dir}/config.txt ${mount_dir}/config.orig fi -if [[ ! -e ${mount}/rpi3-u-boot.bin.orig ]]; then - cp ${mount}/rpi3-u-boot.bin ${mount}/rpi3-u-boot.bin.orig +if [[ ! -e ${mount_dir}/rpi3-u-boot.bin.orig ]]; then + cp ${mount_dir}/rpi3-u-boot.bin ${mount_dir}/rpi3-u-boot.bin.orig fi # Enable the UART and fix the GPU frequency so it works correctly @@ -46,4 +41,4 @@ if ! grep -q "^gpu_freq=250" /media/rpi3_b_boot/config.txt; then fi # Copy U-Boot over from the build directory -cp ${build}/u-boot.bin ${mount}/rpi3-u-boot.bin +cp ${build}/u-boot.bin ${mount_dir}/rpi3-u-boot.bin diff --git a/bin/writer.zynq_mount b/bin/writer.zynq_mount index 9d0958880422..c8395a40680e 100755 --- a/bin/writer.zynq_mount +++ b/bin/writer.zynq_mount @@ -20,22 +20,17 @@ # Writes zynq images to the board -# Args: -# $1: Mount point of the sdcard when board is off -# $2: U-Boot build directory - set -ex tmp=$(mktemp -d) -mount=$1 -build=$2 +build=${U_BOOT_BUILD_DIR} -echo "Writing to ${mount} from build at ${build}" +echo "Writing to ${mount_dir} from build at ${build}" # Copy U-Boot over from the build directory -cp ${build}/u-boot.bin ${mount}/rpi3-u-boot.bin +cp ${build}/u-boot.bin ${mount_dir}/rpi3-u-boot.bin zynq-boot-bin.py -o ${tmp}/boot.bin -u ${build}/spl/u-boot-spl-dtb.bin -cp ${tmp}/boot.bin ${mount}/BOOT.bin -cp ${build}/u-boot.img ${mount}/. +cp ${tmp}/boot.bin ${mount_dir}/BOOT.bin +cp ${build}/u-boot.img ${mount_dir}/. rm -rf ${tmp} From patchwork Tue Jul 25 21:08:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1812859 X-Patchwork-Delegate: trini@ti.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 (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=IlXcm6pV; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R9V5c0RW1z1yZv for ; Wed, 26 Jul 2023 07:09:24 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5595686128; Tue, 25 Jul 2023 23:08:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="IlXcm6pV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FE1386768; Tue, 25 Jul 2023 23:08:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (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 76FC786377 for ; Tue, 25 Jul 2023 23:08:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-440ac4b44a8so2090260137.3 for ; Tue, 25 Jul 2023 14:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690319330; x=1690924130; 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=buqD7IyFyazz+YAqBbR/X1SvhWkfHGXeYnwW0ZzFGBI=; b=IlXcm6pV1nklk3m3yk0rNAjOTnIdkgAy5rv2LJt7KtvEzRN7KSZsoG7mAdEHKzhQgY AElwyuilGZp1VBkRdpfJHdLpXpSWgRQKuCGztIjMxP2dal/OIrWa0Av2E4EJ96G4WXZZ UTqs8k+RNYiRZgbN00FaK7XEGXV4bdNXG10/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690319330; x=1690924130; 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=buqD7IyFyazz+YAqBbR/X1SvhWkfHGXeYnwW0ZzFGBI=; b=fmQHbugs56UyvQ+0biTJyUf/L4lhqLC/ijhOdsXXqZQiTXrd7kOugw3gk+ECjzh6PO mNFGSUyofeQ94SII/GFGikRyi3BE6a1NS27qND5IQsz9E4MlRxwwDCcDqCjYNI33ybH+ Mu03wId2YwtP/1Ge2wllVAlmCisAYYfURmqtQjFfGSvfRmkvzEkSktAO1y7BUvQDBNHs 0xg3uHKIg/rF8bi6xvYffwtSR+F+XXYGzAi6Oftq4Ilv7rqiQOiXeC3T+1KiLdxp36Wu 5DBp4hMgrF0H6pFSfwBDnm6Od20QVC9VGhZ+G5rIy4N+nF3RzyE34DN5Jm3E9Od64u4H IBMQ== X-Gm-Message-State: ABy/qLYP5HbPkmqQQONoS/rUuIc05r5JNFU5XiroVxIVcseooECUlGx7 sBJMmzKiFnAVYPdMsWHzaRWjj2GJsN8JBWs4uFXZjw== X-Google-Smtp-Source: APBJJlE0g1Augu8wcBJjGRg7ftwqb0SUuWjPNW900+/rXopy7CfmX2/j2ZRGqGkhaRUEWswLs8pGKg== X-Received: by 2002:a05:6102:3005:b0:443:8034:be4a with SMTP id s5-20020a056102300500b004438034be4amr131862vsa.28.1690319330112; Tue, 25 Jul 2023 14:08:50 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-b236-e3a5-57be-379d.res6.spectrum.com. [2603:6081:7b00:6400:b236:e3a5:57be:379d]) by smtp.gmail.com with ESMTPSA id z26-20020ab0565a000000b0078f3657faa5sm366825uaa.36.2023.07.25.14.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 14:08:49 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [u-boot-test-hooks 2/4] bin/writer.rpi*mount: Rework to support all current Pi platforms Date: Tue, 25 Jul 2023 17:08:45 -0400 Message-Id: <20230725210847.1472585-2-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725210847.1472585-1-trini@konsulko.com> References: <20230725210847.1472585-1-trini@konsulko.com> MIME-Version: 1.0 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 Now that we have access to more variables in our "mount" writer scripts, we can have a single one that covers all Pi variants. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- I use this locally to test a Pi 3 in both 32, 64 and "arm64" mode. Cc: Simon Glass --- bin/kea/conf.rpi_3_32b_sjg-rpi_3b | 2 +- bin/kea/conf.rpi_3_sjg-rpi_3b | 2 +- bin/{writer.rpi3_mount => writer.rpi_mount} | 46 +++++++++++++-------- 3 files changed, 31 insertions(+), 19 deletions(-) rename bin/{writer.rpi3_mount => writer.rpi_mount} (63%) diff --git a/bin/kea/conf.rpi_3_32b_sjg-rpi_3b b/bin/kea/conf.rpi_3_32b_sjg-rpi_3b index 5fe98687221d..020eca2404d8 100644 --- a/bin/kea/conf.rpi_3_32b_sjg-rpi_3b +++ b/bin/kea/conf.rpi_3_32b_sjg-rpi_3b @@ -23,7 +23,7 @@ reset_impl=ykush flash_impl=sdwire_poweroff_mount power_impl=ykush -flash_writer=rpi3_mount +flash_writer=rpi_mount ykush_serial=YK17698 ykush_port=1 diff --git a/bin/kea/conf.rpi_3_sjg-rpi_3b b/bin/kea/conf.rpi_3_sjg-rpi_3b index 64ffff01737f..d8d2a94f036a 100644 --- a/bin/kea/conf.rpi_3_sjg-rpi_3b +++ b/bin/kea/conf.rpi_3_sjg-rpi_3b @@ -23,7 +23,7 @@ reset_impl=ykush flash_impl=sdwire_ykush_mount power_impl=ykush -flash_writer=rpi3_mount +flash_writer=rpi_mount ykush_serial=YK17698 ykush_port=1 diff --git a/bin/writer.rpi3_mount b/bin/writer.rpi_mount similarity index 63% rename from bin/writer.rpi3_mount rename to bin/writer.rpi_mount index a63e7999e57b..73fb8bf6af04 100755 --- a/bin/writer.rpi3_mount +++ b/bin/writer.rpi_mount @@ -1,4 +1,5 @@ # Copyright 2019 Google LLC. All rights reserved. +# Copyright 2024 Konsulko Group. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -18,27 +19,38 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -# Writes rpi3_b to the board - -set -ex +set -e build=${U_BOOT_BUILD_DIR} echo "Writing to ${mount_dir} from build at ${build}" -# First make a copy of the original files if we haven't already -if [[ ! -e ${mount_dir}/config.orig ]]; then - cp ${mount_dir}/config.txt ${mount_dir}/config.orig -fi -if [[ ! -e ${mount_dir}/rpi3-u-boot.bin.orig ]]; then - cp ${mount_dir}/rpi3-u-boot.bin ${mount_dir}/rpi3-u-boot.bin.orig -fi +case "${board_type}" in +rpi) + kernel_dst=kernel.img + ;; +rpi_2) + kernel_dst=kernel7.img + ;; +rpi_3|rpi_3b|rpi_3_b_plus|rpi_4|rpi_arm64) + kernel_dst=kernel8.img + ;; +rpi_3_32b|rpi_4_32b) + kernel_dst=kernel8-32.img + ;; +*) + echo Unknown Pi \""${board_type}"\" + exit 1 + ;; +esac + +sudo rm -f ${mount_dir}/kernel*img +sudo cp -v ${build}/u-boot.bin ${mount_dir}/${kernel_dst} -# Enable the UART and fix the GPU frequency so it works correctly -sed -i '/enable_uart/c\enable_uart = 1' /media/rpi3_b_boot/config.txt -if ! grep -q "^gpu_freq=250" /media/rpi3_b_boot/config.txt; then - echo 'gpu_freq=250' >>/media/rpi3_b_boot/config.txt -fi +echo "enable_uart=1" | sudo tee ${mount_dir}/config.txt -# Copy U-Boot over from the build directory -cp ${build}/u-boot.bin ${mount_dir}/rpi3-u-boot.bin +case "${board_ident}" in +3-32-pl011) + echo "dtoverlay=pi3-miniuart-bt" | sudo tee -a ${mount_dir}/config.txt + ;; +esac From patchwork Tue Jul 25 21:08:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1812861 X-Patchwork-Delegate: trini@ti.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 (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=CSR2cUFq; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R9V5v5B6fz1yZv for ; Wed, 26 Jul 2023 07:09:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AB1CE86797; Tue, 25 Jul 2023 23:09:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="CSR2cUFq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 775C686128; Tue, 25 Jul 2023 23:08:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) (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 5EDFD86698 for ; Tue, 25 Jul 2023 23:08:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-44504b2141bso1979971137.2 for ; Tue, 25 Jul 2023 14:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690319331; x=1690924131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=miXmuNzLUot8qoSmBlLBJWGPutLwB6dfmLpDSls/Ujs=; b=CSR2cUFqlfS2EUvXXj0B3HeUMy7TU5pC/XPNiz77GLkBjDVlM5qEBq5NZvlzWFt3Tm JZJ6wgHHDuM1jbbtPh/QxqHeA2d6QXYhjxQIjIv4IYMyyPciyk5AcEADZrTxiz7conwl TWBOQbmjQ7eZh2rZxeMVH0VDY6tN92aI3gI2k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690319331; x=1690924131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=miXmuNzLUot8qoSmBlLBJWGPutLwB6dfmLpDSls/Ujs=; b=V/pDHuNyAngAfUJ1xOkK3tMdWR4iwMpgugn9Myg1D6Yd/MVEyGRfAckQlj1xYvbZh1 Yi2g/lJo3dFLwY3TTG0hHgeYaLWMxSMhMUNN0hcUwaYKoj8o0rMbNzQ5a8IAEJR/dX5D AniCV81LI5NEMIkOjJOeEG6L8pmL/k6Hiehwo9Nbi6CS2sKlBmqF0Viy6703Hvbkgr9M AxcA7QezO+Q8Z5t1ahEGhY5lBA/gP0kTx5REMPf7jTsP7QP5WXpvbiWSBCIhB6B+GLjS 066zl6byRYEdjQ6D9hltoIWn9YEk6wAl5eRZiaYEJpRFr5VTOLJ8uTluJJTiWjJYHuQP PWZw== X-Gm-Message-State: ABy/qLYsebqvyAAoGYCVj6Eh5awPnvLv0hrIBDfoWYITq05W/9RULa56 XrDDOkXtuee0Dhw3jUnwa9V8EKtZTPjq65C45O7M3g== X-Google-Smtp-Source: APBJJlH6c5mNYaQlJ5CMvIe+UZOfCPXQJEdhsFLQX8e8weIIuQaKdRvstIuBScdWx0Fw8fwrwtB84A== X-Received: by 2002:a05:6102:11e6:b0:444:bb6f:b983 with SMTP id e6-20020a05610211e600b00444bb6fb983mr154735vsg.2.1690319331016; Tue, 25 Jul 2023 14:08:51 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-b236-e3a5-57be-379d.res6.spectrum.com. [2603:6081:7b00:6400:b236:e3a5:57be:379d]) by smtp.gmail.com with ESMTPSA id z26-20020ab0565a000000b0078f3657faa5sm366825uaa.36.2023.07.25.14.08.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 14:08:50 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [u-boot-test-hooks 3/4] bin/writer.ti-omap_mount: Add support for TI OMAP-style platforms via mount Date: Tue, 25 Jul 2023 17:08:46 -0400 Message-Id: <20230725210847.1472585-3-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725210847.1472585-1-trini@konsulko.com> References: <20230725210847.1472585-1-trini@konsulko.com> MIME-Version: 1.0 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 In the case of TI OMAP (and similar) platforms, the SD card needs MLO and u-boot.img to boot, always. Copy these files over. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- bin/writer.ti-omap_mount | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 bin/writer.ti-omap_mount diff --git a/bin/writer.ti-omap_mount b/bin/writer.ti-omap_mount new file mode 100755 index 000000000000..7d1dbee8f65f --- /dev/null +++ b/bin/writer.ti-omap_mount @@ -0,0 +1,29 @@ +# Copyright 2022 Konsulko Group. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Copies MLO to the filesystem + +set -e + +build=${U_BOOT_BUILD_DIR} + +echo "Writing to ${mount_dir} from build at ${build}" + +sudo cp ${build}/MLO ${build}/u-boot.img ${mount_dir}/ From patchwork Tue Jul 25 21:08:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1812860 X-Patchwork-Delegate: trini@ti.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=buw3vLVp; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R9V5j1p8cz1yZv for ; Wed, 26 Jul 2023 07:09:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE2C08678C; Tue, 25 Jul 2023 23:09:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="buw3vLVp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C195186679; Tue, 25 Jul 2023 23:08:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) (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 E6EC886729 for ; Tue, 25 Jul 2023 23:08:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vs1-xe2b.google.com with SMTP id ada2fe7eead31-44096f01658so2100018137.0 for ; Tue, 25 Jul 2023 14:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690319332; x=1690924132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TKrpzuUm4nuTM74YoUKHDBpNHac0NpvRrc9eFIrxnmE=; b=buw3vLVpmUQuCSFhUpXyhoVXec38YI50iSDw7KggSaXHwfw/D8z1kGbecsNTrNT3uV IYPkg2kwQvlcNDj0IiDscZi4OoL4wtA0ihN4tm4l5jsJeVe/OGfJB9g9Cy0z7TThjJPK ke4TR0e56CbQPoyCinJR2yxdKEX/Io4UU0ol0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690319332; x=1690924132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TKrpzuUm4nuTM74YoUKHDBpNHac0NpvRrc9eFIrxnmE=; b=jAlxCqRBJSoVPuhv2ot9TUOvbNxEVgYavHsnhVhCp4M/JLsvgqShRIqbiLPcFCOHJs Z+tc1R8mXBTGozp+Nc0j6hMX90hGhdO7X0l+tcMI7ubvz+F1KKVdpfgNGbr2z3exsSxC rTGN6c+fyEjBkjZGG5ni5WR0aQCFRZa6Lyr7SYPdk0LhhtwuOO8oL6E1YT22fuD+zO0K wInnYX3B7S8zTVEiUIopc93OkiYY7mXXLa7+xOFNZVKJxaHj9RmafS87CVssp8Evsjty cxCOdTPpJYEjDU2XJYh1HbDsqHkQe8EUxn0YmouDILA8aFlvP1zfBLcejwgw1CLOeB/E rOhQ== X-Gm-Message-State: ABy/qLaffNQe36/RzdOJpL3tcsFyDIWX+KTO8BdFmjq444NLD4rSVj9R 1RvLfWCuo6qVn9Dq3WQ6jiGGPdASiAHAuGr2ib+LGQ== X-Google-Smtp-Source: APBJJlECRu4Jsw8GinQqD7u/dJfyj9uHs1EYjURhasE2ruRzOoAV6K2HhKHLVEHTNRnLRcmrhwTbqw== X-Received: by 2002:a05:6102:415:b0:447:7da:bd35 with SMTP id d21-20020a056102041500b0044707dabd35mr99681vsq.24.1690319332557; Tue, 25 Jul 2023 14:08:52 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-b236-e3a5-57be-379d.res6.spectrum.com. [2603:6081:7b00:6400:b236:e3a5:57be:379d]) by smtp.gmail.com with ESMTPSA id z26-20020ab0565a000000b0078f3657faa5sm366825uaa.36.2023.07.25.14.08.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 14:08:51 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [u-boot-test-hooks 4/4] bin/writer.ti-k3_mount: Add support for TI K3 platforms via mount Date: Tue, 25 Jul 2023 17:08:47 -0400 Message-Id: <20230725210847.1472585-4-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725210847.1472585-1-trini@konsulko.com> References: <20230725210847.1472585-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The TI K3 platforms require a number of things in order to boot. We must have built both the Cortex-R and Cortex-A configurations (following their board documents and requirements as these need additional tooling and binaries). Further, depending on the specific SoC and variant we need three or four files to be copied to the mount point, with specific names. The least fragile way to handle this is that each board conf file must define the name of the input files to copy (the outputs have static names). Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- bin/writer.ti-k3_mount | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 bin/writer.ti-k3_mount diff --git a/bin/writer.ti-k3_mount b/bin/writer.ti-k3_mount new file mode 100755 index 000000000000..e22a2a50de78 --- /dev/null +++ b/bin/writer.ti-k3_mount @@ -0,0 +1,36 @@ +# Copyright 2022 Konsulko Group. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Copies MLO to the filesystem + +set -e + +build=${U_BOOT_BUILD_DIR} + +if [ -z "${tispl}" -o -z "${uboot}" -o -z "${tiboot3}" ]; then + echo "Must configure tispl, uboot, tiboot3 and optionally sysfw" + echo "per the board documentation." + exit 1 +fi +echo "Writing to ${mount_dir} from build at ${build}" +sudo cp -v ${build}/${tispl} ${mount_dir}/tispl.bin +sudo cp -v ${build}/${uboot} ${mount_dir}/u-boot.img.bin +sudo cp -v ${build/_a??/_r5}/${tiboot3} ${mount_dir}/tiboot3.bin +[ ! -z "${sysfw}" ] && sudo cp -v ${build/_a??/_r5}/${sysfw} ${mount_dir}/sysfw.itb