diff --git a/romimages/RON_VIA_SPD/Makefile b/romimages/RON_VIA_SPD/Makefile index e32c52596d..6454505b12 100644 --- a/romimages/RON_VIA_SPD/Makefile +++ b/romimages/RON_VIA_SPD/Makefile @@ -48,7 +48,6 @@ floppy: all # can put it on the floppy (see ROOTDOIT) romimage: linuxbios.rom vmlinux.bin.gz.block cat vmlinux.bin.gz.block linuxbios.rom > romimage - cp romimage /tmp linuxbios.rom: linuxbios.strip mkrom ./mkrom -s 64 -f -o linuxbios.rom linuxbios.strip diff --git a/src/cpu/p6/mtrr.c b/src/cpu/p6/mtrr.c index e7553d05c6..91a0037df1 100644 --- a/src/cpu/p6/mtrr.c +++ b/src/cpu/p6/mtrr.c @@ -28,7 +28,7 @@ #ifndef lint static char rcsid[] = "$Id$"; #endif -#define DEBUG + #include #include #include diff --git a/src/include/pci-i386.h b/src/include/pci-i386.h index a7fc20ada2..a71909ced2 100644 --- a/src/include/pci-i386.h +++ b/src/include/pci-i386.h @@ -6,14 +6,6 @@ * (c) 1999 Martin Mares */ -#undef DEBUG - -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif - #define PCI_PROBE_BIOS 1 #define PCI_PROBE_CONF1 2 #define PCI_PROBE_CONF2 4 diff --git a/src/include/string.h b/src/include/string.h index a8542665c6..63be07241d 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -4,10 +4,38 @@ //extern inline void strcpy(char *dst, char *src) {while (*src) *dst++ = *src++;} //extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;} + +#if 1 extern inline int strnlen(const char *src, int max) { int i = 0; - while ((*src++) && (i < max)) - i++; - return i; + if (max<0) { + while (*src++) + i++; + return i; + } + else { + while ((*src++) && (i < max)) + i++; + return i; + } } - +#else +static inline size_t strnlen(const char * s, size_t count) +{ +int d0; +register int __res; +__asm__ __volatile__( + "movl %2,%0\n\t" + "jmp 2f\n" + "1:\tcmpb $0,(%0)\n\t" + "je 3f\n\t" + "incl %0\n" + "2:\tdecl %1\n\t" + "cmpl $-1,%1\n\t" + "jne 1b\n" + "3:\tsubl %2,%0" + :"=a" (__res), "=&d" (d0) + :"c" (s),"1" (count)); +return __res; +} +#endif diff --git a/src/mainboard/gigabit/ga-6bxc/mainboard.c b/src/mainboard/gigabit/ga-6bxc/mainboard.c index d0a6d68a55..627d87da60 100644 --- a/src/mainboard/gigabit/ga-6bxc/mainboard.c +++ b/src/mainboard/gigabit/ga-6bxc/mainboard.c @@ -6,3 +6,7 @@ void mainboard_fixup() { } + +void final_mainboard_fixup() +{ +} diff --git a/src/southbridge/intel/piix4e/southbridge.c b/src/southbridge/intel/piix4e/southbridge.c index 7ffe7eec20..c5bb513240 100644 --- a/src/southbridge/intel/piix4e/southbridge.c +++ b/src/southbridge/intel/piix4e/southbridge.c @@ -30,6 +30,11 @@ void nvram_on() // for now, I am putting in the old keyboard code, until we figure out // the best way to do this -- RGM +#ifdef NO_KEYBOARD +void keyboard_on() +{ +} +#else void keyboard_on() { u32 controlbits; @@ -70,5 +75,5 @@ void keyboard_on() /* now keyboard should work, ha ha. */ pc_keyboard_init(); - } +#endif diff --git a/util/config/NLBConfig.py b/util/config/NLBConfig.py index 876be7d7fe..f214c7403a 100644 --- a/util/config/NLBConfig.py +++ b/util/config/NLBConfig.py @@ -22,6 +22,7 @@ linuxbiosbase = 0xf0000; objectrules = []; userrules = []; +userdefines = []; # this is the absolute base rule, and so is very special. mainrulelist = "all" @@ -191,16 +192,16 @@ def adddepend(dir, rule): makebaserules[rulename][0] = makebaserules[rulename][0] + " " + depend def makedefine(dir, rule): - userrules.append(rule) + userdefines.append(rule) + def option(dir, option): - makeoptions[option] = 1; + makeoptions[option] = "-D" + option def nooption(dir, option): - makeoptions[option] = 0; + makeoptions[option] = "-U" + option def commandline(dir, command): - rule = "CMD_LINE=\'\"" + command + "\"\'" - makedefine(dir, rule) + makeoptions["CMD_LINE"] = "-DCMD_LINE=\'\"" + command + "\"\'" # we do all these rules by hand because docipl will always be special # it's more or less a stand-alone bootstrap @@ -406,10 +407,8 @@ def writemakefile(path): file.write("TOP=%s\n" % (treetop)) file.write("CPUFLAGS=\n") for z in makeoptions.keys(): - if (makeoptions[z]): - file.write("CPUFLAGS += -D%s\n" % (z)) - else: - file.write("CPUFLAGS += -U%s\n" % (z)) + print "key is %s, val %s\n" % (z, makeoptions[z]) + file.write("CPUFLAGS += %s\n" % (makeoptions[z])) # print out all the object dependencies # There is ALWAYS a crt0.o @@ -417,14 +416,20 @@ def writemakefile(path): for i in range(len(objectrules)): file.write("OBJECTS += %s\n" % (objectrules[i][0])) - # print out the base rules + # print out the user defines + for i in range(len(userdefines)): + print "rule %d is %s" % (i, userdefines[i]) + file.write("%s\n" % userdefines[i]) + + # print out the base rules # need to have a rule that counts on 'all' file.write("mainrule: %s\n" % mainrulelist) # for i in range(len(baserules)): # file.write("%s\n" % baserules[i]) for i in range(len(userrules)): + print "rule %d is %s" % (i, userrules[i]) file.write("%s\n" % userrules[i]) # print out any user rules