]> git.sur5r.net Git - u-boot/blobdiff - include/configs/display5.h
display5: config: Update swupdate initramfs file name (now supporting ext4)
[u-boot] / include / configs / display5.h
index 9bae8bc8a7021930ad02568de8dbd34ea9de85e6..1f76d9021a91f01978dc371e5f75192e995522fd 100644 (file)
@@ -30,8 +30,8 @@
  * 0x020000 - 0x120000 : SPI.u-boot (1MiB)
  * 0x120000 - 0x130000 : SPI.u-boot-env1 (64KiB)
  * 0x130000 - 0x140000 : SPI.u-boot-env2 (64KiB)
- * 0x940000 - 0xD40000 : SPI.swupdate-kernel-FIT (4MiB)
- * 0xD40000 - 0x1540000 : SPI.swupdate-initramfs  (8MiB)
+ * 0x140000 - 0x540000 : SPI.swupdate-kernel-FIT (4MiB)
+ * 0x540000 - 0x1540000 : SPI.swupdate-initramfs  (16MiB)
  * 0x1540000 - 0x1640000 : SPI.factory  (1MiB)
  */
 
 #define CONFIG_BAUDRATE                        115200
 
 #ifndef CONFIG_BOOTCOMMAND
-#define CONFIG_BOOTCOMMAND "if test ${BOOT_FROM} = FACTORY; then " \
+#define CONFIG_BOOTCOMMAND "if run check_em_pad; then " \
+            "run recovery;" \
+       "else if test ${BOOT_FROM} = FACTORY; then " \
             "run factory_nfs;" \
        "else " \
             "run boot_mmc;" \
-       "fi"
+       "fi;fi"
 #endif
 
 #define PARTS_DEFAULT \
               "mmc write ${loadaddr} ${lba_start} ${fw_sz}; " \
           "; fi\0" \
 
-/* To save some considerable time, we only once download the rootfs image */
-/* and store it on 'active' and 'backup' rootfs partitions */
 #define TFTP_UPDATE_ROOTFS \
        "setenv rootfs_part ${rootfs_part_active};" \
        "run tftp_mmc_rootfs;" \
-       "part start mmc ${mmcdev} ${rootfs_part_backup} lba_start;" \
-       "mmc write ${loadaddr} ${lba_start} ${fw_sz};" \
+       "run tftp_mmc_rootfs_bkp;" \
+
 
 #define TFTP_UPDATE_RECOVERY_SWU_KERNEL \
        "tftp_sf_fitImg_SWU=" \
        "; fi\0"          \
 
 #define TFTP_UPDATE_RECOVERY_SWU_INITRAMFS \
-       "swu_initramfs_file=swupdate-image-display5.ext3.gz.u-boot\0" \
+       "swu_initramfs_file=swupdate-image-display5.ext4.gz.u-boot\0" \
        "tftp_sf_initramfs_SWU=" \
            "if tftp ${loadaddr} ${swu_initramfs_file}; then " \
                "sf probe;" \
 
 #define CONFIG_EXTRA_ENV_SETTINGS        \
        PARTS_DEFAULT \
+       "gpio_recovery=93\0" \
+       "check_em_pad=gpio input ${gpio_recovery};test $? -eq 0;\0" \
        "display=tianma-tm070-800x480\0" \
        "board=display5\0" \
        "mmcdev=0\0" \
        "rootfs_part_active=2\0" \
        "rootfs_part_backup=4\0" \
        "rootfs_file=core-image-lwn-display5.ext4\0" \
+       "rootfs_file_backup=core-image-lwn-backup-display5.ext4\0" \
        __TFTP_UPDATE_ROOTFS \
+       "tftp_mmc_rootfs_bkp=" \
+          "setenv rootfs_part ${rootfs_part_backup};" \
+          "setenv rootfs_file ${rootfs_file_backup};" \
+          "run tftp_mmc_rootfs\0" \
        TFTP_UPDATE_RECOVERY_SWU_KERNEL \
        TFTP_UPDATE_RECOVERY_SWU_INITRAMFS \
        "\0" \
 #define CONFIG_MTD_PARTITIONS
 #define CONFIG_MTD_DEVICE
 
+/* Watchdog */
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_IMX_WATCHDOG
+#define CONFIG_WATCHDOG_TIMEOUT_MSECS   15000
+
 /* ENV config */
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SIZE                (SZ_64K)