]> git.sur5r.net Git - u-boot/commitdiff
Add "source" command; prepare removal of "autoscr" command
authorWolfgang Denk <wd@denx.de>
Wed, 1 Apr 2009 21:34:12 +0000 (23:34 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 3 Apr 2009 20:01:42 +0000 (22:01 +0200)
According to the doc/feature-removal-schedule.txt, the "autoscr"
command will be replaced by the "source" command in approximately 6
months from now.

This patch prepares this change and starts a 6 month transition
period as follows:

- The new "source" command has been added, which implements exactly
  the same functionlaity as the old "autoscr" command before
- The old "autoscr" command name is kept as an alias for compatibility
- Command sequences, script files atc. have been adapted to use the
  new "source" command
- Related environment variables ("autoscript", "autoscript_uname")
  have *not* been adapted yet; these will be renamed resp. removed in
  a separate patch when the support for the "autoscr" command get's
  finally dropped.

Signed-off-by: Wolfgang Denk <wd@denx.de>
59 files changed:
README
board/cray/L1/L1.c
board/cray/L1/bootscript.hush
board/esd/common/cmd_loadpci.c
board/pn62/cmd_pn62.c
common/Makefile
common/cmd_autoscript.c [deleted file]
common/cmd_load.c
common/cmd_net.c
common/cmd_source.c [new file with mode: 0644]
doc/feature-removal-schedule.txt
include/common.h
include/config_cmd_all.h
include/config_cmd_default.h
include/configs/APC405.h
include/configs/CRAYL1.h
include/configs/DU440.h
include/configs/EP1C20.h
include/configs/GEN860T.h
include/configs/MVBC_P.h
include/configs/MVBLM7.h
include/configs/NETPHONE.h
include/configs/NETTA2.h
include/configs/NX823.h
include/configs/PN62.h
include/configs/TOP860.h
include/configs/TQM5200.h
include/configs/VoVPN-GW.h
include/configs/afeb9260.h
include/configs/apollon.h
include/configs/at91cap9adk.h
include/configs/at91sam9260ek.h
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9rlek.h
include/configs/atngw100.h
include/configs/atstk1002.h
include/configs/atstk1006.h
include/configs/eNET.h
include/configs/favr-32-ezkit.h
include/configs/grsim.h
include/configs/grsim_leon2.h
include/configs/gth2.h
include/configs/keymile-common.h
include/configs/lwmon.h
include/configs/lwmon5.h
include/configs/mp2usb.h
include/configs/mx1fs2.h
include/configs/omap2420h4.h
include/configs/omap3_beagle.h
include/configs/omap3_evm.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/omap3_zoom1.h
include/configs/sc3.h
include/configs/scb9328.h
include/configs/stxxtc.h
include/configs/vct.h
include/configs/wepep250.h

diff --git a/README b/README
index 32d9acdd216a8a972d79852948a1542d000fd591..fcc4d7c5f377b9ce5369df35f4039aa096024236 100644 (file)
--- a/README
+++ b/README
@@ -593,7 +593,6 @@ The following options need to be configured:
                except those marked below with a "*".
 
                CONFIG_CMD_ASKENV       * ask for env variable
-               CONFIG_CMD_AUTOSCRIPT     Autoscript Support
                CONFIG_CMD_BDI            bdinfo
                CONFIG_CMD_BEDBUG       * Include BedBug Debugger
                CONFIG_CMD_BMP          * BMP support
@@ -654,6 +653,7 @@ The following options need to be configured:
                                          (requires CONFIG_CMD_I2C)
                CONFIG_CMD_SETGETDCR      Support for DCR Register access
                                          (4xx only)
+               CONFIG_CMD_SOURCE         "source" command Support
                CONFIG_CMD_SPI          * SPI serial bus support
                CONFIG_CMD_USB          * USB support
                CONFIG_CMD_VFD          * VFD support (TRAB)
@@ -1789,7 +1789,7 @@ The following options need to be configured:
 
                Note: overly (ab)use of the default environment is
                discouraged. Make sure to check other ways to preset
-               the environment like the autoscript function or the
+               the environment like the "source" command or the
                boot command first.
 
 - DataFlash Support:
@@ -1948,8 +1948,8 @@ Legacy uImage format:
    81  common/cmd_net.c        NetLoop() back without error
   -82  common/cmd_net.c        size == 0 (File with size 0 loaded)
    82  common/cmd_net.c        trying automatic boot
-   83  common/cmd_net.c        running autoscript
-  -83  common/cmd_net.c        some error in automatic boot or autoscript
+   83  common/cmd_net.c        running "source" command
+  -83  common/cmd_net.c        some error in automatic boot or "source" command
    84  common/cmd_net.c        end without errors
 
 FIT uImage format:
@@ -2952,7 +2952,7 @@ Some configuration options can be set using Environment Variables:
   autoscript   - if set to "yes" commands like "loadb", "loady",
                  "bootp", "tftpb", "rarpboot" and "nfs" will attempt
                  to automatically run script images (by internally
-                 calling "autoscript").
+                 calling "source").
 
   autoscript_uname - if script image is in a format (FIT) this
                     variable is used to get script subimage unit name.
index 1c82bdf12512dd1bf5f7c82af9415e313b475fa7..8a06ecc66504e91f4aa4b8b3577c826e62a9b3b2 100644 (file)
@@ -164,7 +164,7 @@ int misc_init_r (void)
                        setenv ("ethaddr", e);
                }
        }
-       sprintf (bootcmd,"autoscript %X",(unsigned)bootscript);
+       sprintf (bootcmd,"source %X",(unsigned)bootscript);
        setenv ("bootcmd", bootcmd);
        return (0);
 }
index ec4839b5d013b1fe5ccd059eb36f3f8cde9ffe09..f2f78ad5c30f3f01d2917bf100f725fb931b26b5 100644 (file)
@@ -31,7 +31,7 @@ if printenv bootscript
        tftp $tftp_addr $bootcript
        if imi $tftp_addr
        then
-               autoscript $tftp_addr
+               source $tftp_addr
        fi
 fi
 
index 0a6626e0716dfb6e6cd3c02ed8ff2e21bd4ad343..c779f793d8ac5abe12a9ada0663cef8d2f485b69 100644 (file)
@@ -30,7 +30,7 @@
 #if defined(CONFIG_CMD_BSP)
 
 extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
-extern int do_autoscript (cmd_tbl_t *, int, int, char *[]);
+extern int do_source (cmd_tbl_t *, int, int, char *[]);
 
 #define ADDRMASK 0xfffff000
 
@@ -98,12 +98,12 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
                case 1:
                        /*
-                        * Boot image via autoscr
+                        * Boot image via "source" command
                         */
                        printf("executing script at addr 0x%s ...\n", addr);
                        local_args[0] = addr;
                        local_args[1] = NULL;
-                       do_autoscript(cmdtp, 0, 1, local_args);
+                       do_source(cmdtp, 0, 1, local_args);
                        break;
 
                case 2:
index 10d0df63a8c5b8983c9db3e2718ce77420b2cd45..b9f3bdb94ea22cd6a73d5d8246541a8e3970855a 100644 (file)
@@ -152,12 +152,13 @@ int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        rcode = do_bootm (cmdtp, 0, 1, local_args);
     }
 
-#ifdef CONFIG_AUTOSCRIPT
+#ifdef CONFIG_SOURCE
     if (load_addr) {
        char *s;
 
        if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
-               printf ("Running autoscript at addr 0x%08lX", load_addr);
+               printf ("Running "source" command at addr 0x%08lX",
+                       load_addr);
 
                s = getenv ("autoscript_uname");
                if (s)
@@ -165,7 +166,7 @@ int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                else
                        puts (" ...\n");
 
-               rcode = autoscript (load_addr, s);
+               rcode = source (load_addr, s);
        }
     }
 #endif
index 23171ca55951aa9c02684e2f5c85db9cca00b491..eb8e283a6dda2d10c3c556ed369bcde736178429 100644 (file)
@@ -61,8 +61,8 @@ COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 
 # command
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
-COBJS-$(CONFIG_AUTOSCRIPT) += cmd_autoscript.o
-COBJS-$(CONFIG_CMD_AUTOSCRIPT) += cmd_autoscript.o
+COBJS-$(CONFIG_SOURCE) += cmd_source.o
+COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o
 COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
 COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
 COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
deleted file mode 100644 (file)
index e5a9bc0..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, kharris@nexus-tech.net
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/*
- * autoscript allows a remote host to download a command file and,
- * optionally, binary data for automatically updating the target. For
- * example, you create a new kernel image and want the user to be
- * able to simply download the image and the machine does the rest.
- * The kernel image is postprocessed with mkimage, which creates an
- * image with a script file prepended. If enabled, autoscript will
- * verify the script and contents of the download and execute the
- * script portion. This would be responsible for erasing flash,
- * copying the new image, and rebooting the machine.
- */
-
-/* #define DEBUG */
-
-#include <common.h>
-#include <command.h>
-#include <image.h>
-#include <malloc.h>
-#include <asm/byteorder.h>
-#if defined(CONFIG_8xx)
-#include <mpc8xx.h>
-#endif
-#ifdef CONFIG_SYS_HUSH_PARSER
-#include <hush.h>
-#endif
-
-int
-autoscript (ulong addr, const char *fit_uname)
-{
-       ulong           len;
-       image_header_t  *hdr;
-       ulong           *data;
-       char            *cmd;
-       int             rcode = 0;
-       int             verify;
-#if defined(CONFIG_FIT)
-       const void*     fit_hdr;
-       int             noffset;
-       const void      *fit_data;
-       size_t          fit_len;
-#endif
-
-       verify = getenv_yesno ("verify");
-
-       switch (genimg_get_format ((void *)addr)) {
-       case IMAGE_FORMAT_LEGACY:
-               hdr = (image_header_t *)addr;
-
-               if (!image_check_magic (hdr)) {
-                       puts ("Bad magic number\n");
-                       return 1;
-               }
-
-               if (!image_check_hcrc (hdr)) {
-                       puts ("Bad header crc\n");
-                       return 1;
-               }
-
-               if (verify) {
-                       if (!image_check_dcrc (hdr)) {
-                               puts ("Bad data crc\n");
-                               return 1;
-                       }
-               }
-
-               if (!image_check_type (hdr, IH_TYPE_SCRIPT)) {
-                       puts ("Bad image type\n");
-                       return 1;
-               }
-
-               /* get length of script */
-               data = (ulong *)image_get_data (hdr);
-
-               if ((len = uimage_to_cpu (*data)) == 0) {
-                       puts ("Empty Script\n");
-                       return 1;
-               }
-
-               /*
-                * scripts are just multi-image files with one component, seek
-                * past the zero-terminated sequence of image lengths to get
-                * to the actual image data
-                */
-               while (*data++);
-               break;
-#if defined(CONFIG_FIT)
-       case IMAGE_FORMAT_FIT:
-               if (fit_uname == NULL) {
-                       puts ("No FIT subimage unit name\n");
-                       return 1;
-               }
-
-               fit_hdr = (const void *)addr;
-               if (!fit_check_format (fit_hdr)) {
-                       puts ("Bad FIT image format\n");
-                       return 1;
-               }
-
-               /* get script component image node offset */
-               noffset = fit_image_get_node (fit_hdr, fit_uname);
-               if (noffset < 0) {
-                       printf ("Can't find '%s' FIT subimage\n", fit_uname);
-                       return 1;
-               }
-
-               if (!fit_image_check_type (fit_hdr, noffset, IH_TYPE_SCRIPT)) {
-                       puts ("Not a image image\n");
-                       return 1;
-               }
-
-               /* verify integrity */
-               if (verify) {
-                       if (!fit_image_check_hashes (fit_hdr, noffset)) {
-                               puts ("Bad Data Hash\n");
-                               return 1;
-                       }
-               }
-
-               /* get script subimage data address and length */
-               if (fit_image_get_data (fit_hdr, noffset, &fit_data, &fit_len)) {
-                       puts ("Could not find script subimage data\n");
-                       return 1;
-               }
-
-               data = (ulong *)fit_data;
-               len = (ulong)fit_len;
-               break;
-#endif
-       default:
-               puts ("Wrong image format for autoscript\n");
-               return 1;
-       }
-
-       debug ("** Script length: %ld\n", len);
-
-       if ((cmd = malloc (len + 1)) == NULL) {
-               return 1;
-       }
-
-       /* make sure cmd is null terminated */
-       memmove (cmd, (char *)data, len);
-       *(cmd + len) = 0;
-
-#ifdef CONFIG_SYS_HUSH_PARSER /*?? */
-       rcode = parse_string_outer (cmd, FLAG_PARSE_SEMICOLON);
-#else
-       {
-               char *line = cmd;
-               char *next = cmd;
-
-               /*
-                * break into individual lines,
-                * and execute each line;
-                * terminate on error.
-                */
-               while (*next) {
-                       if (*next == '\n') {
-                               *next = '\0';
-                               /* run only non-empty commands */
-                               if (*line) {
-                                       debug ("** exec: \"%s\"\n",
-                                               line);
-                                       if (run_command (line, 0) < 0) {
-                                               rcode = 1;
-                                               break;
-                                       }
-                               }
-                               line = next + 1;
-                       }
-                       ++next;
-               }
-               if (rcode == 0 && *line)
-                       rcode = (run_command(line, 0) >= 0);
-       }
-#endif
-       free (cmd);
-       return rcode;
-}
-
-/**************************************************/
-#if defined(CONFIG_CMD_AUTOSCRIPT)
-int
-do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       ulong addr;
-       int rcode;
-       const char *fit_uname = NULL;
-
-       /* Find script image */
-       if (argc < 2) {
-               addr = CONFIG_SYS_LOAD_ADDR;
-               debug ("*  autoscr: default load address = 0x%08lx\n", addr);
-#if defined(CONFIG_FIT)
-       } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) {
-               debug ("*  autoscr: subimage '%s' from FIT image at 0x%08lx\n",
-                               fit_uname, addr);
-#endif
-       } else {
-               addr = simple_strtoul(argv[1], NULL, 16);
-               debug ("*  autoscr: cmdline image address = 0x%08lx\n", addr);
-       }
-
-       printf ("## Executing script at %08lx\n", addr);
-       rcode = autoscript (addr, fit_uname);
-       return rcode;
-}
-
-U_BOOT_CMD(
-       autoscr, 2, 0,  do_autoscript,
-       "run script from memory",
-       "[addr] - run script starting at addr"
-       " - A valid autoscr header must be present\n"
-#if defined(CONFIG_FIT)
-       "For FIT format uImage addr must include subimage\n"
-       "unit name in the form of addr:<subimg_uname>\n"
-#endif
-);
-#endif
index 88fba889914817b15d8f3d6624c893ca5de214ca..d5eaac7351c5c2d043db48b30f15cff9eb25f8e8 100644 (file)
@@ -513,12 +513,13 @@ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                }
        }
 
