Hi Sheikh,
On 31.07.24 22:38, Sheikh Bakir wrote:
> Hi All,
>
> I need to update a raw NAND partition. The raw nand partition fits into
> single PEB, due to bad block management I reserved extra PEB for this
> specific partition. Now I need to identify and check if a particular PEB
> is good/bad before installing image in run time.
>
> I am new to swupdate and after reading the documentation, I am thinking
> to do this way.
>
> * Write embedded-script lua script to find the offset of first good
> PEB from the reserved 4 PEB.
> * Add *offset* attribute to the image table
>
> Example:
> /images =
> (
> {
> filename = "<image_name>";
> device = "/dev/block/platform/<partition_name>";
> type = "raw";
Wrong.
> installed-directly = True
> hook = "set_offset"
> },
> ..
> ..
> ..
> )
> function //set_offset//(image)
> //set offset="query the good PEB offset from the device"
> end/
> /
> /
> Does this sound right
No.
SWUpdate is able to manage bad blocks. You just need to pass the MTD
device where the artifact should be installed. There is a specific
handler "flash" to be used, and this will skip bad blocks. No need to
work with offsets.
Best regards,
Stefano Babic