Difference between revisions of "Backup and restore U-Boot environment on AMC1"
From DSignT Support Database
Line 1: | Line 1: | ||
__NOINDEX__ | __NOINDEX__ | ||
+ | == Preparation == | ||
+ | Boot into U-Boot and stop execution by pressing a key | ||
+ | |||
+ | <syntaxhighlight lang=c style="border:1px dashed blue"> | ||
+ | U-Boot 2017.01 (Nov 14 2017 - 13:37:55 +0100) | ||
+ | |||
+ | CPU : AM437X-GP rev 1.2 | ||
+ | I2C: ready | ||
+ | DRAM: 512 MiB | ||
+ | MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 | ||
+ | SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB, m | ||
+ | apped at 30000000 | ||
+ | In: serial | ||
+ | Out: serial | ||
+ | Err: serial | ||
+ | Net: cpsw | ||
+ | Hit any key to stop autoboot: 0 | ||
+ | AMC1> | ||
+ | </syntaxhighlight> | ||
+ | <br> | ||
+ | To access the on-board QSPI Flash you need to execute the '''''sf probe''''' command at least once: | ||
+ | <syntaxhighlight lang=c style="border:1px dashed blue"> | ||
+ | AMC1> sf probe | ||
+ | SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB, m | ||
+ | apped at 30000000 | ||
+ | AMC1> | ||
+ | </syntaxhighlight> | ||
+ | <br><br> | ||
== Backup environment == | == Backup environment == | ||
Load environment from serial FLASH to RAM | Load environment from serial FLASH to RAM |
Latest revision as of 13:24, 16 November 2017
1 Preparation
Boot into U-Boot and stop execution by pressing a key
U-Boot 2017.01 (Nov 14 2017 - 13:37:55 +0100)
CPU : AM437X-GP rev 1.2
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB, m
apped at 30000000
In: serial
Out: serial
Err: serial
Net: cpsw
Hit any key to stop autoboot: 0
AMC1>
To access the on-board QSPI Flash you need to execute the sf probe command at least once:
AMC1> sf probe
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB, m
apped at 30000000
AMC1>
2 Backup environment
Load environment from serial FLASH to RAM
sf read ${loadaddr} 0x100000 0x10000
Write to backup section
sf erase 0x110000 0x10000 sf write ${loadaddr} 0x110000 0x10000
3 Restore environment
Load environment from backup section in serial FLASH to RAM
sf read ${loadaddr} 0x110000 0x10000
Write to environment section in serial FLASH
sf erase 0x100000 0x10000 sf write ${loadaddr} 0x100000 0x10000
4 Additional Tags
Serial FLASH mapping on AMC1 Serial FLASH programming via U-Boot on AMC1 Reset U-Boot environment on AMC1