-#ifdef CONFIG_AUTOSCRIPT
+#ifdef CONFIG_SOURCE
        if (load_addr) {
                char *s;
 
                if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
-                       printf ("Running autoscript at addr 0x%08lX", load_addr);
+                       printf ("Running "source" command at addr 0x%08lX",
+                               load_addr);
 
                        s = getenv ("autoscript_uname");
                        if (s)
@@ -526,7 +527,7 @@ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        else
                                puts (" ...\n");
 
-                       rcode = autoscript (load_addr, s);
+                       rcode = source (load_addr, s);
                }
        }
 #endif
index a6878491998afaa299f77ad06306bff83e028939..9bef7a2049e9013e8c062efbaa537b5cfe197f59 100644 (file)
@@ -222,9 +222,10 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
                rcode = do_bootm (cmdtp, 0, 1, local_args);
        }
 
-#ifdef CONFIG_AUTOSCRIPT
+#ifdef CONFIG_SOURCE
        if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
-               printf ("Running autoscript at addr 0x%08lX", load_addr);
+               printf ("Running "source" command at addr 0x%08lX",
+                       load_addr);
 
                s = getenv ("autoscript_uname");
                if (s)
@@ -233,7 +234,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
                        puts (" ...\n");
 
                show_boot_progress (83);
-               rcode = autoscript (load_addr, s);
+               rcode = source (load_addr, s);
        }
 #endif
        if (rcode < 0)
diff --git a/common/cmd_source.c b/common/cmd_source.c
new file mode 100644 (file)
index 0000000..43e1315
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * (C) Copyright 2001
+ * Kyle Harris, kharris@nexus-tech.net
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * The "source" command allows to define "script images", i. e. files
+ * that contain command sequences that can be executed by the command
+ * interpreter. It returns the exit status of the last command
+ * executed from the script. This is very similar to running a shell
+ * script in a UNIX shell, hence the name for the command.
+ */
+
+/* #define DEBUG */
+
+#include <common.h>
+#include <command.h>
+#include <image.h>
+#include <malloc.h>
+#include <asm/byteorder.h>
+#if defined(CONFIG_8xx)
+#include <mpc8xx.h>
+#endif
+#ifdef CONFIG_SYS_HUSH_PARSER
+#include <hush.h>
+#endif
+
+int
+source (ulong addr, const char *fit_uname)
+{
+       ulong           len;
+       image_header_t  *hdr;
+       ulong           *data;
+       char            *cmd;
+       int             rcode = 0;
+       int             verify;
+#if defined(CONFIG_FIT)
+       const void*     fit_hdr;
+       int             noffset;
+       const void      *fit_data;
+       size_t          fit_len;
+#endif
+
+       verify = getenv_yesno ("verify");
+
+       switch (genimg_get_format ((void *)addr)) {
+       case IMAGE_FORMAT_LEGACY:
+               hdr = (image_header_t *)addr;
+
+               if (!image_check_magic (hdr)) {
+                       puts ("Bad magic number\n");
+                       return 1;
+               }
+
+               if (!image_check_hcrc (hdr)) {
+                       puts ("Bad header crc\n");
+                       return 1;
+               }
+
+               if (verify) {
+                       if (!image_check_dcrc (hdr)) {
+                               puts ("Bad data crc\n");
+                               return 1;
+                       }
+               }
+
+               if (!image_check_type (hdr, IH_TYPE_SCRIPT)) {
+                       puts ("Bad image type\n");
+                       return 1;
+               }
+
+               /* get length of script */
+               data = (ulong *)image_get_data (hdr);
+
+               if ((len = uimage_to_cpu (*data)) == 0) {
+                       puts ("Empty Script\n");
+                       return 1;
+               }
+
+               /*
+                * scripts are just multi-image files with one component, seek
+                * past the zero-terminated sequence of image lengths to get
+                * to the actual image data
+                */
+               while (*data++);
+               break;
+#if defined(CONFIG_FIT)
+       case IMAGE_FORMAT_FIT:
+               if (fit_uname == NULL) {
+                       puts ("No FIT subimage unit name\n");
+                       return 1;
+               }
+
+               fit_hdr = (const void *)addr;
+               if (!fit_check_format (fit_hdr)) {
+                       puts ("Bad FIT image format\n");
+                       return 1;
+               }
+
+               /* get script component image node offset */
+               noffset = fit_image_get_node (fit_hdr, fit_uname);
+               if (noffset < 0) {
+                       printf ("Can't find '%s' FIT subimage\n", fit_uname);
+                       return 1;
+               }
+
+               if (!fit_image_check_type (fit_hdr, noffset, IH_TYPE_SCRIPT)) {
+                       puts ("Not a image image\n");
+                       return 1;
+               }
+
+               /* verify integrity */
+               if (verify) {
+                       if (!fit_image_check_hashes (fit_hdr, noffset)) {
+                               puts ("Bad Data Hash\n");
+                               return 1;
+                       }
+               }
+
+               /* get script subimage data address and length */
+               if (fit_image_get_data (fit_hdr, noffset, &fit_data, &fit_len)) {
+                       puts ("Could not find script subimage data\n");
+                       return 1;
+               }
+
+               data = (ulong *)fit_data;
+               len = (ulong)fit_len;
+               break;
+#endif
+       default:
+               puts ("Wrong image format for \"source\" command\n");
+               return 1;
+       }
+
+       debug ("** Script length: %ld\n", len);
+
+       if ((cmd = malloc (len + 1)) == NULL) {
+               return 1;
+       }
+
+       /* make sure cmd is null terminated */
+       memmove (cmd, (char *)data, len);
+       *(cmd + len) = 0;
+
+#ifdef CONFIG_SYS_HUSH_PARSER /*?? */
+       rcode = parse_string_outer (cmd, FLAG_PARSE_SEMICOLON);
+#else
+       {
+               char *line = cmd;
+               char *next = cmd;
+
+               /*
+                * break into individual lines,
+                * and execute each line;
+                * terminate on error.
+                */
+               while (*next) {
+                       if (*next == '\n') {
+                               *next = '\0';
+                               /* run only non-empty commands */
+                               if (*line) {
+                                       debug ("** exec: \"%s\"\n",
+                                               line);
+                                       if (run_command (line, 0) < 0) {
+                                               rcode = 1;
+                                               break;
+                                       }
+                               }
+                               line = next + 1;
+                       }
+                       ++next;
+               }
+               if (rcode == 0 && *line)
+                       rcode = (run_command(line, 0) >= 0);
+       }
+#endif
+       free (cmd);
+       return rcode;
+}
+
+/**************************************************/
+#if defined(CONFIG_CMD_SOURCE)
+int
+do_source (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       ulong addr;
+       int rcode;
+       const char *fit_uname = NULL;
+
+       /* Find script image */
+       if (argc < 2) {
+               addr = CONFIG_SYS_LOAD_ADDR;
+               debug ("*  source: default load address = 0x%08lx\n", addr);
+#if defined(CONFIG_FIT)
+       } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) {
+               debug ("*  source: subimage '%s' from FIT image at 0x%08lx\n",
+                               fit_uname, addr);
+#endif
+       } else {
+               addr = simple_strtoul(argv[1], NULL, 16);
+               debug ("*  source: cmdline image address = 0x%08lx\n", addr);
+       }
+
+       printf ("## Executing script at %08lx\n", addr);
+       rcode = source (addr, fit_uname);
+       return rcode;
+}
+
+U_BOOT_CMD(
+       source, 2, 0,   do_source,
+       "run script from memory",
+       "[addr]\n"
+       "\t- run script starting at addr\n"
+       "\t- A valid image header must be present\n"
+#if defined(CONFIG_FIT)
+       "For FIT format uImage addr must include subimage\n"
+       "unit name in the form of addr:<subimg_uname>\n"
+#endif
+);
+
+/*
+ * Keep for now for backward compatibility;
+ * remove later when support for "autoscr" goes away.
+ */
+static int
+do_autoscr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       printf ("\n### WARNING ### "
+               "\"autoscr\" is deprecated, use \"source\" instead ###\n\n");
+       return do_source (cmdtp, flag, argc, argv);
+}
+
+U_BOOT_CMD(
+       autoscr, 2, 0,  do_autoscr,
+       "DEPRECATED - use \"source\" command instead",
+       "DEPRECATED - use \"source\" command instead\n"
+);
+#endif
index 10e63bfd9203859b89e8e6d297bd9c647b39ef90..f973403362e1f67c1ec0ddc7d6ce3db0cb58c43b 100644 (file)
@@ -8,12 +8,20 @@ file.
 ---------------------------
 
 What:  "autoscr" command
-When:  August 2009
-Why:   "autosrc" is an ugly and completely non-standard name.  The "autoscr"
-       command is deprecated and will be replaced the "source" command as
-       used by other shells such as bash.  Both commands will be supported
-       for a transition period of 6 months after which "autoscr" will be
-       removed.
+When:  Release 2009-09
+
+Why:   "autosrc" is an ugly and completely non-standard name.
+        The "autoscr" command is deprecated and will be replaced by
+
+        the "source" command as used by other shells such as bash.
+
+        Starting with March 2009, both commands will be supported for
+        a transition period of 6 months after which "autoscr" will be
+        removed. During the transition period existing scripts and
+        environment variable names remain untouched for maximum
+        compatibiltiy; thse will be changed when support for the
+        "autoscr" command get's finally dropped.
+
 Who:   Peter Tyser <ptyser@xes-inc.com>
 
 ---------------------------
index 952ddfffab2bd6810aa0b4f1a823fe1760fa9b5a..20c058a81dce1477ba2ae5632ff66dd1a0af3d84 100644 (file)
@@ -234,8 +234,8 @@ int mac_read_from_eeprom(void);
 /* common/flash.c */
 void flash_perror (int);
 
-/* common/cmd_autoscript.c */
-int    autoscript (ulong addr, const char *fit_uname);
+/* common/cmd_source.c */
+int    source (ulong addr, const char *fit_uname);
 
 extern ulong load_addr;                /* Default Load Address */
 
index db1f55c84a071fe5c17919959dc5bdbd1560dec8..c5e0d268e3ace8f521b28225749cd0c5962e893c 100644 (file)
@@ -15,7 +15,6 @@
 
 #define CONFIG_CMD_AMBAPP      /* AMBA Plug & Play Bus print utility */
 #define CONFIG_CMD_ASKENV      /* ask for env variable         */
-#define CONFIG_CMD_AUTOSCRIPT  /* Autoscript Support           */
 #define CONFIG_CMD_BDI         /* bdinfo                       */
 #define CONFIG_CMD_BEDBUG      /* Include BedBug Debugger      */
 #define CONFIG_CMD_BMP         /* BMP support                  */
@@ -76,6 +75,7 @@
 #define CONFIG_CMD_SETEXPR     /* setexpr support              */
 #define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
 #define CONFIG_CMD_SNTP                /* SNTP support                 */
+#define CONFIG_CMD_SOURCE      /* "source" command support     */
 #define CONFIG_CMD_SPI         /* SPI utility                  */
 #define CONFIG_CMD_TERMINAL    /* built-in Serial Terminal     */
 #define CONFIG_CMD_UNIVERSE    /* Tundra Universe Support      */
index 366760289fb47135cfe0135c390d03d7d7859426..0376e44bd367f67a9634dda9e2155a09016e2c1e 100644 (file)
@@ -16,7 +16,6 @@
  * hardware, not fully tested, etc.).
  */
 
-#define CONFIG_CMD_AUTOSCRIPT  /* Autoscript Support           */
 #define CONFIG_CMD_BDI         /* bdinfo                       */
 #define CONFIG_CMD_BOOTD       /* bootd                        */
 #define CONFIG_CMD_CONSOLE     /* coninfo                      */
@@ -37,6 +36,7 @@
 #define CONFIG_CMD_NFS         /* NFS support                  */
 #define CONFIG_CMD_RUN         /* run command in env variable  */
 #define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
+#define CONFIG_CMD_SOURCE      /* "source" command support     */
 #define CONFIG_CMD_XIMG                /* Load part of Multi Image     */
 
 #endif /* _CONFIG_CMD_DEFAULT_H */
index 7453518bfdd91cb0c5189801fea628c025be8c23..41eaaabfcd3a88c1375d8368bb73e98f6edc0a90 100644 (file)
  */
 #include <config_cmd_default.h>
 
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_FAT
+#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_ELF
-#define CONFIG_CMD_DATE
+#define CONFIG_CMD_FAT
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_IRQ
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_PCI
 #define CONFIG_CMD_PING
-#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_SOURCE
 #define CONFIG_CMD_USB
-#define CONFIG_CMD_AUTOSCRIPT
 
 #define CONFIG_MAC_PARTITION
 #define CONFIG_DOS_PARTITION
index 527c84650209cd64f8934d27af8892f8860644ac..150bd29e00ebcce1a9e906c554e8df1b6a38dbbb 100644 (file)
 #define        CONFIG_SYS_HZ                        1000       /* decrementer freq: 1 ms ticks */
 #define CONFIG_SYS_HUSH_PARSER                 1
 #define CONFIG_SYS_PROMPT_HUSH_PS2             "> "
-#define CONFIG_AUTOSCRIPT              1
+#define CONFIG_SOURCE                  1
 
 
 /*
  * Command line configuration.
  */
 
+#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_BDI
-#define CONFIG_CMD_IMI
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_MEMORY
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_CONSOLE
-#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
 #define CONFIG_CMD_ECHO
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IMI
 #define CONFIG_CMD_IMMAP
+#define CONFIG_CMD_MEMORY
+#define CONFIG_CMD_NET
 #define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DATE
 #define CONFIG_CMD_RUN
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_DIAG
-#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_SETGETDCR
+#define CONFIG_CMD_SOURCE
 
 
 /*
index 85c0e612b2783e266f59da0b1c422b15425b1117..e6abbdc5f3aeaed8e22113cdc782f6ab7d55375f 100644 (file)
@@ -290,14 +290,13 @@ int du440_phy_addr(int devnum);
 
 #include <config_cmd_default.h>
 
-#define CONFIG_CMD_AUTOSCRIPT
-#define CONFIG_CMD_BSP
+#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_BMP
+#define CONFIG_CMD_BSP
 #define CONFIG_CMD_DATE
-#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_DIAG
+#define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_FAT
@@ -309,9 +308,10 @@ int du440_phy_addr(int devnum);
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
 #define CONFIG_CMD_REGINFO
 #define CONFIG_CMD_SDRAM
+#define CONFIG_CMD_SOURCE
+#define CONFIG_CMD_USB
 
 #define CONFIG_SUPPORT_VFAT
 
@@ -428,7 +428,7 @@ int du440_phy_addr(int devnum);
 #define CONFIG_KGDB_SER_INDEX  2       /* which serial port to use */
 #endif
 
-#define CONFIG_AUTOSCRIPT      1
+#define CONFIG_SOURCE          1
 
 #define CONFIG_OF_LIBFDT
 #define CONFIG_OF_BOARD_SETUP
index a0904d46431ea4d3a2d0efe1f8deada26ef1765e..8941e4df53536558c39b6038bc4d28b86932e99b 100644 (file)
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SAVES
 
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_BOOTD
 #undef CONFIG_CMD_CONSOLE
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_ITEST
 #undef CONFIG_CMD_NFS
 #undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_XIMG
 
 
index a399d22a7af12fc32bf736248e24bf6b5b8e4b41..8f18ab242d742ebcd75090b4a38ba56101336abc 100644 (file)
 
 /*
  * Set default IP stuff just to get bootstrap entries into the
- * environment so that we can autoscript the full default environment.
+ * environment so that we can source the full default environment.
  */
 #define CONFIG_ETHADDR                                 9a:52:63:15:85:25
 #define CONFIG_SERVERIP                                        10.0.4.201
index cd910ea051a3f5d86bfd67734d987104a07cf4b4..edbc701d97d363505797d598cca078cd70cef6c8 100644 (file)
@@ -73,8 +73,8 @@
 #define MV_INITRD_LENGTH       0x00300000
 #define MV_SCRATCH_ADDR                0x00000000
 #define MV_SCRATCH_LENGTH      MV_INITRD_LENGTH
-#define MV_AUTOSCR_ADDR                0xff840000
-#define MV_AUTOSCR_ADDR2       0xff850000
+#define MV_SOURCE_ADDR         0xff840000
+#define MV_SOURCE_ADDR2                0xff850000
 #define MV_DTB_ADDR            0xfffc0000
 
 #define CONFIG_SHOW_BOOT_PROGRESS 1
 #define CONFIG_RESET_TO_RETRY          1000
 
 #define CONFIG_BOOTCOMMAND     "if imi ${autoscr_addr}; \
-                                       then autoscr ${autoscr_addr};   \
-                                       else autoscr ${autoscr_addr2};  \
+                                       then source ${autoscr_addr};    \
+                                       else source ${autoscr_addr2};   \
                                fi;"
 
 #define CONFIG_BOOTARGS                "root=/dev/ram ro rootfstype=squashfs"
        "fpga=0\0"                                              \
        "fpgadata=" MK_STR(MV_FPGA_DATA) "\0"                   \
        "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"               \
-       "autoscr_addr=" MK_STR(MV_AUTOSCR_ADDR) "\0"            \
-       "autoscr_addr2=" MK_STR(MV_AUTOSCR_ADDR2) "\0"          \
+       "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0"             \
+       "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0"           \
        "mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0"           \
        "mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"   \
        "mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0"           \
index b321825c953d219b6fe59f444046c43b89063cf7..8f741f58bbf8284c458e54b022a7838b305bddf1 100644 (file)
 #define MV_FPGA_SIZE           0x00076ca2
 #define MV_KERNEL_ADDR         0xff810000
 #define MV_INITRD_ADDR         0xffb00000
-#define MV_AUTOSCR_ADDR                0xff804000
-#define MV_AUTOSCR_ADDR2       0xff806000
+#define MV_SOURCE_ADDR         0xff804000
+#define MV_SOURCE_ADDR2                0xff806000
 #define MV_DTB_ADDR            0xff808000
 #define MV_INITRD_LENGTH       0x00400000
 
 #define MV_INITRD_ADDR_RAM     0x01000000
 
 #define CONFIG_BOOTCOMMAND     "if imi ${autoscr_addr}; \
-                                       then autoscr ${autoscr_addr};  \
-                                       else autoscr ${autoscr_addr2}; \
+                                       then source ${autoscr_addr};  \
+                                       else source ${autoscr_addr2}; \
                                fi;"
 #define CONFIG_BOOTARGS                "root=/dev/ram ro rootfstype=squashfs"
 
        "fpga=0\0"                                              \
        "fpgadata=" MK_STR(MV_FPGA_DATA) "\0"                   \
        "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"               \
-       "autoscr_addr=" MK_STR(MV_AUTOSCR_ADDR) "\0"            \
-       "autoscr_addr2=" MK_STR(MV_AUTOSCR_ADDR2) "\0"          \
+       "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0"             \
+       "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0"           \
        "mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0"           \
        "mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"   \
        "mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0"           \
index 2d04d89251c18c91b29a7f759d9a0199c89a027a..796938a518476c778f052892225ac8963953b4dd 100644 (file)
@@ -71,7 +71,7 @@
        "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;"    \
        "bootm"
 
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
 #define CONFIG_LOADS_ECHO      0       /* echo off for serial download */
 #undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
 
index 4a2702791285abbc42692f01382567a4b14fdd1c..a14b2dd8971612210c4f739966204a7ca91a1e5b 100644 (file)
@@ -71,7 +71,7 @@
        "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
        "bootm"
 
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
 #define CONFIG_LOADS_ECHO      0       /* echo off for serial download */
 #undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
 
index 9182223c632b402f53ce2ffd7144f2a3fbe57d37..5054d5e61f3fc3238c160240dfb35e812c271488 100644 (file)
@@ -55,7 +55,7 @@
 #define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
 #undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
 #undef CONFIG_WATCHDOG                 /* watchdog disabled, for now       */
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
 
 /*
  * BOOTP options
@@ -72,7 +72,7 @@
  */
 #include <config_cmd_default.h>
 
-#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_SOURCE
 
 
 /* call various generic functions */
index 06c11e69ba1d9524c58f5b2295306e04b8164c00..562c5c3a1e70abe5596ad70cdad4fc0db1a4ad6b 100644 (file)
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_BSP
 
-#undef CONFIG_CMD_AUTOSCRIPT
-#undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_SAVEENV
 #undef CONFIG_CMD_FLASH
 #undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_SOURCE
 
 
 #define CONFIG_BAUDRATE                19200   /* console baudrate             */
index 8c2befbf00cd04f1e9f4736e5409e9a7e8364ed5..b9e450df67b78ebcce859cfc36c9aae12cc21787 100644 (file)
 #define CONFIG_CMD_BEDBUG
 
 
-#define        CONFIG_AUTOSCRIPT               1
+#define        CONFIG_SOURCE                   1
 #define        CONFIG_SYS_LOADS_BAUD_CHANGE    1
 #undef CONFIG_LOADS_ECHO                       /* NO echo on for serial download       */
 
 
 /*
  * Set default IP stuff just to get bootstrap entries into the
- * environment so that we can autoscript the full default environment.
+ * environment so that we can source the full default environment.
  */
 #define CONFIG_ETHADDR                                 9a:52:63:15:85:25
 #define CONFIG_SERVERIP                                        10.0.4.200
 #define CONFIG_IPADDR                                  10.0.4.111
 
-/*-----------------------------------------------------------------------
- * Defaults for Autoscript
- */
 #define CONFIG_SYS_LOAD_ADDR           0x00100000      /* default load address */
 #define        CONFIG_SYS_TFTP_LOADADDR        0x00100000
 
  */
 #define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
 
-
 #endif /* __CONFIG_H */
index d374981abc468defb058433a53ca37fb18b7ab58..fe1d10290be44d4932b4c24a21cf2766c0f612ec 100644 (file)
 #define CUSTOM_ENV_SETTINGS                                            \
        "bootfile=cam5200/uImage\0"                                     \
        "u-boot=cam5200/u-boot.bin\0"                                   \
-       "setup=tftp 200000 cam5200/setup.img; autoscr 200000\0"
+       "setup=tftp 200000 cam5200/setup.img; source 200000\0"
 #endif
 
 #if defined(CONFIG_TQM5200_B)
index 5f9a17f3df83e0dfbaf845e1cf7208ba8e5a4185..b2d75e3c1cf1ce5da5457cd405999a9a0181e480 100644 (file)
  * Command line configuration.
  */
 
-#define CONFIG_CMD_AUTOSCRIPT
 #define CONFIG_CMD_BDI
 #define CONFIG_CMD_CONSOLE
 #define CONFIG_CMD_ECHO
-#define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_FLASH
 #define CONFIG_CMD_IMI
 #define CONFIG_CMD_IMLS
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_RUN
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_SOURCE
 
 
 /*
index 33a67ca8304a0b2ee07e5aab6ec703b707a13ef2..fa2711913268b32c9d7ddeb94a5263822e680684 100644 (file)
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
 #undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
 
 #define CONFIG_CMD_PING                1
 #define CONFIG_CMD_DHCP                1
index 04da083e697d4234165d601c832fab57893ea8e4..c14f8713573e53abdc42530c81d83611bd4ce120 100644 (file)
 #define CONFIG_MTD_PARTITIONS
 #endif
 
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_SOURCE
 
 #ifndef        CONFIG_SYS_USE_NOR
 # undef        CONFIG_CMD_FLASH
index 7e7f124b98e97b7feee59f5b128a1a0d533cc645..2ddbd172a2d1bf389df3e91e9bc6d5ba03aec360 100644 (file)
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_IMI
 #undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
 
 #define CONFIG_CMD_PING                1
 #define CONFIG_CMD_DHCP                1
index 1fae3a3b820400d12c136cd7506be7452cb11779..1a5f9a48bc9b750a33f6ddc4f682dad6a817f182 100644 (file)
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
 #undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
 
 #define CONFIG_CMD_PING                1
 #define CONFIG_CMD_DHCP                1
index 752d7e9ccdd568559de3d61fc3a407dc13c2bef6..4d5093203bc695d5d8cafac805ab4e58e1b5b54c 100644 (file)
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
 #undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
 
 #define CONFIG_CMD_PING                1
 #define CONFIG_CMD_DHCP                1
index dd500caf6c557bbb8eda6109b885b52e268b28d1..78e00810dee440f74036c571029c8bc8bb56fc30 100644 (file)
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
 #undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
 
 #define CONFIG_CMD_PING                1
 #define CONFIG_CMD_DHCP                1
index 7a4039c55aaaca0e53b2e3153295901ef2e5df4e..a48f2cba5a1fa8d339670dfc2de7f4b248d80f1c 100644 (file)
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
 #undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_USB
 
 #define CONFIG_CMD_NAND                1
index c998952fbf35f1260ef3904344e1e4750be235d5..4ed5514d3028fafb084c64c714fdf755a6ca44c1 100644 (file)
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
 
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_XIMG
 
 #define CONFIG_ATMEL_USART             1
index 2284277da238641494914465820767b639b8a218..b258f2df4394a0fa77cf2a1395b23841847a6ebe 100644 (file)
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_MMC
 
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_XIMG
 
 #define CONFIG_ATMEL_USART             1
index 8cfa31269ba7787b71ac6def3d814b8ffaf006c1..f93118edbc478c7f3284bf590520af6da523c574 100644 (file)
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_MMC
 
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_XIMG
 
 #define CONFIG_ATMEL_USART             1
index f7e6608baa63ddda59110d94f545ac15bab4c27e..dde4c8321304e32fd126acbea489bbc8fe6b96ae 100644 (file)
  */
 #include <config_cmd_default.h>
 
-#define CONFIG_CMD_AUTOSCRIPT  /* Autoscript Support           */
 #define CONFIG_CMD_BDI         /* bdinfo                       */
 #define CONFIG_CMD_BOOTD       /* bootd                        */
 #define CONFIG_CMD_CONSOLE     /* coninfo                      */
 #define CONFIG_CMD_ECHO                /* echo arguments               */
-#define CONFIG_CMD_SAVEENV     /* saveenv                      */
 #define CONFIG_CMD_FLASH       /* flinfo, erase, protect       */
 #define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
 #define CONFIG_CMD_IMI         /* iminfo                       */
 #define CONFIG_CMD_IMLS                /* List all found images        */
+#define CONFIG_CMD_IRQ         /* IRQ Information              */
 #define CONFIG_CMD_ITEST       /* Integer (and string) test    */
 #define CONFIG_CMD_LOADB       /* loadb                        */
 #define CONFIG_CMD_LOADS       /* loads                        */
 #undef CONFIG_CMD_NET          /* bootp, tftpboot, rarpboot    */
 #undef CONFIG_CMD_NFS          /* NFS support                  */
 #define CONFIG_CMD_RUN         /* run command in env variable  */
+#define CONFIG_CMD_SAVEENV     /* saveenv                      */
 #define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
+#define CONFIG_CMD_SOURCE      /* "source" command Support     */
 #define CONFIG_CMD_XIMG                /* Load part of Multi Image     */
-#define CONFIG_CMD_IRQ         /* IRQ Information              */
 
 #define CONFIG_BOOTDELAY               15
 #define CONFIG_BOOTARGS                        "root=/dev/mtdblock0 console=ttyS0,9600"
index 21802df1d213490c268039512d8723d5e0112285..739ff0d6271fc40eec62cc3df8985e2063cd6440 100644 (file)
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_MMC
 
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_XIMG
 
 #define CONFIG_ATMEL_USART             1
index a9eaa4a2c16ec8485f374b6a4c72a080a313b239..c3f1a3106dd7a32c7024260ff4c5bab4c37c7563 100644 (file)
 /*
  * Supported commands
  */
-#define CONFIG_CMD_AMBAPP      /* AMBA Plyg&Play information   */
-#define CONFIG_CMD_AUTOSCRIPT  /* Autoscript Support           */
-#define CONFIG_CMD_BDI         /* bdinfo                       */
-#define CONFIG_CMD_CONSOLE     /* coninfo                      */
+#define CONFIG_CMD_AMBAPP      /* AMBA Plyg&Play information   */
+#define CONFIG_CMD_BDI         /* bdinfo                       */
+#define CONFIG_CMD_CONSOLE     /* coninfo                      */
 #define CONFIG_CMD_DIAG
-#define CONFIG_CMD_ECHO                /* echo arguments               */
-#define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
+#define CONFIG_CMD_ECHO                /* echo arguments               */
+#define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
 #define CONFIG_CMD_IRQ
-#define CONFIG_CMD_ITEST       /* Integer (and string) test    */
-#define CONFIG_CMD_LOADB       /* loadb                        */
-#define CONFIG_CMD_LOADS       /* loads                        */
+#define CONFIG_CMD_ITEST       /* Integer (and string) test    */
+#define CONFIG_CMD_LOADB       /* loadb                        */
+#define CONFIG_CMD_LOADS       /* loads                        */
 #define CONFIG_CMD_MISC                /* Misc functions like sleep etc */
-#define CONFIG_CMD_NET         /* bootp, tftpboot, rarpboot    */
+#define CONFIG_CMD_NET         /* bootp, tftpboot, rarpboot    */
 #define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_RUN         /* run command in env variable  */
-#define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
-#define CONFIG_CMD_XIMG                /* Load part of Multi Image     */
+#define CONFIG_CMD_RUN         /* run command in env variable  */
+#define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
+#define CONFIG_CMD_SOURCE      /* "source" command support     */
+#define CONFIG_CMD_XIMG                /* Load part of Multi Image     */
 
 /*
  * Autobooting
index 58f26fd5a500d15f994570acfef676a6f9a22af5..7ebbf2501cd9129f177121e25d939662b44c4967 100644 (file)
 /*
  * Supported commands
  */
-#define CONFIG_CMD_AUTOSCRIPT  /* Autoscript Support           */
-#define CONFIG_CMD_BDI         /* bdinfo                       */
-#define CONFIG_CMD_CONSOLE     /* coninfo                      */
+#define CONFIG_CMD_BDI         /* bdinfo                       */
+#define CONFIG_CMD_CONSOLE     /* coninfo                      */
 #define CONFIG_CMD_DIAG
-#define CONFIG_CMD_ECHO                /* echo arguments               */
-#define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
+#define CONFIG_CMD_ECHO                /* echo arguments               */
+#define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
 #define CONFIG_CMD_IRQ
-#define CONFIG_CMD_ITEST       /* Integer (and string) test    */
-#define CONFIG_CMD_LOADB       /* loadb                        */
-#define CONFIG_CMD_LOADS       /* loads                        */
+#define CONFIG_CMD_ITEST       /* Integer (and string) test    */
+#define CONFIG_CMD_LOADB       /* loadb                        */
+#define CONFIG_CMD_LOADS       /* loads                        */
 #define CONFIG_CMD_MISC                /* Misc functions like sleep etc */
 #define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_RUN         /* run command in env variable  */
-#define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
-#define CONFIG_CMD_XIMG                /* Load part of Multi Image     */
+#define CONFIG_CMD_RUN         /* run command in env variable  */
+#define CONFIG_CMD_SETGETDCR   /* DCR support on 4xx           */
+#define CONFIG_CMD_SOURCE      /* "source" command support     */
+#define CONFIG_CMD_XIMG                /* Load part of Multi Image     */
 
 /*
  * Autobooting
index b1b4842e085b1ae08334cdb6d68242ca5734c8e6..677baea5b0471df2251baaf61af3c7dbeb7d8171 100644 (file)
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_DHCP
 
-#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_ELF
 #undef CONFIG_CMD_FAT
 #undef CONFIG_CMD_FLASH
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_MII
-#undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_LOADB
-#undef CONFIG_CMD_ELF
-#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_MII
 #undef CONFIG_CMD_NFS
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_SOURCE
 
 
 /*
index 58b95f463ab13e3ed50e6a68cf1bd9f3f51bd11b..b2e37ec22207f7064c67eaadbe4f276895cc192b 100644 (file)
                "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0"        \
        "new_esw=run set_new_esw_script; "                              \
                "tftp ${autoscr_ws} ${new_esw_script}; "                \
-               "iminfo ${autoscr_ws}; autoscr ${autoscr_ws} \0"        \
+               "iminfo ${autoscr_ws}; source ${autoscr_ws} \0" \
        "bootlimit=0 \0"                                                \
        CONFIG_KM_DEF_ENV_IOMUX                                         \
        CONFIG_KM_DEF_ENV_PRIVATE                                       \
index d52a5e0cf45d812f35332df723da52a724a98885..8f00773216a8d70f4a904a15e3721109b99a94a7 100644 (file)
@@ -93,7 +93,7 @@
  * 3 = 0x3C+0x3F = F3 + F6 :   enable test mode
  */
 
-#define CONFIG_BOOTCOMMAND "autoscr 40040000;saveenv"
+#define CONFIG_BOOTCOMMAND "source 40040000;saveenv"
 
 /*     "gatewayip=10.8.211.250\0"                                      \ */
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "key_magic2=3A+3C\0"                                            \
        "key_cmd2=echo *** Entering Update Mode ***;"                   \
                "if fatload ide 0:3 10000 update.scr;"                  \
-                       "then autoscr 10000;"                           \
+                       "then source 10000;"                            \
                        "else echo *** UPDATE FAILED ***;"              \
                "fi\0"                                                  \
        "key_magic3=3C+3F\0"                                            \
