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/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
46 47
47 48 install: all $(ROOTBOOTLOADER)
48 49
49 50 PROG= ${LOADER}.sym
50 51 INTERNALPROG=
51 52
52 53 # architecture-specific loader code
53 54 SRCS= main.c conf.c vers.c chain.c
54 55
55 56 CPPFLAGS += -DLOADER_TFTP_SUPPORT -DLOADER_GZIP_SUPPORT
56 57
57 58 # Enable BootForth
58 59 CPPFLAGS += -DBOOT_FORTH -I$(SRC)/common/ficl -I../../ficl
59 60 LIBFICL= ../../ficl/i386/libficl.a
60 61
61 62 # Always add MI sources
62 63 SRCS += boot.c commands.c console.c devopen.c interp.c
63 64 SRCS += interp_backslash.c interp_parse.c ls.c misc.c
64 65 SRCS += module.c panic.c linenoise.c
65 66
66 67 SRCS += load_elf32.c load_elf32_obj.c reloc_elf32.c
67 68 SRCS += load_elf64.c load_elf64_obj.c reloc_elf64.c
68 69
69 70 SRCS += dev_net.c
70 71
71 72 SRCS += disk.c part.c
72 73 CPPFLAGS += -DLOADER_DISK_SUPPORT
73 74 SRCS += crc32.c
74 75 CPPFLAGS += -DLOADER_GPT_SUPPORT
75 76 CPPFLAGS += -DLOADER_MBR_SUPPORT
76 77
77 78 SRCS += bcache.c
78 79
79 80 SRCS += isapnp.c
80 81 SRCS += pnp.c
81 82
82 83 # Forth interpreter
83 84 SRCS += interp_forth.c
84 85
85 86 MAN += loader.8
86 87 MAN += zfsloader.8
87 88 CPPFLAGS += -I../../common
88 89 CPPFLAGS += -I.
89 90
90 91 CLEANFILES= vers.c ${LOADER} ${LOADER}.sym ${LOADER}.bin loader.help
91 92
92 93 CFLAGS += -Wall
93 94 LDFLAGS= -static -Ttext 0x0
94 95
95 96 # i386 standalone support library
96 97 CPPFLAGS += -I.. -I../../../../lib/libstand
97 98 LIBSTAND= ../../libstand/i386/libstand.a
98 99
99 100 # BTX components
100 101 CPPFLAGS += -I../btx/lib
101 102
102 103 # Debug me!
103 104 #CFLAGS+= -g
104 105 #LDFLAGS+= -g
105 106
106 107 include ../Makefile.inc
107 108
108 109 vers.c: ../../common/newvers.sh version
109 110 $(SH) ../../common/newvers.sh version ${NEWVERSWHAT}
110 111
111 112 ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
112 113 $(BTXLD) -v -f aout -e ${LOADER_ADDRESS} -o $@ -l ${BTXLDR} \
113 114 -b ${BTXKERN} ${LOADER}.bin
114 115
115 116 ${LOADER}.bin: ${LOADER}.sym
116 117 $(CP) $^ $@
117 118 $(GSTRIP) -R .comment -R .note $@
118 119
119 120 loader.help: ../../common/help.common help.i386
120 121 $(CAT) $^ | $(AWK) -f ../../common/merge_help.awk > $@
121 122
122 123 FILES= ${LOADER} loader.help
123 124
124 125 include ../../forth/Makefile.inc
125 126 FORTH += pcibios.4th
126 127
127 128 FILES += loader.rc
128 129 FORTH += menu.rc
129 130
130 131 # XXX crt0.o needs to be first for pxeboot(8) to work
131 132
132 133 DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
133 134 LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
134 135
135 136 CLEANFILES += machine x86
136 137 CFLAGS += -DLOADER_PREFER_AMD64
↓ open down ↓ |
81 lines elided |
↑ open up ↑ |
137 138
138 139 machine:
139 140 $(RM) machine
140 141 $(SYMLINK) ../../../i386/include machine
141 142
142 143 x86:
143 144 $(RM) x86
144 145 $(SYMLINK) ../../../x86/include x86
145 146
146 147 OBJS= $(SRCS:%.c=%.o)
148 +
149 +${OBJS}: machine x86
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 ↓ |
18 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX