mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Trent Piepho <trent.piepho@igorinstitute.com>
Cc: Barebox List <barebox@lists.infradead.org>, Yunus Bas <Y.Bas@phytec.de>
Subject: Re: [PATCH 2/3] imx-bbu-nand-fcb: Save bootloader location into device parameters
Date: Tue, 12 Oct 2021 10:11:09 +0200	[thread overview]
Message-ID: <20211012081109.GM28453@pengutronix.de> (raw)
In-Reply-To: <20211012015359.933464-2-trent.piepho@igorinstitute.com>

On Mon, Oct 11, 2021 at 06:53:58PM -0700, Trent Piepho wrote:
> When updating the FCB, save the location and size of the Barebox images
> into parameters on the NAND device.  Since the location and padding is
> calculated based on net NAND partition size, with an unknown number of
> bad blocks, these values aren't known beforehard.  Saving them will
> allow extracting or checksumming the Barebox image in NAND.
> 
> For example:
> sha256sum /dev/nand0.barebox ${nand0.barebox.firmware1_addr}+${nand0.barebox.firmware1_size}
> memcpy -s /dev/nand0.barebox -d /mnt/mmc0.0/imagedump ${nand0.barebox.firmware2_addr} 0 ${nand0.barebox.firmware2_size}

As you are adding a fcb utility command anyway in the next patch, maybe
it would be more convenient for the user to add a firmware extraction
option there instead of adding these device parameters.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-10-12  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12  1:53 [PATCH 1/3] imx-bbu-nand-fcb: Show additional information from decoded FCB Trent Piepho
2021-10-12  1:53 ` [PATCH 2/3] imx-bbu-nand-fcb: Save bootloader location into device parameters Trent Piepho
2021-10-12  8:11   ` Sascha Hauer [this message]
2021-10-12  1:53 ` [PATCH 3/3] imx-bbu-nand-fcb: Add command to help debug FCB issues Trent Piepho
2021-10-12  8:21   ` Sascha Hauer
2021-10-13 10:14     ` Trent Piepho
2021-10-14 12:09       ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211012081109.GM28453@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=Y.Bas@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=trent.piepho@igorinstitute.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox