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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 469ADC433EF for ; Thu, 11 Nov 2021 17:42:42 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7461661077 for ; Thu, 11 Nov 2021 17:42:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7461661077 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7347D83A5C; Thu, 11 Nov 2021 18:42:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D2C2083A66; Thu, 11 Nov 2021 18:42:37 +0100 (CET) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 9CB0883A48 for ; Thu, 11 Nov 2021 18:42:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f181.google.com with SMTP id n15so6079283qta.0 for ; Thu, 11 Nov 2021 09:42:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q98H+5F/6LdCn/ObcqeWNc7b+M+6qP8/0tt2JnLy0KU=; b=6v+WqcTMrMx3BqH3oC5Ho2Zs9MnXHiZPRVG2k2WwpQAEwl6ruV0JVOt/hSoxGQTrZD lS7Hr1yp8ClS9TCL4SRQajRBUGGzkGR6EDyFoMkNvk2sno3nzBmLm/4nUxMukF4y7IRe nmW/hmxtd9fzcL2BpqfAAVTVX2cln0PyXTtL8Os+HUQoCdEEyCUknJA7Zm0bwjk/Jhw4 GnmMsIwKNNLbyERdnX2OW/Ro4YxRLW+CIPdSV06g8RguVJWyc8ybwfoqQTyO7wkdM/vQ By4M17+rf8GMsFFYMw/KVgllfq9m9kPucKNe0NaPxNPXc8A3nL2lepPg82Erg0R9aguK T0bw== X-Gm-Message-State: AOAM53178jh67XTIVj0sDRXgzFNlGRz0Ke5AOQPwC4iwPlk0ayKPwmEU KV62LTfh8jjJeCyol7OclAshC76zoQ== X-Google-Smtp-Source: ABdhPJw4vOF7C+6Y+/c/3LM7Igsapc8Cv+fMs2zCVgV/FifRxpEr0iHrUyTAsQfedpF9z9VjJGW6Sg== X-Received: by 2002:a05:622a:551:: with SMTP id m17mr5716857qtx.98.1636652552971; Thu, 11 Nov 2021 09:42:32 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-0560-a46c-4644-38cb.res6.spectrum.com. [2603:6081:7b01:cbda:560:a46c:4644:38cb]) by smtp.gmail.com with ESMTPSA id e12sm1688632qtj.13.2021.11.11.09.42.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Nov 2021 09:42:32 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [u-boot-test-hooks] writer: Add imx_raw variant Date: Thu, 11 Nov 2021 12:42:29 -0500 Message-Id: <20211111174229.1005945-1-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean When flashing the SD card for an imx platform, we need to use u-boot-with-spl.imx at an offset of 1024 bytes in to the device. Signed-off-by: Tom Rini --- bin/writer.imx_raw | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 bin/writer.imx_raw diff --git a/bin/writer.imx_raw b/bin/writer.imx_raw new file mode 100755 index 000000000000..4708bab3ca28 --- /dev/null +++ b/bin/writer.imx_raw @@ -0,0 +1,39 @@ +# Copyright 2021 Konsulko Group, All rights reserved. +# Based on writer.sunxi_raw which is +# Copyright 2019 Google LLC. 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. + +# Writes raw imx images to the board + +# Args: +# $1: Device path of the sdcard when board is off (e.g. /dev/sdcard0) +# $2: U-Boot build directory + +set -e + +device=$1 +build=$2 + +echo "Writing to ${device} from build at ${build}" + +# At least partially zero out the previous image +dd if=/dev/zero of=$device bs=1k seek=1 count=128 +dd if=${build}/u-boot-with-spl.imx of=$device bs=1024 seek=1 +sync $device -- 2.25.1