Print this page
7438 intermittent build failures from the new boot loader
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2015 Toomas Soome <tsoome@me.com>

  14 #
  15 
  16 #
  17 
  18 include $(SRC)/Makefile.master
  19 
  20 AS=     $(GNU_ROOT)/bin/gas
  21 LD=     $(GNU_ROOT)/bin/gld
  22 CC=     $(GCC_ROOT)/bin/gcc
  23 OBJCOPY=        $(GNU_ROOT)/bin/gobjcopy
  24 
  25 PROG=           gptzfsboot
  26 MAN=            gptzfsboot.8
  27 FILEMODE=0444
  28 
  29 # need to update this to trigger installboot updates.
  30 BUILDDATE :sh = TZ=UTC date +%Y%m%dT%H%M%SZ
  31 BOOT2_VERSION=  1.1:$(BUILDDATE)
  32 
  33 BOOT_COMCONSOLE_PORT= 0x3f8


  56         -I../../.. \
  57         -I../../../sys \
  58         -I../libi386 \
  59         -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
  60         -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  61         -Wpointer-arith -Wshadow -Wwrite-strings \
  62         -Winline -Wno-unknown-pragmas
  63 
  64 CFLAGS +=       --param max-inline-insns-single=100
  65 CFLAGS +=       -fno-reorder-functions
  66 
  67 LD_FLAGS=-static -N --gc-sections
  68 CCASFLAGS=-Wa,--divide
  69 LIBSTAND=       ../../libstand/i386/libstand.a
  70 LIBZFSBOOT=     ../../zfs/i386/libzfsboot.a
  71 
  72 include ../Makefile.inc
  73 
  74 .PARALLEL:
  75 
  76 all: machine x86 $(PROG)
  77 
  78 install: all $(ROOTBOOTPROG)
  79 
  80 OBJS =  multiboot.o zfsboot.o sio.o cons.o panic.o devopen.o \
  81         part.o biosmem.o smbios.o biosdisk.o devicename.o disk.o bcache.o \
  82         time.o crc32.o
  83 
  84 CLEANFILES=     gptzfsboot $(OBJS)
  85 
  86 gptzfsboot: gptldr.bin gptzfsboot.bin ${BTXKERN}
  87         $(BTXLD) -v -E ${ORG2} -f bin -b ${BTXKERN} -V ${BOOT2_VERSION} -l \
  88                 gptldr.bin -o $@ gptzfsboot.bin
  89 
  90 CLEANFILES +=   gptldr.bin gptldr.out gptldr.o
  91 
  92 gptldr.bin: gptldr.out
  93         ${OBJCOPY} -S -O binary gptldr.out $@
  94 
  95 gptldr.out: gptldr.o
  96         ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o $@ gptldr.o
  97 
  98 CLEANFILES +=   gptzfsboot.bin gptzfsboot.out
  99 
 100 gptzfsboot.bin: gptzfsboot.out
 101         ${OBJCOPY} -S -O binary gptzfsboot.out $@
 102 
 103 gptzfsboot.out: ${BTXCRT} ${OBJS} ${LIBZFSBOOT} ${LIBSTAND}
 104         ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o $@ ${BTXCRT} ${OBJS} \
 105                 ${LIBZFSBOOT} ${LIBSTAND}
 106 
 107 machine:
 108         $(RM) machine
 109         $(SYMLINK) ../../../i386/include machine
 110 
 111 x86:
 112         $(RM) x86
 113         $(SYMLINK) ../../../x86/include x86


 114 
 115 %.o:    ../common/%.c
 116         $(COMPILE.c) -o $@ $<
 117 
 118 %.o:    ../../common/%.c
 119         $(COMPILE.c) -o $@ $<
 120 
 121 biosdisk.o: ../libi386/biosdisk.c
 122         $(CC) $(CFLAGS) $(CPPFLAGS) -Dalloca=__builtin_alloca -c -o $@ ../libi386/$*.c
 123 
 124 biosmem.o: ../libi386/biosmem.c
 125         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c
 126 
 127 smbios.o: ../libi386/smbios.c
 128         $(CC) $(CFLAGS) $(CPPFLAGS) \
 129                 -DSMBIOS_SERIAL_NUMBERS -DSMBIOS_LITTLE_ENDIAN_UUID \
 130                 -c -o $@ ../libi386/$*.c
 131 
 132 devicename.o: ../libi386/devicename.c
 133         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c
   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2015 Toomas Soome <tsoome@me.com>
  14 # Copyright 2016 RackTop Systems.
  15 #
  16 
  17 #
  18 
  19 include $(SRC)/Makefile.master
  20 
  21 AS=     $(GNU_ROOT)/bin/gas
  22 LD=     $(GNU_ROOT)/bin/gld
  23 CC=     $(GCC_ROOT)/bin/gcc
  24 OBJCOPY=        $(GNU_ROOT)/bin/gobjcopy
  25 
  26 PROG=           gptzfsboot
  27 MAN=            gptzfsboot.8
  28 FILEMODE=0444
  29 
  30 # need to update this to trigger installboot updates.
  31 BUILDDATE :sh = TZ=UTC date +%Y%m%dT%H%M%SZ
  32 BOOT2_VERSION=  1.1:$(BUILDDATE)
  33 
  34 BOOT_COMCONSOLE_PORT= 0x3f8


  57         -I../../.. \
  58         -I../../../sys \
  59         -I../libi386 \
  60         -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
  61         -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  62         -Wpointer-arith -Wshadow -Wwrite-strings \
  63         -Winline -Wno-unknown-pragmas
  64 
  65 CFLAGS +=       --param max-inline-insns-single=100
  66 CFLAGS +=       -fno-reorder-functions
  67 
  68 LD_FLAGS=-static -N --gc-sections
  69 CCASFLAGS=-Wa,--divide
  70 LIBSTAND=       ../../libstand/i386/libstand.a
  71 LIBZFSBOOT=     ../../zfs/i386/libzfsboot.a
  72 
  73 include ../Makefile.inc
  74 
  75 .PARALLEL:
  76 
  77 all: $(PROG)
  78 
  79 install: all $(ROOTBOOTPROG)
  80 
  81 OBJS =  multiboot.o zfsboot.o sio.o cons.o panic.o devopen.o \
  82         part.o biosmem.o smbios.o biosdisk.o devicename.o disk.o bcache.o \
  83         time.o crc32.o
  84 
  85 CLEANFILES=     gptzfsboot $(OBJS)
  86 
  87 gptzfsboot: gptldr.bin gptzfsboot.bin ${BTXKERN}
  88         $(BTXLD) -v -E ${ORG2} -f bin -b ${BTXKERN} -V ${BOOT2_VERSION} -l \
  89                 gptldr.bin -o $@ gptzfsboot.bin
  90 
  91 CLEANFILES +=   gptldr.bin gptldr.out gptldr.o
  92 
  93 gptldr.bin: gptldr.out
  94         ${OBJCOPY} -S -O binary gptldr.out $@
  95 
  96 gptldr.out: gptldr.o
  97         ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o $@ gptldr.o
  98 
  99 CLEANFILES +=   gptzfsboot.bin gptzfsboot.out
 100 
 101 gptzfsboot.bin: gptzfsboot.out
 102         ${OBJCOPY} -S -O binary gptzfsboot.out $@
 103 
 104 gptzfsboot.out: ${BTXCRT} ${OBJS} ${LIBZFSBOOT} ${LIBSTAND}
 105         ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o $@ ${BTXCRT} ${OBJS} \
 106                 ${LIBZFSBOOT} ${LIBSTAND}
 107 
 108 machine:
 109         $(RM) machine
 110         $(SYMLINK) ../../../i386/include machine
 111 
 112 x86:
 113         $(RM) x86
 114         $(SYMLINK) ../../../x86/include x86
 115 
 116 $(OBJS): machine x86
 117 
 118 %.o:    ../common/%.c
 119         $(COMPILE.c) -o $@ $<
 120 
 121 %.o:    ../../common/%.c
 122         $(COMPILE.c) -o $@ $<
 123 
 124 biosdisk.o: ../libi386/biosdisk.c
 125         $(CC) $(CFLAGS) $(CPPFLAGS) -Dalloca=__builtin_alloca -c -o $@ ../libi386/$*.c
 126 
 127 biosmem.o: ../libi386/biosmem.c
 128         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c
 129 
 130 smbios.o: ../libi386/smbios.c
 131         $(CC) $(CFLAGS) $(CPPFLAGS) \
 132                 -DSMBIOS_SERIAL_NUMBERS -DSMBIOS_LITTLE_ENDIAN_UUID \
 133                 -c -o $@ ../libi386/$*.c
 134 
 135 devicename.o: ../libi386/devicename.c
 136         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c