summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
commitdb7d4daea91e105e3859cf461d7e53b9b77454b2 (patch)
tree9bb65b95440af09e8aca63abe56970dd3360cc57 /scripts
parent9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff)
Merge with Linux 2.2.8.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Configure29
-rw-r--r--scripts/Menuconfig17
-rw-r--r--scripts/header.tk27
-rw-r--r--scripts/ksymoops/README8
-rw-r--r--scripts/ksymoops/oops.c283
-rw-r--r--scripts/lxdialog/checklist.c8
-rw-r--r--scripts/lxdialog/inputbox.c8
-rw-r--r--scripts/lxdialog/menubox.c8
-rw-r--r--scripts/lxdialog/msgbox.c8
-rw-r--r--scripts/lxdialog/textbox.c8
-rw-r--r--scripts/lxdialog/yesno.c8
-rwxr-xr-xscripts/split-includebin0 -> 14401 bytes
-rw-r--r--scripts/tkgen.c10
-rw-r--r--scripts/tkparse.c26
-rw-r--r--scripts/tkparse.h8
-rw-r--r--scripts/ver_linux12
16 files changed, 351 insertions, 117 deletions
diff --git a/scripts/Configure b/scripts/Configure
index 004ae5349..80eefc7e1 100644
--- a/scripts/Configure
+++ b/scripts/Configure
@@ -1,4 +1,3 @@
-
#! /bin/sh
#
# This script is used to configure the Linux kernel.
@@ -8,18 +7,8 @@
# something better'' because the old configure script wasn't flexible
# enough.
#
-# Please send comments / questions / bug fixes to raymondc@microsoft.com.
-#
-# ***** IMPORTANT COMPATIBILITY NOTE ****
-# If configuration changes are made which might adversely effect
-# Menuconfig or xconfig, please notify the respective maintainers so that
-# those utilities can be updated in parallel.
-#
-# Menuconfig: <mec@shout.net>
-# xconfig: <apenwarr@foxnet.net> <eric@aib.com>
-# ****************************************
-#
-# Each line in the config file is a command.
+# Raymond Chen was the original author of Configure.
+# Michael Elizabeth Chastain (mec@shout.net) is the current maintainer.
#
# 050793 - use IFS='@' to get around a bug in a pre-version of bash-1.13
# with an empty IFS.
@@ -56,6 +45,9 @@
#
# 102598 Michael Chastain (mec@shout.net) - put temporary files in
# current directory, not in /tmp.
+#
+# 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
+# - Improve the exit message (Jeff Ronne).
#
# Make sure we're really running bash.
@@ -528,10 +520,13 @@ mv .tmpconfig .config
mv .tmpconfig.h include/linux/autoconf.h
echo
-echo "The Linux kernel should now be configured for your setup."
-echo "Check the top-level Makefile for additional configuration,"
-echo "and do a 'make dep ; make clean' if you want to be sure all"
-echo "the files are correctly re-made"
+echo "*** End of Linux kernel configuration."
+echo "*** Check the top-level Makefile for additional configuration."
+if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
+ echo "*** Next, you must run 'make dep'."
+else
+ echo "*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo'."
+fi
echo
exit 0
diff --git a/scripts/Menuconfig b/scripts/Menuconfig
index a179e5161..a25722756 100644
--- a/scripts/Menuconfig
+++ b/scripts/Menuconfig
@@ -65,6 +65,9 @@
# 02 January 1999, Michael Elizabeth Chastain (mec@shout.net)
# Blow away lxdialog.scrltmp on entry to activate_menu. This protects
# against people who use commands like ' ' to select menus.
+#
+# 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
+# - Improve the exit message (Jeff Ronne).
#
@@ -190,7 +193,7 @@ function dep_tristate () {
else if [ "$3" = "m" ]; then
mod_bool "$1" "$2"
else
- define_bool "$2" "$n"
+ define_bool "$2" n
fi; fi
}
@@ -1290,9 +1293,19 @@ if $DIALOG --backtitle "$backtitle" \
then
save_configuration
echo
- echo The linux kernel is now configured for your setup.
+ echo
+ echo "*** End of Linux kernel configuration."
+ echo "*** Check the top-level Makefile for additional configuration."
+ if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
+ echo "*** Next, you must run 'make dep'."
+ else
+ echo "*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo.'"
+ fi
+ echo
else
+ echo
echo
echo Your kernel configuration changes were NOT saved.
+ echo
fi
exit 0
diff --git a/scripts/header.tk b/scripts/header.tk
index b4f4b5439..8226fe3a7 100644
--- a/scripts/header.tk
+++ b/scripts/header.tk
@@ -4,12 +4,17 @@
# CHANGES
# =======
#
-# 8 January 1998, Michael Elizabeth Chastain, <mec@shout.net>
-# Remove unused do_cmd function (part of the 2.0 sound support).
-# Arrange buttons in three columns for better screen fitting.
-# Add CONSTANT_Y, CONSTANT_M, CONSTANT_N for commands like:
-# dep_tristate 'foo' CONFIG_FOO m
+# 8 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
+# - Remove unused do_cmd function (part of the 2.0 sound support).
+# - Arrange buttons in three columns for better screen fitting.
+# - Add CONSTANT_Y, CONSTANT_M, CONSTANT_N for commands like:
+# dep_tristate 'foo' CONFIG_FOO m
#
+# 23 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
+# - Shut vfix the hell up.
+#
+# 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
+# - Improve the exit message (Jeff Ronne).
#
# This is a handy replacement for ".widget cget" that requires neither tk4
@@ -27,7 +32,6 @@ proc cget { w option } {
proc vfix { var } {
global $var
if [ catch {eval concat $$var} ] {
- puts stdout "WARNING - broken Config.in! $var was not declared!"
set $var 0
}
}
@@ -428,8 +432,15 @@ ${var}:\\
proc wrapup {w } {
catch {destroy $w}
toplevel $w -class Dialog
- message $w.m -width 400 -aspect 300 -text \
- "The Linux kernel should now be configured for your setup. Check the top-level Makefile for additional configuration, and do a 'make dep ; make clean' if you want to be sure all the files are correctly re-made." -relief raised
+
+ global CONFIG_MODVERSIONS; vfix CONFIG_MODVERSIONS
+ if { ([file exists .hdepend] != 1) || ($CONFIG_MODVERSIONS == 1) } then {
+ message $w.m -width 400 -aspect 300 -relief raised -text \
+ "End of Linux kernel configuration. Check the top-level Makefile for additional configuration. Next, you must run 'make dep'."
+ } else {
+ message $w.m -width 400 -aspect 300 -relief raised -text \
+ "End of Linux kernel configuration. Check the top-level Makefile for additional configuration. Next, you may 'make bzImage', 'make bzdisk', or 'make bzlilo.'"
+ }
label $w.bm -bitmap info
pack $w.bm $w.m -pady 10 -side top -padx 10
wm title $w "Kernel build instructions"
diff --git a/scripts/ksymoops/README b/scripts/ksymoops/README
index 134ef02d9..e38ee2c10 100644
--- a/scripts/ksymoops/README
+++ b/scripts/ksymoops/README
@@ -110,8 +110,8 @@
* Prints all relevant lines for a complete Oops report.
* Tries to provide output no matter how bad the input is. The level of
progress and error reporting is aimed at beginners.
- * Handles i386, alpha, sparc, m68k. It is a lot easier to extend to
- other architectures (patches and/or sample data gratefully accepted).
+ * Handles i386, alpha, sparc, sparc64, m68k. It is a lot easier to extend
+ to other architectures (patches and/or sample data gratefully accepted).
* Handles all Oops in the input file(s).
@@ -193,6 +193,7 @@
m68k code derived from ksymoops.cc and reading traps.c, untested.
MIPS tested.
Sparc tested.
+ Sparc64 tested.
Alpha tested.
ARM tested.
@@ -338,6 +339,9 @@
* The sparc PC line starts with PSR and PC is the second hex value, not
bracketed.
+ * The sparc64 TPC line starts with TSTATE and TPC is the second hex value,
+ not bracketed.
+
* A call trace line is identified by 'Call Trace:' followed by at least
one white space. Or it is a line starting with a bracketed address,
but only if the previous line was a call trace line (I hate multi line
diff --git a/scripts/ksymoops/oops.c b/scripts/ksymoops/oops.c
index 1df01f40c..61107b144 100644
--- a/scripts/ksymoops/oops.c
+++ b/scripts/ksymoops/oops.c
@@ -5,6 +5,10 @@
Copyright Keith Owens <kaos@ocs.com.au>.
Released under the GNU Public Licence, Version 2.
+
+ Sun Jan 7 12:56:12 CET 1999
+ Added SPARC64 support and some SPARC hacks by "Jakub Jelinek"
+ <jj@ultra.linux.cz>
Mon Jan 4 08:47:55 EST 1999
Version 0.6d
@@ -44,6 +48,20 @@
#include <string.h>
#include <unistd.h>
+enum oops_arch {
+ OOPS_NOARCH,
+ OOPS_I386,
+ OOPS_SPARC,
+ OOPS_SPARC64,
+ OOPS_ARM,
+ OOPS_ALPHA,
+ OOPS_MIPS,
+ OOPS_PPC,
+ OOPS_M68K
+} oops_arch;
+
+char *eip_names[] = { "IP", "EIP", "PC", "PC", "PC", "PC", "PC", "NIP", "PC" };
+
/* Error detected by bfd */
static void Oops_bfd_perror(const char *msg)
{
@@ -187,11 +205,13 @@ static FILE *Oops_objdump(const char *file)
static char const options[] = "-dhf ";
static char const procname[] = "Oops_objdump";
- cmd = malloc(strlen(path_objdump)+1+strlen(options)+strlen(file)+1);
+ cmd = malloc(strlen(path_objdump)+1+13+strlen(options)+strlen(file)+1);
if (!cmd)
malloc_error(procname);
strcpy(cmd, path_objdump);
strcat(cmd, " ");
+ if (oops_arch == OOPS_SPARC64)
+ strcat(cmd, "-m sparc:v9a ");
strcat(cmd, options);
strcat(cmd, file);
if (debug > 1)
@@ -205,9 +225,9 @@ static FILE *Oops_objdump(const char *file)
static void Oops_decode_one(SYMBOL_SET *ss, const char *line, elf_addr_t eip,
int adjust)
{
- int i;
+ int i, j;
elf_addr_t address, eip_relative;
- char *line2, *map, **string = NULL;
+ char *line2, *map, **string = NULL, *p;
static regex_t re_Oops_objdump;
static regmatch_t *re_Oops_objdump_pmatch;
static char const procname[] = "Oops_decode_one";
@@ -233,7 +253,9 @@ static void Oops_decode_one(SYMBOL_SET *ss, const char *line, elf_addr_t eip,
"( <_EIP[^>]*>)?" /* 2 */
":"
"(" /* 3 */
- ".* +<_EIP\\+0?x?([0-9a-fA-F]+)>[ \t]*$" /* 4 */
+ ".* +"
+ "(0?x?[0-9a-fA-F]+ +)" /* 4 */
+ "<_EIP\\+0?x?([0-9a-fA-F]+)>[ \t]*$" /* 5 */
")?"
".*"
,
@@ -261,34 +283,60 @@ static void Oops_decode_one(SYMBOL_SET *ss, const char *line, elf_addr_t eip,
address = 0;
}
address += eip + adjust;
- if (string[4]) {
+ if (string[5]) {
/* EIP relative data to be adjusted */
errno = 0;
- eip_relative = strtoul(string[4], NULL, 16);
+ eip_relative = strtoul(string[5], NULL, 16);
if (errno) {
- fprintf(stderr,
- "%s Invalid hex value in objdump line, "
- "treated as zero - '%s'\n"
- " objdump line '%s'\n",
- procname, string[4], line);
- perror(" ");
- ++errors;
- eip_relative = 0;
+#ifdef __sparc__
+ /* Try strtoull also, e.g. sparc binutils print <_PC+0xfffffffffffffd58> */
+ errno = 0;
+ eip_relative = strtoull(string[5], NULL, 16);
+#endif
+ if (errno) {
+ fprintf(stderr,
+ "%s Invalid hex value in objdump line, "
+ "treated as zero - '%s'\n"
+ " objdump line '%s'\n",
+ procname, string[5], line);
+ perror(" ");
+ ++errors;
+ eip_relative = 0;
+ }
}
eip_relative += eip + adjust;
map = map_address(&ss_merged, eip_relative);
/* new text is original line, eip_relative in hex, map text */
- i = strlen(line)+1+2*sizeof(eip_relative)+1+strlen(map)+1;
- line2 = malloc(i);
+ j = strlen(line);
+ if (string[4])
+ j = re_Oops_objdump_pmatch[4].rm_so;
+ i = j+1+2*sizeof(eip_relative)+1+strlen(map)+1;
+ line2 = malloc(i + 5);
if (!line2)
malloc_error(procname);
- snprintf(line2, i, "%s %s %s",
- line, format_address(eip_relative), map);
- add_symbol_n(ss, address, 'C', 1, line2);
- free(line2);
+ snprintf(line2, i, "%.*s %s %s",
+ j, line, format_address(eip_relative), map);
+ } else {
+ line2 = malloc(strlen(line) + 6);
+ if (!line2)
+ malloc_error(procname);
+ strcpy(line2, line);
}
- else
- add_symbol_n(ss, address, 'C', 1, line); /* as is */
+ if (oops_arch != OOPS_I386) {
+ p = line2;
+ while ((p = strstr(p, "_EIP"))) {
+ int l = strlen(eip_names[oops_arch]);
+ memcpy(p + 1, eip_names[oops_arch], l);
+ if (l < 3)
+ strcpy(p + 1 + l, p + 4);
+ p += 1 + l;
+ }
+ }
+ if (address == eip)
+ strcat(line2, " <==="); /* This makes it easier to locate visually the
+ offending instruction */
+ add_symbol_n(ss, address, 'C', 1, line2); /* as is */
+ free(line2);
re_strings_free(&re_Oops_objdump, &string);
}
@@ -435,6 +483,8 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
int i;
static regex_t re_Oops_eip_sparc;
static regmatch_t *re_Oops_eip_sparc_pmatch;
+ static regex_t re_Oops_eip_sparc64;
+ static regmatch_t *re_Oops_eip_sparc64_pmatch;
static regex_t re_Oops_eip_ppc;
static regmatch_t *re_Oops_eip_ppc_pmatch;
static regex_t re_Oops_eip_mips;
@@ -442,7 +492,7 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
static regex_t re_Oops_eip_other;
static regmatch_t *re_Oops_eip_other_pmatch;
static const char procname[] = "Oops_eip";
-
+
/* Oops 'EIP:' line for sparc, actually PSR followed by PC */
re_compile(&re_Oops_eip_sparc,
"^PSR: [0-9a-fA-F]+ PC: " UNBRACKETED_ADDRESS,
@@ -458,9 +508,28 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
procname);
re_strings(&re_Oops_eip_sparc, line, re_Oops_eip_sparc_pmatch,
string);
+ oops_arch = OOPS_SPARC;
return((*string)[re_Oops_eip_sparc.re_nsub]);
}
+ /* Oops 'EIP:' line for sparc64, actually TSTATE followed by TPC */
+ re_compile(&re_Oops_eip_sparc64,
+ "^TSTATE: [0-9a-fA-F]{16} TPC: " UNBRACKETED_ADDRESS,
+ REG_NEWLINE|REG_EXTENDED|REG_ICASE,
+ &re_Oops_eip_sparc64_pmatch);
+
+ re_string_check(re_Oops_eip_sparc64.re_nsub+1, string_max, procname);
+ i = regexec(&re_Oops_eip_sparc64, line, re_Oops_eip_sparc64.re_nsub+1,
+ re_Oops_eip_sparc64_pmatch, 0);
+ if (debug > 3)
+ fprintf(stderr, "DEBUG: %s regexec sparc64 %d\n", procname, i);
+ if (i == 0) {
+ re_strings(&re_Oops_eip_sparc64, line, re_Oops_eip_sparc64_pmatch,
+ string);
+ oops_arch = OOPS_SPARC64;
+ return((*string)[re_Oops_eip_sparc64.re_nsub]);
+ }
+
/* Oops 'EIP:' line for PPC, all over the place */
re_compile(&re_Oops_eip_ppc,
"("
@@ -482,6 +551,7 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
procname);
re_strings(&re_Oops_eip_ppc, line, re_Oops_eip_ppc_pmatch,
string);
+ oops_arch = OOPS_PPC;
return((*string)[re_Oops_eip_ppc.re_nsub]);
}
@@ -503,6 +573,7 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
procname);
re_strings(&re_Oops_eip_mips, line, re_Oops_eip_mips_pmatch,
string);
+ oops_arch = OOPS_MIPS;
return((*string)[re_Oops_eip_mips.re_nsub]);
}
@@ -527,6 +598,7 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
procname);
re_strings(&re_Oops_eip_other, line, re_Oops_eip_other_pmatch,
string);
+ oops_arch = OOPS_I386;
return((*string)[re_Oops_eip_other.re_nsub]);
}
return(NULL);
@@ -536,6 +608,7 @@ static char *Oops_eip(const char *line, char ***string, int string_max)
static void Oops_set_eip(const char *value, elf_addr_t *eip, SYMBOL_SET *ss)
{
static const char procname[] = "Oops_set_eip";
+ char buf[10];
errno = 0;
*eip = strtoul(value, NULL, 16);
if (errno) {
@@ -546,7 +619,8 @@ static void Oops_set_eip(const char *value, elf_addr_t *eip, SYMBOL_SET *ss)
++errors;
*eip = 0;
}
- add_symbol_n(ss, *eip, 'E', 1, ">>EIP:");
+ sprintf(buf, ">>%s:", eip_names[oops_arch]);
+ add_symbol_n(ss, *eip, 'E', 1, buf);
}
/* Look for the MIPS ra line, returns start of the relevant hex value */
@@ -597,6 +671,80 @@ static void Oops_set_ra(const char *value, SYMBOL_SET *ss)
add_symbol_n(ss, ra, 'R', 1, ">>RA :");
}
+/* Look for the SPARC o7/i7 registers line, returns start of the relevant hex value */
+static char *Oops_oi7(const char *line, char ***string, int string_max)
+{
+ int i;
+ static regex_t re_Oops_oi7;
+ static regmatch_t *re_Oops_oi7_pmatch;
+ static const char procname[] = "Oops_oi7";
+
+ re_compile(&re_Oops_oi7,
+ "^[io][04]: [0-9a-fA-F iosp:]+ ([io]7|ret_pc): "
+ UNBRACKETED_ADDRESS,
+ REG_NEWLINE|REG_EXTENDED|REG_ICASE,
+ &re_Oops_oi7_pmatch);
+
+ re_string_check(re_Oops_oi7.re_nsub+1, string_max, procname);
+ i = regexec(&re_Oops_oi7, line, re_Oops_oi7.re_nsub+1,
+ re_Oops_oi7_pmatch, 0);
+ if (debug > 3)
+ fprintf(stderr, "DEBUG: %s regexec %d\n", procname, i);
+ if (i == 0) {
+ re_strings(&re_Oops_oi7, line, re_Oops_oi7_pmatch,
+ string);
+ return((*string)[re_Oops_oi7.re_nsub]);
+ }
+ return(NULL);
+}
+
+/* Set the SPARC o7/i7 from the oi7 line */
+static void Oops_set_oi7(const char *value, char ***string, SYMBOL_SET *ss)
+{
+ static const char procname[] = "Oops_set_oi7";
+ elf_addr_t oi7;
+ int o7 = 1;
+ errno = 0;
+ oi7 = strtoul(value, NULL, 16);
+ if ((*string)[1] && !strcmp((*string)[1], "i7"))
+ o7 = 0;
+ if (errno) {
+ fprintf(stderr,
+ "%s Invalid hex value in oi7 line, ignored - '%s'\n",
+ procname, value);
+ perror(" ");
+ ++errors;
+ oi7 = 0;
+ }
+ add_symbol_n(ss, oi7, 'O', 1, o7 ? ">>O7:" : ">>I7:");
+}
+
+/* Look for the SPARC register dump lines end */
+static int Oops_sparc_regdump(const char *line)
+{
+ int i;
+ static regex_t re_Oops_sparc_regdump;
+ static regmatch_t *re_Oops_sparc_regdump_pmatch;
+ static const char procname[] = "Oops_sparc_regdump";
+
+ re_compile(&re_Oops_sparc_regdump,
+ "^(i[04]: "
+ "|Instruction DUMP: "
+ "|Caller\\["
+ ")",
+ REG_NEWLINE|REG_EXTENDED|REG_ICASE,
+ &re_Oops_sparc_regdump_pmatch);
+
+ i = regexec(&re_Oops_sparc_regdump, line, re_Oops_sparc_regdump.re_nsub+1,
+ re_Oops_sparc_regdump_pmatch, 0);
+ if (debug > 3)
+ fprintf(stderr, "DEBUG: %s regexec %d\n", procname, i);
+ if (i == 0)
+ return 1;
+ return 0;
+}
+
+
/* Look for the Trace multilines :(. Returns start of addresses. */
static const char *Oops_trace(const char *line, char ***string, int string_max)
{
@@ -619,6 +767,8 @@ static const char *Oops_trace(const char *line, char ***string, int string_max)
/* ppc */ "|(Call backtrace:)" /* 6 */
/* ppc */ "|(" UNBRACKETED_ADDRESS ")" /* 7,8*/
/* ARM */ "|(Function entered at (" BRACKETED_ADDRESS "))" /* 9,10,11 */
+ /* sparc */
+ /* sparc64 */ "|(Caller\\[" UNBRACKETED_ADDRESS "\\])"/*12,13*/
")",
REG_NEWLINE|REG_EXTENDED|REG_ICASE,
&re_Oops_trace_pmatch);
@@ -645,8 +795,11 @@ static const char *Oops_trace(const char *line, char ***string, int string_max)
else if (MATCHED(10)){
trace_line = 1; /* ARM */
start = line + re_Oops_trace_pmatch[10].rm_so;
- }
- else
+ } else if (MATCHED(12)) {
+ trace_line = 0; /* sparc, sparc64 */
+ start = line + re_Oops_trace_pmatch[13].rm_so;
+ return start;
+ } else
trace_line = 0;
}
else
@@ -819,21 +972,25 @@ static int Oops_print(const char *line, const char **text, char ***string,
/* m68k */ "|(baddr=)"
/* any other m68K lines to print? */
- /* sparc */ "|(Bad unaligned kernel)"
- /* sparc */ "|(Forwarding unaligned exception)"
- /* sparc */ "|(: unhandled unaligned exception)"
- /* sparc */ "|(<sc)"
- /* sparc */ "|(pc *=)"
- /* sparc */ "|(r[0-9]+ *=)"
- /* sparc */ "|(gp *=)"
- /* any other sparc lines to print? */
-
- /* alpha */ "|(tsk->)"
- /* alpha */ "|(PSR: )"
- /* alpha */ "|([goli]0: )"
- /* alpha */ "|(Instruction DUMP: )"
+ /* alpha */ "|(Bad unaligned kernel)"
+ /* alpha */ "|(Forwarding unaligned exception)"
+ /* alpha */ "|(: unhandled unaligned exception)"
+ /* alpha */ "|(<sc)"
+ /* alpha */ "|(pc *=)"
+ /* alpha */ "|(r[0-9]+ *=)"
+ /* alpha */ "|(gp *=)"
/* any other alpha lines to print? */
+ /* sparc */ "|(tsk->)"
+ /* sparc */ "|(PSR: )"
+ /* sparc */ "|([goli][04]: )"
+ /* sparc */ "|(Instruction DUMP: )"
+ /* sparc */ "|(Caller\\[)"
+ /* any other sparc lines to print? */
+
+ /* sparc64 */ "|(TSTATE: )"
+ /* any other sparc64 lines to print? */
+
/* ppc */ "|(MSR: )"
/* ppc */ "|(TASK = )"
/* ppc */ "|(last math )"
@@ -908,13 +1065,13 @@ static int Oops_print(const char *line, const char **text, char ***string,
/* various */ "|(Aiee)" /* anywhere in text is a bad sign (TM) */
/* various */ "|(die_if_kernel)" /* ditto */
- /* sparc */ "|(\\([0-9]\\): Oops )"
- /* sparc */ "|(: memory violation)"
- /* sparc */ "|(: Exception at)"
- /* sparc */ "|(: Arithmetic fault)"
- /* sparc */ "|(: Instruction fault)"
- /* sparc */ "|(: arithmetic trap)"
- /* sparc */ "|(: unaligned trap)"
+ /* alpha */ "|(\\([0-9]\\): Oops )"
+ /* alpha */ "|(: memory violation)"
+ /* alpha */ "|(: Exception at)"
+ /* alpha */ "|(: Arithmetic fault)"
+ /* alpha */ "|(: Instruction fault)"
+ /* alpha */ "|(: arithmetic trap)"
+ /* alpha */ "|(: unaligned trap)"
/* sparc die_if_kernel has no fixed text, identify by (pid): text.
* Somebody has been playful with the texts.
@@ -976,7 +1133,7 @@ static const char *Oops_code(const char *line, char ***string, int string_max)
"(" /* 4 */
"(general protection.*)"
"|(<[0-9]+>)"
- "|(([<(]?[0-9a-fA-F]+[>)]?[ \t]*)+)"
+ "|(([<(]?[0-9a-fA-F]+[>)]?[ \t]+)+[<(]?[0-9a-fA-F]+[>)]?)"
")"
"(.*)$" /* trailing garbage */
,
@@ -1114,8 +1271,9 @@ int Oops_read(int filecount, char * const *filename, int code_bytes,
{
char *line = NULL, **string = NULL;
const char *start, *text;
- int i, size = 0, lineno = 0, lastprint = 0;
+ int i, size = 0, lineno = 0, lastprint = 0, print = 0;
elf_addr_t eip = 0;
+ int sparc_regdump = 0;
FILE *f;
SYMBOL_SET ss_format;
static const char procname[] = "Oops_read";
@@ -1138,7 +1296,19 @@ int Oops_read(int filecount, char * const *filename, int code_bytes,
fprintf(stderr,
"DEBUG: %s - %s\n", procname, line);
++lineno;
- if (Oops_print(line, &text, &string, MAX_STRINGS)) {
+ print = Oops_print(line, &text, &string, MAX_STRINGS);
+ if (Oops_sparc_regdump (text)) {
+ sparc_regdump = 1;
+ } else {
+ if ((oops_arch == OOPS_SPARC ||
+ oops_arch == OOPS_SPARC64) &&
+ sparc_regdump && ss_format.used) {
+ Oops_format(&ss_format);
+ ss_free(&ss_format);
+ }
+ sparc_regdump = 0;
+ }
+ if (print) {
puts(line);
lastprint = lineno;
if ((start = Oops_eip(text,
@@ -1147,6 +1317,10 @@ int Oops_read(int filecount, char * const *filename, int code_bytes,
if ((start = Oops_ra(text,
&string, MAX_STRINGS)))
Oops_set_ra(start, &ss_format);
+ if ((start = Oops_oi7(text,
+ &string, MAX_STRINGS)))
+ Oops_set_oi7(start, &string,
+ &ss_format);
if ((start = Oops_trace(text,
&string, MAX_STRINGS)))
Oops_trace_line(text, start,
@@ -1178,10 +1352,13 @@ int Oops_read(int filecount, char * const *filename, int code_bytes,
}
}
if (ss_format.used) {
- fprintf(stderr,
- "Warning, Code line not seen, dumping "
- "what data is available\n");
- ++warnings;
+ if ((oops_arch != OOPS_SPARC &&
+ oops_arch != OOPS_SPARC64) || !sparc_regdump) {
+ fprintf(stderr,
+ "Warning, Code line not seen, dumping "
+ "what data is available\n");
+ ++warnings;
+ }
Oops_format(&ss_format);
ss_free(&ss_format);
if (one_shot)
diff --git a/scripts/lxdialog/checklist.c b/scripts/lxdialog/checklist.c
index ad6102070..a1bf1f738 100644
--- a/scripts/lxdialog/checklist.c
+++ b/scripts/lxdialog/checklist.c
@@ -157,6 +157,14 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
diff --git a/scripts/lxdialog/inputbox.c b/scripts/lxdialog/inputbox.c
index 1d0200fa4..fa7bebc69 100644
--- a/scripts/lxdialog/inputbox.c
+++ b/scripts/lxdialog/inputbox.c
@@ -69,6 +69,14 @@ dialog_inputbox (const char *title, const char *prompt, int height, int width,
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
diff --git a/scripts/lxdialog/menubox.c b/scripts/lxdialog/menubox.c
index 638feee6d..d6dc07d40 100644
--- a/scripts/lxdialog/menubox.c
+++ b/scripts/lxdialog/menubox.c
@@ -189,6 +189,14 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
diff --git a/scripts/lxdialog/msgbox.c b/scripts/lxdialog/msgbox.c
index 19ae28c52..93692e1fb 100644
--- a/scripts/lxdialog/msgbox.c
+++ b/scripts/lxdialog/msgbox.c
@@ -43,6 +43,14 @@ dialog_msgbox (const char *title, const char *prompt, int height, int width,
draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
diff --git a/scripts/lxdialog/textbox.c b/scripts/lxdialog/textbox.c
index 415a42f87..ecf55410e 100644
--- a/scripts/lxdialog/textbox.c
+++ b/scripts/lxdialog/textbox.c
@@ -106,6 +106,14 @@ dialog_textbox (const char *title, const char *file, int height, int width)
wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
diff --git a/scripts/lxdialog/yesno.c b/scripts/lxdialog/yesno.c
index 6f40af645..11fcc25f5 100644
--- a/scripts/lxdialog/yesno.c
+++ b/scripts/lxdialog/yesno.c
@@ -63,6 +63,14 @@ dialog_yesno (const char *title, const char *prompt, int height, int width)
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
diff --git a/scripts/split-include b/scripts/split-include
new file mode 100755
index 000000000..2db6ca69f
--- /dev/null
+++ b/scripts/split-include
Binary files differ
diff --git a/scripts/tkgen.c b/scripts/tkgen.c
index d695b2e48..279072d78 100644
--- a/scripts/tkgen.c
+++ b/scripts/tkgen.c
@@ -89,6 +89,9 @@
* drives/net/Config.in and other places.
* - Fix menu line wraparound at 128 menus (some fool used a 'char' for
* a counter).
+ *
+ * 23 January 1999, Michael Elizabeth Chastain <mec@shout.net>
+ * - Remove bug-compatible code.
*/
#include <stdio.h>
@@ -749,11 +752,9 @@ void dump_tk_script( struct kconfig * scfg )
break;
case token_endmenu:
-#if ! defined(BUG_COMPATIBLE)
/* flatten menus with proper scoping */
if ( --menu_depth < 0 )
{ fprintf( stderr, "unmatched endmenu\n" ); exit( 1 ); }
-#endif
break;
case token_bool:
@@ -929,8 +930,11 @@ void dump_tk_script( struct kconfig * scfg )
case token_hex:
case token_int:
+ printf( "set %s %s\n", cfg->optionname, cfg->value ? cfg->value : "0");
+ break;
+
case token_string:
- printf( "set %s %s\n", cfg->optionname, cfg->value );
+ printf( "set %s \"%s\"\n", cfg->optionname, cfg->value ? cfg->value : "");
break;
}
}
diff --git a/scripts/tkparse.c b/scripts/tkparse.c
index 5bf317cdb..4b593fd0a 100644
--- a/scripts/tkparse.c
+++ b/scripts/tkparse.c
@@ -26,6 +26,9 @@
* every architecture and comparing it character-for-character against
* the output of the old tkparse.
*
+ * 23 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
+ * - Remove bug-compatible code.
+ *
* TO DO:
* - xconfig is at the end of its life cycle. Contact <mec@shout.net> if
* you are interested in working on the replacement.
@@ -434,25 +437,14 @@ static void tokenize_line( const char * pnt )
case token_define_bool:
pnt = get_string( pnt, &cfg->optionname );
-#if ! defined(BUG_COMPATIBLE)
while ( *pnt == ' ' || *pnt == '\t' )
pnt++;
-#endif
if ( *pnt == 'n' || *pnt == 'N' ) cfg->value = "0";
else if ( *pnt == 'y' || *pnt == 'Y' ) cfg->value = "1";
else if ( *pnt == 'm' || *pnt == 'M' ) cfg->value = "2";
else
{
-#if ! defined(BUG_COMPATIBLE)
syntax_error( "unknown define_bool value" );
-#else
- /*
- * This ought to give the same output as printf'ing
- * through the null pointer ... I don't want to be
- * SIGSEGV compatible!
- */
- cfg->value = "(null)";
-#endif
}
break;
@@ -504,12 +496,17 @@ static void tokenize_line( const char * pnt )
case token_hex:
case token_int:
- case token_string:
pnt = get_qstring ( pnt, &cfg->label );
pnt = get_string ( pnt, &cfg->optionname );
pnt = get_string ( pnt, &cfg->value );
break;
+ case token_string:
+ pnt = get_qstring ( pnt, &cfg->label );
+ pnt = get_string ( pnt, &cfg->optionname );
+ pnt = get_qstring ( pnt, &cfg->value );
+ break;
+
case token_if:
cfg->cond = tokenize_if( pnt );
break;
@@ -558,12 +555,7 @@ static void do_source( const char * filename )
if ( infile == NULL )
{
sprintf( buffer, "unable to open %s", filename );
-#if defined(BUG_COMPATIBLE)
- fprintf( stderr, "%s\n", buffer );
- return;
-#else
syntax_error( buffer );
-#endif
}
/* push the new file name and line number */
diff --git a/scripts/tkparse.h b/scripts/tkparse.h
index e2bca1950..0478effed 100644
--- a/scripts/tkparse.h
+++ b/scripts/tkparse.h
@@ -3,14 +3,6 @@
*/
/*
- * Define this symbol to generate exactly the same output, byte for byte,
- * as the previous version of xconfig. I need to do this to make sure I
- * I don't break anything in my moby edit. -- mec
- */
-
-#define BUG_COMPATIBLE
-
-/*
* Token types (mostly statement types).
*/
diff --git a/scripts/ver_linux b/scripts/ver_linux
index 42c582eab..4725ebfeb 100644
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -4,12 +4,11 @@
# /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
# differ on your system.
#
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
echo '-- Versions installed: (if some fields are empty or looks'
echo '-- unusual then possibly you have very old versions)'
uname -a
-insmod -V 1>/tmp/ver_linux.tmp 2>>/tmp/ver_linux.tmp
-awk 'NR==1{print "Kernel modules ",$NF}' /tmp/ver_linux.tmp
-rm -f /tmp/ver_linux.tmp
+insmod -V 2>&1 | awk 'NR==1 {print "Kernel modules ",$NF}'
echo "Gnu C " `gcc --version`
ld -v 2>&1 | awk -F\) '{print $1}' | awk \
'/BFD/{print "Binutils ",$NF}'
@@ -21,12 +20,11 @@ ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \
'{print "Linux C++ Library " $4"."$5"."$6}'
ps --version 2>&1 | awk 'NR==1{print "Procps ", $NF}'
mount --version | awk -F\- '{print "Mount ", $NF}'
-netstat --version | awk \
-'NR==1{if ($5 != "") { n=split($5,buf,"-"); ver=buf[n]; done=1 }}
- NR==2{if (done != 1) ver=$3 }
- END{print "Net-tools ",ver}'
+hostname -V 2>&1 | awk 'NR==1{print "Net-tools ", $NF}'
loadkeys -h 2>&1 | awk \
'(NR==1 && $3) {ver=$3}
(NR==2 && $1 ~ /console-tools/) {print "Console-tools ",$3; done=1}
END {if (!done) print "Kbd ",ver}'
expr --v | awk '{print "Sh-utils ", $NF}'
+X=`cat /proc/modules | sed -e "s/ .*$//"`
+echo "Modules Loaded "$X