U-Boot: Fix linking the kernel by adding FDT support

Add FDT support to the kernel,
move fdt_support.cpp and declare gFDT there for the kernel.
This commit is contained in:
François Revol
2012-11-06 19:43:12 +01:00
parent 3b4ba8d607
commit 2d014a2886
3 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -248,7 +248,7 @@ Depends haiku-mmc-image : haiku-$(HAIKU_BOOT_BOARD).mmc ;
SEARCH on [ FGristFiles $(genericPlatformSources) ]
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
SEARCH on [ FGristFiles openfirmware.cpp ]
SEARCH on [ FGristFiles openfirmware.cpp fdt_support.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel platform u-boot ] ;
SEARCH on [ FGristFiles $(libFDTSources) ]
+15
View File
@@ -5,7 +5,22 @@ SubDirC++Flags $(TARGET_KERNEL_PIC_CCFLAGS) ;
UseLibraryHeaders [ FDirName libfdt ] ;
local libFDTSources =
fdt.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
;
KernelMergeObject kernel_platform_u-boot.o :
platform.cpp
fdt_support.cpp
openfirmware.cpp
$(libFDTSources)
;
SEARCH on [ FGristFiles $(libFDTSources) ]
= [ FDirName $(HAIKU_TOP) src libs libfdt ] ;
@@ -15,6 +15,10 @@ extern "C" {
#include <libfdt_env.h>
};
#ifndef _BOOT_MODE
/* the bootloader has it in asm code to avoid it ending up in .bss */
void *gFDT;
#endif
extern "C" void dump_fdt(const void *fdt);