Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2017 12:19:12 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ngie Cooper <ngie@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r316132 - head/sys/boot/i386/boot2
Message-ID:  <CANCZdfrdQAmxGZvpNrFZfe_2F%2BrcqgfF-SxvpZroQHRfrP-Q6Q@mail.gmail.com>
In-Reply-To: <201703290930.v2T9U3x9087583@repo.freebsd.org>
References:  <201703290930.v2T9U3x9087583@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 29, 2017 at 3:30 AM, Ngie Cooper <ngie@freebsd.org> wrote:
> Author: ngie
> Date: Wed Mar 29 09:30:03 2017
> New Revision: 316132
> URL: https://svnweb.freebsd.org/changeset/base/316132
>
> Log:
>   Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/...
>
>   This is being done to make it easier to change in the future--this action might be
>   needed sooner rather than later because of gcc 6.3.0 bailing, stating that there
>   is negative free space left (deficit) in the boot2 bootloader.

This number is never, ever ever going to change. Don't even put that
on the list of things that are possible to fix gcc 6.3 bloated code
generation. You must fix the compiler, pass it the right options, or
it will remain unsupported. There's a fixed slot it slides into. While
it is in theory possible to increase it, it really isn't practical to
increase it because so many things just know its size and offset.

Warner

>   MFC after:    2 months
>   Sponsored by: Dell EMC Isilon
>
> Modified:
>   head/sys/boot/i386/boot2/Makefile
>
> Modified: head/sys/boot/i386/boot2/Makefile
> ==============================================================================
> --- head/sys/boot/i386/boot2/Makefile   Wed Mar 29 08:38:31 2017        (r316131)
> +++ head/sys/boot/i386/boot2/Makefile   Wed Mar 29 09:30:03 2017        (r316132)
> @@ -66,10 +66,12 @@ boot1.out: boot1.o
>  CLEANFILES+=   boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \
>                 boot2.h sio.o
>
> +BOOT2SIZE=     7680
> +
>  boot2: boot2.ld
> -       @set -- `ls -l ${.ALLSRC}`; x=$$((7680-$$5)); \
> +       @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \
>             echo "$$x bytes available"; test $$x -ge 0
> -       ${DD} if=${.ALLSRC} of=${.TARGET} obs=7680 conv=osync
> +       ${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync
>
>  boot2.ld: boot2.ldr boot2.bin ${BTXKERN}
>         btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrdQAmxGZvpNrFZfe_2F%2BrcqgfF-SxvpZroQHRfrP-Q6Q>