]> git.sur5r.net Git - u-boot/commitdiff
Use __stringify() instead of xstr()
authorAnatolij Gustschin <agust@denx.de>
Fri, 24 Oct 2014 18:13:51 +0000 (20:13 +0200)
committerTom Rini <trini@ti.com>
Mon, 27 Oct 2014 21:54:13 +0000 (17:54 -0400)
Some boards still use xstr(). Replace remaining occurrences
of xstr() by commonly used __stringify().

Signed-off-by: Anatolij Gustschin <agust@denx.de>
include/configs/mcx.h
include/configs/o2d.h
include/configs/o2d300.h
include/configs/o2dnt-common.h
include/configs/o2dnt2.h
include/configs/o2i.h
include/configs/o2mnt.h
include/configs/o3dnt.h
include/configs/woodburn_common.h
include/configs/x600.h

index adaf44f68f633b49d8537c4e423d98a470fdc2bd..b775ebd0edef662ed6dbf87143f02151edab372a 100644 (file)
 
 #define CONFIG_BOOTFILE                "uImage"
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 /* Setup MTD for NAND on the SOM */
 #define MTDIDS_DEFAULT         "nand0=omap2-nand.0"
 #define MTDPARTS_DEFAULT       "mtdparts=omap2-nand.0:512k(MLO),"      \
        "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "baudrate=115200\0"                                             \
        "consoledev=ttyO2\0"                                            \
-       "hostname=" xstr(CONFIG_HOSTNAME) "\0"                          \
+       "hostname=" __stringify(CONFIG_HOSTNAME) "\0"                   \
        "loadaddr=0x82000000\0"                                         \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
        "load_k=tftp ${loadaddr} ${bootfile}\0"                         \
        "loaduimage=fatload mmc 0 ${loadaddr} uImage\0"                 \
        "loadmlo=tftp ${loadaddr} ${mlo}\0"                             \
-       "mlo=" xstr(CONFIG_HOSTNAME) "/MLO\0"                           \
+       "mlo=" __stringify(CONFIG_HOSTNAME) "/MLO\0"                    \
        "mmcargs=root=/dev/mmcblk0p2 rw "                               \
                "rootfstype=ext3 rootwait\0"                            \
        "mmcboot=echo Booting from mmc ...; "                           \
                "bootm ${loadaddr}\0"                                   \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.img\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.img\0"          \
        "uboot_addr=0x80000\0"                                          \
        "update=nandecc sw;nand erase ${uboot_addr} 100000;"            \
                "nand write ${loadaddr} ${uboot_addr} 80000\0"          \
index eff1bcef3b50698cc9d27a8a65710ca4b328e888..b2905b2697f1118f4c64c7b2ed1821131f170521 100644 (file)
@@ -43,8 +43,8 @@
 
 #define CONFIG_BOARD_NAME              "o2d"
 #define CONFIG_BOARD_BOOTCMD           "run dhcp_boot"
-#define CONFIG_BOARD_MEM_LIMIT         xstr(126)
-#define BOARD_POST_CRC32_END           xstr(0x01000000)
+#define CONFIG_BOARD_MEM_LIMIT         __stringify(126)
+#define BOARD_POST_CRC32_END           __stringify(0x01000000)
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        CONFIG_IFM_DEFAULT_ENV_SETTINGS                                 \
@@ -56,7 +56,7 @@
        "ramtop=fc55ffff\0"                                             \
        "jffbot=fc560000\0"                                             \
        "jfftop=fcffffff\0"                                             \
-       "ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"                      \
+       "ubobot=" __stringify(CONFIG_SYS_FLASH_BASE) "\0"               \
        "ubotop=fc03ffff\0"                                             \
        "kernel_addr=0xfc060000\0"                                      \
        "ramdisk_addr=0xfc160000\0"                                     \
index 1af53834f757916f4f0339445a069bb23e43de85..a8222d9f97e2418b0cf79900c939378bbcb27021 100644 (file)
@@ -44,8 +44,8 @@
 
 #define CONFIG_BOARD_NAME              "o2d300"
 #define CONFIG_BOARD_BOOTCMD           "run dhcp_boot"
-#define CONFIG_BOARD_MEM_LIMIT         xstr(126)
-#define BOARD_POST_CRC32_END           xstr(0x02000000)
+#define CONFIG_BOARD_MEM_LIMIT         __stringify(126)
+#define BOARD_POST_CRC32_END           __stringify(0x02000000)
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        CONFIG_IFM_DEFAULT_ENV_SETTINGS                                 \
@@ -63,7 +63,7 @@
        "ramtop=fc57ffff\0"                                             \
        "jffbot=fc580000\0"                                             \
        "jfftop=fd39ffff\0"                                             \
-       "ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"                      \
+       "ubobot=" __stringify(CONFIG_SYS_FLASH_BASE) "\0"               \
        "ubotop=fc03ffff\0"                                             \
        "halname="CONFIG_BOARD_NAME"/"CONFIG_BOARD_NAME"_halcon\0"      \
        "halbot=fd3a0000\0"                                             \
index 133dc6f8cd137c93c5d09f9bd34dc8816495fcac..183c4492848dd78787d29f6e30f9e2d4b35c4b81 100644 (file)
 
 #undef CONFIG_BOOTARGS
 
-#define xstr(s) str(s)
-#define str(s)  #s
-
 #if !defined(CONFIG_CONSOLE_DEV)
 #define CONFIG_CONSOLE_DEV     "ttyPSC1"
 #endif
        "kernel_addr_r=600000\0"                                        \
        "initrd_high=0x03e00000\0"                                      \
        "memlimit=mem="CONFIG_BOARD_MEM_LIMIT"M\0"                      \
-       "memtest=mtest 0x00100000 "xstr(CONFIG_SYS_MEMTEST_END)" 0 1\0" \
+       "memtest=mtest 0x00100000 "__stringify(CONFIG_SYS_MEMTEST_END)" 0 1\0" \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
        "unlock=yes\0"                                                  \
        "post=echo !!! "CONFIG_BOARD_NAME" POWER ON SELF TEST !!!;"     \
                "setenv bootdelay 1;"                                   \
-               "crc32 "xstr(CONFIG_SYS_TEXT_BASE)" "                   \
+               "crc32 "__stringify(CONFIG_SYS_TEXT_BASE)" "            \
                        BOARD_POST_CRC32_END";"                         \
                "setenv bootcmd "CONFIG_BOARD_BOOTCMD";saveenv;reset\0"
 
index 3636c0e1d4125b7bbd5c810559554dc3b13bdc7f..1b765a7e4e43fbe7b41c9fe4b5ab97eba45d04ff 100644 (file)
@@ -43,8 +43,8 @@
 
 #define CONFIG_BOARD_NAME              "o2dnt2"
 #define CONFIG_BOARD_BOOTCMD           "run flash_self"
-#define CONFIG_BOARD_MEM_LIMIT         xstr(126)
-#define BOARD_POST_CRC32_END           xstr(0x01000000)
+#define CONFIG_BOARD_MEM_LIMIT         __stringify(126)
+#define BOARD_POST_CRC32_END           __stringify(0x01000000)
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        CONFIG_IFM_DEFAULT_ENV_SETTINGS                                 \
@@ -56,7 +56,7 @@
        "ramtop=fc55ffff\0"                                             \
        "jffbot=fc560000\0"                                             \
        "jfftop=fce5ffff\0"                                             \
-       "ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"                      \
+       "ubobot=" __stringify(CONFIG_SYS_FLASH_BASE) "\0"               \
        "ubotop=fc03ffff\0"                                             \
        "calname="CONFIG_BOARD_NAME"/uCal_"CONFIG_BOARD_NAME"_act\0"    \
        "calbot=fce60000\0"                                             \
index 8fe1da58bb23b9f9801dd9d5ef804a63bbc94606..c0fcedaf10ca72b61a0ba680d5db8d3aee9232a6 100644 (file)
@@ -37,8 +37,8 @@
 
 #define CONFIG_BOARD_NAME              "o2i"
 #define CONFIG_BOARD_BOOTCMD           "run dhcp_boot"
-#define CONFIG_BOARD_MEM_LIMIT         xstr(62)
-#define BOARD_POST_CRC32_END           xstr(0x01000000)
+#define CONFIG_BOARD_MEM_LIMIT         __stringify(62)
+#define BOARD_POST_CRC32_END           __stringify(0x01000000)
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        CONFIG_IFM_DEFAULT_ENV_SETTINGS                                 \
@@ -52,7 +52,7 @@
        "jfftop=ffebffff\0"                                             \
        "kernel_addr=0xff060000\0"                                      \
        "ramdisk_addr=0xff160000\0"                                     \
-       "ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"                      \
+       "ubobot=" __stringify(CONFIG_SYS_FLASH_BASE) "\0"               \
        "ubotop=ff03ffff\0"                                             \
        "autoload=no\0"                                                 \
        "dhcp_boot=run dhcpcmd; run flash_mtd\0"                        \
index c2164b5efb4a008d97215bbec2ef934d6bf4c441..eb63cb0c852f9d11ea8316004c6cdb09d1b41668 100644 (file)
@@ -39,8 +39,8 @@
 
 #define CONFIG_BOARD_NAME              "o2mnt"
 #define CONFIG_BOARD_BOOTCMD           "${newcmd}"
-#define CONFIG_BOARD_MEM_LIMIT         xstr(62)
-#define BOARD_POST_CRC32_END           xstr(0x01000000)
+#define CONFIG_BOARD_MEM_LIMIT         __stringify(62)
+#define BOARD_POST_CRC32_END           __stringify(0x01000000)
 
 #ifndef CONFIG_IFM_SENSOR_TYPE
 #define CONFIG_IFM_SENSOR_TYPE         "O2M110"
@@ -56,7 +56,7 @@
        "ramtop=ffc5ffff\0"                                             \
        "jffbot=ffc60000\0"                                             \
        "jfftop=ffffffff\0"                                             \
-       "ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"                      \
+       "ubobot=" __stringify(CONFIG_SYS_FLASH_BASE) "\0"               \
        "ubotop=ff03ffff\0"                                             \
        "kernel_addr=0xff060000\0"                                      \
        "ramdisk_addr=0xff260000\0"                                     \
index 05cd36081593addf0b2654ef9fc38729a686fca1..77907507b3063a33b93b051ebd4a2cfc8325aeaa 100644 (file)
@@ -44,8 +44,8 @@
 
 #define CONFIG_BOARD_NAME              "o3dnt"
 #define CONFIG_BOARD_BOOTCMD           "run flash_self"
-#define CONFIG_BOARD_MEM_LIMIT         xstr(62)
-#define BOARD_POST_CRC32_END           xstr(0x01000000)
+#define CONFIG_BOARD_MEM_LIMIT         __stringify(62)
+#define BOARD_POST_CRC32_END           __stringify(0x01000000)
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        CONFIG_IFM_DEFAULT_ENV_SETTINGS                                 \
@@ -57,7 +57,7 @@
        "ramtop=fc55ffff\0"                                             \
        "jffbot=fc560000\0"                                             \
        "jfftop=fce5ffff\0"                                             \
-       "ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"                      \
+       "ubobot=" __stringify(CONFIG_SYS_FLASH_BASE) "\0"               \
        "ubotop=fc03ffff\0"                                             \
        "calname="CONFIG_BOARD_NAME"/uCal_"CONFIG_BOARD_NAME"_act\0"    \
        "calbot=fce60000\0"                                             \
index 259205e88176cdeb8bd232403851a35acfb81972..d3d3e694cdaa3c71f20f29fb6693f75cd8bddd77 100644 (file)
  * Default environment and default scripts
  * to update uboot and load kernel
  */
-#define xstr(s)        str(s)
-#define str(s) #s
 
 #define CONFIG_HOSTNAME woodburn
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "addmisc=setenv bootargs ${bootargs} ${misc}\0"                 \
        "loadaddr=80800000\0"                                           \
        "kernel_addr_r=80800000\0"                                      \
-       "hostname=" xstr(CONFIG_HOSTNAME) "\0"                          \
-       "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"                   \
-       "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"             \
+       "hostname=" __stringify(CONFIG_HOSTNAME) "\0"                   \
+       "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"            \
+       "ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0"      \
        "flash_self=run ramargs addip addtty addmtd addmisc;"           \
                "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
        "flash_nfs=run nfsargs addip addtty addmtd addmisc;"            \
                "run ramargs addip addtty addmtd addmisc;"              \
                "bootm ${kernel_addr_r} ${ramdisk_addr_r};"             \
                "else echo Images not loades;fi\0"                      \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"          \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
-       "uboot_addr=" xstr(CONFIG_SYS_MONITOR_BASE) "\0"                \
+       "uboot_addr=" __stringify(CONFIG_SYS_MONITOR_BASE) "\0"         \
        "update=protect off ${uboot_addr} +80000;"                      \
                "erase ${uboot_addr} +80000;"                           \
                "cp.b ${loadaddr} ${uboot_addr} ${filesize}\0"          \
index 71373e98f9585ab4b915b6ee0b1554ec4e8d9587..6214dc480a0c1c3d9eeef1ce1c474ac1a049c8ac 100644 (file)
 #define CONFIG_UBI_PART                                ubi0
 #define CONFIG_UBIFS_VOLUME                    rootfs
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define MTDIDS_DEFAULT         "nand0=nand"
 #define MTDPARTS_DEFAULT       "mtdparts=nand:64M(ubi0),64M(ubi1)"
 
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "u-boot_addr=1000000\0"                                         \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.spr\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.spr\0"          \
        "load=tftp ${u-boot_addr} ${u-boot}\0"                          \
-       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " +${filesize};"\
-               "erase " xstr(CONFIG_SYS_MONITOR_BASE) " +${filesize};" \
-               "cp.b ${u-boot_addr} " xstr(CONFIG_SYS_MONITOR_BASE)    \
+       "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)      \
+               " +${filesize};"                                        \
+               "erase " __stringify(CONFIG_SYS_MONITOR_BASE) " +${filesize};" \
+               "cp.b ${u-boot_addr} " __stringify(CONFIG_SYS_MONITOR_BASE) \
                " ${filesize};"                                         \
-               "protect on " xstr(CONFIG_SYS_MONITOR_BASE)             \
+               "protect on " __stringify(CONFIG_SYS_MONITOR_BASE)      \
                " +${filesize}\0"                                       \
        "upd=run load update\0"                                         \
-       "ubifs=" xstr(CONFIG_HOSTNAME) "/ubifs.img\0"                   \
-       "part=" xstr(CONFIG_UBI_PART) "\0"                              \
-       "vol=" xstr(CONFIG_UBIFS_VOLUME) "\0"                           \
+       "ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0"            \
+       "part=" __stringify(CONFIG_UBI_PART) "\0"                       \
+       "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0"                    \
        "load_ubifs=tftp ${kernel_addr} ${ubifs}\0"                     \
        "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \
                " ${filesize}\0"                                        \
                "saveenv;boot\0"                                        \
        "ubifsargs=set bootargs ubi.mtd=ubi${boot_part} "               \
                "root=ubi0:rootfs rootfstype=ubifs\0"                   \
-       "kernel=" xstr(CONFIG_HOSTNAME) "/uImage\0"                     \
+       "kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0"              \
        "kernel_fs=/boot/uImage \0"                                     \
        "kernel_addr=1000000\0"                                         \
-       "dtb=" xstr(CONFIG_HOSTNAME) "/" xstr(CONFIG_HOSTNAME) ".dtb\0" \
-       "dtb_fs=/boot/" xstr(CONFIG_HOSTNAME) ".dtb\0"                  \
+       "dtb=" __stringify(CONFIG_HOSTNAME) "/"                         \
+               __stringify(CONFIG_HOSTNAME) ".dtb\0"                   \
+       "dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0"           \
        "dtb_addr=1800000\0"                                            \
        "load_kernel=tftp ${kernel_addr} ${kernel}\0"                   \
        "load_dtb=tftp ${dtb_addr} ${dtb}\0"                            \