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:
@@ -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) ]
|
||||
|
||||
@@ -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 ] ;
|
||||
|
||||
|
||||
+4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user