svn commit: r316132 - head/sys/boot/i386/boot2

Warner Losh imp at bsdimp.com
Wed Mar 29 18:19:13 UTC 2017


On Wed, Mar 29, 2017 at 3:30 AM, Ngie Cooper <ngie at 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 \
>


More information about the svn-src-head mailing list