[PATCH 2/3] imx-bbu-nand-fcb: Save bootloader location into device parameters

Sascha Hauer sha at pengutronix.de
Tue Oct 12 01:11:09 PDT 2021


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 |



More information about the barebox mailing list