diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-10-16 03:59:28 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-10-16 03:59:28 +0000 |
commit | 7f20726e4badbe62a3b6d45a2e61bd68ac1d4cd3 (patch) | |
tree | 67800699cd92e1f23279262668cca3c3469607db /sys/boot | |
parent | 7e705f54f8270b7ec5a3ef638bed161cbf0bd532 (diff) | |
download | src-test2-7f20726e4badbe62a3b6d45a2e61bd68ac1d4cd3.tar.gz src-test2-7f20726e4badbe62a3b6d45a2e61bd68ac1d4cd3.zip |
Notes
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/arm/uboot/Makefile | 6 | ||||
-rw-r--r-- | sys/boot/efi/boot1/Makefile | 4 | ||||
-rw-r--r-- | sys/boot/efi/loader/Makefile | 4 | ||||
-rw-r--r-- | sys/boot/i386/loader/Makefile | 6 | ||||
-rw-r--r-- | sys/boot/loader.mk (renamed from sys/boot/common/Makefile.inc) | 13 | ||||
-rw-r--r-- | sys/boot/mips/beri/loader/Makefile | 10 | ||||
-rw-r--r-- | sys/boot/mips/uboot/Makefile | 6 | ||||
-rw-r--r-- | sys/boot/powerpc/kboot/Makefile | 8 | ||||
-rw-r--r-- | sys/boot/powerpc/ofw/Makefile | 8 | ||||
-rw-r--r-- | sys/boot/powerpc/ps3/Makefile | 8 | ||||
-rw-r--r-- | sys/boot/powerpc/uboot/Makefile | 8 | ||||
-rw-r--r-- | sys/boot/sparc64/loader/Makefile | 6 | ||||
-rw-r--r-- | sys/boot/userboot/userboot/Makefile | 5 |
13 files changed, 38 insertions, 54 deletions
diff --git a/sys/boot/arm/uboot/Makefile b/sys/boot/arm/uboot/Makefile index 990c78d48d35..ba56279b0f8b 100644 --- a/sys/boot/arm/uboot/Makefile +++ b/sys/boot/arm/uboot/Makefile @@ -90,9 +90,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" CFLAGS+= -I. CLEANFILES+= loader.help @@ -124,7 +122,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} ldscript.abs: echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} diff --git a/sys/boot/efi/boot1/Makefile b/sys/boot/efi/boot1/Makefile index 95508df8bbd9..6375a796886f 100644 --- a/sys/boot/efi/boot1/Makefile +++ b/sys/boot/efi/boot1/Makefile @@ -53,9 +53,7 @@ CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" .PATH: ${.CURDIR}/arch/${MACHINE} diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile index 89a58f7c31c2..006e544f19e3 100644 --- a/sys/boot/efi/loader/Makefile +++ b/sys/boot/efi/loader/Makefile @@ -103,9 +103,7 @@ CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" FILES+= loader.efi FILESMODE_loader.efi= ${BINMODE} diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile index 034b77536baf..b5b169e2717c 100644 --- a/sys/boot/i386/loader/Makefile +++ b/sys/boot/i386/loader/Makefile @@ -72,9 +72,7 @@ CFLAGS+= -I${.CURDIR}/../../.. -D_STAND .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" CFLAGS+= -I. CLEANFILES= ${LOADER} ${LOADER}.bin loader.help @@ -104,7 +102,7 @@ ${LOADER}.bin: ${LOADER}.sym strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC} loader.help: help.common help.i386 - cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + cat ${.ALLSRC} | awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} FILES= ${LOADER} # XXX INSTALLFLAGS_loader= -b diff --git a/sys/boot/common/Makefile.inc b/sys/boot/loader.mk index 867035907a99..bf241a127526 100644 --- a/sys/boot/common/Makefile.inc +++ b/sys/boot/loader.mk @@ -1,6 +1,11 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/boot/common ${SRCTOP}/sys/boot/libsa +BOOTDIR=${SRCTOP}/sys/boot +LDR_MI=${BOOTDIR}/common + +.PATH: ${LDR_MI} ${BOOTDIR}/libsa + +CFLAGS+=-I${LDR_MI} SRCS+= boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c @@ -62,7 +67,7 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c -.include "../ficl.mk" +.include "${BOOTDIR}/ficl.mk" .endif .if defined(BOOT_PROMPT_123) @@ -78,6 +83,6 @@ VERSION_FILE?= ${.CURDIR}/version .if ${MK_REPRODUCIBLE_BUILD} != no REPRO_FLAG= -r .endif -vers.c: ${SRCTOP}/sys/boot/common/newvers.sh ${VERSION_FILE} - sh ${SRCTOP}/sys/boot/common/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \ +vers.c: ${LDR_MI}/newvers.sh ${VERSION_FILE} + sh ${LDR_MI}/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \ ${NEWVERSWHAT} diff --git a/sys/boot/mips/beri/loader/Makefile b/sys/boot/mips/beri/loader/Makefile index 1bdf5a99351a..aec550cc038c 100644 --- a/sys/boot/mips/beri/loader/Makefile +++ b/sys/boot/mips/beri/loader/Makefile @@ -76,14 +76,8 @@ CFLAGS+= -I${.CURDIR}/../../../ficl/mips64 LIBFICL= ${.OBJDIR}/../../../ficl/libficl.a .endif -# Common code across BERI boot loader parts -.PATH: ${.CURDIR}/../common -CFLAGS+= -I${.CURDIR}/../common - # Always add MI sources -.PATH: ${.CURDIR}/../../../common -.include "${.CURDIR}/../../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../../common +.include "../../../loader.mk" # BERI files common to boot2 and loader .PATH: ${.CURDIR}/../common @@ -112,7 +106,7 @@ LDADD= ${LIBFICL} ${LIBSA} loader.help: help.common help.mips cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../../forth .include "${.CURDIR}/../../../forth/Makefile.inc" diff --git a/sys/boot/mips/uboot/Makefile b/sys/boot/mips/uboot/Makefile index 86a07a7e6a02..3efafafe23af 100644 --- a/sys/boot/mips/uboot/Makefile +++ b/sys/boot/mips/uboot/Makefile @@ -94,9 +94,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" CFLAGS+= -I. CLEANFILES+= loader.help @@ -126,7 +124,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} ldscript.abs: echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} diff --git a/sys/boot/powerpc/kboot/Makefile b/sys/boot/powerpc/kboot/Makefile index c42267bf0930..f5767f972ac9 100644 --- a/sys/boot/powerpc/kboot/Makefile +++ b/sys/boot/powerpc/kboot/Makefile @@ -72,9 +72,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a CFLAGS+= -mcpu=powerpc64 # Always add MI sources -.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. +.include "../../loader.mk" +.PATH: ${.CURDIR}/../../../libkern +CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= loader.help @@ -98,7 +98,7 @@ LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile index 458d7dd237b5..b170812559f6 100644 --- a/sys/boot/powerpc/ofw/Makefile +++ b/sys/boot/powerpc/ofw/Makefile @@ -69,9 +69,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. +.include "../../loader.mk" +.PATH: ${.CURDIR}/../../../libkern +CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= loader.help @@ -96,7 +96,7 @@ LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" diff --git a/sys/boot/powerpc/ps3/Makefile b/sys/boot/powerpc/ps3/Makefile index 4df5b4196030..f6b3d41c2b98 100644 --- a/sys/boot/powerpc/ps3/Makefile +++ b/sys/boot/powerpc/ps3/Makefile @@ -72,9 +72,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a CFLAGS+= -mcpu=powerpc64 # Always add MI sources -.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. +.include "../../loader.mk" +.PATH: ${.CURDIR}/../../../libkern +CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= loader.help @@ -100,7 +100,7 @@ font.h: loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile index c153719b5fc8..5a88546d5ce3 100644 --- a/sys/boot/powerpc/uboot/Makefile +++ b/sys/boot/powerpc/uboot/Makefile @@ -75,9 +75,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. +.include "../../loader.mk" +.PATH: ${.CURDIR}/../../../libkern +CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= ${PROG}.help @@ -101,7 +101,7 @@ LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth FILES= loader.help diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile index bc7b870ae5b2..4825a76ddd6b 100644 --- a/sys/boot/sparc64/loader/Makefile +++ b/sys/boot/sparc64/loader/Makefile @@ -66,9 +66,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" CFLAGS+= -I. CLEANFILES+= loader.help @@ -87,7 +85,7 @@ LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} loader.help: help.common help.sparc64 cat ${.ALLSRC} | \ - awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} + awk -f ${LDR_MI}/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" diff --git a/sys/boot/userboot/userboot/Makefile b/sys/boot/userboot/userboot/Makefile index 3f5dcace6162..9a8963c9ed65 100644 --- a/sys/boot/userboot/userboot/Makefile +++ b/sys/boot/userboot/userboot/Makefile @@ -30,7 +30,6 @@ SRCS+= vers.c CFLAGS+= -Wall CFLAGS+= -I${.CURDIR}/.. -CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -ffreestanding -I. @@ -54,9 +53,7 @@ LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common -.include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +.include "../../loader.mk" CFLAGS+= -I. DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA} LDADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA} |