User manual

Linux Guide taskit GmbH
protect - enable or disable FLASH write protection
protect on|off addr1 addr2
protect on|off all
Use the protect command to protect individual flash sectors from unintentional write
accesses. This is purely a software protection on the U-Boot level. The protection prevents
the cp and erase commands from being carried out on the correspondingly marked
sectors. This protection is easy to remove and other programs (e.g. Linux) know nothing
about this „protection“ and will erase the corresponding range. In U-Boot, the range used
for U-Boot and its environment variables is write protected. You can request a list of write-
protected sectors using the flinfo command.
Example 1:
Display the standard configuration, remove all write protection, set write protection for all
sectors.
U-Boot> flinfo
Bank # 1: AMD Chip: LV320B 32 Mbit
Size: 4 MB in 71 Sectors
Sector Start Addresses:
10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO)
1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO)
10030000 10040000 10050000 10060000 10070000
. . .
103A0000 103B0000 103C0000 103D0000 103E0000
103F0000
U-Boot> protect off all
Un-Protect Flash Bank # 1
U-Boot> flinfo
Bank # 1: AMD Chip: LV320B 32 Mbit
Size: 4 MB in 71 Sectors
Sector Start Addresses:
10000000 10002000 10004000 10006000 10008000
1000A000 1000C000 1000E000 10010000 10020000
10030000 10040000 10050000 10060000 10070000
. . .
103A0000 103B0000 103C0000 103D0000 103E0000
103F0000
U-Boot> protect on all
Protect Flash Bank # 1
U-Boot> flinfo
Bank # 1: AMD Chip: LV320B 32 Mbit
Size: 4 MB in 71 Sectors
Sector Start Addresses:
10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO)
1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO)
10030000 (RO) 10040000 (RO) 10050000 (RO) 10060000 (RO) 10070000 (RO)
. . .
103A0000 (RO) 103B0000 (RO) 103C0000 (RO) 103D0000 (RO) 103E0000 (RO)
103F0000 (RO)
Example 2:
Page 57 of 65 Version 1.26 (2008-04-30)