Page MenuHomeFreeBSD

D33514.diff
No OneTemporary

D33514.diff

diff --git a/stand/Makefile b/stand/Makefile
--- a/stand/Makefile
+++ b/stand/Makefile
@@ -80,8 +80,10 @@
SUBDIR_DEPEND_lua+= liblua
SUBDIR_DEPEND_efi+= ${INTERP_DEPENDS}
+SUBDIR_DEPEND_kboot+= ${INTERP_DEPENDS}
.if ${MK_FDT} != "no"
SUBDIR_DEPEND_efi+= fdt
+SUBDIR_DEPEND_kboot+= fdt
.endif
SUBDIR_DEPEND_uboot+= ${INTERP_DEPENDS}
diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile
--- a/stand/kboot/Makefile
+++ b/stand/kboot/Makefile
@@ -17,30 +17,23 @@
INSTALLFLAGS= -b
# Architecture-specific loader code
-SRCS= conf.c vers.c main.c ppc64_elf_freebsd.c
-SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c
-SRCS+= ucmpdi2.c gfx_fb_stub.c
+SRCS= vers.c main.c hostcons.c hostdisk.c kbootfdt.c gfx_fb_stub.c
CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
.include "${BOOTSRC}/fdt.mk"
-CFLAGS+= -mcpu=powerpc64
+.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
+.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern
+CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
-CFLAGS+= -Wall -DAIM
-# load address. set in linker script
-RELOC?= 0x0
-CFLAGS+= -DRELOC=${RELOC}
-
-LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
+CFLAGS+= -Wall
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
-MK_PIE= no
-
.include <bsd.prog.mk>
diff --git a/stand/kboot/arch/powerpc64/Makefile.inc b/stand/kboot/arch/powerpc64/Makefile.inc
new file mode 100644
--- /dev/null
+++ b/stand/kboot/arch/powerpc64/Makefile.inc
@@ -0,0 +1,14 @@
+CFLAGS+= -mcpu=powerpc64
+
+SRCS+= conf.c ppc64_elf_freebsd.c host_syscall.S kerneltramp.S
+SRCS+= ucmpdi2.c
+
+# load address. set in linker script
+RELOC?= 0x0
+CFLAGS+= -DRELOC=${RELOC}
+
+LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.powerpc
+
+MK_PIE= no
+# Maybe bogus?
+CFLAGS+= -DAIM
diff --git a/stand/kboot/conf.c b/stand/kboot/arch/powerpc64/conf.c
rename from stand/kboot/conf.c
rename to stand/kboot/arch/powerpc64/conf.c
diff --git a/stand/kboot/host_syscall.S b/stand/kboot/arch/powerpc64/host_syscall.S
rename from stand/kboot/host_syscall.S
rename to stand/kboot/arch/powerpc64/host_syscall.S
diff --git a/stand/kboot/kerneltramp.S b/stand/kboot/arch/powerpc64/kerneltramp.S
rename from stand/kboot/kerneltramp.S
rename to stand/kboot/arch/powerpc64/kerneltramp.S
diff --git a/stand/kboot/ldscript.powerpc b/stand/kboot/arch/powerpc64/ldscript.powerpc
rename from stand/kboot/ldscript.powerpc
rename to stand/kboot/arch/powerpc64/ldscript.powerpc
diff --git a/stand/kboot/ppc64_elf_freebsd.c b/stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c
rename from stand/kboot/ppc64_elf_freebsd.c
rename to stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 2:49 PM (18 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17884062
Default Alt Text
D33514.diff (2 KB)

Event Timeline