index 05055c89afa223b594f84a35579d3da9f819edd4..777a4d6cf7bcca24b992a205f45eba9493db8e61 100644 (file)
                "cp.b 200000 FFF80000 80000\0"                          \
        "upd=run load update\0"                                         \
        "lwe_env=tftp 200000 /tftpboot.dev/lwmon5/env_uboot.bin;"       \
-               "autoscr 200000\0"                                      \
+               "source 200000\0"                                       \
        ""
 #define CONFIG_BOOTCOMMAND     "run flash_self"
 
index 9ac7e9afb736b8a45b8c5ea172284dc960bee6e1..edaa17403fbe18c0e15551736853b294300c43b2 100644 (file)
 
 #else
 
-    #define CONFIG_CMD_USB
     #define CONFIG_CMD_CACHE
+    #define CONFIG_CMD_USB
 
-    #undef CONFIG_CMD_AUTOSCRIPT
     #undef CONFIG_CMD_BDI
     #undef CONFIG_CMD_FPGA
     #undef CONFIG_CMD_IMI
     #undef CONFIG_CMD_LOADS
     #undef CONFIG_CMD_MISC
+    #undef CONFIG_CMD_SOURCE
 
 #endif
 
index 431e6695e325b6d5beee2cb5c667d50ec274ef6d..24fa144ec668bb789932676a66ba8a278e768fc6 100644 (file)
 
 #define CONFIG_CMD_JFFS2
 
-#undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_PING
-#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_SOURCE
 
 
 /*
index 331bf4530572f4fe2e0f5513e9d79f1d07027b05..1803b1346c4f1c99b6e5f8539ba1faf1b366fc8e 100644 (file)
     #define CONFIG_CMD_I2C
     #define CONFIG_CMD_JFFS2
 
-    #undef CONFIG_CMD_AUTOSCRIPT
+    #undef CONFIG_CMD_SOURCE
 #endif
 
 
index 7db1eb754bc9a2b9217e1bf8c23ce0c547db8d83..5a948e4cd620fd7982940bf178e0735a9d3a42b0 100644 (file)
                "rootfstype=jffs2\0" \
        "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
-               "autoscr ${loadaddr}\0" \
+               "source ${loadaddr}\0" \
        "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
index 2f532d5929a55da9509888eaf867734ae85ea6cc..8cd8a1b90fe0d91e072d91004f25005b3b290e37 100644 (file)
                "rootfstype=jffs2\0" \
        "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
-               "autoscr ${loadaddr}\0" \
+               "source ${loadaddr}\0" \
        "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
index 0c32100a0a744106a20060d6617dc824b6c41483..51b04b6428fa3fa8753427581e0438a971b83173 100644 (file)
                "rootfstype=jffs2\0" \
        "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
-               "autoscr ${loadaddr}\0" \
+               "source ${loadaddr}\0" \
        "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
index fb4e50dbdb3e76b15618ce6b2a08b03dc2b4db49..40107a60df5a0b1673350df20eba5dbfdd145b67 100644 (file)
                "rootfstype=jffs2\0" \
        "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
-               "autoscr ${loadaddr}\0" \
+               "source ${loadaddr}\0" \
        "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
index 883234a50598b9a622d90db77f754a5c85a561ea..c60778c0f0ddb95c958f3e4a706c1e147aae6a5e 100644 (file)
                "rootfstype=jffs2\0" \
        "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
-               "autoscr ${loadaddr}\0" \
+               "source ${loadaddr}\0" \
        "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
index 5b68ef9875bfb742605652a859c0dbaeebe274de..97e1da22bb5ba0e80444c827db855e1dc5a06895 100644 (file)
        "rootpath=/opt/eldk/ppc_4xx\0"                                  \
        "bootfile=/tftpboot/sc3/uImage\0"                               \
        "u-boot=/tftpboot/sc3/u-boot.bin\0"                             \
-       "setup=tftp 200000 /tftpboot/sc3/setup.img;autoscr 200000\0"    \
+       "setup=tftp 200000 /tftpboot/sc3/setup.img;source 200000\0"     \
        "kernel_addr=FFE08000\0"                                        \
        ""
 #undef CONFIG_BOOTCOMMAND
 #include <config_cmd_default.h>
 
 
-#define CONFIG_CMD_AUTOSCRIPT
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_IDE
+#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_ELF
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SOURCE
 
 
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
index 2f166c9d861051881ccc89501fba2d7e29fe027f..893c3d3c2f742f66fd0cf11cdd4bad18a1b207a2 100644 (file)
@@ -54,9 +54,9 @@
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
 
-#undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
 
 
 /*
index 5a5f7728f58c21ff1adeb93c509c6759c748857c..147233df1e235d70eeea214ba7351de1694d8dce 100644 (file)
@@ -68,7 +68,7 @@
        "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
        "bootm"
 
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
 #define CONFIG_LOADS_ECHO      0       /* echo off for serial download */
 #undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
 
index 5371e2d7f619263d7e730c63eb0f8dfe30881e52..d202522bd5c7248f3056c6be9946c38b336e5852 100644 (file)
@@ -301,38 +301,38 @@ int vct_gpio_get(int pin);
  * (NOR/OneNAND) usage and Linux kernel booting.
  */
 #if defined(CONFIG_VCT_SMALL_IMAGE)
+#undef CONFIG_CMD_ASKENV
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_CACHE
+#undef CONFIG_CMD_CONSOLE
+#undef CONFIG_CMD_CRC32
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_EEPROM
-#undef CONFIG_CMD_I2C
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_PING
-#undef CONFIG_CMD_SNTP
 #undef CONFIG_CMD_ELF
-#undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_CACHE
-#undef CONFIG_CMD_BEDBUG
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FAT
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_I2C
 #undef CONFIG_CMD_IRQ
 #undef CONFIG_CMD_ITEST
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_LOADY
 #undef CONFIG_CMD_MII
 #undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_PING
 #undef CONFIG_CMD_REGINFO
+#undef CONFIG_CMD_SNTP
+#undef CONFIG_CMD_SOURCE
 #undef CONFIG_CMD_STRINGS
 #undef CONFIG_CMD_TERMINAL
-#undef CONFIG_CMD_ASKENV
-#undef CONFIG_CMD_CRC32
-#undef CONFIG_CMD_DHCP
-#undef CONFIG_CMD_EEPROM
-#undef CONFIG_CMD_I2C
-#undef CONFIG_CMD_LOADB
-#undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_LOADY
-#undef CONFIG_CMD_BDI
 #undef CONFIG_CMD_USB
-#undef CONFIG_CMD_FAT
 
 #undef CONFIG_DRIVER_SMC911X
 #undef CONFIG_SOFT_I2C
-#undef CONFIG_AUTOSCRIPT
+#undef CONFIG_SOURCE
 #undef CONFIG_SYS_LONGHELP
 #undef CONFIG_TIMESTAMP
 #endif /* CONFIG_VCT_SMALL_IMAGE */
index 717577f398a95c5e480c5cf788036a9d98c1fc4b..e74303da854bf10c4519461c254b124a506b98b4 100644 (file)
  */
 #include <config_cmd_default.h>
 
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_SOURCE
 
 
 /*