Commit e37a8cc4 authored by David Mondou's avatar David Mondou
Browse files

Vesta 300 now uses emmc for boot toggle and boot counter

parent 1a97597c
......@@ -160,12 +160,12 @@
#elif CONFIG_VESTA_300
#define BOARD_TYPE "vesta-300"
#define CONFIG_DEFAULT_FDT_FILE "zImage-vesta-300.dtb"
#define CONFIG_KERNEL_LOCATION "0x210000"
#define CONFIG_FDT_LOCATION "0x200000"
#define CONFIG_ALT_KERNEL_LOCATION "0xa10000"
#define CONFIG_ALT_FDT_LOCATION "0xa00000"
#define CONFIG_ROOT_FS "root=/dev/mmcblk1p2 rootwait rw"
#define CONFIG_ALT_ROOT_FS "root=/dev/mmcblk1p3 rootwait rw"
#define CONFIG_KERNEL_LOCATION "2"
#define CONFIG_FDT_LOCATION "2"
#define CONFIG_ALT_KERNEL_LOCATION "3"
#define CONFIG_ALT_FDT_LOCATION "3"
#define CONFIG_ROOT_FS "root=/dev/mmcblk1p5 rootwait rw"
#define CONFIG_ALT_ROOT_FS "root=/dev/mmcblk1p6 rootwait rw"
#elif CONFIG_VESTA_64M_NOR
#define BOARD_TYPE "vesta-nor"
#define CONFIG_DEFAULT_FDT_FILE "zImage-vesta-64M-nor.dtb"
......@@ -298,7 +298,17 @@
"alt_rootfs="CONFIG_ALT_ROOT_FS"\0" \
"board_type="BOARD_TYPE"\0" \
#if defined CONFIG_VESTA_100 || CONFIG_VESTA_200
#if defined CONFIG_VESTA_64M_NOR
#define CONFIG_BOOTCOMMAND \
"run boot_counter; run spiboot;\0" \
"boot_counter=sf probe; sf read $loadaddr 0xe0000 1; if itest.b *$loadaddr -eq 0; then run boot_count_good; elif itest.b *$loadaddr -eq 99; then run boot_count_bad; else run boot_count_inc; fi\0" \
"boot_count_inc=if itest.b *$loadaddr -eq 3; then mw.b $loadaddr 99; elif itest.b *$loadaddr -eq 2; then mw.b $loadaddr 3; elif itest.b *$loadaddr -eq 1; then mw.b $loadaddr 2; fi; sf update $loadaddr 0xe0000 1; run boot_count_good\0" \
"boot_count_bad=sf read $loadaddr 0xf0002 2; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_count_good=sf read $loadaddr 0xf0000 2; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_chk_fs=if itest.b *$loadaddr_1 -eq 31; then setenv rootfs ${alt_rootfs}; fi\0" \
"boot_chk_kernel=if itest.b *$loadaddr -eq 31; then setenv fdt_location ${alt_fdt_location}; setenv kernel_location ${alt_kernel_location}; fi;"
#else
#define CONFIG_BOOTCOMMAND \
"mmc dev 1 1; run boot_counter; run loadimage; run loadfdt; run mmcboot;\0" \
"loadaddr_2=0x80800002\0" \
......@@ -311,15 +321,6 @@
"boot_chk_kernel=if itest.b *$loadaddr -eq 31; then setenv mmcpart ${alt_kernel_location}; fi;\0" \
"boot_chk_fs_prev=if itest.b *$loadaddr_3 -eq 31; then setenv rootfs ${alt_rootfs}; fi\0" \
"boot_chk_kernel_prev=if itest.b *$loadaddr_2 -eq 31; then setenv mmcpart ${alt_kernel_location}; fi;"
#else
#define CONFIG_BOOTCOMMAND \
"run boot_counter; run spiboot;\0" \
"boot_counter=sf probe; sf read $loadaddr 0xe0000 1; if itest.b *$loadaddr -eq 0; then run boot_count_good; elif itest.b *$loadaddr -eq 99; then run boot_count_bad; else run boot_count_inc; fi\0" \
"boot_count_inc=if itest.b *$loadaddr -eq 3; then mw.b $loadaddr 99; elif itest.b *$loadaddr -eq 2; then mw.b $loadaddr 3; elif itest.b *$loadaddr -eq 1; then mw.b $loadaddr 2; fi; sf update $loadaddr 0xe0000 1; run boot_count_good\0" \
"boot_count_bad=sf read $loadaddr 0xf0002 2; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_count_good=sf read $loadaddr 0xf0000 2; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_chk_fs=if itest.b *$loadaddr_1 -eq 31; then setenv rootfs ${alt_rootfs}; fi\0" \
"boot_chk_kernel=if itest.b *$loadaddr -eq 31; then setenv fdt_location ${alt_fdt_location}; setenv kernel_location ${alt_kernel_location}; fi;"
#endif
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment