COMMON: Use __stringify() instead of xstr()
authorMarek Vasut <marex@denx.de>
Sun, 23 Sep 2012 15:41:23 +0000 (17:41 +0200)
committerTom Rini <trini@ti.com>
Mon, 15 Oct 2012 18:53:47 +0000 (11:53 -0700)
Kill multiple occurances and redeclaration of xstr in favor of __stringify().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
18 files changed:
include/configs/MPC8308RDB.h
include/configs/amcc-common.h
include/configs/at91sam9263ek.h
include/configs/cam_enc_4xx.h
include/configs/ea20.h
include/configs/enbw_cmc.h
include/configs/flea3.h
include/configs/ima3-mx53.h
include/configs/imx27lite-common.h
include/configs/km/keymile-common.h
include/configs/km/km-powerpc.h
include/configs/km/km_arm.h
include/configs/manroland/common.h
include/configs/mpc8308_p1m.h
include/configs/mx35pdk.h
include/configs/qong.h
include/configs/tam3517-common.h
include/configs/tx25.h

index 2d48dde808478b71646549a6d37a4d3133eb9a2b..a1fbece8e83284d82bc975ae9b6bb404a3480971 100644 (file)
 
 #define CONFIG_BOOTDELAY       5       /* -1 disables auto-boot */
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
        "consoledev=ttyS0\0"                                            \
                "bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
        "bootcmd=run flash_self\0"                                      \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
-       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)             \
-               " +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)      \
+       "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)      \
+               " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
                " +${filesize};cp.b ${fileaddr} "                       \
-               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"          \
+               __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"   \
        "upd=run load update\0"                                         \
 
 #endif /* __CONFIG_H */
index 056a22a68bafd94ee7aff89bf8bad2f0845722fe..9d0c80b924dd227a63aa4814db694be856713bac 100644 (file)
 #define CONFIG_ADDMISC "addmisc=setenv bootargs ${bootargs}\0"
 #endif
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 /*
  * General common environment variables shared on all AMCC eval boards
  */
 #define CONFIG_AMCC_DEF_ENV                                            \
-       "netdev=" xstr(CONFIG_USE_NETDEV) "\0"                          \
+       "netdev=" __stringify(CONFIG_USE_NETDEV) "\0"                           \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
                "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
                ":${hostname}:${netdev}:off panic=1\0"                  \
        "addtty=setenv bootargs ${bootargs}"                            \
-               " console=" xstr(CONFIG_USE_TTY) ",${baudrate}\0"       \
+               " console=" __stringify(CONFIG_USE_TTY) ",${baudrate}\0"        \
        CONFIG_ADDMISC                                                  \
        "initrd_high=30000000\0"                                        \
        "kernel_addr_r=1000000\0"                                       \
        "fdt_addr_r=1800000\0"                                          \
        "ramdisk_addr_r=1900000\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"              \
        CONFIG_AMCC_DEF_ENV_ROOTPATH
 
 /*
        "net_self=run net_self_load;"                                   \
                "run ramargs addip addtty addmisc;"                     \
                "bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
-       "fdt_file=" xstr(CONFIG_HOSTNAME) "/" xstr(CONFIG_HOSTNAME) ".dtb\0"
+       "fdt_file=" __stringify(CONFIG_HOSTNAME) "/" __stringify(CONFIG_HOSTNAME) ".dtb\0"
 
 /*
  * Default environment for arch/ppc booting,
                "bootm ${kernel_addr_r}\0"
 
 #define CONFIG_AMCC_DEF_ENV_NOR_UPD                                    \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"          \
        "load=tftp 200000 ${u-boot}\0"                                  \
-       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"        \
-               "era " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"               \
-               "cp.b ${fileaddr} " xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
+       "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;" \
+               "era " __stringify(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"        \
+               "cp.b ${fileaddr} " __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
        "upd=run load update\0"                                         \
 
 #define CONFIG_AMCC_DEF_ENV_NAND_UPD                                   \
-       "u-boot-nand=" xstr(CONFIG_HOSTNAME) "/u-boot-nand.bin\0"       \
+       "u-boot-nand=" __stringify(CONFIG_HOSTNAME) "/u-boot-nand.bin\0"\
        "nload=tftp 200000 ${u-boot-nand}\0"                            \
        "nupdate=nand erase 0 100000;nand write 200000 0 100000\0"      \
        "nupd=run nload nupdate\0"
index 9421b5373ceb091f78d0a9644c418c492868ac6e..35038229ad5976d973d8e5d3b9dd6a953e0962de 100644 (file)
 /* Address and size of Primary Environment Sector */
 #define CONFIG_ENV_SIZE                0x10000
 
-#define xstr(s)   str(s)
-#define str(s) #s
-
 #define CONFIG_EXTRA_ENV_SETTINGS      \
-       "monitor_base=" xstr(CONFIG_SYS_MONITOR_BASE) "\0" \
+       "monitor_base=" __stringify(CONFIG_SYS_MONITOR_BASE) "\0" \
        "update=" \
                "protect off ${monitor_base} +${filesize};" \
                "erase ${monitor_base} +${filesize};" \
index 9b56e028f371c84edb1c74f2345b34f3969803c1..56dc1cbbd51d9309f099c4e7f3275331cb26571b 100644 (file)
 /*
  * Default environment settings
  */
-#define xstr(s)        str(s)
-#define str(s) #s
 
 #define DVN4XX_UBOOT_ADDR_R_RAM                0x80000000
 /* (DVN4XX_UBOOT_ADDR_R_RAM + CONFIG_SYS_NAND_PAGE_SIZE) */
 #define DVN4XX_UBOOT_ADDR_R_UBOOT      0x80003800
 
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-       "u_boot_addr_r=" xstr(DVN4XX_UBOOT_ADDR_R_RAM) "\0"             \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.ubl\0"                 \
+       "u_boot_addr_r=" __stringify(DVN4XX_UBOOT_ADDR_R_RAM) "\0"      \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.ubl\0"          \
        "load=tftp ${u_boot_addr_r} ${u-boot}\0"                        \
-       "pagesz=" xstr(CONFIG_SYS_NAND_PAGE_SIZE) "\0"                  \
+       "pagesz=" __stringify(CONFIG_SYS_NAND_PAGE_SIZE) "\0"           \
        "writeheader=nandrbl rbl;nand erase 20000 ${pagesz};"           \
                "nand write ${u_boot_addr_r} 20000 ${pagesz};"          \
                "nandrbl uboot\0"                                       \
        "writenand_spl=nandrbl rbl;nand erase 0 3000;"                  \
-               "nand write " xstr(DVN4XX_UBOOT_ADDR_R_NAND_SPL)        \
+               "nand write " __stringify(DVN4XX_UBOOT_ADDR_R_NAND_SPL) \
                " 0 3000;nandrbl uboot\0"                               \
        "writeuboot=nandrbl uboot;"                                     \
-               "nand erase " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "     \
-                xstr(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)                  \
-               ";nand write " xstr(DVN4XX_UBOOT_ADDR_R_UBOOT)          \
-               " " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "               \
-               xstr(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"                  \
+               "nand erase " __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "\
+                __stringify(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)           \
+               ";nand write " __stringify(DVN4XX_UBOOT_ADDR_R_UBOOT)   \
+               " " __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "        \
+               __stringify(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"           \
        "update=run load writenand_spl writeuboot\0"                    \
        "bootcmd=run net_nfs\0"                                         \
        "rootpath=/opt/eldk-arm/arm\0"                                  \
        "rootpath=/opt/eldk-arm/arm\0"                                  \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
-       "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage \0"                  \
+       "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage \0"           \
        "kernel_addr_r=80600000\0"                                      \
        "load_kernel=tftp ${kernel_addr_r} ${bootfile}\0"               \
        "ubi_load_kernel=ubi part ubi 2048;ubifsmount ${img_volume};"   \
                "ubifsload ${kernel_addr_r} boot/uImage\0"              \
-       "fit_addr_r=" xstr(CONFIG_BOARD_IMG_ADDR_R) "\0"                \
-       "img_addr_r=" xstr(CONFIG_BOARD_IMG_ADDR_R) "\0"                \
-       "img_file=" xstr(CONFIG_HOSTNAME) "/ait.itb\0"                  \
+       "fit_addr_r=" __stringify(CONFIG_BOARD_IMG_ADDR_R) "\0"         \
+       "img_addr_r=" __stringify(CONFIG_BOARD_IMG_ADDR_R) "\0"         \
+       "img_file=" __stringify(CONFIG_HOSTNAME) "/ait.itb\0"           \
        "header_addr=20000\0"                                           \
        "img_writeheader=nandrbl rbl;"                                  \
                "nand erase ${header_addr} ${pagesz};"                  \
        "img_writespl=nandrbl rbl;nand erase 0 3000;"                   \
                "nand write ${img_addr_r} 0 3000;nandrbl uboot\0"       \
        "img_writeuboot=nandrbl uboot;"                                 \
-               "nand erase " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "     \
-                xstr(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)                  \
+               "nand erase " __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "\
+                __stringify(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)           \
                ";nand write ${img_addr_r} "                            \
-               xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "                   \
-               xstr(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"                  \
+               __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "            \
+               __stringify(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"           \
        "img_writedfenv=ubi part ubi 2048;"                             \
                "ubi write ${img_addr_r} default ${filesize}\0"         \
        "img_volume=rootfs1\0"                                          \
index c82b5b68a1d0d77aab34b82c27759a01a49e7e5c..d3eb5969dc99e37c8881a0d99841f78c3851050c 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 ea20
 #define        CONFIG_EXTRA_ENV_SETTINGS                               \
        "loadaddr=c0000014\0"                                           \
        "memory=32M\0"                                                  \
        "kernel_addr_r=c0700000\0"                                      \
-       "hostname=" xstr(CONFIG_HOSTNAME) "\0"                          \
-       "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"                   \
-       "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/image.ext2\0"           \
+       "hostname=" __stringify(CONFIG_HOSTNAME) "\0"                   \
+       "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"            \
+       "ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/image.ext2\0"    \
        "flash_self=run ramargs addip addtty addmtd addmisc addmem;"    \
                        "bootm ${kernel_addr_r}\0"                      \
        "flash_nfs=run nfsargs addip addtty addmtd addmisc addmem;"     \
        "net_nandrw=tftp ${kernel_addr_r} ${bootfile}; run nandrwargs"  \
                " addip addtty addmtd addmisc addmem;"                  \
                "clrlogo;bootm ${kernel_addr_r}\0"                      \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"         \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"          \
        "load_magic=if sf probe 0;then sf "                             \
                "read c0000000 0x10000 0x60000;fi\0"                    \
        "load_nand=ubi part nand0,${as};ubifsmount rootfs;"             \
index e2e0d5c2d04a8efc5acb715016d31f7a826ea0ce..2d63b670cd7c5011bad815533aef8338629f8c50 100644 (file)
 #define CONFIG_DEFAULT_SETTINGS_ADDR   (CONFIG_ENV_ADDR_REDUND + \
                                                CONFIG_ENV_SECT_SIZE)
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "u-boot_addr_r=c0000000\0"                                      \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"          \
        "load=tftp ${u-boot_addr_r} ${u-boot}\0"                        \
-       "update=protect off " xstr(CONFIG_SYS_FLASH_BASE) " +${filesize};"\
-               "erase " xstr(CONFIG_SYS_FLASH_BASE) " +${filesize};"   \
-               "cp.b ${u-boot_addr_r} " xstr(CONFIG_SYS_FLASH_BASE)    \
+       "update=protect off " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize};"\
+               "erase " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize};"    \
+               "cp.b ${u-boot_addr_r} " __stringify(CONFIG_SYS_FLASH_BASE)     \
                " ${filesize};"                                         \
-               "protect on " xstr(CONFIG_SYS_FLASH_BASE) " +${filesize}\0"\
+               "protect on " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize}\0"\
        "netdev=eth0\0"                                                 \
        "rootpath=/opt/eldk-arm/arm\0"                                  \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
        "kernel_addr_r=c0700000\0"                                      \
        "fdt_addr_r=c0600000\0"                                         \
        "ramdisk_addr_r=c0b00000\0"                                     \
-       "fdt_file=" xstr(CONFIG_HOSTNAME) "/"                           \
-               xstr(CONFIG_HOSTNAME) ".dtb\0"                          \
-       "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0"               \
+       "fdt_file=" __stringify(CONFIG_HOSTNAME) "/"                    \
+               __stringify(CONFIG_HOSTNAME) ".dtb\0"                   \
+       "kernel_file=" __stringify(CONFIG_HOSTNAME) "/uImage \0"        \
        "nand_ld_ramdsk=nand read ${ramdisk_addr_r} 320000 400000\0"    \
        "nand_ld_kernel=nand read ${kernel_addr_r} 20000 300000\0"      \
        "nand_ld_fdt=nand read ${fdt_addr_r} 0 2000\0"                  \
index 46171b98f0185a63170ed16f6e9f6c52dc12264d..26570135c0231b21323e0333e51e60b67592f590 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 flea3
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
                ":${hostname}:${netdev}:off panic=1\0"                  \
        "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"               \
        "addip=if test -n ${ipdyn};then run addip_dyn;"                 \
-               "else run addip_sta;fi\0"       \
+               "else run addip_sta;fi\0"                               \
        "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "addtty=setenv bootargs ${bootargs}"                            \
                " console=ttymxc2,${baudrate}\0"                        \
        "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} +40000;"                      \
                "erase ${uboot_addr} +40000;"                           \
                "cp.b ${loadaddr} ${uboot_addr} ${filesize}\0"          \
index dbc59b91e98503256c2c00c3e68cb3a7eadc1375..af505dc06497a180efb98cc6e5731cd05676dd82 100644 (file)
  */
 
 #define HOSTNAME ima3-mx53
-#define xstr(s)        str(s)
-#define str(s) #s
 
 #define CONFIG_HOSTNAME ima3-mx53
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "loadaddr=70800000\0"                                           \
        "kernel_addr_r=70800000\0"                                      \
        "ramdisk_addr_r=71000000\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"      \
        "mmcargs=setenv bootargs root=${mmcroot} "                      \
                "rootfstype=${mmcrootfstype}\0"                         \
        "mmcroot=/dev/mmcblk0p3 rw\0"                                   \
                "run satargs addip addtty addmtd addmisc;"              \
                "sata init;ext2load sata 0:1 ${kernel_addr_r} "         \
                "${satafile};bootm\0"                                   \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.imx\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.imx\0"          \
        "uimage=uImage\0"                                               \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
        "uboot_addr=0xf0001000\0"                                       \
index a2853a7ef99e5892db05a643c896b0b1455cbd56..8fb33375e048b0261ccf52dcf687456267f958f1 100644 (file)
 #define CONFIG_LOADADDR                0xa0800000      /* loadaddr env var */
 #define CONFIG_SYS_LOAD_ADDR           CONFIG_LOADADDR
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                " console=ttymxc0,${baudrate}\0"                        \
        "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "addmisc=setenv bootargs ${bootargs}\0"                         \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"          \
        "kernel_addr_r=a0800000\0"                                      \
-       "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"                   \
+       "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"            \
        "rootpath=/opt/eldk-4.2-arm/arm\0"                              \
        "net_nfs=tftp ${kernel_addr_r} ${bootfile};"                    \
                "run nfsargs addip addtty addmtd addmisc;"              \
                "bootm\0"                                               \
-       "bootcmd=run net_nfs\0"                                 \
+       "bootcmd=run net_nfs\0"                                         \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
-       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)             \
-               " +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)      \
+       "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)      \
+               " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
                " +${filesize};cp.b ${fileaddr} "                       \
-               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"          \
+               __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"   \
        "upd=run load update\0"                                         \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \
        "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
index 9983104732713a826cedaae228a53b3635a94b3b..05480d48aedf0b730992f77617e21b813bfa802f 100644 (file)
        "ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0"
 #endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 /*
  * boottargets
  * - set 'subbootcmds'
                ":${hostname}:${netdev}:off3"                           \
                " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}"        \
                " mem=${kernelmem} init=${init}"                        \
-               " phram.phram=phvar,${varaddr}," xstr(CONFIG_KM_PHRAM)  \
+               " phram.phram=phvar,${varaddr}," __stringify(CONFIG_KM_PHRAM)\
                " " CONFIG_KM_UBI_LINUX_MTD " "                         \
                CONFIG_KM_DEF_BOOT_ARGS_CPU                             \
                "\0"                                                    \
  * - 'cramfsloadfdt': copy fdt from a cramfs to ram
  */
 #define CONFIG_KM_DEF_ENV_FLASH_BOOT                                   \
-       "cramfsaddr=" xstr(CONFIG_KM_CRAMFS_ADDR) "\0"                  \
+       "cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0"           \
        "cramfsloadkernel=cramfsload ${load_addr_r} uImage\0"           \
-       "ubicopy=ubi read "xstr(CONFIG_KM_CRAMFS_ADDR)                  \
+       "ubicopy=ubi read "__stringify(CONFIG_KM_CRAMFS_ADDR)           \
                        " bootfs${boot_bank}\0"                         \
        CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
 
 #define CONFIG_KM_DEF_ENV_CONSTANTS                                    \
        "backup_bank=0\0"                                               \
        "release=run newenv; reset\0"                                   \
-       "pnvramsize=" xstr(CONFIG_KM_PNVRAM) "\0"                       \
+       "pnvramsize=" __stringify(CONFIG_KM_PNVRAM) "\0"                \
        "testbootcmd=setenv boot_bank ${test_bank}; "                   \
                "run ${subbootcmds}; reset\0"                           \
        ""
                "saveenv && saveenv && boot\0"                          \
        "bootlimit=3\0"                                                 \
        "init=/sbin/init-overlay.sh\0"                                  \
-       "load_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0"                  \
+       "load_addr_r="__stringify(CONFIG_KM_KERNEL_ADDR) "\0"           \
        "load=tftpboot ${load_addr_r} ${u-boot}\0"                      \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \
        "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
index 506755ba0ec7b7dfacf0ffea09d97e07d65f3b9b..bd5bdbcb4895a6b3dd856af6915104fe9e7d1ed7 100644 (file)
        "cramfsloadfdt="                                                \
                "cramfsload ${fdt_addr_r} "                             \
                "fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"             \
-       "fdt_addr_r=" xstr(CONFIG_KM_FDT_ADDR) "\0"                     \
-       "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"                  \
+       "fdt_addr_r=" __stringify(CONFIG_KM_FDT_ADDR) "\0"              \
+       "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"           \
        "update="                                                       \
-               "protect off " xstr(BOOTFLASH_START) " +${filesize} && "\
-               "erase " xstr(BOOTFLASH_START) "  +${filesize} && "     \
-               "cp.b ${load_addr_r} " xstr(BOOTFLASH_START)            \
+               "protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
+               "erase " __stringify(BOOTFLASH_START) "  +${filesize} && "\
+               "cp.b ${load_addr_r} " __stringify(BOOTFLASH_START)     \
                "  ${filesize} && "                                     \
-               "protect on " xstr(BOOTFLASH_START) "  +${filesize}\0"  \
+               "protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
        ""
 
 #endif /* __CONFIG_KEYMILE_POWERPC_H */
index 44d5373968cfef9439e7fcca1b2452b1f816c56c..549278d8b026bbe546f44505c346c79c03cd2aed 100644 (file)
@@ -91,7 +91,7 @@
 #define CONFIG_KM_DEF_ENV_CPU                                          \
        "boot=bootm ${load_addr_r} - -\0"                               \
        "cramfsloadfdt=true\0"                                          \
-       "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.kwb\0"                  \
+       "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0"           \
        CONFIG_KM_UPDATE_UBOOT                                          \
        ""
 
@@ -271,16 +271,16 @@ int get_scl(void);
 #if defined CONFIG_KM_ENV_IS_IN_SPI_NOR
 #define CONFIG_KM_NEW_ENV                                              \
        "newenv=sf probe 0;"                                            \
-               "sf erase " xstr(CONFIG_ENV_OFFSET) " "                 \
-               xstr(CONFIG_ENV_TOTAL_SIZE)"\0"
+               "sf erase " __stringify(CONFIG_ENV_OFFSET) " "          \
+               __stringify(CONFIG_ENV_TOTAL_SIZE)"\0"
 #else
 #define CONFIG_KM_NEW_ENV                                              \
        "newenv=setenv addr 0x100000 && "                               \
                "i2c dev 1; mw.b ${addr} 0 4 && "                       \
-               "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)        \
-               " ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "            \
-               "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)        \
-               " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"
+               "eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR) \
+               " ${addr} " __stringify(CONFIG_ENV_OFFSET) " 4 && "     \
+               "eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR) \
+               " ${addr} " __stringify(CONFIG_ENV_OFFSET_REDUND) " 4\0"
 #endif
 
 /*
index 797378b30d9a38ce10860072262132c9e1e95a1b..2e4340370c9168dff953f050820df33276fefa4b 100644 (file)
@@ -70,9 +70,6 @@
 
 #undef CONFIG_BOOTARGS
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
                ":${hostname}:${netdev}:off panic=1\0"                  \
        "kernel_addr=ff810000\0"                                        \
-       "fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0"                      \
+       "fdt_addr="__stringify(CONFIG_SYS_FLASH_BASE)"\0"               \
        "flash_nfs=run nfsargs addip addcon addwdt addlog;"             \
                "bootm ${kernel_addr} - ${fdt_addr}\0"                  \
        "rootpath=/opt/eldk/ppc_82xx\0"                                 \
        "kernel_addr_r=300000\0"                                        \
        "fdt_addr_r=200000\0"                                           \
-       "fdt_file=" xstr(CONFIG_HOSTNAME) "/"                           \
-               xstr(CONFIG_HOSTNAME) ".dtb\0"                          \
-       "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0"               \
+       "fdt_file=" __stringify(CONFIG_HOSTNAME) "/"                    \
+               __stringify(CONFIG_HOSTNAME) ".dtb\0"                   \
+       "kernel_file=" __stringify(CONFIG_HOSTNAME) "/uImage \0"        \
        "load_fdt=tftp ${fdt_addr_r} ${fdt_file};\0"                    \
        "load_kernel=tftp ${kernel_addr_r} ${kernel_file};\0"           \
        "addcon=setenv bootargs ${bootargs} console=ttyPSC0,${baudrate}\0"\
        "net_nfs=run load_fdt load_kernel; "                            \
                "run nfsargs addip addcon addwdt addlog;"               \
                "bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
-       "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0"                \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin \0"         \
        "u-boot_addr_r=200000\0"                                        \
        "load=tftp ${u-boot_addr_r} ${u-boot}\0"                        \
-       "update=protect off " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};"               \
-               "erase " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};"            \
-               "cp.b ${u-boot_addr_r} " xstr(CONFIG_SYS_TEXT_BASE)             \
+       "update=protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +${filesize};"\
+               "erase " __stringify(CONFIG_SYS_TEXT_BASE) " +${filesize};"\
+               "cp.b ${u-boot_addr_r} " __stringify(CONFIG_SYS_TEXT_BASE) \
                " ${filesize};"                                         \
-               "protect on " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize}\0"              \
+               "protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +${filesize}\0"\
        ""
 
 #define CONFIG_BOOTCOMMAND     "run net_nfs"
index 806ed6400e3ad9185fc3ba914e21cac2bf42c7d3..035a1b6798508ad91c853a6104c41ef27eb0b643 100644 (file)
 
 #define CONFIG_BOOTDELAY       5       /* -1 disables auto-boot */
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
        "consoledev=ttyS0\0"                                            \
                "bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
        "bootcmd=run flash_self\0"                                      \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
-       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)             \
-               " +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)      \
+       "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)      \
+               " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
                " +${filesize};cp.b ${fileaddr} "                       \
-               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"          \
+               __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"   \
        "upd=run load update\0"                                         \
 
 #endif /* __CONFIG_H */
index 69bd654b9f5ae397f677d8561e838ae5bf442f95..826c912494d4c1285dfaec6a789821d055d60799 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 "mx35pdk"
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
                ":${hostname}:${netdev}:off panic=1\0"                  \
        "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"               \
        "addip=if test -n ${ipdyn};then run addip_dyn;"                 \
-               "else run addip_sta;fi\0"       \
+               "else run addip_sta;fi\0"                               \
        "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "addtty=setenv bootargs ${bootargs}"                            \
                " console=ttymxc0,${baudrate}\0"                        \
        "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;"            \
                "bootm ${kernel_addr_r}\0"                              \
        "net_self_load=tftp ${kernel_addr_r} ${bootfile};"              \
                "tftp ${ramdisk_addr_r} ${ramdisk_file};\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 c2bd09729dacdde9b465a53dcd20fbc1bad68cd4..e43a02110ec84337f3d383d7daab20dfa133f91a 100644 (file)
 
 #define CONFIG_LOADADDR                0x80800000      /* loadaddr env var */
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "bootm\0"                                               \
        "bootcmd=run flash_self\0"                                      \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
-       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)             \
-               " +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)      \
+       "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)      \
+               " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
                " +${filesize};cp.b ${fileaddr} "                       \
-               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"          \
+               __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"   \
        "upd=run load update\0"                                         \
        "videomode=video=ctfb:x:640,y:480,depth:16,mode:0,pclk:40000,"  \
                "le:120,ri:40,up:35,lo:10,hs:30,vs:3,sync:100663296,"   \
index cbb6c7ec3916ed75e4ea9589633d88319d3a9191..dd7757cb97550ffe01d61268a9d014b34a3dc90b 100644 (file)
                                "1m(u-boot),256k(env1)," \
                                "256k(env2),6m(kernel),-(rootfs)"
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_TAM3517_SETTINGS                                         \
        "netdev=eth0\0"                                                 \
        "nandargs=setenv bootargs root=${nandroot} "                    \
        "addmisc=setenv bootargs ${bootargs} ${misc}\0"                 \
        "loadaddr=82000000\0"                                           \
        "kernel_addr_r=82000000\0"                                      \
-       "hostname=" xstr(CONFIG_HOSTNAME) "\0"                          \
-       "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"                   \
+       "hostname=" __stringify(CONFIG_HOSTNAME) "\0"                   \
+       "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\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.img\0"                 \
+       "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.img\0"          \
        "load=tftp ${loadaddr} ${u-boot}\0"                             \
        "loadmlo=tftp ${loadaddr} ${mlo}\0"                             \
-       "mlo=" xstr(CONFIG_HOSTNAME) "/MLO\0"                           \
+       "mlo=" __stringify(CONFIG_HOSTNAME) "/MLO\0"                    \
        "uboot_addr=0x80000\0"                                          \
        "update=nandecc sw;nand erase ${uboot_addr} 100000;"            \
                "nand write ${loadaddr} ${uboot_addr} 80000\0"          \
index 71b1d326de5a04674286e324af71f869eab71105..80194d824c19d2e49d6ad1cc35d178eb8bd884e0 100644 (file)
 #define CONFIG_LOADADDR                0x81000000      /* loadaddr env var */
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
-#define xstr(s)        str(s)
-#define str(s) #s
-
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
        "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "addmisc=setenv bootargs ${bootargs}\0"                         \
        "u-boot=tx25/u-boot.bin\0"                                      \
-       "kernel_addr_r=" xstr(CONFIG_LOADADDR) "\0"                     \
+       "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0"              \
        "hostname=tx25\0"                                               \
        "bootfile=tx25/uImage\0"                                        \
        "rootpath=/opt/eldk/arm\0"                                      \