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>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile
+++ new/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile
1 1 #
2 2 # This file and its contents are supplied under the terms of the
3 3 # Common Development and Distribution License ("CDDL"), version 1.0.
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
4 4 # You may only use this file in accordance with the terms of version
5 5 # 1.0 of the CDDL.
6 6 #
7 7 # A full copy of the text of the CDDL should have accompanied this
8 8 # source. A copy of the CDDL is also available via the Internet at
9 9 # http://www.illumos.org/license/CDDL.
10 10 #
11 11
12 12 #
13 13 # Copyright 2015 Toomas Soome <tsoome@me.com>
14 +# Copyright 2016 RackTop Systems.
14 15 #
15 16
16 17 #
17 18
18 19 include $(SRC)/Makefile.master
19 20
20 21 AS= $(GNU_ROOT)/bin/gas
21 22 LD= $(GNU_ROOT)/bin/gld
22 23 CC= $(GCC_ROOT)/bin/gcc
23 24 OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
24 25
25 26 PROG= gptzfsboot
26 27 MAN= gptzfsboot.8
27 28 FILEMODE=0444
28 29
29 30 # need to update this to trigger installboot updates.
30 31 BUILDDATE :sh = TZ=UTC date +%Y%m%dT%H%M%SZ
31 32 BOOT2_VERSION= 1.1:$(BUILDDATE)
32 33
33 34 BOOT_COMCONSOLE_PORT= 0x3f8
34 35 BOOT_COMCONSOLE_SPEED= 9600
35 36 B2SIOFMT= 0x3
36 37
37 38 REL1= 0x700
38 39 ORG1= 0x7c00
39 40 ORG2= 0x0
40 41
41 42 CPPFLAGS=
42 43 CFLAGS= -nostdinc -DBOOTPROG=\"gptzfsboot\" \
43 44 -O1 \
44 45 -DGPT -DBOOT2 \
45 46 -DLOADER_MBR_SUPPORT -DLOADER_GPT_SUPPORT \
46 47 -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
47 48 -DSIOFMT=${B2SIOFMT} \
48 49 -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
49 50 -I../../../../include \
50 51 -I../../../../lib/libstand \
51 52 -I../../common \
52 53 -I../common \
53 54 -I../../zfs \
54 55 -I../../../cddl/boot/zfs \
55 56 -I../btx/lib -I. \
56 57 -I../../.. \
57 58 -I../../../sys \
58 59 -I../libi386 \
59 60 -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
60 61 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
61 62 -Wpointer-arith -Wshadow -Wwrite-strings \
62 63 -Winline -Wno-unknown-pragmas
63 64
64 65 CFLAGS += --param max-inline-insns-single=100
65 66 CFLAGS += -fno-reorder-functions
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
66 67
67 68 LD_FLAGS=-static -N --gc-sections
68 69 CCASFLAGS=-Wa,--divide
69 70 LIBSTAND= ../../libstand/i386/libstand.a
70 71 LIBZFSBOOT= ../../zfs/i386/libzfsboot.a
71 72
72 73 include ../Makefile.inc
73 74
74 75 .PARALLEL:
75 76
76 -all: machine x86 $(PROG)
77 +all: $(PROG)
77 78
78 79 install: all $(ROOTBOOTPROG)
79 80
80 81 OBJS = multiboot.o zfsboot.o sio.o cons.o panic.o devopen.o \
81 82 part.o biosmem.o smbios.o biosdisk.o devicename.o disk.o bcache.o \
82 83 time.o crc32.o
83 84
84 85 CLEANFILES= gptzfsboot $(OBJS)
85 86
86 87 gptzfsboot: gptldr.bin gptzfsboot.bin ${BTXKERN}
87 88 $(BTXLD) -v -E ${ORG2} -f bin -b ${BTXKERN} -V ${BOOT2_VERSION} -l \
88 89 gptldr.bin -o $@ gptzfsboot.bin
89 90
90 91 CLEANFILES += gptldr.bin gptldr.out gptldr.o
91 92
92 93 gptldr.bin: gptldr.out
93 94 ${OBJCOPY} -S -O binary gptldr.out $@
94 95
95 96 gptldr.out: gptldr.o
96 97 ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o $@ gptldr.o
97 98
98 99 CLEANFILES += gptzfsboot.bin gptzfsboot.out
99 100
100 101 gptzfsboot.bin: gptzfsboot.out
101 102 ${OBJCOPY} -S -O binary gptzfsboot.out $@
102 103
103 104 gptzfsboot.out: ${BTXCRT} ${OBJS} ${LIBZFSBOOT} ${LIBSTAND}
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
104 105 ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o $@ ${BTXCRT} ${OBJS} \
105 106 ${LIBZFSBOOT} ${LIBSTAND}
106 107
107 108 machine:
108 109 $(RM) machine
109 110 $(SYMLINK) ../../../i386/include machine
110 111
111 112 x86:
112 113 $(RM) x86
113 114 $(SYMLINK) ../../../x86/include x86
115 +
116 +$(OBJS): machine x86
114 117
115 118 %.o: ../common/%.c
116 119 $(COMPILE.c) -o $@ $<
117 120
118 121 %.o: ../../common/%.c
119 122 $(COMPILE.c) -o $@ $<
120 123
121 124 biosdisk.o: ../libi386/biosdisk.c
122 125 $(CC) $(CFLAGS) $(CPPFLAGS) -Dalloca=__builtin_alloca -c -o $@ ../libi386/$*.c
123 126
124 127 biosmem.o: ../libi386/biosmem.c
125 128 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c
126 129
127 130 smbios.o: ../libi386/smbios.c
128 131 $(CC) $(CFLAGS) $(CPPFLAGS) \
129 132 -DSMBIOS_SERIAL_NUMBERS -DSMBIOS_LITTLE_ENDIAN_UUID \
130 133 -c -o $@ ../libi386/$*.c
131 134
132 135 devicename.o: ../libi386/devicename.c
133 136 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c
134 137
135 138 time.o: ../libi386/time.c
136 139 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ../libi386/$*.c
137 140
138 141 .S.o:
139 142 $(CC) $(CFLAGS) $(CCASFLAGS) -c -o $@ $<
140 143
141 144 clobber: clean
142 145
143 146 clean:
144 147 $(RM) $(CLEANFILES) machine x86
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX