svn commit: r324876 - in head/sys/boot: . arm/uboot mips/uboot powerpc/uboot uboot/common
Warner Losh
imp at FreeBSD.org
Sun Oct 22 22:49:53 UTC 2017
Author: imp
Date: Sun Oct 22 22:49:51 2017
New Revision: 324876
URL: https://svnweb.freebsd.org/changeset/base/324876
Log:
Move fdt and uboot defines into common uboot.mk.
Sponsored by: Netflix
Added:
head/sys/boot/uboot.mk (contents, props changed)
Deleted:
head/sys/boot/uboot/common/Makefile.inc
Modified:
head/sys/boot/arm/uboot/Makefile
head/sys/boot/defs.mk
head/sys/boot/mips/uboot/Makefile
head/sys/boot/powerpc/uboot/Makefile
Modified: head/sys/boot/arm/uboot/Makefile
==============================================================================
--- head/sys/boot/arm/uboot/Makefile Sun Oct 22 22:05:37 2017 (r324875)
+++ head/sys/boot/arm/uboot/Makefile Sun Oct 22 22:49:51 2017 (r324876)
@@ -30,14 +30,6 @@ LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
-.if ${LOADER_FDT_SUPPORT} == "yes"
-CFLAGS+= -I${.CURDIR}/../../fdt
-CFLAGS+= -I${.OBJDIR}/../../fdt
-CFLAGS+= -DLOADER_FDT_SUPPORT
-LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a
-LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
-.endif
-
# Always add MI sources
.include "../../loader.mk"
CFLAGS+= -I.
@@ -50,19 +42,9 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MA
LDFLAGS+= -Wl,-znotext
# Pull in common loader code
-.PATH: ${.CURDIR}/../../uboot/common
-.include "${.CURDIR}/../../uboot/common/Makefile.inc"
-CFLAGS+= -I${.CURDIR}/../../uboot/common
+.include "../../uboot.mk"
-# U-Boot standalone support library
-LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a
-CFLAGS+= -I${.CURDIR}/../../uboot/lib
-CFLAGS+= -I${.OBJDIR}/../../uboot/lib
-
CFLAGS+= -fPIC
-
-# clang doesn't understand %D as a specifier to printf
-NO_WERROR.clang=
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
Modified: head/sys/boot/defs.mk
==============================================================================
--- head/sys/boot/defs.mk Sun Oct 22 22:05:37 2017 (r324875)
+++ head/sys/boot/defs.mk Sun Oct 22 22:49:51 2017 (r324876)
@@ -10,6 +10,8 @@ FICLDIR= ${BOOTDIR}/ficl
LDR_MI= ${BOOTDIR}/common
SASRC= ${BOOTDIR}/libsa
SYSDIR= ${SRCTOP}/sys
+FDTSRC= ${BOOTDIR}/fdt
+UBOOTSRC= ${BOOTDIR}/uboot
BOOTOBJ= ${OBJTOP}/sys/boot
Modified: head/sys/boot/mips/uboot/Makefile
==============================================================================
--- head/sys/boot/mips/uboot/Makefile Sun Oct 22 22:05:37 2017 (r324875)
+++ head/sys/boot/mips/uboot/Makefile Sun Oct 22 22:49:51 2017 (r324876)
@@ -26,14 +26,6 @@ LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
-.if ${LOADER_FDT_SUPPORT} == "yes"
-CFLAGS+= -I${.CURDIR}/../../fdt
-CFLAGS+= -I${.OBJDIR}/../../fdt
-CFLAGS+= -DLOADER_FDT_SUPPORT
-LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a
-LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
-.endif
-
# Always add MI sources
.include "../../loader.mk"
CFLAGS+= -I.
@@ -44,19 +36,7 @@ CFLAGS+= -ffreestanding -msoft-float -g
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
-# Pull in common loader code
-.PATH: ${.CURDIR}/../../uboot/common
-.include "${.CURDIR}/../../uboot/common/Makefile.inc"
-CFLAGS+= -I${.CURDIR}/../../uboot/common
-
-# U-Boot standalone support library
-LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a
-CFLAGS+= -I${.CURDIR}/../../uboot/lib
-CFLAGS+= -I${.OBJDIR}/../../uboot/lib
-
-# clang doesn't understand %D as a specifier to printf
-#NO_WERROR.clang=
-#NO_WERROR=
+.include "../../uboot.mk"
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
Modified: head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/uboot/Makefile Sun Oct 22 22:05:37 2017 (r324875)
+++ head/sys/boot/powerpc/uboot/Makefile Sun Oct 22 22:49:51 2017 (r324876)
@@ -22,14 +22,6 @@ LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
-.if ${LOADER_FDT_SUPPORT} == "yes"
-CFLAGS+= -I${.CURDIR}/../../fdt
-CFLAGS+= -I${.OBJDIR}/../../fdt
-CFLAGS+= -DLOADER_FDT_SUPPORT
-LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a
-LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
-.endif
-
# Always add MI sources
.include "../../loader.mk"
.PATH: ${.CURDIR}/../../../libkern
@@ -42,15 +34,7 @@ CFLAGS+= -ffreestanding
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
-# Pull in common loader code
-.PATH: ${.CURDIR}/../../uboot/common
-.include "${.CURDIR}/../../uboot/common/Makefile.inc"
-CFLAGS+= -I${.CURDIR}/../../uboot/common
-
-# U-Boot standalone support library
-LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a
-CFLAGS+= -I${.CURDIR}/../../uboot/lib
-CFLAGS+= -I${.OBJDIR}/../../uboot/lib
+.include "../../uboot.mk"
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
Added: head/sys/boot/uboot.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sys/boot/uboot.mk Sun Oct 22 22:49:51 2017 (r324876)
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+SRCS+= main.c metadata.c
+
+.PATH: ${UBOOTSRC}/common
+
+CFLAGS+= -I${UBOOTSRC}/common
+
+# U-Boot standalone support library
+LIBUBOOT= ${BOOTOBJ}/uboot/lib/libuboot.a
+CFLAGS+= -I${UBOOTSRC}/lib
+CFLAGS+= -I${BOOTOBJ}/uboot/lib
+
+.if ${LOADER_FDT_SUPPORT} == "yes"
+CFLAGS+= -I${FDTSRC}
+CFLAGS+= -I${BOOTOBJ}/fdt
+CFLAGS+= -DLOADER_FDT_SUPPORT
+LIBUBOOT_FDT= ${BOOTOBJ}/uboot/fdt/libuboot_fdt.a
+LIBFDT= ${BOOTOBJ}/fdt/libfdt.a
+.endif
More information about the svn-src-all
mailing list