From: wdenk Date: Wed, 29 Aug 2001 07:55:37 +0000 (+0000) Subject: * Re-arrange boot message formatting X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e3579cbc337cbc78f17ec80d7f914a0e2da18f07;p=users%2Frw%2Fppcboot.git * Re-arrange boot message formatting (includes patch by Jon Diekema, Fri, 10 Aug 2001) * Add check for and prevent buffer overflow for BOOTP / DHCP string parameters * Fix PUMA download on CCM board * allow 0x... prefix on input (based on idea by Mads Dydensborg, Tue, 7 Aug 2001) * allow to put "preboot" command in default configuration * extended flash chip support for TQM8260 board (AM29LV800T/B, AM29LV160T/B, AM29DL322T/B, AM29DL323T/B) * BCR tweakage for the 8260 bus mode on TQM8260 * SIUMCR tweakage enabling the MI interrupt (IRQ7) on TQM8260 * To simplify switching between bus modes, a new configuration option (CONFIG_BUSMODE_60x) has been added to the "config_TQM8260.h" file. If defined, BCR will be configured for the 60x mode, otherwise for 8260 mode. --- diff --git a/CHANGELOG b/CHANGELOG index 20c397a..c01dd12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -56,6 +56,9 @@ To do: Modifications for 1.0.5: ====================================================================== +* Re-arrange boot message formatting + (includes patch by Jon Diekema, Fri, 10 Aug 2001) + * Add check for and prevent buffer overflow for BOOTP / DHCP string parameters diff --git a/README b/README index 074466c..1afd567 100644 --- a/README +++ b/README @@ -236,6 +236,12 @@ The following options need to be configured: CONFIG_8xx_GCLK_FREQ - if get_gclk_freq() can not work e.g. no 32KHz reference PIT/RTC clock +- Clock Interface: + CFG_CLKS_IN_HZ + If defined, all clock information including those + passed in the bd_info structure to the Linux kernel, + is calculated in Hz (otherwise it's in MHz). + - Console Interface: Define exactly one of CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2 or diff --git a/common/cmd_boot.c b/common/cmd_boot.c index 946fa09..361ed57 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -80,8 +80,8 @@ void do_bdinfo (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) #ifdef CONFIG_HERMES print_str ("ethspeed", strmhz(buf, bd->bi_ethspeed)); #endif - printf ("\n IP addr = "); print_IPaddr (bd->bi_ip_addr); - printf ("\n baudrate = %6ld bps\n", bd->bi_baudrate ); + printf ("\nIP addr = "); print_IPaddr (bd->bi_ip_addr); + printf ("\nbaudrate = %6ld bps\n", bd->bi_baudrate ); print_num ("getc", (ulong)bd->bi_mon_fnc->getc); print_num ("tstc", (ulong)bd->bi_mon_fnc->tstc); print_num ("putc", (ulong)bd->bi_mon_fnc->putc); diff --git a/cpu/mpc8260/speed.c b/cpu/mpc8260/speed.c index 1a7bca3..a48493d 100644 --- a/cpu/mpc8260/speed.c +++ b/cpu/mpc8260/speed.c @@ -196,11 +196,11 @@ prt_8260_clks(void) printf(" - dfbrg %ld, corecnf 0x%02lx, busdf %ld, cpmdf %ld, " "plldf %ld, pllmf %ld\n", dfbrg, corecnf, busdf, cpmdf, plldf, pllmf); - printf(" - vco_out %10ld, cpm_clk %10ld, bus_clk %10ld\n", - idata->vco_out, idata->cpm_clk, idata->bus_clk); + printf(" - vco_out %10ld, scc_clk %10ld, brg_clk %10ld\n", + idata->vco_out, idata->scc_clk, idata->brg_clk); - printf(" - scc_clk %10ld, brg_clk %10ld, cpu_clk %10ld\n\n", - idata->scc_clk, idata->brg_clk, idata->cpu_clk); + printf(" - cpu_clk %10ld, cpm_clk %10ld, bus_clk %10ld\n\n", + idata->cpu_clk, idata->cpm_clk, idata->bus_clk); } /* ------------------------------------------------------------------------- */ diff --git a/include/config_TQM8260.h b/include/config_TQM8260.h index f3de7b0..9c380ea 100644 --- a/include/config_TQM8260.h +++ b/include/config_TQM8260.h @@ -35,6 +35,8 @@ #define CONFIG_MPC8260 1 /* This is a MPC8260 CPU */ #define CONFIG_TQM8260 100 /* ...on a TQM8260 module Rev.100 */ + +/* Define 60x busmode only if your TQM8260 has L2 cache! */ #if 0 #define CONFIG_BUSMODE_60x 1 /* bus mode: 60x */ #else @@ -49,9 +51,7 @@ #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ #endif -#define CONFIG_PREBOOT "echo;" \ - "echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \ - "echo" +#define CONFIG_PREBOOT "echo;echo Type \"run flash_nfs\" to mount root filesystem over NFS;echo" #undef CONFIG_BOOTARGS #define CONFIG_BOOTCOMMAND \ diff --git a/tools/mkimage.c b/tools/mkimage.c index 3109c4a..74fa29f 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -58,7 +58,7 @@ typedef struct table_entry { } table_entry_t; table_entry_t arch_name[] = { - { IH_CPU_INVALID, "", "Invalid CPU", }, + { IH_CPU_INVALID, NULL, "Invalid CPU", }, { IH_CPU_ALPHA, "alpha", "Alpha", }, { IH_CPU_ARM, "arm", "ARM", }, { IH_CPU_I386, "x86", "Intel x86", }, @@ -74,7 +74,7 @@ table_entry_t arch_name[] = { }; table_entry_t os_name[] = { - { IH_OS_INVALID, "", "Invalid OS", }, + { IH_OS_INVALID, NULL, "Invalid OS", }, { IH_OS_OPENBSD, "openbsd", "OpenBSD", }, { IH_OS_NETBSD, "netbsd", "NetBSD", }, { IH_OS_FREEBSD, "freebsd", "FreeBSD", }, @@ -96,7 +96,7 @@ table_entry_t os_name[] = { }; table_entry_t type_name[] = { - { IH_TYPE_INVALID, "", "Invalid Image", }, + { IH_TYPE_INVALID, NULL, "Invalid Image", }, { IH_TYPE_STANDALONE, "standalone", "Standalone Program", }, { IH_TYPE_KERNEL, "kernel", "Kernel Image", }, { IH_TYPE_RAMDISK, "ramdisk", "RAMDisk Image", }, @@ -163,33 +163,34 @@ main (int argc, char **argv) while (--argc > 0 && **++argv == '-') { while (*++*argv) { +fprintf(stderr, "Flag '%c' - argc=%d\n",**argv,argc); switch (**argv) { case 'l': lflag = 1; break; case 'A': - if ((argc-- <= 0) || + if ((--argc <= 0) || (opt_arch = get_arch(*++argv)) < 0) usage (); goto NXTARG; case 'C': - if ((argc-- <= 0) || + if ((--argc <= 0) || (opt_comp = get_comp(*++argv)) < 0) usage (); goto NXTARG; case 'O': - if ((argc-- <= 0) || + if ((--argc <= 0) || (opt_os = get_os(*++argv)) < 0) usage (); goto NXTARG; case 'T': - if ((argc-- <= 0) || + if ((--argc <= 0) || (opt_type = get_type(*++argv)) < 0) usage (); goto NXTARG; case 'a': - if (argc-- <= 0) + if (--argc <= 0) usage (); addr = strtoul (*++argv, (char **)&ptr, 16); if (*ptr) { @@ -200,19 +201,19 @@ main (int argc, char **argv) } goto NXTARG; case 'd': - if (argc-- <= 0) + if (--argc <= 0) usage (); datafile = *++argv; dflag = 1; goto NXTARG; case 's': - if (argc-- <= 0) + if (--argc <= 0) usage (); scriptfile = *++argv; sflag = 1; goto NXTARG; case 'e': - if (argc-- <= 0) + if (--argc <= 0) usage (); ep = strtoul (*++argv, (char **)&ptr, 16); if (*ptr) { @@ -224,7 +225,7 @@ main (int argc, char **argv) eflag = 1; goto NXTARG; case 'n': - if (argc-- <= 0) + if (--argc <= 0) usage (); name = *++argv; goto NXTARG; @@ -654,14 +655,18 @@ static int get_type(char *name) static int get_table_entry (table_entry_t *table, char *msg, char *name) { table_entry_t *t; + int first = 1; for (t=table; t->val>=0; ++t) { - if (strcasecmp(t->sname, name) == 0) + if (t->sname && strcasecmp(t->sname, name)==0) return (t->val); } fprintf (stderr, "\nInvalid %s Type - valid names are", msg); for (t=table; t->val>=0; ++t) { - fprintf (stderr, "%c %s", (t == table) ? ':' : ',', t->sname); + if (t->sname == NULL) + continue; + fprintf (stderr, "%c %s", (first) ? ':' : ',', t->sname); + first = 0; } fprintf (stderr, "\n"); return (-1);