mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Fixes to get it to build.
This builds but dependencies need work; it takes a few make -k passes :-) Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@80 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
417311203a
commit
61d24531e5
3 changed files with 23 additions and 3 deletions
|
@ -62,7 +62,7 @@ $(obj)/linuxbios.stage2: $(obj)/stage0.init $(obj)/statictree.o
|
|||
$(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/mem.c -o $(obj)/mem.o
|
||||
$(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/malloc.c -o $(obj)/malloc.o
|
||||
$(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/clog2.c -o $(obj)/clog2.o
|
||||
$(Q)$(CC) $(INITCFLAGS) -c -I$(src) $(src)/statictree.c -o $(obj)/statictree.o
|
||||
$(Q)$(CC) $(INITCFLAGS) -c -I$(src) $(obj)/statictree.c -o $(obj)/statictree.o
|
||||
$(Q)$(CC) $(INITCFLAGS) -c mainboard/$(MAINBOARDDIR)/mainboard.c -o $(obj)/mainboard.o
|
||||
|
||||
# leave a .o with full symbols in it for debugging.
|
||||
|
|
|
@ -307,3 +307,23 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args
|
|||
return count;
|
||||
}
|
||||
|
||||
/* very gross simple thing that is non-reentrant. This should not matter though. */
|
||||
static unsigned char *ssp;
|
||||
static void stxbyte(unsigned char byte)
|
||||
{
|
||||
*ssp++ = byte;
|
||||
}
|
||||
|
||||
int sprintf(char *str, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
int i;
|
||||
|
||||
ssp = (unsigned char *) str;
|
||||
va_start(args, format);
|
||||
i = vtxprintf(stxbyte, format, args);
|
||||
va_end(args);
|
||||
|
||||
return i;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ $(obj)/linuxbios.vpd:
|
|||
# this is going to be the init ram code:
|
||||
#
|
||||
|
||||
$(obj)/linuxbios.initram: $(obj)/stage0.init
|
||||
$(obj)/linuxbios.initram: $(obj)/stage0.o
|
||||
$(Q)echo Building linuxbios.initram
|
||||
#
|
||||
# main
|
||||
|
@ -49,7 +49,7 @@ $(obj)/linuxbios.initram: $(obj)/stage0.init
|
|||
#cd $(obj); $(Q)$(LD) -Ttext 0x00000000 -s --oformat binary initram.o console.o uart8250.o \
|
||||
# serial.o vtxprintf.o -o $(obj)/linuxbios.initram
|
||||
|
||||
$(Q)$(LD) -R stage0.o -Ttext 0x80000 $(obj)/initram.o \
|
||||
$(Q)$(LD) -R $(obj)/stage0.o -Ttext 0x80000 $(obj)/initram.o \
|
||||
-o $(obj)/linuxbios.initram.o
|
||||
|
||||
$(Q)objcopy -O binary $(obj)/linuxbios.initram.o $(obj)/linuxbios.initram
|
||||
|
|
Loading…
Add table
Reference in a new issue