Move fdt and uboot defines into common uboot.mk.
Sponsored by: Netflix
This commit is contained in:
parent
ca37b93652
commit
ee4a355671
@ -30,14 +30,6 @@ LOADER_GZIP_SUPPORT?= no
|
|||||||
LOADER_BZIP2_SUPPORT?= no
|
LOADER_BZIP2_SUPPORT?= no
|
||||||
LOADER_FDT_SUPPORT= ${MK_FDT}
|
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
|
# Always add MI sources
|
||||||
.include "../../loader.mk"
|
.include "../../loader.mk"
|
||||||
CFLAGS+= -I.
|
CFLAGS+= -I.
|
||||||
@ -50,20 +42,10 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
|
|||||||
LDFLAGS+= -Wl,-znotext
|
LDFLAGS+= -Wl,-znotext
|
||||||
|
|
||||||
# Pull in common loader code
|
# Pull in common loader code
|
||||||
.PATH: ${.CURDIR}/../../uboot/common
|
.include "../../uboot.mk"
|
||||||
.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
|
|
||||||
|
|
||||||
CFLAGS+= -fPIC
|
CFLAGS+= -fPIC
|
||||||
|
|
||||||
# clang doesn't understand %D as a specifier to printf
|
|
||||||
NO_WERROR.clang=
|
|
||||||
|
|
||||||
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
||||||
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ FICLDIR= ${BOOTDIR}/ficl
|
|||||||
LDR_MI= ${BOOTDIR}/common
|
LDR_MI= ${BOOTDIR}/common
|
||||||
SASRC= ${BOOTDIR}/libsa
|
SASRC= ${BOOTDIR}/libsa
|
||||||
SYSDIR= ${SRCTOP}/sys
|
SYSDIR= ${SRCTOP}/sys
|
||||||
|
FDTSRC= ${BOOTDIR}/fdt
|
||||||
|
UBOOTSRC= ${BOOTDIR}/uboot
|
||||||
|
|
||||||
BOOTOBJ= ${OBJTOP}/sys/boot
|
BOOTOBJ= ${OBJTOP}/sys/boot
|
||||||
|
|
||||||
|
@ -26,14 +26,6 @@ LOADER_GZIP_SUPPORT?= no
|
|||||||
LOADER_BZIP2_SUPPORT?= no
|
LOADER_BZIP2_SUPPORT?= no
|
||||||
LOADER_FDT_SUPPORT= ${MK_FDT}
|
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
|
# Always add MI sources
|
||||||
.include "../../loader.mk"
|
.include "../../loader.mk"
|
||||||
CFLAGS+= -I.
|
CFLAGS+= -I.
|
||||||
@ -44,19 +36,7 @@ CFLAGS+= -ffreestanding -msoft-float -g
|
|||||||
|
|
||||||
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
|
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
|
||||||
|
|
||||||
# Pull in common loader code
|
.include "../../uboot.mk"
|
||||||
.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=
|
|
||||||
|
|
||||||
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
||||||
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
|
||||||
|
@ -22,14 +22,6 @@ LOADER_GZIP_SUPPORT?= no
|
|||||||
LOADER_BZIP2_SUPPORT?= no
|
LOADER_BZIP2_SUPPORT?= no
|
||||||
LOADER_FDT_SUPPORT= ${MK_FDT}
|
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
|
# Always add MI sources
|
||||||
.include "../../loader.mk"
|
.include "../../loader.mk"
|
||||||
.PATH: ${.CURDIR}/../../../libkern
|
.PATH: ${.CURDIR}/../../../libkern
|
||||||
@ -42,15 +34,7 @@ CFLAGS+= -ffreestanding
|
|||||||
|
|
||||||
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
|
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
|
||||||
|
|
||||||
# Pull in common loader code
|
.include "../../uboot.mk"
|
||||||
.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
|
|
||||||
|
|
||||||
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
|
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
|
||||||
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
|
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
|
||||||
|
20
sys/boot/uboot.mk
Normal file
20
sys/boot/uboot.mk
Normal file
@ -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
|
@ -1,3 +0,0 @@
|
|||||||
# $FreeBSD$
|
|
||||||
|
|
||||||
SRCS+= main.c metadata.c
|
|
Loading…
Reference in New Issue
Block a user