UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor deryai
Visitor
1,501 Views
Registered: ‎05-09-2017

Erase QSPI Flash Partition /dev/mtd Problem

Jump to solution

Hi,

We are using petalinux-v2017.2 for our custom board designed with zynq7045 SoC. We have two 64MB QSPI Flash(Spansion S25FL512S) in dual stacked configuration on it.
We have 4 partitions on qspi flash boot(zynq_fsbl.elf+system_wrapper.bit+u-boot.elf), bootenv, kernel(uImage+dtb) and spare. Rootfs is on EMMC. We are trying to update kernel partition image with the new one from rootfs with flashcp command.

 

Creating flash partition messages in kernel startup logs on below:

 

Screenshot from 2017-09-29 11-22-09.png

We've checked partiton again..

 

Screenshot from 2017-09-29 11-24-12.png

 

Screenshot from 2017-09-29 11-25-44.png

We are trying to erase kernel partition on below command:

Screenshot from 2017-09-29 11-27-07.png

 

After reading&checking the flash partiton(kernel_image.bin), it seems the kernel partiton is not erased.
Screenshot from 2017-09-29 11-29-03.png

 

Because of the flash erase problem , update kernel partition with the same image is failed.
root@petalinux_out:~# flashcp -v image.ub /dev/mtd2


BTW, we've checked the unlock of flash:

Screenshot from 2017-09-29 11-30-09.png

 

After searching on web, the reason of erase problem, uboot locks flash and erase & program from rootfs is not successful. unlock is not implemented in m25p80.c so unlock is not supported in kernel layer.

Is there any patch to solve this? How can we achieve update kernel parttion from rootfs ?

Thanks,

Best Regards,

0 Kudos
1 Solution

Accepted Solutions
Voyager
Voyager
2,138 Views
Registered: ‎06-24-2013

Re: Erase QSPI Flash Partition /dev/mtd Problem

Jump to solution

Hey @deryai,

 

I see at least two options here ...

  • Use the unlock command in u-boot to unlock the flash/partition
  • Patch the kernel to support unlocking

 

There have been several proposed patches for the unlock feature (google for m25p80.c unlock/unprotect) but it seems that they didn't make it into the kernel for whatever reason.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
2 Replies
Voyager
Voyager
2,139 Views
Registered: ‎06-24-2013

Re: Erase QSPI Flash Partition /dev/mtd Problem

Jump to solution

Hey @deryai,

 

I see at least two options here ...

  • Use the unlock command in u-boot to unlock the flash/partition
  • Patch the kernel to support unlocking

 

There have been several proposed patches for the unlock feature (google for m25p80.c unlock/unprotect) but it seems that they didn't make it into the kernel for whatever reason.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Visitor deryai
Visitor
1,401 Views
Registered: ‎05-09-2017

Re: Erase QSPI Flash Partition /dev/mtd Problem

Jump to solution

Hi @@hpoetzl,

Thanks for your reply ...

 

Best Regards,

Derya

0 Kudos