From nobody Wed Dec 15 04:15:16 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C2BEE18DF8B4; Wed, 15 Dec 2021 04:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JDMNN3lbgz3Dnb; Wed, 15 Dec 2021 04:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D1BA15924; Wed, 15 Dec 2021 04:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BF4FGOi021652; Wed, 15 Dec 2021 04:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BF4FGfh021651; Wed, 15 Dec 2021 04:15:16 GMT (envelope-from git) Date: Wed, 15 Dec 2021 04:15:16 GMT Message-Id: <202112150415.1BF4FGfh021651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9dc70af83e59 - main - stand/uboot: reorg List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dc70af83e5992e543542adbf5a6edeb38f187f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639541716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8oaV6uQFkNOGwAlcPc77RGfLlvSyGNIAeAH9/QeDPa4=; b=Oo5L1/9ukDlpMDbQM6lf0Kl+vUNuXemz63njYCsG5I5r3VhgNs3fILhh7I/kQ6ch5udr7S MrrI056vlfTGzChKLodYoR4paZkF1SFh3bN2IzZHewXXtwSXkCbRzjmoX7QJ8eY3UQtQK9 rrUjr/qmGgwqvQsgrDOHeAb8soD7zIGlseuc4Bk+edhPhDuIM+Ar53Gm0ZKqBDN5nCs1ME 5NjYPmRqsGUgKa9gJAmZ3eEYhmcSlF5VNNYUOSQxFfpcuFNMtkzZWW1Px1JELM502mmiN5 goobPNAKPiMIlTajdn6RDFw796UpLTGrrK1WG5f0uL2qrFLzvPrQmvF4Ny0n/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639541716; a=rsa-sha256; cv=none; b=Fny26rSDoW9mm999HWJG/4Dce5ZfhNCm3HuTznU0ai+Oxgx3qVRseQoWMAM7qODqJHLjfB vXAzRjR5ms6HDKkR2fPTqts+Rc3bHED5SKmaaY1RVvOZRsio3WqAeF/D5KI3rgWFhXRlLz aqD9Tuyjvr2b57/m1R1xoNG0yS1/xZlsjSwQyvt0fzfzSJ2gzc9giFrO/HoeHQVmmIngWu Sdx0nIwOvcS4GReIAlpQKU/v5z8OV7EUvozyU9q9BYPAkvL5sDEXRODO2t5+JfFkUjs6wz QYtBXosegzmzgc38SU0+VOLbZPqyPYjdHBXTtMcSvM6U27BUvMTuerHJSXtIcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9dc70af83e5992e543542adbf5a6edeb38f187f6 commit 9dc70af83e5992e543542adbf5a6edeb38f187f6 Author: Warner Losh AuthorDate: 2021-12-15 04:09:53 +0000 Commit: Warner Losh CommitDate: 2021-12-15 04:09:53 +0000 stand/uboot: reorg Build uboot ubldr and friends like we build efi binaries o move everything to be under stand/uboot o md code goes in arch/$ARCH o move everything over from the library - Had to rename console.c, disk.c and module.c due to conflicts o update version to 1.5 to reflect the new way of building This results in a more consistent build system and should represent no functional change, apart from powerpc version getting new help file. Also, moved to exlcuding uboot on powerpc64le by using BROKEN_OPTION instead of the incidental exclusion we had before due to Makefile reorgs. Sponsored by: Netflix Feedback by: stevek, jrtc27 Differential Revision: https://reviews.freebsd.org/D33362 --- share/mk/src.opts.mk | 4 +- stand/Makefile | 5 ++ stand/arm/Makefile | 7 -- stand/arm/Makefile.inc | 3 - stand/arm/uboot/Makefile | 68 ------------------- stand/arm/uboot/version | 10 --- stand/powerpc/Makefile | 4 -- stand/powerpc/uboot/Makefile | 36 ---------- stand/powerpc/uboot/version | 11 --- stand/uboot.mk | 21 ------ stand/uboot/Makefile | 78 +++++++++++++++++++++- stand/uboot/Makefile.inc | 3 - stand/uboot/{lib => }/api_public.h | 0 stand/uboot/arch/arm/Makefile.inc | 25 +++++++ stand/{arm/uboot => uboot/arch/arm}/conf.c | 0 stand/{arm/uboot => uboot/arch/arm}/ldscript.arm | 0 stand/{arm/uboot => uboot/arch/arm}/start.S | 0 stand/uboot/arch/powerpc/Makefile.inc | 6 ++ stand/{powerpc/uboot => uboot/arch/powerpc}/conf.c | 0 .../uboot => uboot/arch/powerpc}/ldscript.powerpc | 0 .../arch/powerpc}/ppc64_elf_freebsd.c | 0 .../{powerpc/uboot => uboot/arch/powerpc}/start.S | 0 stand/uboot/{lib => }/copy.c | 0 stand/uboot/{lib => }/devicename.c | 0 stand/uboot/{lib => }/elf_freebsd.c | 0 stand/uboot/fdt/Makefile | 21 ------ stand/uboot/{lib => }/glue.c | 0 stand/uboot/{lib => }/glue.h | 0 stand/{arm => }/uboot/help.uboot | 0 stand/uboot/lib/Makefile | 30 --------- stand/uboot/{lib => }/libuboot.h | 0 stand/uboot/{common => }/main.c | 0 stand/uboot/{lib => }/net.c | 0 stand/uboot/{lib => }/reboot.c | 0 stand/uboot/{lib => }/time.c | 0 stand/uboot/{lib/console.c => uboot_console.c} | 0 stand/uboot/{lib/disk.c => uboot_disk.c} | 0 stand/uboot/{fdt => }/uboot_fdt.c | 0 stand/uboot/{lib/module.c => uboot_module.c} | 0 stand/uboot/version | 6 ++ 40 files changed, 119 insertions(+), 219 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 6fdeaf6a37f3..3d59776973a1 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -314,8 +314,8 @@ BROKEN_OPTIONS+=EFI .if ${__T:Mpowerpc*} == "" BROKEN_OPTIONS+=LOADER_OFW .endif -# UBOOT is only for arm, mips and powerpc, exclude others -.if ${__T:Marm*} == "" && ${__T:Mmips*} == "" && ${__T:Mpowerpc*} == "" +# UBOOT is only for arm, and big-endian powerpc +.if (${__T:Marm*} == "" && ${__T:Mpowerpc*} == "") || ${__T} == "powerpc64le" BROKEN_OPTIONS+=LOADER_UBOOT .endif # GELI and Lua in loader currently cause boot failures on powerpc. diff --git a/stand/Makefile b/stand/Makefile index c5918a6539eb..7ac848f4076a 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -81,6 +81,11 @@ SUBDIR_DEPEND_efi+= ${INTERP_DEPENDS} SUBDIR_DEPEND_efi+= fdt .endif +SUBDIR_DEPEND_uboot+= ${INTERP_DEPENDS} +.if ${MK_FDT} != "no" +SUBDIR_DEPEND_uboot+= fdt +.endif + SUBDIR_PARALLEL= yes .include diff --git a/stand/arm/Makefile b/stand/arm/Makefile deleted file mode 100644 index 7ff21abcc9b8..000000000000 --- a/stand/arm/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# $FreeBSD$ - -NO_OBJ=t - -SUBDIR= uboot - -.include diff --git a/stand/arm/Makefile.inc b/stand/arm/Makefile.inc deleted file mode 100644 index 265f86d1ed55..000000000000 --- a/stand/arm/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $FreeBSD$ - -.include "../Makefile.inc" diff --git a/stand/arm/uboot/Makefile b/stand/arm/uboot/Makefile deleted file mode 100644 index f99282aa6e5a..000000000000 --- a/stand/arm/uboot/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# $FreeBSD$ - -LOADER_UFS_SUPPORT?= yes -LOADER_CD9660_SUPPORT?= no -LOADER_MSDOS_SUPPORT?= no -LOADER_EXT2FS_SUPPORT?= no -LOADER_NET_SUPPORT?= yes -LOADER_NFS_SUPPORT?= yes -LOADER_TFTP_SUPPORT?= no -LOADER_GZIP_SUPPORT?= no -LOADER_BZIP2_SUPPORT?= no - -.include - -FILES+= ubldr ubldr.bin - -NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} -INSTALLFLAGS= -b -WARNS?= 1 -# Address at which ubldr will be loaded. -# This varies for different boards and SOCs. -UBLDR_LOADADDR?= 0x1000000 - -# Architecture-specific loader code -SRCS= start.S conf.c self_reloc.c vers.c - -.if ${COMPILER_TYPE} == "gcc" -CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized -.endif - -HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt - -# Always add MI sources -.include "${BOOTSRC}/loader.mk" - -LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} -LDFLAGS+= -Wl,-znotext - -# Pull in common loader code -.include "${BOOTSRC}/uboot.mk" - -CFLAGS+= -fPIC - -DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} - -OBJS+= ${SRCS:N*.h:R:S/$/.o/g} - -ldscript.abs: - echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} - -ldscript.pie: - echo "UBLDR_LOADADDR = 0;" >${.TARGET} - -ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} - ${CC} ${CFLAGS} -T ldscript.abs ${LDFLAGS} \ - -o ${.TARGET} ${OBJS} ${LDADD} - -ubldr.pie: ${OBJS} ldscript.pie ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} - ${CC} ${CFLAGS} -T ldscript.pie ${LDFLAGS} -pie -Wl,-Bsymbolic \ - -o ${.TARGET} ${OBJS} ${LDADD} - -ubldr.bin: ubldr.pie - ${OBJCOPY} -S -O binary ubldr.pie ${.TARGET} - -CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin - -.include diff --git a/stand/arm/uboot/version b/stand/arm/uboot/version deleted file mode 100644 index ec46b388b281..000000000000 --- a/stand/arm/uboot/version +++ /dev/null @@ -1,10 +0,0 @@ -$FreeBSD$ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - -1.3: Remove NAND FS support. -1.2: Extended with NAND FS support. -1.1: Flattened Device Tree blob support. -1.0: Added storage support. Booting from HDD, USB, etc. is now possible. -0.5: Initial U-Boot/arm version (netbooting only). diff --git a/stand/powerpc/Makefile b/stand/powerpc/Makefile index a16d3933ff7e..b5d11dd6cf57 100644 --- a/stand/powerpc/Makefile +++ b/stand/powerpc/Makefile @@ -6,10 +6,6 @@ NO_OBJ=t SUBDIR.yes= boot1.chrp ofw -.if "${MACHINE_ARCH}" != "powerpc64le" -SUBDIR.${MK_FDT}+= uboot -.endif - .if "${MACHINE_ARCH}" == "powerpc64" SUBDIR.${MK_FDT}+= kboot .endif diff --git a/stand/powerpc/uboot/Makefile b/stand/powerpc/uboot/Makefile deleted file mode 100644 index b0635104e454..000000000000 --- a/stand/powerpc/uboot/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $FreeBSD$ - -LOADER_UFS_SUPPORT?= yes -LOADER_CD9660_SUPPORT?= no -LOADER_EXT2FS_SUPPORT?= no -LOADER_NET_SUPPORT?= yes -LOADER_NFS_SUPPORT?= yes -LOADER_TFTP_SUPPORT?= no -LOADER_GZIP_SUPPORT?= no -LOADER_BZIP2_SUPPORT?= no - -.include - -BINDIR= /boot/uboot -PROG= ubldr -NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} -INSTALLFLAGS= -b - -# Architecture-specific loader code -SRCS= start.S conf.c vers.c ppc64_elf_freebsd.c -SRCS+= ucmpdi2.c - -# Always add MI sources -.include "${BOOTSRC}/loader.mk" -.PATH: ${SYSDIR}/libkern - -LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc - -.include "${BOOTSRC}/uboot.mk" - -DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} - -MK_PIE= no - -.include diff --git a/stand/powerpc/uboot/version b/stand/powerpc/uboot/version deleted file mode 100644 index 21556cff70e0..000000000000 --- a/stand/powerpc/uboot/version +++ /dev/null @@ -1,11 +0,0 @@ -$FreeBSD$ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - -1.1: Flattened Device Tree blob support. -1.0: Added storage support. -0.6: Integrated with the new U-Boot API -0.5: Full network functionality. -0.2: Initial U-Boot/PowerPC version derived from the existing - OpenFirmware-based. diff --git a/stand/uboot.mk b/stand/uboot.mk deleted file mode 100644 index 0ff7fb32b07c..000000000000 --- a/stand/uboot.mk +++ /dev/null @@ -1,21 +0,0 @@ -# $FreeBSD$ - -SRCS+= main.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 ${MACHINE_CPUARCH} == "arm" -SRCS+= metadata.c -.endif - -.include "${BOOTSRC}/fdt.mk" - -.if ${MK_FDT} == "yes" -LIBUBOOT_FDT= ${BOOTOBJ}/uboot/fdt/libuboot_fdt.a -.endif diff --git a/stand/uboot/Makefile b/stand/uboot/Makefile index fde6f9c4e16e..aed2121bd507 100644 --- a/stand/uboot/Makefile +++ b/stand/uboot/Makefile @@ -1,9 +1,81 @@ # $FreeBSD$ +LOADER_UFS_SUPPORT?= yes +LOADER_CD9660_SUPPORT?= no +LOADER_MSDOS_SUPPORT?= no +LOADER_EXT2FS_SUPPORT?= no +LOADER_NET_SUPPORT?= yes +LOADER_NFS_SUPPORT?= yes +LOADER_TFTP_SUPPORT?= no +LOADER_GZIP_SUPPORT?= no +LOADER_BZIP2_SUPPORT?= no +LOADER_DISK_SUPPORT?= yes + .include -SUBDIR.yes= lib +.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" + +.if ${MK_PIE} == "yes" +FILES+= ubldr ubldr.bin +OBJS+= ${SRCS:N*.h:R:S/$/.o/g} +.else +PROG= ubldr +.endif + +NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} +BINDIR= /boot/uboot +INSTALLFLAGS= -b +WARNS?= 1 + +.PATH: ${BOOTSRC}/common +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} + + +.if ${COMPILER_TYPE} == "gcc" +CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized +.endif + +HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt + +# Always add MI sources +.include "${BOOTSRC}/loader.mk" + +LDSCRIPT= ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} +LDFLAGS= -nostdlib -static -T ${LDSCRIPT} +LDFLAGS+= -Wl,-znotext + +SRCS+= main.c vers.c +SRCS+= copy.c devicename.c elf_freebsd.c glue.c +SRCS+= net.c reboot.c time.c gfx_fb_stub.c +SRCS+= uboot_console.c uboot_disk.c uboot_fdt.c uboot_module.c + +CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken +CFLAGS.glue.c+= -DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib + +CFLAGS+= -I${BOOTSRC}/common +CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${.OBJDIR} + +.if ${MACHINE_CPUARCH} == "arm" +SRCS+= metadata.c +.endif + +.include "${BOOTSRC}/fdt.mk" + +CFLAGS+= -fPIC + +# Pick up the bootstrap header for some interface items +CFLAGS+= -I${LDRSRC} + +# libfdt headers +CFLAGS+= -I${FDTSRC} + +.ifdef(BOOT_DISK_DEBUG) +# Make the disk code more talkative +CFLAGS+= -DDISK_DEBUG +.endif -SUBDIR.${MK_FDT}+=fdt +DPADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} +LDADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} -.include +.include diff --git a/stand/uboot/Makefile.inc b/stand/uboot/Makefile.inc deleted file mode 100644 index 265f86d1ed55..000000000000 --- a/stand/uboot/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $FreeBSD$ - -.include "../Makefile.inc" diff --git a/stand/uboot/lib/api_public.h b/stand/uboot/api_public.h similarity index 100% rename from stand/uboot/lib/api_public.h rename to stand/uboot/api_public.h diff --git a/stand/uboot/arch/arm/Makefile.inc b/stand/uboot/arch/arm/Makefile.inc new file mode 100644 index 000000000000..66cb3f1b4dda --- /dev/null +++ b/stand/uboot/arch/arm/Makefile.inc @@ -0,0 +1,25 @@ +# Address at which ubldr will be loaded. +# This varies for different boards and SOCs. +UBLDR_LOADADDR?= 0x1000000 + +SRCS+= start.S conf.c self_reloc.c + +ldscript.abs: + echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} + +ldscript.pie: + echo "UBLDR_LOADADDR = 0;" >${.TARGET} + +ubldr: ${OBJS} ldscript.abs ${LDSCRIPT} ${DPADD} + ${CC} ${CFLAGS} -T ldscript.abs ${LDFLAGS} \ + -o ${.TARGET} ${OBJS} ${LDADD} + +ubldr.pie: ${OBJS} ldscript.pie ${LDSCRIPT} ${DPADD} + ${CC} ${CFLAGS} -T ldscript.pie ${LDFLAGS} -pie -Wl,-Bsymbolic \ + -o ${.TARGET} ${OBJS} ${LDADD} + +ubldr.bin: ubldr.pie + ${OBJCOPY} -S -O binary ubldr.pie ${.TARGET} + +CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin + diff --git a/stand/arm/uboot/conf.c b/stand/uboot/arch/arm/conf.c similarity index 100% rename from stand/arm/uboot/conf.c rename to stand/uboot/arch/arm/conf.c diff --git a/stand/arm/uboot/ldscript.arm b/stand/uboot/arch/arm/ldscript.arm similarity index 100% rename from stand/arm/uboot/ldscript.arm rename to stand/uboot/arch/arm/ldscript.arm diff --git a/stand/arm/uboot/start.S b/stand/uboot/arch/arm/start.S similarity index 100% rename from stand/arm/uboot/start.S rename to stand/uboot/arch/arm/start.S diff --git a/stand/uboot/arch/powerpc/Makefile.inc b/stand/uboot/arch/powerpc/Makefile.inc new file mode 100644 index 000000000000..01c7a0c6ac8c --- /dev/null +++ b/stand/uboot/arch/powerpc/Makefile.inc @@ -0,0 +1,6 @@ + +SRCS+= start.S conf.c ppc64_elf_freebsd.c +.PATH: ${SYSDIR}/libkern +SRCS+= ucmpdi2.c + +MK_PIE= no diff --git a/stand/powerpc/uboot/conf.c b/stand/uboot/arch/powerpc/conf.c similarity index 100% rename from stand/powerpc/uboot/conf.c rename to stand/uboot/arch/powerpc/conf.c diff --git a/stand/powerpc/uboot/ldscript.powerpc b/stand/uboot/arch/powerpc/ldscript.powerpc similarity index 100% rename from stand/powerpc/uboot/ldscript.powerpc rename to stand/uboot/arch/powerpc/ldscript.powerpc diff --git a/stand/powerpc/uboot/ppc64_elf_freebsd.c b/stand/uboot/arch/powerpc/ppc64_elf_freebsd.c similarity index 100% rename from stand/powerpc/uboot/ppc64_elf_freebsd.c rename to stand/uboot/arch/powerpc/ppc64_elf_freebsd.c diff --git a/stand/powerpc/uboot/start.S b/stand/uboot/arch/powerpc/start.S similarity index 100% rename from stand/powerpc/uboot/start.S rename to stand/uboot/arch/powerpc/start.S diff --git a/stand/uboot/lib/copy.c b/stand/uboot/copy.c similarity index 100% rename from stand/uboot/lib/copy.c rename to stand/uboot/copy.c diff --git a/stand/uboot/lib/devicename.c b/stand/uboot/devicename.c similarity index 100% rename from stand/uboot/lib/devicename.c rename to stand/uboot/devicename.c diff --git a/stand/uboot/lib/elf_freebsd.c b/stand/uboot/elf_freebsd.c similarity index 100% rename from stand/uboot/lib/elf_freebsd.c rename to stand/uboot/elf_freebsd.c diff --git a/stand/uboot/fdt/Makefile b/stand/uboot/fdt/Makefile deleted file mode 100644 index ef60f8bdb6a9..000000000000 --- a/stand/uboot/fdt/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# $FreeBSD$ - -.include - -.PATH: ${LDRSRC} - -LIB= uboot_fdt -WARNS?= 2 - -SRCS= uboot_fdt.c - -# U-Boot library headers -CFLAGS+= -I${UBOOTSRC}/lib - -# libfdt headers -CFLAGS+= -I${FDTSRC} - -# Pick up the bootstrap header for some interface items -CFLAGS+= -I${LDRSRC} - -.include diff --git a/stand/uboot/lib/glue.c b/stand/uboot/glue.c similarity index 100% rename from stand/uboot/lib/glue.c rename to stand/uboot/glue.c diff --git a/stand/uboot/lib/glue.h b/stand/uboot/glue.h similarity index 100% rename from stand/uboot/lib/glue.h rename to stand/uboot/glue.h diff --git a/stand/arm/uboot/help.uboot b/stand/uboot/help.uboot similarity index 100% rename from stand/arm/uboot/help.uboot rename to stand/uboot/help.uboot diff --git a/stand/uboot/lib/Makefile b/stand/uboot/lib/Makefile deleted file mode 100644 index e5d35de59ffd..000000000000 --- a/stand/uboot/lib/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $FreeBSD$ - -.include - -.PATH: ${LDRSRC} - -LIB= uboot -WARNS?= 2 - -SRCS= console.c copy.c devicename.c elf_freebsd.c glue.c -SRCS+= module.c net.c reboot.c time.c gfx_fb_stub.c - -CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken -CFLAGS.glue.c+= -DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib - -.if ${LOADER_DISK_SUPPORT:Uyes} == "yes" -SRCS+= disk.c -.endif - -.include "${BOOTSRC}/fdt.mk" - -# Pick up the bootstrap header for some interface items -CFLAGS+= -I${LDRSRC} - -.ifdef(BOOT_DISK_DEBUG) -# Make the disk code more talkative -CFLAGS+= -DDISK_DEBUG -.endif - -.include diff --git a/stand/uboot/lib/libuboot.h b/stand/uboot/libuboot.h similarity index 100% rename from stand/uboot/lib/libuboot.h rename to stand/uboot/libuboot.h diff --git a/stand/uboot/common/main.c b/stand/uboot/main.c similarity index 100% rename from stand/uboot/common/main.c rename to stand/uboot/main.c diff --git a/stand/uboot/lib/net.c b/stand/uboot/net.c similarity index 100% rename from stand/uboot/lib/net.c rename to stand/uboot/net.c diff --git a/stand/uboot/lib/reboot.c b/stand/uboot/reboot.c similarity index 100% rename from stand/uboot/lib/reboot.c rename to stand/uboot/reboot.c diff --git a/stand/uboot/lib/time.c b/stand/uboot/time.c similarity index 100% rename from stand/uboot/lib/time.c rename to stand/uboot/time.c diff --git a/stand/uboot/lib/console.c b/stand/uboot/uboot_console.c similarity index 100% rename from stand/uboot/lib/console.c rename to stand/uboot/uboot_console.c diff --git a/stand/uboot/lib/disk.c b/stand/uboot/uboot_disk.c similarity index 100% rename from stand/uboot/lib/disk.c rename to stand/uboot/uboot_disk.c diff --git a/stand/uboot/fdt/uboot_fdt.c b/stand/uboot/uboot_fdt.c similarity index 100% rename from stand/uboot/fdt/uboot_fdt.c rename to stand/uboot/uboot_fdt.c diff --git a/stand/uboot/lib/module.c b/stand/uboot/uboot_module.c similarity index 100% rename from stand/uboot/lib/module.c rename to stand/uboot/uboot_module.c diff --git a/stand/uboot/version b/stand/uboot/version new file mode 100644 index 000000000000..630fe00bb777 --- /dev/null +++ b/stand/uboot/version @@ -0,0 +1,6 @@ +$FreeBSD$ + +NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this +file is important. Make sure the current version number is on line 6. + +1.5: Unified ubldr build