Print this page
7438 intermittent build failures from the new boot loader
Reviewed by: Juraj Lutter <juraj.lutter@erigones.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/boot/sys/boot/i386/loader/Makefile
+++ new/usr/src/boot/sys/boot/i386/loader/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 include $(SRC)/Makefile.master
17 18
18 19 CFLAGS= -O2
19 20 CPPFLAGS= -DSTAND -nostdinc -I../../../../include -I../../..
20 21 LOADER= zfsloader
21 22 NEWVERSWHAT= "ZFS enabled bootstrap loader" x86
22 23 MAN=
23 24
24 25 # Set by zfsloader Makefile
25 26 CPPFLAGS += -DLOADER_ZFS_SUPPORT -I../../zfs
26 27 CPPFLAGS += -I../libi386
27 28 LIBZFSBOOT= ../../zfs/i386/libzfsboot.a
28 29 LIBI386= ../libi386/libi386.a
29 30
30 31 # loader.help build needs better awk
31 32 AWK= /usr/xpg4/bin/awk
32 33 LD= $(GNU_ROOT)/bin/gld
33 34 CC= $(GCC_ROOT)/bin/gcc
34 35 OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
35 36 GSTRIP= $(GNU_ROOT)/bin/gstrip
36 37 ROOT_BOOT= $(ROOT)/boot
37 38 ROOT_BOOT_DEFAULTS= $(ROOT)/boot/defaults
38 39 ROOT_BOOT_FORTH= $(ROOT)/boot/forth
39 40 ROOT_BOOT_CONF= $(ROOT)/boot/conf.d
40 41 ROOTBOOTFILES=$(FILES:%=$(ROOT_BOOT)/%)
41 42 ROOTBOOTFORTH=$(FORTH:%=$(ROOT_BOOT_FORTH)/%)
42 43 ROOTBOOTDEFAULTS=$(DEFFILES:%=$(ROOT_BOOT_DEFAULTS)/%)
43 44 FILEMODE=0444
44 45
45 -all: machine x86 ${LOADER} loader.help
46 +all: ${LOADER} loader.help
47 +
48 +${LOADER}: machine x86
46 49
47 50 install: all $(ROOTBOOTLOADER)
48 51
49 52 PROG= ${LOADER}.sym
50 53 INTERNALPROG=
51 54
52 55 # architecture-specific loader code
53 56 SRCS= main.c conf.c vers.c chain.c
54 57
55 58 CPPFLAGS += -DLOADER_TFTP_SUPPORT -DLOADER_GZIP_SUPPORT
56 59
57 60 # Enable BootForth
58 61 CPPFLAGS += -DBOOT_FORTH -I$(SRC)/common/ficl -I../../ficl
59 62 LIBFICL= ../../ficl/i386/libficl.a
60 63
61 64 # Always add MI sources
62 65 SRCS += boot.c commands.c console.c devopen.c interp.c
63 66 SRCS += interp_backslash.c interp_parse.c ls.c misc.c
64 67 SRCS += module.c panic.c linenoise.c
65 68
66 69 SRCS += load_elf32.c load_elf32_obj.c reloc_elf32.c
67 70 SRCS += load_elf64.c load_elf64_obj.c reloc_elf64.c
68 71
69 72 SRCS += dev_net.c
70 73
71 74 SRCS += disk.c part.c
72 75 CPPFLAGS += -DLOADER_DISK_SUPPORT
73 76 SRCS += crc32.c
74 77 CPPFLAGS += -DLOADER_GPT_SUPPORT
75 78 CPPFLAGS += -DLOADER_MBR_SUPPORT
76 79
77 80 SRCS += bcache.c
78 81
79 82 SRCS += isapnp.c
80 83 SRCS += pnp.c
81 84
82 85 # Forth interpreter
83 86 SRCS += interp_forth.c
84 87
85 88 MAN += loader.8
86 89 MAN += zfsloader.8
87 90 CPPFLAGS += -I../../common
88 91 CPPFLAGS += -I.
89 92
90 93 CLEANFILES= vers.c ${LOADER} ${LOADER}.sym ${LOADER}.bin loader.help
91 94
92 95 CFLAGS += -Wall
93 96 LDFLAGS= -static -Ttext 0x0
94 97
95 98 # i386 standalone support library
96 99 CPPFLAGS += -I.. -I../../../../lib/libstand
97 100 LIBSTAND= ../../libstand/i386/libstand.a
98 101
99 102 # BTX components
100 103 CPPFLAGS += -I../btx/lib
101 104
102 105 # Debug me!
103 106 #CFLAGS+= -g
104 107 #LDFLAGS+= -g
105 108
106 109 include ../Makefile.inc
107 110
108 111 vers.c: ../../common/newvers.sh version
109 112 $(SH) ../../common/newvers.sh version ${NEWVERSWHAT}
110 113
111 114 ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
112 115 $(BTXLD) -v -f aout -e ${LOADER_ADDRESS} -o $@ -l ${BTXLDR} \
113 116 -b ${BTXKERN} ${LOADER}.bin
114 117
115 118 ${LOADER}.bin: ${LOADER}.sym
116 119 $(CP) $^ $@
117 120 $(GSTRIP) -R .comment -R .note $@
118 121
119 122 loader.help: ../../common/help.common help.i386
120 123 $(CAT) $^ | $(AWK) -f ../../common/merge_help.awk > $@
121 124
122 125 FILES= ${LOADER} loader.help
123 126
124 127 include ../../forth/Makefile.inc
125 128 FORTH += pcibios.4th
126 129
127 130 FILES += loader.rc
128 131 FORTH += menu.rc
129 132
130 133 # XXX crt0.o needs to be first for pxeboot(8) to work
131 134
132 135 DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
133 136 LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
134 137
135 138 CLEANFILES += machine x86
136 139 CFLAGS += -DLOADER_PREFER_AMD64
137 140
138 141 machine:
139 142 $(RM) machine
140 143 $(SYMLINK) ../../../i386/include machine
141 144
142 145 x86:
143 146 $(RM) x86
144 147 $(SYMLINK) ../../../x86/include x86
145 148
146 149 OBJS= $(SRCS:%.c=%.o)
147 150
148 151 ${PROG}: ${OBJS} $(LDADD)
149 152 $(LD) $(LDFLAGS) -o $@ $(BTXCRT) $(OBJS) $(LDADD)
150 153
151 154 clean: clobber
152 155 clobber:
153 156 $(RM) $(CLEANFILES) $(OBJS)
154 157
155 158 install: all $(ROOT_BOOT_DEFAULTS) $(ROOT_BOOT_FORTH) \
156 159 $(ROOTBOOTFILES) $(ROOTBOOTDEFAULTS) $(ROOT_BOOT_CONF) $(ROOTBOOTFORTH)
157 160
158 161 %.o: ../../common/%.c
159 162 $(COMPILE.c) -o $@ $<
160 163
161 164 %.o: ../../common/linenoise/%.c
162 165 $(COMPILE.c) -o $@ $<
163 166
164 167 $(ROOT_BOOT)/%: ../../forth/%
165 168 $(INS.file)
166 169
167 170 $(ROOT_BOOT_DEFAULTS)/%: ../../forth/%
168 171 $(INS.file)
169 172
170 173 $(ROOT_BOOT_FORTH)/%: ../../forth/%
171 174 $(INS.file)
172 175
173 176 $(ROOT_BOOT_DEFAULTS) $(ROOT_BOOT_CONF) $(ROOT_BOOT_FORTH):
174 177 $(INS.dir)
↓ open down ↓ |
119 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX