diff --git a/src/system/boot/platform/u-boot/Jamfile b/src/system/boot/platform/u-boot/Jamfile index 7641bea93c..a2cea4405b 100644 --- a/src/system/boot/platform/u-boot/Jamfile +++ b/src/system/boot/platform/u-boot/Jamfile @@ -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) ] diff --git a/src/system/kernel/platform/u-boot/Jamfile b/src/system/kernel/platform/u-boot/Jamfile index b9604505c7..dbadd8cbcb 100644 --- a/src/system/kernel/platform/u-boot/Jamfile +++ b/src/system/kernel/platform/u-boot/Jamfile @@ -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 ] ; + diff --git a/src/system/boot/platform/u-boot/fdt_support.cpp b/src/system/kernel/platform/u-boot/fdt_support.cpp similarity index 96% rename from src/system/boot/platform/u-boot/fdt_support.cpp rename to src/system/kernel/platform/u-boot/fdt_support.cpp index d0ac350ae8..fe05f6f9ad 100644 --- a/src/system/boot/platform/u-boot/fdt_support.cpp +++ b/src/system/kernel/platform/u-boot/fdt_support.cpp @@ -15,6 +15,10 @@ extern "C" { #include }; +#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);