Nathan Whitehorn
2016-Jul-11 13:49 UTC
stable/11 question: kboot vs. powerpc: only powerpc64?
It is not 64-bit only; like the normal loader, it can load both 32-bit and 64-bit kernels. Those two flags are probably obsolete at this point and were for compatibility with pre-2.17.5 versions of binutils. Can you do a test build with the -CFLAGS+= -Wa,-mppc64bridge line removed? -Nathan On 07/11/16 03:55, Mark Millard wrote:> Is the following something that should be updated something like is indicated below for 11.0-BETA1? Is kboot powerpc64 specific? > > # svnlite diff /usr/src/sys/boot/powerpc/Makefile > Index: /usr/src/sys/boot/powerpc/Makefile > ==================================================================> --- /usr/src/sys/boot/powerpc/Makefile (revision 302457) > +++ /usr/src/sys/boot/powerpc/Makefile (working copy) > @@ -1,5 +1,9 @@ > # $FreeBSD$ > > -SUBDIR= boot1.chrp kboot ofw ps3 uboot > +SUBDIR= boot1.chrp > +.if ${MACHINE_ARCH} == "powerpc64" > +SUBDIR+= kboot > +.endif > +SUBDIR+= ofw ps3 uboot > > .include <bsd.subdir.mk> > > > > I ask because I'd submitted 206303 back on 2016-jan-16 reporting that TARGET_ARCH=powerpc WITH_BOOT= was stopped by getting a -Wc,-mppc64bride and a -mcpu=powerpc64 (one of the base/head/sys/boot/powerpc/kboot/Makefile SRCS being ppc64_elf_freebsd.c). > > ==> Mark Millard > markmi at dsl-only.net > >
On 2016-Jul-11, at 6:49 AM, Nathan Whitehorn <nwhitehorn at freebsd.org> wrote:> > It is not 64-bit only; like the normal loader, it can load both 32-bit and 64-bit kernels. Those two flags are probably obsolete at this point and were for compatibility with pre-2.17.5 versions of binutils. Can you do a test build with the -CFLAGS+= -Wa,-mppc64bridge line removed? > -Nathan > > On 07/11/16 03:55, Mark Millard wrote: >> Is the following something that should be updated something like is indicated below for 11.0-BETA1? Is kboot powerpc64 specific? >> >> # svnlite diff /usr/src/sys/boot/powerpc/Makefile >> Index: /usr/src/sys/boot/powerpc/Makefile >> ==================================================================>> --- /usr/src/sys/boot/powerpc/Makefile (revision 302457) >> +++ /usr/src/sys/boot/powerpc/Makefile (working copy) >> @@ -1,5 +1,9 @@ >> # $FreeBSD$ >> -SUBDIR= boot1.chrp kboot ofw ps3 uboot >> +SUBDIR= boot1.chrp >> +.if ${MACHINE_ARCH} == "powerpc64" >> +SUBDIR+= kboot >> +.endif >> +SUBDIR+= ofw ps3 uboot >> .include <bsd.subdir.mk> >> >> >> >> I ask because I'd submitted 206303 back on 2016-jan-16 reporting that TARGET_ARCH=powerpc WITH_BOOT= was stopped by getting a -Wc,-mppc64bride and a -mcpu=powerpc64 (one of the base/head/sys/boot/powerpc/kboot/Makefile SRCS being ppc64_elf_freebsd.c). >> >> ==>> Mark Millard >> markmi at dsl-only.netI do not have access to powerpc's currently so I'm just going to be doing cross-build tests for TARGET_ARCH=powerpc and TARGET_ARCH=powerpc64 (from amd64) based on the below updates. You initially mention "two flags" but then only explicitly request removal of one (the -CFLAGS+= -Wa,-mppc64bridge line). I'm assuming that the -mcpu=powerpc64 is also to be removed if powerpc (non-64) is to be covered. See my intended test below. Let me know if it is not what you want.> # svnlite diff sys/boot/powerpc/kboot/Makefile > Index: sys/boot/powerpc/kboot/Makefile > ==================================================================> --- sys/boot/powerpc/kboot/Makefile (revision 302457) > +++ sys/boot/powerpc/kboot/Makefile (working copy) > @@ -71,7 +71,7 @@ > # Avoid the open-close-dance for every file access as some firmwares perform > # an auto-negotiation on every open of the network interface and thus causes > # netbooting to take horribly long. > -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE -mcpu=powerpc64 > +CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE > > # Always add MI sources > .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern > @@ -88,9 +88,6 @@ > > LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc > > -# 64-bit bridge extensions > -CFLAGS+= -Wa,-mppc64bridge > - > # Pull in common loader code > #.PATH: ${.CURDIR}/../../ofw/common > #.include "${.CURDIR}/../../ofw/common/Makefile.inc"> # svnlite diff sys/boot/powerpc/Makefile > #(I.e., I reverted sys/boot/powerpc/Makefile.) ==Mark Millard markmi at dsl-only.net