Enable iminfo command by default for all devices
authorPiotr Dymacz <pepe2k@gmail.com>
Sun, 14 Aug 2016 11:31:05 +0000 (13:31 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 14 Aug 2016 11:31:05 +0000 (13:31 +0200)
Since we support both types of image headers, we can enable
"iminfo" command by default for all devices.

Example output for image with custom TP-Link header:

uboot> imi 0x9F020000

Checking image at 0x9F020000...

   Vendor/image name:    TP-LINK Technologies ver. 1.0
   Firmware version:     3.16.9
   Hardware ID:          0x8410009
   Whole image size:     3.8 MB (3932160 bytes)
   Kernel size:          706.1 kB (723022 bytes)
   Rootfs size:          2.8 MB (2883584 bytes)
   Kernel load address:  0x80002000
   Kernel entry point:   0x801856F0

   Header CRC...  skipped
   Data CRC...    skipped

And for default U-Boot image header (Multi-File image here):

uboot> imi 0x9FE80000

Checking image at 0x9FE80000...

   Image name:    MIPS OpenWrt Linux-3.3.8
   Build date:    2015-10-22 03:41:11 UTC
   Architecture:  MIPS
   OS/image type: Linux Multi-File
   Compression:   LZMA
   Data size:     1 MB (1090582 bytes)
   Load address:  0x80060000
   Entry point:   0x80060000

   Multi-Image:
   > 1 MB (1090574 bytes)

   Header CRC...  OK!
   Data CRC...    OK!

u-boot/include/configs/ap121.h
u-boot/include/configs/ap143.h
u-boot/include/configs/db12x.h

index 10f30ed1a0beeebc5d95076bb8d5b6c31bfb14ce..84051755f4ba2d542e0a1dd49c7ac2c5a75c2e4a 100644 (file)
                                                         CFG_CMD_ITEST  | \
                                                         CFG_CMD_IMI)
 
-#elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) || \
-      defined(CONFIG_FOR_DRAGINO_V2) || \
-      defined(CONFIG_FOR_MESH_POTATO_V2) || \
-      defined(CONFIG_FOR_BLACK_SWIFT_BOARD)
-
-       #define CONFIG_COMMANDS (CFG_CMD_MEMORY | \
-                                                        CFG_CMD_DHCP   | \
-                                                        CFG_CMD_PING   | \
-                                                        CFG_CMD_FLASH  | \
-                                                        CFG_CMD_NET    | \
-                                                        CFG_CMD_RUN    | \
-                                                        CFG_CMD_DATE   | \
-                                                        CFG_CMD_SNTP   | \
-                                                        CFG_CMD_ECHO   | \
-                                                        CFG_CMD_BOOTD  | \
-                                                        CFG_CMD_ITEST  | \
-                                                        CFG_CMD_IMI    | \
-                                                        CFG_CMD_ENV    | \
-                                                        CFG_CMD_LOADB)
-
 #else
 
        #define CONFIG_COMMANDS (CFG_CMD_MEMORY | \
                                                         CFG_CMD_ECHO   | \
                                                         CFG_CMD_BOOTD  | \
                                                         CFG_CMD_ITEST  | \
+                                                        CFG_CMD_IMI    | \
                                                         CFG_CMD_ENV    | \
                                                         CFG_CMD_LOADB)
 
index cb76b82d9985fd3ae7842fb5769e86cf61993527..03baa30dc0e1b8f351b02f6558cac0de5ea4ab52 100644 (file)
 /*
  * Available commands
  */
-#if defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\
-       defined(CONFIG_FOR_TPLINK_WR802N)    ||\
-       defined(CONFIG_FOR_TPLINK_WR841N_V9)
-       #define CONFIG_COMMANDS (CFG_CMD_MEMORY | \
-                                                        CFG_CMD_DHCP   | \
-                                                        CFG_CMD_PING   | \
-                                                        CFG_CMD_FLASH  | \
-                                                        CFG_CMD_NET    | \
-                                                        CFG_CMD_RUN    | \
-                                                        CFG_CMD_DATE   | \
-                                                        CFG_CMD_SNTP   | \
-                                                        CFG_CMD_ECHO   | \
-                                                        CFG_CMD_BOOTD  | \
-                                                        CFG_CMD_ITEST  | \
-                                                        CFG_CMD_ENV    | \
-                                                        CFG_CMD_LOADB)
-
-#elif defined(CONFIG_FOR_WALLYS_DR531)
-
-       #define CONFIG_COMMANDS (CFG_CMD_MEMORY | \
-                                                        CFG_CMD_DHCP   | \
-                                                        CFG_CMD_PING   | \
-                                                        CFG_CMD_FLASH  | \
-                                                        CFG_CMD_NET    | \
-                                                        CFG_CMD_RUN    | \
-                                                        CFG_CMD_DATE   | \
-                                                        CFG_CMD_SNTP   | \
-                                                        CFG_CMD_ECHO   | \
-                                                        CFG_CMD_BOOTD  | \
-                                                        CFG_CMD_ITEST  | \
-                                                        CFG_CMD_IMI    | \
-                                                        CFG_CMD_ENV    | \
-                                                        CFG_CMD_LOADB)
-
-#endif
+#define CONFIG_COMMANDS (CFG_CMD_MEMORY | \
+                                                CFG_CMD_DHCP   | \
+                                                CFG_CMD_PING   | \
+                                                CFG_CMD_FLASH  | \
+                                                CFG_CMD_NET    | \
+                                                CFG_CMD_RUN    | \
+                                                CFG_CMD_DATE   | \
+                                                CFG_CMD_SNTP   | \
+                                                CFG_CMD_ECHO   | \
+                                                CFG_CMD_BOOTD  | \
+                                                CFG_CMD_ITEST  | \
+                                                CFG_CMD_IMI    | \
+                                                CFG_CMD_ENV    | \
+                                                CFG_CMD_LOADB)
 
 // Enable NetConsole and custom NetConsole port
 #define CONFIG_NETCONSOLE
index dd2837c7e1421a79a94adde01b8d97d0755b152a..79890b16b303b32d8b90484825872b3629e1b9e9 100644 (file)
                                                 CFG_CMD_ECHO   | \
                                                 CFG_CMD_BOOTD  | \
                                                 CFG_CMD_ITEST  | \
+                                                CFG_CMD_IMI    | \
                                                 CFG_CMD_ENV    | \
                                                 CFG_CMD_LOADB)