Merge lp:~noskcaj/ubuntu/trusty/elilo/merge into lp:ubuntu/trusty/elilo
- Trusty (14.04)
- merge
- Merge into trusty
Proposed by
Jackson Doak
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Michael Terry | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~noskcaj/ubuntu/trusty/elilo/merge | ||||
Merge into: | lp:ubuntu/trusty/elilo | ||||
Diff against target: |
3477 lines (+1147/-1046) 53 files modified
.pc/.quilt_patches (+1/-0) .pc/.quilt_series (+1/-0) .pc/apple.diff/Makefile (+1/-1) .pc/apple.diff/elilo.c (+1/-1) .pc/applied-patches (+0/-1) .pc/debian-changes-3.12-3/Makefile (+0/-109) .pc/debian-changes-3.12-3/choosers/Makefile (+0/-58) .pc/debian-changes-3.12-3/devschemes/Makefile (+0/-46) .pc/debian-changes-3.12-3/fs/Makefile (+0/-70) .pc/debian-changes-3.12-3/ia32/Makefile (+0/-51) .pc/debian-changes-3.12-3/ia64/Makefile (+0/-42) .pc/debian-changes-3.12-3/tools/Makefile (+0/-47) .pc/debian-changes-3.12-3/x86_64/Makefile (+0/-52) .pc/fix-paths.diff/Make.defaults (+1/-1) ChangeLog (+57/-0) Makefile (+6/-11) alloc.c (+15/-7) bootparams.c (+2/-0) choosers/Makefile (+10/-19) choosers/simple.c (+7/-6) choosers/textmenu.c (+3/-3) config.c (+5/-5) debian/changelog (+49/-3) debian/control (+4/-2) debian/elilo.sh (+1/-1) debian/patches/cross-build.diff (+266/-0) debian/patches/debian-changes-3.12-3 (+0/-284) debian/patches/fix-paths.diff (+1/-1) debian/patches/series (+1/-1) debian/po/da.po (+86/-0) debian/po/pl.po (+90/-0) debian/rules (+5/-9) devschemes/Makefile (+5/-10) elilo.c (+1/-1) elilo.h (+8/-2) fileops.c (+1/-1) fs/Makefile (+10/-19) fs/localfs.c (+1/-1) glue_netfs.c (+23/-0) ia32/Makefile (+7/-12) ia32/bzimage.c (+1/-1) ia32/system.c (+19/-1) ia64/Makefile (+4/-9) ia64/system.c (+6/-0) initrd.c (+10/-2) strops.c (+6/-6) tools/Makefile (+4/-9) tools/eliloalt.c (+23/-12) x86_64/Makefile (+7/-12) x86_64/bzimage.c (+136/-32) x86_64/config.c (+16/-3) x86_64/sysdeps.h (+27/-36) x86_64/system.c (+219/-46) |
||||
To merge this branch: | bzr merge lp:~noskcaj/ubuntu/trusty/elilo/merge | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Terry | Approve | ||
Review via email: mp+198125@code.launchpad.net |
Commit message
Description of the change
Merge from debian
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file '.ChangeLog.swp' | |||
2 | 0 | Binary files .ChangeLog.swp 2009-11-01 22:37:21 +0000 and .ChangeLog.swp 1970-01-01 00:00:00 +0000 differ | 0 | Binary files .ChangeLog.swp 2009-11-01 22:37:21 +0000 and .ChangeLog.swp 1970-01-01 00:00:00 +0000 differ |
3 | === added file '.pc/.quilt_patches' | |||
4 | --- .pc/.quilt_patches 1970-01-01 00:00:00 +0000 | |||
5 | +++ .pc/.quilt_patches 2013-12-06 20:30:39 +0000 | |||
6 | @@ -0,0 +1,1 @@ | |||
7 | 1 | debian/patches | ||
8 | 0 | 2 | ||
9 | === added file '.pc/.quilt_series' | |||
10 | --- .pc/.quilt_series 1970-01-01 00:00:00 +0000 | |||
11 | +++ .pc/.quilt_series 2013-12-06 20:30:39 +0000 | |||
12 | @@ -0,0 +1,1 @@ | |||
13 | 1 | series | ||
14 | 0 | 2 | ||
15 | === modified file '.pc/apple.diff/Makefile' | |||
16 | --- .pc/apple.diff/Makefile 2011-08-22 21:17:34 +0000 | |||
17 | +++ .pc/apple.diff/Makefile 2013-12-06 20:30:39 +0000 | |||
18 | @@ -81,7 +81,7 @@ | |||
19 | 81 | 81 | ||
20 | 82 | elilo.so: $(FILES) | 82 | elilo.so: $(FILES) |
21 | 83 | 83 | ||
23 | 84 | elilo.o : elilo.c | 84 | elilo.o : elilo.c $(ARCH)/sysdeps.h |
24 | 85 | 85 | ||
25 | 86 | fileops.o : Make.defaults | 86 | fileops.o : Make.defaults |
26 | 87 | chooser.o : Make.defaults | 87 | chooser.o : Make.defaults |
27 | 88 | 88 | ||
28 | === modified file '.pc/apple.diff/elilo.c' | |||
29 | --- .pc/apple.diff/elilo.c 2011-08-22 21:17:34 +0000 | |||
30 | +++ .pc/apple.diff/elilo.c 2013-12-06 20:30:39 +0000 | |||
31 | @@ -93,7 +93,7 @@ | |||
32 | 93 | INTN | 93 | INTN |
33 | 94 | kernel_load(EFI_HANDLE image, CHAR16 *kname, kdesc_t *kd, memdesc_t *imem, memdesc_t *mmem) | 94 | kernel_load(EFI_HANDLE image, CHAR16 *kname, kdesc_t *kd, memdesc_t *imem, memdesc_t *mmem) |
34 | 95 | { | 95 | { |
36 | 96 | CHAR16 kernel[CMDLINE_MAXLEN]; | 96 | CHAR16 kernel[FILENAME_MAXLEN]; |
37 | 97 | 97 | ||
38 | 98 | /* | 98 | /* |
39 | 99 | * Do the vm image switch here | 99 | * Do the vm image switch here |
40 | 100 | 100 | ||
41 | === modified file '.pc/applied-patches' | |||
42 | --- .pc/applied-patches 2011-08-22 21:17:34 +0000 | |||
43 | +++ .pc/applied-patches 2013-12-06 20:30:39 +0000 | |||
44 | @@ -1,3 +1,2 @@ | |||
45 | 1 | fix-paths.diff | 1 | fix-paths.diff |
46 | 2 | apple.diff | 2 | apple.diff |
47 | 3 | debian-changes-3.12-3 | ||
48 | 4 | 3 | ||
49 | === removed directory '.pc/debian-changes-3.12-3' | |||
50 | === removed file '.pc/debian-changes-3.12-3/Makefile' | |||
51 | --- .pc/debian-changes-3.12-3/Makefile 2011-08-22 21:17:34 +0000 | |||
52 | +++ .pc/debian-changes-3.12-3/Makefile 1970-01-01 00:00:00 +0000 | |||
53 | @@ -1,109 +0,0 @@ | |||
54 | 1 | # | ||
55 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
56 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
57 | 4 | # Contributed by Fenghua Yu<fenghua.yu@intel.com> | ||
58 | 5 | # Contributed by Chandramouli Narayanan<mouli@linux.intel.com> | ||
59 | 6 | # | ||
60 | 7 | # This file is part of ELILO, the LINUX EFI boot loader. | ||
61 | 8 | # | ||
62 | 9 | # ELILO is free software; you can redistribute it and/or modify | ||
63 | 10 | # it under the terms of the GNU General Public License as published by | ||
64 | 11 | # the Free Software Foundation; either version 2, or (at your option) | ||
65 | 12 | # any later version. | ||
66 | 13 | # | ||
67 | 14 | # ELILO is distributed in the hope that it will be useful, | ||
68 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
69 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
70 | 17 | # GNU General Public License for more details. | ||
71 | 18 | # | ||
72 | 19 | # You should have received a copy of the GNU General Public License | ||
73 | 20 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
74 | 21 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
75 | 22 | # 02111-1307, USA. | ||
76 | 23 | # | ||
77 | 24 | # Please check out the elilo.txt for complete documentation on how | ||
78 | 25 | # to use this program. | ||
79 | 26 | # | ||
80 | 27 | |||
81 | 28 | include Make.defaults | ||
82 | 29 | TOPDIR=. | ||
83 | 30 | |||
84 | 31 | |||
85 | 32 | CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o | ||
86 | 33 | LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds | ||
87 | 34 | |||
88 | 35 | LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS) | ||
89 | 36 | LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) | ||
90 | 37 | FORMAT = efi-app-$(ARCH) | ||
91 | 38 | |||
92 | 39 | FILESYSTEM = | ||
93 | 40 | |||
94 | 41 | ifeq ($(CONFIG_localfs),y) | ||
95 | 42 | FILESYSTEMS += glue_localfs.o | ||
96 | 43 | endif | ||
97 | 44 | |||
98 | 45 | ifeq ($(CONFIG_ext2fs),y) | ||
99 | 46 | FILESYSTEMS += glue_ext2fs.o | ||
100 | 47 | endif | ||
101 | 48 | |||
102 | 49 | ifeq ($(CONFIG_netfs),y) | ||
103 | 50 | FILESYSTEMS += glue_netfs.o | ||
104 | 51 | endif | ||
105 | 52 | |||
106 | 53 | SUBDIRS = fs choosers devschemes tools | ||
107 | 54 | |||
108 | 55 | ifeq ($(ARCH),ia64) | ||
109 | 56 | SUBDIRS += ia64 | ||
110 | 57 | endif | ||
111 | 58 | |||
112 | 59 | ifeq ($(ARCH),ia32) | ||
113 | 60 | SUBDIRS += ia32 | ||
114 | 61 | endif | ||
115 | 62 | |||
116 | 63 | ifeq ($(ARCH),x86_64) | ||
117 | 64 | SUBDIRS += x86_64 | ||
118 | 65 | endif | ||
119 | 66 | |||
120 | 67 | FILES = elilo.o getopt.o strops.o loader.o \ | ||
121 | 68 | fileops.o util.o vars.o alloc.o chooser.o \ | ||
122 | 69 | config.o initrd.o alternate.o bootparams.o \ | ||
123 | 70 | gunzip.o console.o apple.o fs/fs.o \ | ||
124 | 71 | choosers/choosers.o \ | ||
125 | 72 | devschemes/devschemes.o \ | ||
126 | 73 | $(ARCH)/sysdeps.o \ | ||
127 | 74 | $(FILESYSTEMS) | ||
128 | 75 | |||
129 | 76 | TARGETS = elilo.efi | ||
130 | 77 | |||
131 | 78 | all: check_gcc $(SUBDIRS) $(TARGETS) | ||
132 | 79 | |||
133 | 80 | elilo.efi: elilo.so | ||
134 | 81 | |||
135 | 82 | elilo.so: $(FILES) | ||
136 | 83 | |||
137 | 84 | elilo.o : elilo.c | ||
138 | 85 | |||
139 | 86 | fileops.o : Make.defaults | ||
140 | 87 | chooser.o : Make.defaults | ||
141 | 88 | |||
142 | 89 | $(SUBDIRS): dummy | ||
143 | 90 | $(MAKE) -C $@ | ||
144 | 91 | |||
145 | 92 | dummy: | ||
146 | 93 | |||
147 | 94 | clean: | ||
148 | 95 | @set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d $@ ; done | ||
149 | 96 | rm -f $(TARGETS) *~ *.so $(FILES) | ||
150 | 97 | |||
151 | 98 | .PRECIOUS: elilo.so | ||
152 | 99 | |||
153 | 100 | # | ||
154 | 101 | # on both platforms you must use gcc 3.0 or higher | ||
155 | 102 | # | ||
156 | 103 | check_gcc: | ||
157 | 104 | ifeq ($(GCC_VERSION),2) | ||
158 | 105 | @echo "you need to use a version of gcc >= 3.0, you are using `$(CC) --version`" | ||
159 | 106 | @exit 1 | ||
160 | 107 | endif | ||
161 | 108 | |||
162 | 109 | include Make.rules | ||
163 | 110 | 0 | ||
164 | === removed directory '.pc/debian-changes-3.12-3/choosers' | |||
165 | === removed file '.pc/debian-changes-3.12-3/choosers/Makefile' | |||
166 | --- .pc/debian-changes-3.12-3/choosers/Makefile 2010-06-08 13:42:05 +0000 | |||
167 | +++ .pc/debian-changes-3.12-3/choosers/Makefile 1970-01-01 00:00:00 +0000 | |||
168 | @@ -1,58 +0,0 @@ | |||
169 | 1 | # | ||
170 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
171 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
172 | 4 | # | ||
173 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
174 | 6 | # | ||
175 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
176 | 8 | # it under the terms of the GNU General Public License as published by | ||
177 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
178 | 10 | # any later version. | ||
179 | 11 | # | ||
180 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
181 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
182 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
183 | 15 | # GNU General Public License for more details. | ||
184 | 16 | # | ||
185 | 17 | # You should have received a copy of the GNU General Public License | ||
186 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
187 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
188 | 20 | # 02111-1307, USA. | ||
189 | 21 | # | ||
190 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
191 | 23 | # to use this program. | ||
192 | 24 | # | ||
193 | 25 | |||
194 | 26 | include ../Make.defaults | ||
195 | 27 | include ../Make.rules | ||
196 | 28 | |||
197 | 29 | TOPDIR=$(CDIR)/.. | ||
198 | 30 | |||
199 | 31 | FILES= | ||
200 | 32 | |||
201 | 33 | ifeq ($(CONFIG_chooser_simple),y) | ||
202 | 34 | FILES +=simple.o | ||
203 | 35 | endif | ||
204 | 36 | |||
205 | 37 | ifeq ($(CONFIG_chooser_textmenu),y) | ||
206 | 38 | FILES +=textmenu.o | ||
207 | 39 | endif | ||
208 | 40 | |||
209 | 41 | TARGET=choosers.o | ||
210 | 42 | |||
211 | 43 | all: $(TARGET) | ||
212 | 44 | |||
213 | 45 | $(TARGET): check-choosers $(TOPDIR)/Make.defaults $(FILES) | ||
214 | 46 | $(LD) -o $@ -r $(FILES) | ||
215 | 47 | |||
216 | 48 | clean: | ||
217 | 49 | $(RM) -f $(TARGET) $(FILES) | ||
218 | 50 | |||
219 | 51 | check-choosers: | ||
220 | 52 | @if [ -n "$(FILES)" ]; then \ | ||
221 | 53 | exit 0; \ | ||
222 | 54 | else \ | ||
223 | 55 | echo "You need to define at least one chooser in Make.defaults"; \ | ||
224 | 56 | exit 1; \ | ||
225 | 57 | fi | ||
226 | 58 | |||
227 | 59 | 0 | ||
228 | === removed directory '.pc/debian-changes-3.12-3/devschemes' | |||
229 | === removed file '.pc/debian-changes-3.12-3/devschemes/Makefile' | |||
230 | --- .pc/debian-changes-3.12-3/devschemes/Makefile 2010-06-08 13:42:05 +0000 | |||
231 | +++ .pc/debian-changes-3.12-3/devschemes/Makefile 1970-01-01 00:00:00 +0000 | |||
232 | @@ -1,46 +0,0 @@ | |||
233 | 1 | # | ||
234 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
235 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
236 | 4 | # | ||
237 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
238 | 6 | # | ||
239 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
240 | 8 | # it under the terms of the GNU General Public License as published by | ||
241 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
242 | 10 | # any later version. | ||
243 | 11 | # | ||
244 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
245 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
246 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
247 | 15 | # GNU General Public License for more details. | ||
248 | 16 | # | ||
249 | 17 | # You should have received a copy of the GNU General Public License | ||
250 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
251 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
252 | 20 | # 02111-1307, USA. | ||
253 | 21 | # | ||
254 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
255 | 23 | # to use this program. | ||
256 | 24 | # | ||
257 | 25 | |||
258 | 26 | include ../Make.defaults | ||
259 | 27 | include ../Make.rules | ||
260 | 28 | |||
261 | 29 | TOPDIR=$(CDIR)/.. | ||
262 | 30 | |||
263 | 31 | FILES=simple.o | ||
264 | 32 | |||
265 | 33 | |||
266 | 34 | TARGET=devschemes.o | ||
267 | 35 | |||
268 | 36 | all: $(TARGET) | ||
269 | 37 | |||
270 | 38 | # | ||
271 | 39 | # XXX: does not trigger recompile when changing filesystem selection | ||
272 | 40 | # without doing make clean. | ||
273 | 41 | # | ||
274 | 42 | $(TARGET): $(FILES) | ||
275 | 43 | $(LD) -r -o $@ $(FILES) | ||
276 | 44 | |||
277 | 45 | clean: | ||
278 | 46 | $(RM) -f $(TARGET) $(FILES) | ||
279 | 47 | 0 | ||
280 | === removed directory '.pc/debian-changes-3.12-3/fs' | |||
281 | === removed file '.pc/debian-changes-3.12-3/fs/Makefile' | |||
282 | --- .pc/debian-changes-3.12-3/fs/Makefile 2010-06-08 13:42:05 +0000 | |||
283 | +++ .pc/debian-changes-3.12-3/fs/Makefile 1970-01-01 00:00:00 +0000 | |||
284 | @@ -1,70 +0,0 @@ | |||
285 | 1 | # | ||
286 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
287 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
288 | 4 | # | ||
289 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
290 | 6 | # | ||
291 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
292 | 8 | # it under the terms of the GNU General Public License as published by | ||
293 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
294 | 10 | # any later version. | ||
295 | 11 | # | ||
296 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
297 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
298 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
299 | 15 | # GNU General Public License for more details. | ||
300 | 16 | # | ||
301 | 17 | # You should have received a copy of the GNU General Public License | ||
302 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
303 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
304 | 20 | # 02111-1307, USA. | ||
305 | 21 | # | ||
306 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
307 | 23 | # to use this program. | ||
308 | 24 | # | ||
309 | 25 | |||
310 | 26 | include ../Make.defaults | ||
311 | 27 | include ../Make.rules | ||
312 | 28 | |||
313 | 29 | TOPDIR=$(CDIR)/.. | ||
314 | 30 | |||
315 | 31 | FILES= | ||
316 | 32 | ifeq ($(CONFIG_localfs),y) | ||
317 | 33 | FILES += localfs.o | ||
318 | 34 | endif | ||
319 | 35 | |||
320 | 36 | # | ||
321 | 37 | # Ext2 is now disabled by default. See top level Makefile | ||
322 | 38 | # for details | ||
323 | 39 | # | ||
324 | 40 | ifeq ($(CONFIG_ext2fs),y) | ||
325 | 41 | FILES += ext2fs.o | ||
326 | 42 | endif | ||
327 | 43 | |||
328 | 44 | ifeq ($(CONFIG_netfs),y) | ||
329 | 45 | FILES += netfs.o | ||
330 | 46 | endif | ||
331 | 47 | |||
332 | 48 | |||
333 | 49 | TARGET=fs.o | ||
334 | 50 | |||
335 | 51 | all: $(TARGET) | ||
336 | 52 | |||
337 | 53 | # | ||
338 | 54 | # XXX: does not trigger recompile when changing filesystem selection | ||
339 | 55 | # without doing make clean. | ||
340 | 56 | # | ||
341 | 57 | $(TARGET): check-filesystems $(TOPDIR)/Make.defaults $(FILES) | ||
342 | 58 | $(LD) -r -o $@ $(FILES) | ||
343 | 59 | |||
344 | 60 | clean: | ||
345 | 61 | $(RM) -f $(TARGET) $(FILES) | ||
346 | 62 | |||
347 | 63 | check-filesystems: | ||
348 | 64 | @if [ -n "$(FILES)" ]; then \ | ||
349 | 65 | exit 0; \ | ||
350 | 66 | else \ | ||
351 | 67 | echo "You need to define at least one filesystem in Make.defaults"; \ | ||
352 | 68 | exit 1; \ | ||
353 | 69 | fi | ||
354 | 70 | |||
355 | 71 | 0 | ||
356 | === removed directory '.pc/debian-changes-3.12-3/ia32' | |||
357 | === removed file '.pc/debian-changes-3.12-3/ia32/Makefile' | |||
358 | --- .pc/debian-changes-3.12-3/ia32/Makefile 2010-06-08 13:42:05 +0000 | |||
359 | +++ .pc/debian-changes-3.12-3/ia32/Makefile 1970-01-01 00:00:00 +0000 | |||
360 | @@ -1,51 +0,0 @@ | |||
361 | 1 | # | ||
362 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
363 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
364 | 4 | # | ||
365 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
366 | 6 | # | ||
367 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
368 | 8 | # it under the terms of the GNU General Public License as published by | ||
369 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
370 | 10 | # any later version. | ||
371 | 11 | # | ||
372 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
373 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
374 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
375 | 15 | # GNU General Public License for more details. | ||
376 | 16 | # | ||
377 | 17 | # You should have received a copy of the GNU General Public License | ||
378 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
379 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
380 | 20 | # 02111-1307, USA. | ||
381 | 21 | # | ||
382 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
383 | 23 | # to use this program. | ||
384 | 24 | # | ||
385 | 25 | |||
386 | 26 | include ../Make.defaults | ||
387 | 27 | include ../Make.rules | ||
388 | 28 | |||
389 | 29 | TOPDIR=$(CDIR)/.. | ||
390 | 30 | |||
391 | 31 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | ||
392 | 32 | |||
393 | 33 | TARGET=sysdeps.o | ||
394 | 34 | |||
395 | 35 | all: $(TARGET) | ||
396 | 36 | |||
397 | 37 | system.o: rmswitch.h | ||
398 | 38 | |||
399 | 39 | rmswitch.h: bin_to_h.c rmswitch.S | ||
400 | 40 | $(CC) -o bin_to_h bin_to_h.c | ||
401 | 41 | $(AS) -o rmswitch.o rmswitch.S | ||
402 | 42 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | ||
403 | 43 | ./bin_to_h <rmswitch >rmswitch.h | ||
404 | 44 | |||
405 | 45 | $(TARGET): $(FILES) | ||
406 | 46 | $(LD) -r -o $@ $(FILES) | ||
407 | 47 | |||
408 | 48 | clean: | ||
409 | 49 | $(RM) -f $(TARGET) $(FILES) | ||
410 | 50 | $(RM) -f bin_to_h.o bin_to_h | ||
411 | 51 | $(RM) -f rmswitch.h rmswitch.o rmswitch | ||
412 | 52 | 0 | ||
413 | === removed directory '.pc/debian-changes-3.12-3/ia64' | |||
414 | === removed file '.pc/debian-changes-3.12-3/ia64/Makefile' | |||
415 | --- .pc/debian-changes-3.12-3/ia64/Makefile 2010-06-08 13:42:05 +0000 | |||
416 | +++ .pc/debian-changes-3.12-3/ia64/Makefile 1970-01-01 00:00:00 +0000 | |||
417 | @@ -1,42 +0,0 @@ | |||
418 | 1 | # | ||
419 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
420 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
421 | 4 | # | ||
422 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
423 | 6 | # | ||
424 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
425 | 8 | # it under the terms of the GNU General Public License as published by | ||
426 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
427 | 10 | # any later version. | ||
428 | 11 | # | ||
429 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
430 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
431 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
432 | 15 | # GNU General Public License for more details. | ||
433 | 16 | # | ||
434 | 17 | # You should have received a copy of the GNU General Public License | ||
435 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
436 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
437 | 20 | # 02111-1307, USA. | ||
438 | 21 | # | ||
439 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
440 | 23 | # to use this program. | ||
441 | 24 | # | ||
442 | 25 | |||
443 | 26 | include ../Make.defaults | ||
444 | 27 | include ../Make.rules | ||
445 | 28 | |||
446 | 29 | TOPDIR=$(CDIR)/.. | ||
447 | 30 | |||
448 | 31 | FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \ | ||
449 | 32 | gzip.o memset.o memcpy.o setjmp.o longjmp.o | ||
450 | 33 | |||
451 | 34 | TARGET=sysdeps.o | ||
452 | 35 | |||
453 | 36 | all: $(TARGET) | ||
454 | 37 | |||
455 | 38 | $(TARGET): $(FILES) | ||
456 | 39 | $(LD) -o $@ -r $(FILES) | ||
457 | 40 | |||
458 | 41 | clean: | ||
459 | 42 | $(RM) -f $(TARGET) $(FILES) | ||
460 | 43 | 0 | ||
461 | === removed directory '.pc/debian-changes-3.12-3/tools' | |||
462 | === removed file '.pc/debian-changes-3.12-3/tools/Makefile' | |||
463 | --- .pc/debian-changes-3.12-3/tools/Makefile 2010-06-08 13:42:05 +0000 | |||
464 | +++ .pc/debian-changes-3.12-3/tools/Makefile 1970-01-01 00:00:00 +0000 | |||
465 | @@ -1,47 +0,0 @@ | |||
466 | 1 | # | ||
467 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
468 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
469 | 4 | # | ||
470 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
471 | 6 | # | ||
472 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
473 | 8 | # it under the terms of the GNU General Public License as published by | ||
474 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
475 | 10 | # any later version. | ||
476 | 11 | # | ||
477 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
478 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
479 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
480 | 15 | # GNU General Public License for more details. | ||
481 | 16 | # | ||
482 | 17 | # You should have received a copy of the GNU General Public License | ||
483 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
484 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
485 | 20 | # 02111-1307, USA. | ||
486 | 21 | # | ||
487 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
488 | 23 | # to use this program. | ||
489 | 24 | # | ||
490 | 25 | |||
491 | 26 | include ../Make.defaults | ||
492 | 27 | include ../Make.rules | ||
493 | 28 | |||
494 | 29 | TOPDIR=$(CDIR)/.. | ||
495 | 30 | |||
496 | 31 | FILES=eliloalt.o | ||
497 | 32 | TARGET=eliloalt | ||
498 | 33 | |||
499 | 34 | all: $(TARGET) | ||
500 | 35 | |||
501 | 36 | # | ||
502 | 37 | # redefine local rule (we build a Linux/ia64 binary here) | ||
503 | 38 | # | ||
504 | 39 | %.o: %.c | ||
505 | 40 | $(CC) $(OPTIMFLAGS) $(DEBUGFLAGS) -c $< -o $@ | ||
506 | 41 | |||
507 | 42 | $(TARGET): %:%.o | ||
508 | 43 | $(CC) -o $@ $(OPTIMFLAGS) $(DEBUGFLAGS) $^ | ||
509 | 44 | |||
510 | 45 | clean: | ||
511 | 46 | $(RM) -f $(TARGET) $(FILES) | ||
512 | 47 | |||
513 | 48 | 0 | ||
514 | === removed directory '.pc/debian-changes-3.12-3/x86_64' | |||
515 | === removed file '.pc/debian-changes-3.12-3/x86_64/Makefile' | |||
516 | --- .pc/debian-changes-3.12-3/x86_64/Makefile 2010-06-08 13:42:05 +0000 | |||
517 | +++ .pc/debian-changes-3.12-3/x86_64/Makefile 1970-01-01 00:00:00 +0000 | |||
518 | @@ -1,52 +0,0 @@ | |||
519 | 1 | # | ||
520 | 2 | # Copyright (C) 2001-2003 Hewlett-Packard Co. | ||
521 | 3 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> | ||
522 | 4 | # | ||
523 | 5 | # This file is part of the ELILO, the EFI Linux boot loader. | ||
524 | 6 | # | ||
525 | 7 | # ELILO is free software; you can redistribute it and/or modify | ||
526 | 8 | # it under the terms of the GNU General Public License as published by | ||
527 | 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
528 | 10 | # any later version. | ||
529 | 11 | # | ||
530 | 12 | # ELILO is distributed in the hope that it will be useful, | ||
531 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
532 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
533 | 15 | # GNU General Public License for more details. | ||
534 | 16 | # | ||
535 | 17 | # You should have received a copy of the GNU General Public License | ||
536 | 18 | # along with ELILO; see the file COPYING. If not, write to the Free | ||
537 | 19 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA | ||
538 | 20 | # 02111-1307, USA. | ||
539 | 21 | # | ||
540 | 22 | # Please check out the elilo.txt for complete documentation on how | ||
541 | 23 | # to use this program. | ||
542 | 24 | # | ||
543 | 25 | |||
544 | 26 | include ../Make.defaults | ||
545 | 27 | include ../Make.rules | ||
546 | 28 | |||
547 | 29 | TOPDIR=$(CDIR)/.. | ||
548 | 30 | |||
549 | 31 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | ||
550 | 32 | #FILES=system.o config.o plain_loader.o | ||
551 | 33 | |||
552 | 34 | TARGET=sysdeps.o | ||
553 | 35 | |||
554 | 36 | all: $(TARGET) | ||
555 | 37 | |||
556 | 38 | system.o: rmswitch.h | ||
557 | 39 | |||
558 | 40 | rmswitch.h: bin_to_h.c rmswitch.S | ||
559 | 41 | $(CC) -o bin_to_h bin_to_h.c | ||
560 | 42 | $(AS) -o rmswitch.o rmswitch.S | ||
561 | 43 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | ||
562 | 44 | ./bin_to_h <rmswitch >rmswitch.h | ||
563 | 45 | |||
564 | 46 | $(TARGET): $(FILES) | ||
565 | 47 | $(LD) -r -o $@ $(FILES) | ||
566 | 48 | |||
567 | 49 | clean: | ||
568 | 50 | $(RM) -f $(TARGET) $(FILES) | ||
569 | 51 | $(RM) -f bin_to_h.o bin_to_h | ||
570 | 52 | $(RM) -f rmswitch.h rmswitch.o rmswitch | ||
571 | 53 | 0 | ||
572 | === modified file '.pc/fix-paths.diff/Make.defaults' | |||
573 | --- .pc/fix-paths.diff/Make.defaults 2010-06-08 13:42:05 +0000 | |||
574 | +++ .pc/fix-paths.diff/Make.defaults 2013-12-06 20:30:39 +0000 | |||
575 | @@ -68,7 +68,7 @@ | |||
576 | 68 | 68 | ||
577 | 69 | OPTIMFLAGS = -O2 | 69 | OPTIMFLAGS = -O2 |
578 | 70 | DEBUGFLAGS = -Wall | 70 | DEBUGFLAGS = -Wall |
580 | 71 | CFLAGS = $(OPTIMFLAGS) -fno-strict-aliasing -fpic -fshort-wchar $(DEBUGFLAGS) | 71 | CFLAGS = $(OPTIMFLAGS) -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar $(DEBUGFLAGS) |
581 | 72 | LDFLAGS = -nostdlib -znocombreloc | 72 | LDFLAGS = -nostdlib -znocombreloc |
582 | 73 | INSTALL = install | 73 | INSTALL = install |
583 | 74 | 74 | ||
584 | 75 | 75 | ||
585 | === modified file 'ChangeLog' | |||
586 | --- ChangeLog 2011-08-22 21:17:34 +0000 | |||
587 | +++ ChangeLog 2013-12-06 20:30:39 +0000 | |||
588 | @@ -1,3 +1,17 @@ | |||
589 | 1 | 2011-1-10 signed off by Jason Fleischli <jason.fleischli@hp.com> | ||
590 | 2 | * Uptake of SUSE patches | ||
591 | 3 | - add sysfs support for efi vars (formerly /proc/efi/vars) | ||
592 | 4 | - fix strncpy overflow | ||
593 | 5 | - fix bzimage alloc | ||
594 | 6 | - cleanups | ||
595 | 7 | - support longer command line | ||
596 | 8 | - yet some more mac fixes | ||
597 | 9 | - align elilo with latest kernel boot protocol format. | ||
598 | 10 | - new memory management strategy for initrd and kernel image loading. | ||
599 | 11 | * add force text mode command line option. | ||
600 | 12 | * replace error output on GOP handle failed, downgraded to normal | ||
601 | 13 | print status with more informative output. | ||
602 | 14 | |||
603 | 1 | 2009-10-22 signed off by Jason Fleischli <jason.fleischli@hp.com> | 15 | 2009-10-22 signed off by Jason Fleischli <jason.fleischli@hp.com> |
604 | 2 | * elilo 3.12 release commit | 16 | * elilo 3.12 release commit |
605 | 3 | * Added additional #defines for debug levels to reduce the output | 17 | * Added additional #defines for debug levels to reduce the output |
606 | @@ -39,8 +53,10 @@ | |||
607 | 39 | subtree | 53 | subtree |
608 | 40 | * bugfix loader_probe now correctly errors out if no loaders | 54 | * bugfix loader_probe now correctly errors out if no loaders |
609 | 41 | registered. | 55 | registered. |
610 | 56 | |||
611 | 42 | 2008-01-11 signed off by Jason Fleischli <jason.fleischli@hp.com> | 57 | 2008-01-11 signed off by Jason Fleischli <jason.fleischli@hp.com> |
612 | 43 | * Various compile warning cleanups. | 58 | * Various compile warning cleanups. |
613 | 59 | |||
614 | 44 | 2008-01-03 signed off by Jason Fleischli <jason.fleischli@hp.com> | 60 | 2008-01-03 signed off by Jason Fleischli <jason.fleischli@hp.com> |
615 | 45 | * Patch contribution from Scott Davilla <davilla@4pi.com> | 61 | * Patch contribution from Scott Davilla <davilla@4pi.com> |
616 | 46 | when x is zero for the first call to add_memory_region, e820_map[-1] | 62 | when x is zero for the first call to add_memory_region, e820_map[-1] |
617 | @@ -49,6 +65,7 @@ | |||
618 | 49 | above the e820_map[0] location that should have been zeroed by the | 65 | above the e820_map[0] location that should have been zeroed by the |
619 | 50 | bootloader, the code should not access outside the bounds of | 66 | bootloader, the code should not access outside the bounds of |
620 | 51 | structures. | 67 | structures. |
621 | 68 | |||
622 | 52 | 2008-01-03 Jason Fleischli <jason.fleischli@hp.com> | 69 | 2008-01-03 Jason Fleischli <jason.fleischli@hp.com> |
623 | 53 | * initrd.c -- Let the allocator decide where to grab the memory from | 70 | * initrd.c -- Let the allocator decide where to grab the memory from |
624 | 54 | the efi memory map. Current start_addr=image->start_addr forces the | 71 | the efi memory map. Current start_addr=image->start_addr forces the |
625 | @@ -57,8 +74,10 @@ | |||
626 | 57 | the image->start_addr resulting in an elilo hang. Leaving start_addr | 74 | the image->start_addr resulting in an elilo hang. Leaving start_addr |
627 | 58 | NULL at initialization forces alloc_pages to get a memory region | 75 | NULL at initialization forces alloc_pages to get a memory region |
628 | 59 | sufficient for the size of the initrd image. | 76 | sufficient for the size of the initrd image. |
629 | 77 | |||
630 | 60 | 2007-12-19 Jason Fleischli <jason.fleischli@hp.com> | 78 | 2007-12-19 Jason Fleischli <jason.fleischli@hp.com> |
631 | 61 | * bumping version string to 3.8 | 79 | * bumping version string to 3.8 |
632 | 80 | |||
633 | 62 | 2007-12-19 Jason Fleischli <jason.fleischli@hp.com> | 81 | 2007-12-19 Jason Fleischli <jason.fleischli@hp.com> |
634 | 63 | * MORE PATCHES FROM INTEL FOR IA32 X86_64. | 82 | * MORE PATCHES FROM INTEL FOR IA32 X86_64. |
635 | 64 | * Fix compile warning for cmdline_addr assignment. | 83 | * Fix compile warning for cmdline_addr assignment. |
636 | @@ -83,11 +102,13 @@ | |||
637 | 83 | EFI framebuffer type ID setting code in ELILO is changed accordingly. | 102 | EFI framebuffer type ID setting code in ELILO is changed accordingly. |
638 | 84 | * E820 memory map is added to IA32 to make it possible for | 103 | * E820 memory map is added to IA32 to make it possible for |
639 | 85 | Linux kernel not to depend on EFI memory map on EFI 32. | 104 | Linux kernel not to depend on EFI memory map on EFI 32. |
640 | 105 | |||
641 | 86 | 2007-09-27 Jason Fleischli <jason.fleischli@hp.com> | 106 | 2007-09-27 Jason Fleischli <jason.fleischli@hp.com> |
642 | 87 | * updating changelog for last commit that was omitted | 107 | * updating changelog for last commit that was omitted |
643 | 88 | * incorporating AGriffis patches to enhance parsing | 108 | * incorporating AGriffis patches to enhance parsing |
644 | 89 | passes root= option to kernel options and accounts for -- option | 109 | passes root= option to kernel options and accounts for -- option |
645 | 90 | designation. | 110 | designation. |
646 | 111 | |||
647 | 91 | 2007-07-19 Jason Fleischli <jason.fleischli@hp.com> | 112 | 2007-07-19 Jason Fleischli <jason.fleischli@hp.com> |
648 | 92 | * Integrated x86_64 support patches from Chandramouli Narayanan | 113 | * Integrated x86_64 support patches from Chandramouli Narayanan |
649 | 93 | <mouli@linux.intel.com> changes summarized in following bullets. | 114 | <mouli@linux.intel.com> changes summarized in following bullets. |
650 | @@ -159,13 +180,17 @@ | |||
651 | 159 | * x86_64/sysdeps.c -- new file, system stuff for x86_64 | 180 | * x86_64/sysdeps.c -- new file, system stuff for x86_64 |
652 | 160 | * elilo.txt -- documentation update, add Intel to copyright | 181 | * elilo.txt -- documentation update, add Intel to copyright |
653 | 161 | * README.gnu-efi -- documentation update for x86_64 | 182 | * README.gnu-efi -- documentation update for x86_64 |
654 | 183 | |||
655 | 162 | 2006-01-27 Alex Williamson <alex.williamson@hp.com> | 184 | 2006-01-27 Alex Williamson <alex.williamson@hp.com> |
656 | 163 | * Found a couple more places where vmcode isn't zeroed, causing the | 185 | * Found a couple more places where vmcode isn't zeroed, causing the |
657 | 164 | option to get carried over to labels it shouldn't. | 186 | option to get carried over to labels it shouldn't. |
658 | 187 | |||
659 | 165 | 2006-01-09 Brett Johnson <brett@hp.com> | 188 | 2006-01-09 Brett Johnson <brett@hp.com> |
660 | 166 | * Released 3.6 | 189 | * Released 3.6 |
661 | 190 | |||
662 | 167 | 2005-12-22 Alex Williamson <alex.williamson@hp.com> | 191 | 2005-12-22 Alex Williamson <alex.williamson@hp.com> |
663 | 168 | * Fixed vmcode_name initialization in textmenu chooser | 192 | * Fixed vmcode_name initialization in textmenu chooser |
664 | 193 | |||
665 | 169 | 2005-12-01 Alex Williamson <alex.williamson@hp.com> | 194 | 2005-12-01 Alex Williamson <alex.williamson@hp.com> |
666 | 170 | * Applied patch from Fred Yang <fred.yang@intel.com> to support the | 195 | * Applied patch from Fred Yang <fred.yang@intel.com> to support the |
667 | 171 | vmm= boot option. This option specifies the kernel image for a | 196 | vmm= boot option. This option specifies the kernel image for a |
668 | @@ -179,29 +204,37 @@ | |||
669 | 179 | image will be uncompressed into memory before it is provided to the | 204 | image will be uncompressed into memory before it is provided to the |
670 | 180 | hypervisor. Any combination of compressed and uncompressed images | 205 | hypervisor. Any combination of compressed and uncompressed images |
671 | 181 | can be used for the image and vmm options. | 206 | can be used for the image and vmm options. |
672 | 207 | |||
673 | 182 | 2005-09-15 Brett Johnson <brett@hp.com> | 208 | 2005-09-15 Brett Johnson <brett@hp.com> |
674 | 183 | * Applied patch from Tristan Gingold to add dcache flush and sync with | 209 | * Applied patch from Tristan Gingold to add dcache flush and sync with |
675 | 184 | icache to gzip and plain loaders. This ommision was just noticed now | 210 | icache to gzip and plain loaders. This ommision was just noticed now |
676 | 185 | due to the much larger caches in Montecito, and the smaller size of | 211 | due to the much larger caches in Montecito, and the smaller size of |
677 | 186 | Xen (as compared to the linux kernel). | 212 | Xen (as compared to the linux kernel). |
678 | 213 | |||
679 | 187 | 2004-09-27 Brett Johnson <brett@hp.com> | 214 | 2004-09-27 Brett Johnson <brett@hp.com> |
680 | 188 | * Increase the hardcoded size of the texmenu chooser menu from 16 to 64 | 215 | * Increase the hardcoded size of the texmenu chooser menu from 16 to 64 |
681 | 216 | |||
682 | 189 | 2004-09-23 Brett Johnson <brett@hp.com> | 217 | 2004-09-23 Brett Johnson <brett@hp.com> |
683 | 190 | * Fix for 924147. Thanks to Stephanie Schaaf <sas@sgi.com> for a patch | 218 | * Fix for 924147. Thanks to Stephanie Schaaf <sas@sgi.com> for a patch |
684 | 191 | that the fix is based on. | 219 | that the fix is based on. |
685 | 220 | |||
686 | 192 | 2004-02-19 Brett Johnson <brett@hp.com> | 221 | 2004-02-19 Brett Johnson <brett@hp.com> |
687 | 193 | * Fixed bug where default image initrd would carry over to another | 222 | * Fixed bug where default image initrd would carry over to another |
688 | 194 | image that was selected interactively (iff the newly selected image | 223 | image that was selected interactively (iff the newly selected image |
689 | 195 | did not have an initrd). | 224 | did not have an initrd). |
690 | 196 | * Added support for subnet-specific config files in netfs. | 225 | * Added support for subnet-specific config files in netfs. |
691 | 226 | |||
692 | 197 | 2004-02-17 Brett Johnson <brett@hp.com> | 227 | 2004-02-17 Brett Johnson <brett@hp.com> |
693 | 198 | * integrated ia32 compressed kernel support from Matt Tolentino | 228 | * integrated ia32 compressed kernel support from Matt Tolentino |
694 | 199 | <matthew.e.tolentino@intel.com> | 229 | <matthew.e.tolentino@intel.com> |
695 | 230 | |||
696 | 200 | 2003-08-20 Stephane Eranian <eranian@hpl.hp.com> | 231 | 2003-08-20 Stephane Eranian <eranian@hpl.hp.com> |
697 | 201 | * released 3.4 | 232 | * released 3.4 |
698 | 233 | |||
699 | 202 | 2003-08-19 Stephane Eranian <eranian@hpl.hp.com> | 234 | 2003-08-19 Stephane Eranian <eranian@hpl.hp.com> |
700 | 203 | * integrated ia32 updates from Matt | 235 | * integrated ia32 updates from Matt |
701 | 204 | Tolentino <matthew.e.tolentino@intel.com> | 236 | Tolentino <matthew.e.tolentino@intel.com> |
702 | 237 | |||
703 | 205 | 2003-08-13 Stephane Eranian <eranian@hpl.hp.com> | 238 | 2003-08-13 Stephane Eranian <eranian@hpl.hp.com> |
704 | 206 | * updated elilo.txt and netbooting.txt | 239 | * updated elilo.txt and netbooting.txt |
705 | 207 | * fix a bug in choosers/simple.c:print_infos(). | 240 | * fix a bug in choosers/simple.c:print_infos(). |
706 | @@ -214,37 +247,47 @@ | |||
707 | 214 | * updated simple chooser set of builtin command keys | 247 | * updated simple chooser set of builtin command keys |
708 | 215 | * command keys are only valid if first on the line | 248 | * command keys are only valid if first on the line |
709 | 216 | * increase default buffer size and increment when netbooting | 249 | * increase default buffer size and increment when netbooting |
710 | 250 | |||
711 | 217 | 2003-06-04 Stephane Eranian <eranian@hpl.hp.com> | 251 | 2003-06-04 Stephane Eranian <eranian@hpl.hp.com> |
712 | 218 | * fix fs/netfs.c to work with recent version | 252 | * fix fs/netfs.c to work with recent version |
713 | 219 | of EFI (14.61 or higher) which do not have the | 253 | of EFI (14.61 or higher) which do not have the |
714 | 220 | TFTP problem anymore. fix submitted by Guy Laborde | 254 | TFTP problem anymore. fix submitted by Guy Laborde |
715 | 255 | |||
716 | 221 | 2003-04-21 Stephane Eranian <eranian@hpl.hp.com> | 256 | 2003-04-21 Stephane Eranian <eranian@hpl.hp.com> |
717 | 222 | * ext2fs support is turned off by default to avoid | 257 | * ext2fs support is turned off by default to avoid |
718 | 223 | problems with ext3-formatted partitions. | 258 | problems with ext3-formatted partitions. |
719 | 224 | * added gcc version check. MUST use 3.0 or higher | 259 | * added gcc version check. MUST use 3.0 or higher |
720 | 260 | |||
721 | 225 | 2003-03-03 Stephane Eranian <eranian@hpl.hp.com> | 261 | 2003-03-03 Stephane Eranian <eranian@hpl.hp.com> |
722 | 226 | * added check on dev_tab in fs/*fs.c:*_uninstall() | 262 | * added check on dev_tab in fs/*fs.c:*_uninstall() |
723 | 263 | |||
724 | 227 | 2003-02-07 Stephane Eranian <eranian@hpl.hp.com> | 264 | 2003-02-07 Stephane Eranian <eranian@hpl.hp.com> |
725 | 228 | * clean up in glue_localfs.c w.r.t. CHAR16 in set_default_path() | 265 | * clean up in glue_localfs.c w.r.t. CHAR16 in set_default_path() |
726 | 229 | * added support for extracting basename of bootloader path | 266 | * added support for extracting basename of bootloader path |
727 | 230 | when using BOOTP (DHCP) only. The prefix is then used for all files | 267 | when using BOOTP (DHCP) only. The prefix is then used for all files |
728 | 231 | open via netfs. Suggestion and initial patch by Guy Laborde from HP. | 268 | open via netfs. Suggestion and initial patch by Guy Laborde from HP. |
729 | 269 | |||
730 | 232 | 2003-01-28 Stephane Eranian <eranian@hpl.hp.com> | 270 | 2003-01-28 Stephane Eranian <eranian@hpl.hp.com> |
731 | 233 | * fix the set_default_path() routine in glue_localfs.c. It would not | 271 | * fix the set_default_path() routine in glue_localfs.c. It would not |
732 | 234 | correctly get the basename of the devpath. This caused the | 272 | correctly get the basename of the devpath. This caused the |
733 | 235 | elilo.conf not to be found sometimes. | 273 | elilo.conf not to be found sometimes. |
734 | 274 | |||
735 | 236 | 2003-01-21 Stephane Eranian <eranian@hpl.hp.com> | 275 | 2003-01-21 Stephane Eranian <eranian@hpl.hp.com> |
736 | 237 | * fix bug in glue_netfs.c convert_ip2decstr() which caused some IP | 276 | * fix bug in glue_netfs.c convert_ip2decstr() which caused some IP |
737 | 238 | addresses to be incorrectly converted to strings. | 277 | addresses to be incorrectly converted to strings. |
738 | 278 | |||
739 | 239 | 2002-11-01 Stephane Eranian <eranian@hpl.hp.com> | 279 | 2002-11-01 Stephane Eranian <eranian@hpl.hp.com> |
740 | 240 | * fix bug in -r option for IA64. There is no argument to this option. | 280 | * fix bug in -r option for IA64. There is no argument to this option. |
741 | 281 | |||
742 | 241 | 2002-10-15 Stephane Eranian <eranian@hpl.hp.com> | 282 | 2002-10-15 Stephane Eranian <eranian@hpl.hp.com> |
743 | 242 | * fixed a double free bug for the kernel memory in case of abort. | 283 | * fixed a double free bug for the kernel memory in case of abort. |
744 | 243 | (bug spotted by Levent Akyl from Intel) | 284 | (bug spotted by Levent Akyl from Intel) |
745 | 244 | * released 3.3a | 285 | * released 3.3a |
746 | 286 | |||
747 | 245 | 2002-09-14 Stephane Eranian <eranian@hpl.hp.com> | 287 | 2002-09-14 Stephane Eranian <eranian@hpl.hp.com> |
748 | 246 | * applied patch from Andreas Schwab <schwab@suse.de> to eliloalt.c. | 288 | * applied patch from Andreas Schwab <schwab@suse.de> to eliloalt.c. |
749 | 247 | eliloalt dynamically selects a variable in /proc/efi/vars. | 289 | eliloalt dynamically selects a variable in /proc/efi/vars. |
750 | 290 | |||
751 | 248 | 2002-09-12 Stephane Eranian <eranian@hpl.hp.com> | 291 | 2002-09-12 Stephane Eranian <eranian@hpl.hp.com> |
752 | 249 | * removed extra free() from fs/ext2fs.c:ext2fs_init_state(). | 292 | * removed extra free() from fs/ext2fs.c:ext2fs_init_state(). |
753 | 250 | Bug report and fix by NOMURA Jun'ichi <j-nomura@ce.jp.nec.com> | 293 | Bug report and fix by NOMURA Jun'ichi <j-nomura@ce.jp.nec.com> |
754 | @@ -252,25 +295,31 @@ | |||
755 | 252 | was bigger than the 128KB limit of EFI causing some weird fimrware | 295 | was bigger than the 128KB limit of EFI causing some weird fimrware |
756 | 253 | errors. bug reported by OMURA Jun'ichi <j-nomura@ce.jp.nec.com> | 296 | errors. bug reported by OMURA Jun'ichi <j-nomura@ce.jp.nec.com> |
757 | 254 | * on IA-64 forbid the use of f32-f127 by the compiler (EFI spec) | 297 | * on IA-64 forbid the use of f32-f127 by the compiler (EFI spec) |
758 | 298 | |||
759 | 255 | 2002-09-10 Stephane Eranian <eranian@hpl.hp.com> | 299 | 2002-09-10 Stephane Eranian <eranian@hpl.hp.com> |
760 | 256 | * fix a bug in argify() that was causing an EFI assertion | 300 | * fix a bug in argify() that was causing an EFI assertion |
761 | 257 | when aborting at the elilo prompt when netbooted. | 301 | when aborting at the elilo prompt when netbooted. |
762 | 302 | |||
763 | 258 | 2002-08-26 Stephane Eranian <eranian@hpl.hp.com> | 303 | 2002-08-26 Stephane Eranian <eranian@hpl.hp.com> |
764 | 259 | * fixed devschemes/simple.c to use SPrint() instead of its own buggy | 304 | * fixed devschemes/simple.c to use SPrint() instead of its own buggy |
765 | 260 | conversion code (spotted by Richard Hirst). | 305 | conversion code (spotted by Richard Hirst). |
766 | 261 | * fix bug in argify() when there was no NULL character in the string. | 306 | * fix bug in argify() when there was no NULL character in the string. |
767 | 262 | * released 3.3 | 307 | * released 3.3 |
768 | 308 | |||
769 | 263 | 2002-08-19 Stephane Eranian <eranian@hpl.hp.com> | 309 | 2002-08-19 Stephane Eranian <eranian@hpl.hp.com> |
770 | 264 | * added fpswa.txt in the docs directory | 310 | * added fpswa.txt in the docs directory |
771 | 265 | * updated elilo.txt | 311 | * updated elilo.txt |
772 | 312 | |||
773 | 266 | 2002-08-15 Stephane Eranian <eranian@hpl.hp.com> | 313 | 2002-08-15 Stephane Eranian <eranian@hpl.hp.com> |
774 | 267 | * added -F file option for IA-64 to allow a specific fpswa driver to be loaded | 314 | * added -F file option for IA-64 to allow a specific fpswa driver to be loaded |
775 | 268 | * fixed fpswa.c to try and load the driver from all accessible partitions | 315 | * fixed fpswa.c to try and load the driver from all accessible partitions |
776 | 269 | * added support to load (plain or gzipped) big-endian ELF/ia64 binaries using p_paddr. | 316 | * added support to load (plain or gzipped) big-endian ELF/ia64 binaries using p_paddr. |
777 | 270 | * fixed problem in fs/netfs.c causing large (>4MB) binaries to fail the Mftp() call | 317 | * fixed problem in fs/netfs.c causing large (>4MB) binaries to fail the Mftp() call |
778 | 318 | |||
779 | 271 | 2002-06-13 Stephane Eranian <eranian@hpl.hp.com> | 319 | 2002-06-13 Stephane Eranian <eranian@hpl.hp.com> |
780 | 272 | * Changed the despecialization character for the variables from \\ to & | 320 | * Changed the despecialization character for the variables from \\ to & |
781 | 273 | to avoid conflicts with \\ as a path separator | 321 | to avoid conflicts with \\ as a path separator |
782 | 322 | |||
783 | 274 | 2002-06-11 Stephane Eranian <eranian@hpl.hp.com> | 323 | 2002-06-11 Stephane Eranian <eranian@hpl.hp.com> |
784 | 275 | * fixed the return value in efi_main(). elilo was always returning | 324 | * fixed the return value in efi_main(). elilo was always returning |
785 | 276 | success even in case of failure. Bug reported by Egan Ford <egan@sense.net> | 325 | success even in case of failure. Bug reported by Egan Ford <egan@sense.net> |
786 | @@ -280,11 +329,13 @@ | |||
787 | 280 | compliant with EFI spec with regards to where it looks for files. | 329 | compliant with EFI spec with regards to where it looks for files. |
788 | 281 | With this patch, elilo will look in the directory it was loaded | 330 | With this patch, elilo will look in the directory it was loaded |
789 | 282 | from, not on the root of the partition anymore. | 331 | from, not on the root of the partition anymore. |
790 | 332 | |||
791 | 283 | 2002-03-04 Stephane Eranian <eranian@hpl.hp.com> | 333 | 2002-03-04 Stephane Eranian <eranian@hpl.hp.com> |
792 | 284 | * released version 3.2 | 334 | * released version 3.2 |
793 | 285 | * cleanup some GNU extension in fs/ext2fs.c (variable size array) | 335 | * cleanup some GNU extension in fs/ext2fs.c (variable size array) |
794 | 286 | * updated all documentation. Added netbooting.txt, simple_chooser.txt, | 336 | * updated all documentation. Added netbooting.txt, simple_chooser.txt, |
795 | 287 | eliloalt.txt, elilovar.txt | 337 | eliloalt.txt, elilovar.txt |
796 | 338 | |||
797 | 288 | 2002-02-21 Stephane Eranian <eranian@hpl.hp.com> | 339 | 2002-02-21 Stephane Eranian <eranian@hpl.hp.com> |
798 | 289 | * added a Linux utility program (elilovar in tools) to set/read/delete | 340 | * added a Linux utility program (elilovar in tools) to set/read/delete |
799 | 290 | the EliloAlt EFI variable used to specify an alternate kernel to boot. | 341 | the EliloAlt EFI variable used to specify an alternate kernel to boot. |
800 | @@ -292,19 +343,24 @@ | |||
801 | 292 | * added support for hostname,domain name extraction in fs/netfs.c | 343 | * added support for hostname,domain name extraction in fs/netfs.c |
802 | 293 | * fixed all known bugs in alternate.c | 344 | * fixed all known bugs in alternate.c |
803 | 294 | * integrated patch from SGI to fix load offset for relocatable kernels (Jack Steiner, Brent Casavant) | 345 | * integrated patch from SGI to fix load offset for relocatable kernels (Jack Steiner, Brent Casavant) |
804 | 346 | |||
805 | 295 | 2002-02-21 Michael Johnston <michael.johnston@intel.com> and Chris Ahna <christopher.j.ahna@intel.com> | 347 | 2002-02-21 Michael Johnston <michael.johnston@intel.com> and Chris Ahna <christopher.j.ahna@intel.com> |
806 | 296 | * major update to ia32 support: can now boot 2.4.x, and 2.2.x kernels | 348 | * major update to ia32 support: can now boot 2.4.x, and 2.2.x kernels |
807 | 349 | |||
808 | 297 | 2002-02-20 Stephane Eranian <eranian@hpl.hp.com> | 350 | 2002-02-20 Stephane Eranian <eranian@hpl.hp.com> |
809 | 298 | * fixed missing netfs_fd_free() in case of file not found in netfs.c | 351 | * fixed missing netfs_fd_free() in case of file not found in netfs.c |
810 | 352 | |||
811 | 299 | 2002-02-19 Stephane Eranian <eranian@hpl.hp.com> | 353 | 2002-02-19 Stephane Eranian <eranian@hpl.hp.com> |
812 | 300 | * added support for substitution variables (vars.c) | 354 | * added support for substitution variables (vars.c) |
813 | 301 | * changed the bootparam structure size back to 4kB | 355 | * changed the bootparam structure size back to 4kB |
814 | 302 | * added support to simple to print final command line option with tab key | 356 | * added support to simple to print final command line option with tab key |
815 | 303 | * got rid of all the \r characters in strings use only \n (adjust emulator) | 357 | * got rid of all the \r characters in strings use only \n (adjust emulator) |
816 | 304 | * added EFICRT0 variable in Makefile to indicate location of loader script+crt0 | 358 | * added EFICRT0 variable in Makefile to indicate location of loader script+crt0 |
817 | 359 | |||
818 | 305 | 2002-02-14 Stephane Eranian <eranian@hpl.hp.com> | 360 | 2002-02-14 Stephane Eranian <eranian@hpl.hp.com> |
819 | 306 | * added support for message= option to simple chooser | 361 | * added support for message= option to simple chooser |
820 | 307 | * added support for description= option to simple chooser | 362 | * added support for description= option to simple chooser |
821 | 363 | |||
822 | 308 | 2002-02-13 Stephane Eranian <eranian@hpl.hp.com> | 364 | 2002-02-13 Stephane Eranian <eranian@hpl.hp.com> |
823 | 309 | * choosers/textmenu.c: new textmenu chooser (by rhirst@linuxcare.com) used by Debian | 365 | * choosers/textmenu.c: new textmenu chooser (by rhirst@linuxcare.com) used by Debian |
824 | 310 | * config.c: added support for dynamic global/per-image option management | 366 | * config.c: added support for dynamic global/per-image option management |
825 | @@ -333,6 +389,7 @@ | |||
826 | 333 | mode was specified in config file. In this case, we now autoboot | 389 | mode was specified in config file. In this case, we now autoboot |
827 | 334 | and ignore the prompt directive. | 390 | and ignore the prompt directive. |
828 | 335 | * updated elilo.txt | 391 | * updated elilo.txt |
829 | 392 | |||
830 | 336 | 2001-08-15 Brent Casavant <bcasavan@sgi.com> | 393 | 2001-08-15 Brent Casavant <bcasavan@sgi.com> |
831 | 337 | * fix a bug in config.c:find_option() where it would do | 394 | * fix a bug in config.c:find_option() where it would do |
832 | 338 | a strXcmp() on a NULL string. | 395 | a strXcmp() on a NULL string. |
833 | 339 | 396 | ||
834 | === modified file 'Makefile' | |||
835 | --- Makefile 2011-08-22 21:17:34 +0000 | |||
836 | +++ Makefile 2013-12-06 20:30:39 +0000 | |||
837 | @@ -25,19 +25,15 @@ | |||
838 | 25 | # to use this program. | 25 | # to use this program. |
839 | 26 | # | 26 | # |
840 | 27 | 27 | ||
847 | 28 | SRCDIR = . | 28 | include Make.defaults |
848 | 29 | 29 | TOPDIR=. | |
843 | 30 | VPATH = $(SRCDIR) | ||
844 | 31 | |||
845 | 32 | include $(SRCDIR)/Make.defaults | ||
846 | 33 | TOPDIR = $(SRCDIR) | ||
849 | 34 | 30 | ||
850 | 35 | 31 | ||
851 | 36 | CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o | 32 | CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o |
852 | 37 | LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds | 33 | LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds |
853 | 38 | 34 | ||
854 | 39 | LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS) | 35 | LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS) |
856 | 40 | LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name) | 36 | LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) |
857 | 41 | FORMAT = efi-app-$(ARCH) | 37 | FORMAT = efi-app-$(ARCH) |
858 | 42 | 38 | ||
859 | 43 | FILESYSTEM = | 39 | FILESYSTEM = |
860 | @@ -85,14 +81,13 @@ | |||
861 | 85 | 81 | ||
862 | 86 | elilo.so: $(FILES) | 82 | elilo.so: $(FILES) |
863 | 87 | 83 | ||
865 | 88 | elilo.o : elilo.c | 84 | elilo.o : elilo.c $(ARCH)/sysdeps.h |
866 | 89 | 85 | ||
867 | 90 | fileops.o : Make.defaults | 86 | fileops.o : Make.defaults |
868 | 91 | chooser.o : Make.defaults | 87 | chooser.o : Make.defaults |
869 | 92 | 88 | ||
870 | 93 | $(SUBDIRS): dummy | 89 | $(SUBDIRS): dummy |
873 | 94 | mkdir -p $@ | 90 | $(MAKE) -C $@ |
872 | 95 | $(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH) | ||
874 | 96 | 91 | ||
875 | 97 | dummy: | 92 | dummy: |
876 | 98 | 93 | ||
877 | @@ -111,4 +106,4 @@ | |||
878 | 111 | @exit 1 | 106 | @exit 1 |
879 | 112 | endif | 107 | endif |
880 | 113 | 108 | ||
882 | 114 | include $(SRCDIR)/Make.rules | 109 | include Make.rules |
883 | 115 | 110 | ||
884 | === modified file 'alloc.c' | |||
885 | --- alloc.c 2011-08-22 21:17:34 +0000 | |||
886 | +++ alloc.c 2013-12-06 20:30:39 +0000 | |||
887 | @@ -110,7 +110,7 @@ | |||
888 | 110 | } | 110 | } |
889 | 111 | alloc_add(tmp, size, ALLOC_POOL); | 111 | alloc_add(tmp, size, ALLOC_POOL); |
890 | 112 | #ifdef DEBUG_MEM | 112 | #ifdef DEBUG_MEM |
892 | 113 | DBG_PRT((L"alloc: allocated %d bytes @[" PTR_FMT "-" PTR_FMT "]\n", size, tmp, tmp+size)); | 113 | DBG_PRT((L"alloc: allocated %d bytes @[" PTR_FMT "-" PTR_FMT "]", size, tmp, tmp+size)); |
893 | 114 | #endif | 114 | #endif |
894 | 115 | return tmp; | 115 | return tmp; |
895 | 116 | } | 116 | } |
896 | @@ -140,7 +140,7 @@ | |||
897 | 140 | 140 | ||
898 | 141 | alloc_add(addr, pgcnt, ALLOC_PAGES); | 141 | alloc_add(addr, pgcnt, ALLOC_PAGES); |
899 | 142 | 142 | ||
901 | 143 | DBG_PRT((L"allocator: allocated %d pages @0x%lx\n", pgcnt, tmp)); | 143 | DBG_PRT((L"allocator: allocated %d pages @" PTR_FMT, pgcnt, tmp)); |
902 | 144 | 144 | ||
903 | 145 | return addr; | 145 | return addr; |
904 | 146 | } | 146 | } |
905 | @@ -162,7 +162,7 @@ | |||
906 | 162 | return; | 162 | return; |
907 | 163 | found: | 163 | found: |
908 | 164 | #ifdef DEBUG_MEM | 164 | #ifdef DEBUG_MEM |
910 | 165 | DBG_PRT((L"free: %s @" PTR_FMT " size=%d\n", | 165 | DBG_PRT((L"free: %s @" PTR_FMT " size=%d", |
911 | 166 | p->type == ALLOC_POOL ? L"Pool": L"Page", | 166 | p->type == ALLOC_POOL ? L"Pool": L"Page", |
912 | 167 | addr, p->size)); | 167 | addr, p->size)); |
913 | 168 | #endif | 168 | #endif |
914 | @@ -196,7 +196,7 @@ | |||
915 | 196 | 196 | ||
916 | 197 | while(used_allocs) { | 197 | while(used_allocs) { |
917 | 198 | #ifdef DEBUG_MEM | 198 | #ifdef DEBUG_MEM |
919 | 199 | DBG_PRT((L"free_all %a @ " PTR_FMT "\n", used_allocs->type == ALLOC_POOL ? "pool" : "pages", used_allocs->addr)); | 199 | DBG_PRT((L"free_all %a @ " PTR_FMT, used_allocs->type == ALLOC_POOL ? "pool" : "pages", used_allocs->addr)); |
920 | 200 | #endif | 200 | #endif |
921 | 201 | if (used_allocs->type == ALLOC_POOL) | 201 | if (used_allocs->type == ALLOC_POOL) |
922 | 202 | uefi_call_wrapper(BS->FreePool, 1, used_allocs->addr); | 202 | uefi_call_wrapper(BS->FreePool, 1, used_allocs->addr); |
923 | @@ -217,7 +217,15 @@ | |||
924 | 217 | alloc_kmem_anywhere(VOID **start_addr, UINTN pgcnt) | 217 | alloc_kmem_anywhere(VOID **start_addr, UINTN pgcnt) |
925 | 218 | { | 218 | { |
926 | 219 | void * tmp; | 219 | void * tmp; |
928 | 220 | if ((tmp = alloc_pages(pgcnt, EfiLoaderData, AllocateAnyPages, *start_addr)) == 0) return -1; | 220 | /* |
929 | 221 | * During "AllocateAnyPages" *start_addr will be ignored. | ||
930 | 222 | * Therefore we can safely subvert it to reuse this function with | ||
931 | 223 | * an alloc_kmem_anyhwere_below() semantic... | ||
932 | 224 | */ | ||
933 | 225 | tmp = alloc_pages(pgcnt, EfiLoaderData, | ||
934 | 226 | (*start_addr) ? AllocateMaxAddress : AllocateAnyPages, | ||
935 | 227 | *start_addr); | ||
936 | 228 | if (tmp == NULL) return -1; | ||
937 | 221 | 229 | ||
938 | 222 | kmem_addr = tmp; | 230 | kmem_addr = tmp; |
939 | 223 | kmem_pgcnt = pgcnt; | 231 | kmem_pgcnt = pgcnt; |
940 | @@ -241,7 +249,7 @@ | |||
941 | 241 | free_kmem(VOID) | 249 | free_kmem(VOID) |
942 | 242 | { | 250 | { |
943 | 243 | #ifdef DEBUG_MEM | 251 | #ifdef DEBUG_MEM |
945 | 244 | DBG_PRT((L"free_kmem before (" PTR_FMT ", %d)\n", kmem_addr, kmem_pgcnt)); | 252 | DBG_PRT((L"free_kmem before (" PTR_FMT ", %d)", kmem_addr, kmem_pgcnt)); |
946 | 245 | #endif | 253 | #endif |
947 | 246 | if (kmem_addr && kmem_pgcnt != 0) { | 254 | if (kmem_addr && kmem_pgcnt != 0) { |
948 | 247 | free(kmem_addr); | 255 | free(kmem_addr); |
949 | @@ -249,7 +257,7 @@ | |||
950 | 249 | kmem_pgcnt = 0; | 257 | kmem_pgcnt = 0; |
951 | 250 | } | 258 | } |
952 | 251 | #ifdef DEBUG_MEM | 259 | #ifdef DEBUG_MEM |
954 | 252 | DBG_PRT((L"free_kmem after (" PTR_FMT ", %d)\n", kmem_addr, kmem_pgcnt)); | 260 | DBG_PRT((L"free_kmem after (" PTR_FMT ", %d)", kmem_addr, kmem_pgcnt)); |
955 | 253 | #endif | 261 | #endif |
956 | 254 | } | 262 | } |
957 | 255 | 263 | ||
958 | 256 | 264 | ||
959 | === modified file 'bootparams.c' | |||
960 | --- bootparams.c 2009-12-08 23:48:32 +0000 | |||
961 | +++ bootparams.c 2013-12-06 20:30:39 +0000 | |||
962 | @@ -96,6 +96,8 @@ | |||
963 | 96 | */ | 96 | */ |
964 | 97 | Memset(bp, 0, BOOT_PARAM_MEMSIZE); | 97 | Memset(bp, 0, BOOT_PARAM_MEMSIZE); |
965 | 98 | 98 | ||
966 | 99 | U2ascii(args, cp, cmdline_size); | ||
967 | 100 | |||
968 | 99 | if (sysdeps_create_boot_params(bp, cp, initrd, vmcode, cookie) == -1) return 0; | 101 | if (sysdeps_create_boot_params(bp, cp, initrd, vmcode, cookie) == -1) return 0; |
969 | 100 | 102 | ||
970 | 101 | /* | 103 | /* |
971 | 102 | 104 | ||
972 | === modified file 'choosers/Makefile' | |||
973 | --- choosers/Makefile 2009-11-01 22:37:21 +0000 | |||
974 | +++ choosers/Makefile 2013-12-06 20:30:39 +0000 | |||
975 | @@ -23,15 +23,10 @@ | |||
976 | 23 | # to use this program. | 23 | # to use this program. |
977 | 24 | # | 24 | # |
978 | 25 | 25 | ||
988 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
989 | 27 | 27 | include ../Make.rules | |
990 | 28 | VPATH = $(SRCDIR) | 28 | |
991 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
983 | 30 | include $(SRCDIR)/../Make.defaults | ||
984 | 31 | include $(SRCDIR)/../Make.rules | ||
985 | 32 | |||
986 | 33 | TOPDIR=$(SRCDIR)/.. | ||
987 | 34 | |||
992 | 35 | 30 | ||
993 | 36 | FILES= | 31 | FILES= |
994 | 37 | 32 | ||
995 | @@ -47,17 +42,13 @@ | |||
996 | 47 | 42 | ||
997 | 48 | all: $(TARGET) | 43 | all: $(TARGET) |
998 | 49 | 44 | ||
1009 | 50 | $(TARGET): check-choosers $(TOPDIR)/Make.defaults $(FILES) | 45 | $(TARGET): $(TOPDIR)/Make.defaults $(FILES) |
1010 | 51 | $(LD) $(LD3264) -o $@ -r $(FILES) | 46 | @if [ -z "$(FILES)" ]; then \ |
1001 | 52 | |||
1002 | 53 | clean: | ||
1003 | 54 | $(RM) -f $(TARGET) $(FILES) | ||
1004 | 55 | |||
1005 | 56 | check-choosers: | ||
1006 | 57 | @if [ -n "$(FILES)" ]; then \ | ||
1007 | 58 | exit 0; \ | ||
1008 | 59 | else \ | ||
1011 | 60 | echo "You need to define at least one chooser in Make.defaults"; \ | 47 | echo "You need to define at least one chooser in Make.defaults"; \ |
1012 | 61 | exit 1; \ | 48 | exit 1; \ |
1013 | 62 | fi | 49 | fi |
1014 | 50 | $(LD) -o $@ -r $(FILES) | ||
1015 | 51 | |||
1016 | 52 | clean: | ||
1017 | 53 | $(RM) -f $(TARGET) $(FILES) | ||
1018 | 63 | 54 | ||
1019 | 64 | 55 | ||
1020 | === modified file 'choosers/simple.c' | |||
1021 | --- choosers/simple.c 2011-08-22 21:17:34 +0000 | |||
1022 | +++ choosers/simple.c 2013-12-06 20:30:39 +0000 | |||
1023 | @@ -41,8 +41,8 @@ | |||
1024 | 41 | display_label_info(CHAR16 *name) | 41 | display_label_info(CHAR16 *name) |
1025 | 42 | { | 42 | { |
1026 | 43 | CHAR16 *desc; | 43 | CHAR16 *desc; |
1029 | 44 | CHAR16 initrd_name[CMDLINE_MAXLEN]; | 44 | CHAR16 initrd_name[PATHNAME_MAXLEN]; |
1030 | 45 | CHAR16 vmcode_name[CMDLINE_MAXLEN]; | 45 | CHAR16 vmcode_name[PATHNAME_MAXLEN]; |
1031 | 46 | CHAR16 options_tmp[CMDLINE_MAXLEN]; | 46 | CHAR16 options_tmp[CMDLINE_MAXLEN]; |
1032 | 47 | CHAR16 options[CMDLINE_MAXLEN]; | 47 | CHAR16 options[CMDLINE_MAXLEN]; |
1033 | 48 | CHAR16 kname[FILENAME_MAXLEN]; | 48 | CHAR16 kname[FILENAME_MAXLEN]; |
1034 | @@ -254,10 +254,10 @@ | |||
1035 | 254 | # define BOOT_IMG_STR L"BOOT_IMAGE=" | 254 | # define BOOT_IMG_STR L"BOOT_IMAGE=" |
1036 | 255 | CHAR16 buffer[CMDLINE_MAXLEN]; | 255 | CHAR16 buffer[CMDLINE_MAXLEN]; |
1037 | 256 | CHAR16 alt_buffer[CMDLINE_MAXLEN]; | 256 | CHAR16 alt_buffer[CMDLINE_MAXLEN]; |
1040 | 257 | CHAR16 initrd_name[CMDLINE_MAXLEN]; | 257 | CHAR16 initrd_name[PATHNAME_MAXLEN]; |
1041 | 258 | CHAR16 vmcode_name[CMDLINE_MAXLEN]; | 258 | CHAR16 vmcode_name[PATHNAME_MAXLEN]; |
1042 | 259 | CHAR16 args[CMDLINE_MAXLEN]; | 259 | CHAR16 args[CMDLINE_MAXLEN]; |
1044 | 260 | CHAR16 devname[CMDLINE_MAXLEN]; | 260 | CHAR16 devname[PATHNAME_MAXLEN]; |
1045 | 261 | CHAR16 dpath[FILENAME_MAXLEN]; | 261 | CHAR16 dpath[FILENAME_MAXLEN]; |
1046 | 262 | CHAR16 *slash_pos, *colon_pos, *backslash_pos; | 262 | CHAR16 *slash_pos, *colon_pos, *backslash_pos; |
1047 | 263 | UINTN len; | 263 | UINTN len; |
1048 | @@ -290,8 +290,9 @@ | |||
1049 | 290 | 290 | ||
1050 | 291 | if (elilo_opt.prompt) { | 291 | if (elilo_opt.prompt) { |
1051 | 292 | console_textmode(); | 292 | console_textmode(); |
1053 | 293 | ret = select_kernel(buffer, sizeof(buffer)); | 293 | ret = select_kernel(buffer, CMDLINE_MAXLEN); |
1054 | 294 | if (ret == -1) return -1; | 294 | if (ret == -1) return -1; |
1055 | 295 | /* this function takes really the number of bytes ... */ | ||
1056 | 295 | argc = argify(buffer,sizeof(buffer), argv); | 296 | argc = argify(buffer,sizeof(buffer), argv); |
1057 | 296 | index = 0; | 297 | index = 0; |
1058 | 297 | } | 298 | } |
1059 | 298 | 299 | ||
1060 | === modified file 'choosers/textmenu.c' | |||
1061 | --- choosers/textmenu.c 2011-08-22 21:17:34 +0000 | |||
1062 | +++ choosers/textmenu.c 2013-12-06 20:30:39 +0000 | |||
1063 | @@ -363,10 +363,10 @@ | |||
1064 | 363 | { | 363 | { |
1065 | 364 | # define BOOT_IMG_STR L"BOOT_IMAGE=" | 364 | # define BOOT_IMG_STR L"BOOT_IMAGE=" |
1066 | 365 | CHAR16 label[CMDLINE_MAXLEN]; | 365 | CHAR16 label[CMDLINE_MAXLEN]; |
1069 | 366 | CHAR16 initrd_name[CMDLINE_MAXLEN]; | 366 | CHAR16 initrd_name[PATHNAME_MAXLEN]; |
1070 | 367 | CHAR16 vmcode_name[CMDLINE_MAXLEN]; | 367 | CHAR16 vmcode_name[PATHNAME_MAXLEN]; |
1071 | 368 | CHAR16 args[CMDLINE_MAXLEN]; | 368 | CHAR16 args[CMDLINE_MAXLEN]; |
1073 | 369 | CHAR16 devname[CMDLINE_MAXLEN]; | 369 | CHAR16 devname[PATHNAME_MAXLEN]; |
1074 | 370 | CHAR16 dpath[FILENAME_MAXLEN]; | 370 | CHAR16 dpath[FILENAME_MAXLEN]; |
1075 | 371 | CHAR16 *slash_pos, *colon_pos, *backslash_pos; | 371 | CHAR16 *slash_pos, *colon_pos, *backslash_pos; |
1076 | 372 | UINTN len; | 372 | UINTN len; |
1077 | 373 | 373 | ||
1078 | === modified file 'config.c' | |||
1079 | --- config.c 2011-08-22 21:17:34 +0000 | |||
1080 | +++ config.c 2013-12-06 20:30:39 +0000 | |||
1081 | @@ -56,7 +56,7 @@ | |||
1082 | 56 | */ | 56 | */ |
1083 | 57 | #define ELILO_DEFAULT_CONFIG L"elilo.conf" | 57 | #define ELILO_DEFAULT_CONFIG L"elilo.conf" |
1084 | 58 | 58 | ||
1086 | 59 | #define MAX_STRING CMDLINE_MAXLEN | 59 | #define MAX_STRING 512 |
1087 | 60 | #define CONFIG_BUFSIZE 512 /* input buffer size */ | 60 | #define CONFIG_BUFSIZE 512 /* input buffer size */ |
1088 | 61 | 61 | ||
1089 | 62 | /* | 62 | /* |
1090 | @@ -71,7 +71,7 @@ | |||
1091 | 71 | struct boot_image *next; | 71 | struct boot_image *next; |
1092 | 72 | CHAR16 label[MAX_STRING]; | 72 | CHAR16 label[MAX_STRING]; |
1093 | 73 | CHAR16 kname[FILENAME_MAXLEN]; | 73 | CHAR16 kname[FILENAME_MAXLEN]; |
1095 | 74 | CHAR16 options[MAX_STRING]; | 74 | CHAR16 options[CMDLINE_MAXLEN]; |
1096 | 75 | CHAR16 initrd[FILENAME_MAXLEN]; | 75 | CHAR16 initrd[FILENAME_MAXLEN]; |
1097 | 76 | CHAR16 vmcode[FILENAME_MAXLEN]; | 76 | CHAR16 vmcode[FILENAME_MAXLEN]; |
1098 | 77 | CHAR16 root[FILENAME_MAXLEN]; | 77 | CHAR16 root[FILENAME_MAXLEN]; |
1099 | @@ -100,7 +100,7 @@ | |||
1100 | 100 | CHAR16 root[FILENAME_MAXLEN]; /* globally defined root fs */ | 100 | CHAR16 root[FILENAME_MAXLEN]; /* globally defined root fs */ |
1101 | 101 | CHAR16 initrd[FILENAME_MAXLEN];/* globally defined initrd */ | 101 | CHAR16 initrd[FILENAME_MAXLEN];/* globally defined initrd */ |
1102 | 102 | CHAR16 vmcode[FILENAME_MAXLEN];/* globally defined boot-time module */ | 102 | CHAR16 vmcode[FILENAME_MAXLEN];/* globally defined boot-time module */ |
1104 | 103 | CHAR16 options[MAX_STRING]; | 103 | CHAR16 options[CMDLINE_MAXLEN]; |
1105 | 104 | CHAR16 default_image_name[MAX_STRING]; | 104 | CHAR16 default_image_name[MAX_STRING]; |
1106 | 105 | CHAR16 message_file[MAX_MESSAGES][FILENAME_MAXLEN]; | 105 | CHAR16 message_file[MAX_MESSAGES][FILENAME_MAXLEN]; |
1107 | 106 | CHAR16 chooser[FILENAME_MAXLEN];/* which image chooser to use */ | 106 | CHAR16 chooser[FILENAME_MAXLEN];/* which image chooser to use */ |
1108 | @@ -909,10 +909,10 @@ | |||
1109 | 909 | { | 909 | { |
1110 | 910 | boot_image_t *img, *dfl = global_config.default_image; | 910 | boot_image_t *img, *dfl = global_config.default_image; |
1111 | 911 | 911 | ||
1113 | 912 | if (dfl) Print(L"\t%s\n", dfl->label); | 912 | if (dfl) Print(L" %s\n", dfl->label); |
1114 | 913 | 913 | ||
1115 | 914 | for (img = image_list; img; img = img->next) { | 914 | for (img = image_list; img; img = img->next) { |
1117 | 915 | if (img != dfl) Print(L"\t%s\n", img->label); | 915 | if (img != dfl) Print(L" %s\n", img->label); |
1118 | 916 | } | 916 | } |
1119 | 917 | } | 917 | } |
1120 | 918 | 918 | ||
1121 | 919 | 919 | ||
1122 | === modified file 'debian/changelog' | |||
1123 | --- debian/changelog 2011-08-22 21:17:34 +0000 | |||
1124 | +++ debian/changelog 2013-12-06 20:30:39 +0000 | |||
1125 | @@ -1,3 +1,52 @@ | |||
1126 | 1 | elilo (3.14-3ubuntu1) trusty; urgency=low | ||
1127 | 2 | |||
1128 | 3 | * Merge from Debian. LP: #1175026 Remaining changes: | ||
1129 | 4 | - Add nasty hacks for Apple systems - switch to text mode on startup, | ||
1130 | 5 | pass the framebuffer size to the system on boot, and automatically set | ||
1131 | 6 | legacy-free option on ia32 Apple systems. | ||
1132 | 7 | (needs-to-go-upstream) | ||
1133 | 8 | - Perform some Ubuntu branding, put all files in /EFI/ubuntu. | ||
1134 | 9 | (ubuntu-only) | ||
1135 | 10 | - Add a modprobe call if efivars facility is not found. | ||
1136 | 11 | |||
1137 | 12 | -- Jackson Doak <noskcaj@ubuntu.com> Sat, 07 Dec 2013 07:11:04 +1100 | ||
1138 | 13 | |||
1139 | 14 | elilo (3.14-3) unstable; urgency=low | ||
1140 | 15 | |||
1141 | 16 | * orphan this package as I no longer use it myself | ||
1142 | 17 | |||
1143 | 18 | -- Bdale Garbee <bdale@gag.com> Tue, 07 May 2013 09:37:59 -0600 | ||
1144 | 19 | |||
1145 | 20 | elilo (3.14-2) unstable; urgency=low | ||
1146 | 21 | |||
1147 | 22 | * remove unnecessary explicit iocharset request in elilo.sh that prevents | ||
1148 | 23 | ia64 installations from succeeding, closes: #685186 | ||
1149 | 24 | |||
1150 | 25 | -- Bdale Garbee <bdale@gag.com> Tue, 16 Oct 2012 21:52:16 -0600 | ||
1151 | 26 | |||
1152 | 27 | elilo (3.14-1) unstable; urgency=low | ||
1153 | 28 | |||
1154 | 29 | * new upstream version | ||
1155 | 30 | |||
1156 | 31 | -- Bdale Garbee <bdale@gag.com> Fri, 29 Jun 2012 11:04:12 -0600 | ||
1157 | 32 | |||
1158 | 33 | elilo (3.12-5) unstable; urgency=low | ||
1159 | 34 | |||
1160 | 35 | * merge 3.12-4.1 diff from Christian Perrier | ||
1161 | 36 | * add VCS entries to control file | ||
1162 | 37 | * update standards version | ||
1163 | 38 | |||
1164 | 39 | -- Bdale Garbee <bdale@gag.com> Fri, 29 Jun 2012 09:25:49 -0600 | ||
1165 | 40 | |||
1166 | 41 | elilo (3.12-4.1) unstable; urgency=low | ||
1167 | 42 | |||
1168 | 43 | * Non-maintainer upload. | ||
1169 | 44 | * Fix pending l10n issues. Debconf translations: | ||
1170 | 45 | - Danish (Joe Hansen). Closes: #602446 | ||
1171 | 46 | - Polish (Michał Kułach). Closes: #657502 | ||
1172 | 47 | |||
1173 | 48 | -- Christian Perrier <bubulle@debian.org> Wed, 01 Feb 2012 20:13:32 +0100 | ||
1174 | 49 | |||
1175 | 1 | elilo (3.12-4ubuntu1) oneiric; urgency=low | 50 | elilo (3.12-4ubuntu1) oneiric; urgency=low |
1176 | 2 | 51 | ||
1177 | 3 | * Resynchronise with Debian. Remaining changes: | 52 | * Resynchronise with Debian. Remaining changes: |
1178 | @@ -531,6 +580,3 @@ | |||
1179 | 531 | 580 | ||
1180 | 532 | -- Bdale Garbee <bdale@gag.com> Tue, 10 Jul 2001 13:20:28 -0600 | 581 | -- Bdale Garbee <bdale@gag.com> Tue, 10 Jul 2001 13:20:28 -0600 |
1181 | 533 | 582 | ||
1182 | 534 | Local variables: | ||
1183 | 535 | mode: debian-changelog | ||
1184 | 536 | End: | ||
1185 | 537 | 583 | ||
1186 | === modified file 'debian/control' | |||
1187 | --- debian/control 2011-08-22 21:17:34 +0000 | |||
1188 | +++ debian/control 2013-12-06 20:30:39 +0000 | |||
1189 | @@ -2,9 +2,11 @@ | |||
1190 | 2 | Section: admin | 2 | Section: admin |
1191 | 3 | Priority: optional | 3 | Priority: optional |
1192 | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
1194 | 5 | XSBC-Original-Maintainer: Bdale Garbee <bdale@gag.com> | 5 | XSBC-Original-Maintainer: Debian QA Group <packages@qa.debian.org> |
1195 | 6 | Build-Depends: debhelper (>> 5), binutils (>= 2.17.50.0.14), gcc-multilib [i386 amd64], gnu-efi (>=3.0d), po-debconf | 6 | Build-Depends: debhelper (>> 5), binutils (>= 2.17.50.0.14), gcc-multilib [i386 amd64], gnu-efi (>=3.0d), po-debconf |
1197 | 7 | Standards-Version: 3.9.1 | 7 | Standards-Version: 3.9.3 |
1198 | 8 | Vcs-Git: git://git.gag.com/debian/elilo | ||
1199 | 9 | Vcs-Browser: http://git.gag.com/?p=debian/elilo | ||
1200 | 8 | 10 | ||
1201 | 9 | Package: elilo | 11 | Package: elilo |
1202 | 10 | Architecture: i386 ia64 amd64 | 12 | Architecture: i386 ia64 amd64 |
1203 | 11 | 13 | ||
1204 | === modified file 'debian/elilo.sh' | |||
1205 | --- debian/elilo.sh 2011-08-22 21:17:34 +0000 | |||
1206 | +++ debian/elilo.sh 2013-12-06 20:30:39 +0000 | |||
1207 | @@ -345,7 +345,7 @@ | |||
1208 | 345 | fi | 345 | fi |
1209 | 346 | 346 | ||
1210 | 347 | [ "$VERBOSE" = 1 ] && echo "$PRG: Mounting $boot..." | 347 | [ "$VERBOSE" = 1 ] && echo "$PRG: Mounting $boot..." |
1212 | 348 | mount -t "$fstype" -o codepage=437,iocharset=iso8859-1,rw,noexec,umask=077$loop "$boot" "$TMP/bootstrap.$$" | 348 | mount -t "$fstype" -o codepage=437,rw,noexec,umask=077$loop "$boot" "$TMP/bootstrap.$$" |
1213 | 349 | if [ $? != 0 ] ; then | 349 | if [ $? != 0 ] ; then |
1214 | 350 | echo 1>&2 "$PRG: An error occured mounting $boot" | 350 | echo 1>&2 "$PRG: An error occured mounting $boot" |
1215 | 351 | return 1 | 351 | return 1 |
1216 | 352 | 352 | ||
1217 | === added file 'debian/patches/cross-build.diff' | |||
1218 | --- debian/patches/cross-build.diff 1970-01-01 00:00:00 +0000 | |||
1219 | +++ debian/patches/cross-build.diff 2013-12-06 20:30:39 +0000 | |||
1220 | @@ -0,0 +1,266 @@ | |||
1221 | 1 | diff --git a/Makefile b/Makefile | ||
1222 | 2 | index f0efebd..9d82cbf 100644 | ||
1223 | 3 | --- a/Makefile | ||
1224 | 4 | +++ b/Makefile | ||
1225 | 5 | @@ -25,15 +25,19 @@ | ||
1226 | 6 | # to use this program. | ||
1227 | 7 | # | ||
1228 | 8 | |||
1229 | 9 | -include Make.defaults | ||
1230 | 10 | -TOPDIR=. | ||
1231 | 11 | +SRCDIR = . | ||
1232 | 12 | + | ||
1233 | 13 | +VPATH = $(SRCDIR) | ||
1234 | 14 | + | ||
1235 | 15 | +include $(SRCDIR)/Make.defaults | ||
1236 | 16 | +TOPDIR = $(SRCDIR) | ||
1237 | 17 | |||
1238 | 18 | |||
1239 | 19 | CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o | ||
1240 | 20 | LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds | ||
1241 | 21 | |||
1242 | 22 | LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS) | ||
1243 | 23 | -LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) | ||
1244 | 24 | +LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name) | ||
1245 | 25 | FORMAT = efi-app-$(ARCH) | ||
1246 | 26 | |||
1247 | 27 | FILESYSTEM = | ||
1248 | 28 | @@ -87,7 +91,8 @@ fileops.o : Make.defaults | ||
1249 | 29 | chooser.o : Make.defaults | ||
1250 | 30 | |||
1251 | 31 | $(SUBDIRS): dummy | ||
1252 | 32 | - $(MAKE) -C $@ | ||
1253 | 33 | + mkdir -p $@ | ||
1254 | 34 | + $(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH) | ||
1255 | 35 | |||
1256 | 36 | dummy: | ||
1257 | 37 | |||
1258 | 38 | @@ -106,4 +111,4 @@ ifeq ($(GCC_VERSION),2) | ||
1259 | 39 | @exit 1 | ||
1260 | 40 | endif | ||
1261 | 41 | |||
1262 | 42 | -include Make.rules | ||
1263 | 43 | +include $(SRCDIR)/Make.rules | ||
1264 | 44 | diff --git a/choosers/Makefile b/choosers/Makefile | ||
1265 | 45 | index 9915f48..85d31c7 100644 | ||
1266 | 46 | --- a/choosers/Makefile | ||
1267 | 47 | +++ b/choosers/Makefile | ||
1268 | 48 | @@ -23,10 +23,15 @@ | ||
1269 | 49 | # to use this program. | ||
1270 | 50 | # | ||
1271 | 51 | |||
1272 | 52 | -include ../Make.defaults | ||
1273 | 53 | -include ../Make.rules | ||
1274 | 54 | +SRCDIR = . | ||
1275 | 55 | + | ||
1276 | 56 | +VPATH = $(SRCDIR) | ||
1277 | 57 | + | ||
1278 | 58 | +include $(SRCDIR)/../Make.defaults | ||
1279 | 59 | +include $(SRCDIR)/../Make.rules | ||
1280 | 60 | + | ||
1281 | 61 | +TOPDIR=$(SRCDIR)/.. | ||
1282 | 62 | |||
1283 | 63 | -TOPDIR=$(CDIR)/.. | ||
1284 | 64 | |||
1285 | 65 | FILES= | ||
1286 | 66 | |||
1287 | 67 | @@ -47,7 +52,8 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES) | ||
1288 | 68 | echo "You need to define at least one chooser in Make.defaults"; \ | ||
1289 | 69 | exit 1; \ | ||
1290 | 70 | fi | ||
1291 | 71 | - $(LD) -o $@ -r $(FILES) | ||
1292 | 72 | + $(LD) $(LD3264) -o $@ -r $(FILES) | ||
1293 | 73 | + | ||
1294 | 74 | |||
1295 | 75 | clean: | ||
1296 | 76 | $(RM) -f $(TARGET) $(FILES) | ||
1297 | 77 | diff --git a/devschemes/Makefile b/devschemes/Makefile | ||
1298 | 78 | index 6ac05af..5328cb1 100644 | ||
1299 | 79 | --- a/devschemes/Makefile | ||
1300 | 80 | +++ b/devschemes/Makefile | ||
1301 | 81 | @@ -23,10 +23,15 @@ | ||
1302 | 82 | # to use this program. | ||
1303 | 83 | # | ||
1304 | 84 | |||
1305 | 85 | -include ../Make.defaults | ||
1306 | 86 | -include ../Make.rules | ||
1307 | 87 | +SRCDIR = . | ||
1308 | 88 | + | ||
1309 | 89 | +VPATH = $(SRCDIR) | ||
1310 | 90 | + | ||
1311 | 91 | +include $(SRCDIR)/../Make.defaults | ||
1312 | 92 | +include $(SRCDIR)/../Make.rules | ||
1313 | 93 | + | ||
1314 | 94 | +TOPDIR=$(SRCDIR)/.. | ||
1315 | 95 | |||
1316 | 96 | -TOPDIR=$(CDIR)/.. | ||
1317 | 97 | |||
1318 | 98 | FILES=simple.o | ||
1319 | 99 | |||
1320 | 100 | @@ -40,7 +45,7 @@ all: $(TARGET) | ||
1321 | 101 | # without doing make clean. | ||
1322 | 102 | # | ||
1323 | 103 | $(TARGET): $(FILES) | ||
1324 | 104 | - $(LD) -r -o $@ $(FILES) | ||
1325 | 105 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1326 | 106 | |||
1327 | 107 | clean: | ||
1328 | 108 | $(RM) -f $(TARGET) $(FILES) | ||
1329 | 109 | diff --git a/fs/Makefile b/fs/Makefile | ||
1330 | 110 | index 8e422b2..0bb303f 100644 | ||
1331 | 111 | --- a/fs/Makefile | ||
1332 | 112 | +++ b/fs/Makefile | ||
1333 | 113 | @@ -23,10 +23,15 @@ | ||
1334 | 114 | # to use this program. | ||
1335 | 115 | # | ||
1336 | 116 | |||
1337 | 117 | -include ../Make.defaults | ||
1338 | 118 | -include ../Make.rules | ||
1339 | 119 | +SRCDIR = . | ||
1340 | 120 | + | ||
1341 | 121 | +VPATH = $(SRCDIR) | ||
1342 | 122 | + | ||
1343 | 123 | +include $(SRCDIR)/../Make.defaults | ||
1344 | 124 | +include $(SRCDIR)/../Make.rules | ||
1345 | 125 | + | ||
1346 | 126 | +TOPDIR=$(SRCDIR)/.. | ||
1347 | 127 | |||
1348 | 128 | -TOPDIR=$(CDIR)/.. | ||
1349 | 129 | |||
1350 | 130 | FILES= | ||
1351 | 131 | ifeq ($(CONFIG_localfs),y) | ||
1352 | 132 | @@ -59,7 +64,7 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES) | ||
1353 | 133 | echo "You need to define at least one filesystem in Make.defaults"; \ | ||
1354 | 134 | exit 1; \ | ||
1355 | 135 | fi | ||
1356 | 136 | - $(LD) -r -o $@ $(FILES) | ||
1357 | 137 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1358 | 138 | |||
1359 | 139 | clean: | ||
1360 | 140 | $(RM) -f $(TARGET) $(FILES) | ||
1361 | 141 | diff --git a/ia32/Makefile b/ia32/Makefile | ||
1362 | 142 | index 353ae67..c5f421b 100644 | ||
1363 | 143 | --- a/ia32/Makefile | ||
1364 | 144 | +++ b/ia32/Makefile | ||
1365 | 145 | @@ -23,10 +23,15 @@ | ||
1366 | 146 | # to use this program. | ||
1367 | 147 | # | ||
1368 | 148 | |||
1369 | 149 | -include ../Make.defaults | ||
1370 | 150 | -include ../Make.rules | ||
1371 | 151 | +SRCDIR = . | ||
1372 | 152 | + | ||
1373 | 153 | +VPATH = $(SRCDIR) | ||
1374 | 154 | + | ||
1375 | 155 | +include $(SRCDIR)/../Make.defaults | ||
1376 | 156 | +include $(SRCDIR)/../Make.rules | ||
1377 | 157 | + | ||
1378 | 158 | +TOPDIR=$(SRCDIR)/.. | ||
1379 | 159 | |||
1380 | 160 | -TOPDIR=$(CDIR)/.. | ||
1381 | 161 | |||
1382 | 162 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | ||
1383 | 163 | |||
1384 | 164 | @@ -37,13 +42,13 @@ all: $(TARGET) | ||
1385 | 165 | system.o: rmswitch.h | ||
1386 | 166 | |||
1387 | 167 | rmswitch.h: bin_to_h.c rmswitch.S | ||
1388 | 168 | - $(CC) -o bin_to_h bin_to_h.c | ||
1389 | 169 | - $(AS) -o rmswitch.o rmswitch.S | ||
1390 | 170 | + $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c | ||
1391 | 171 | + $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S | ||
1392 | 172 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | ||
1393 | 173 | ./bin_to_h <rmswitch >rmswitch.h | ||
1394 | 174 | |||
1395 | 175 | $(TARGET): $(FILES) | ||
1396 | 176 | - $(LD) -r -o $@ $(FILES) | ||
1397 | 177 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1398 | 178 | |||
1399 | 179 | clean: | ||
1400 | 180 | $(RM) -f $(TARGET) $(FILES) | ||
1401 | 181 | diff --git a/ia64/Makefile b/ia64/Makefile | ||
1402 | 182 | index a243d0f..bee0a2b 100644 | ||
1403 | 183 | --- a/ia64/Makefile | ||
1404 | 184 | +++ b/ia64/Makefile | ||
1405 | 185 | @@ -23,10 +23,15 @@ | ||
1406 | 186 | # to use this program. | ||
1407 | 187 | # | ||
1408 | 188 | |||
1409 | 189 | -include ../Make.defaults | ||
1410 | 190 | -include ../Make.rules | ||
1411 | 191 | +SRCDIR = . | ||
1412 | 192 | + | ||
1413 | 193 | +VPATH = $(SRCDIR) | ||
1414 | 194 | + | ||
1415 | 195 | +include $(SRCDIR)/../Make.defaults | ||
1416 | 196 | +include $(SRCDIR)/../Make.rules | ||
1417 | 197 | + | ||
1418 | 198 | +TOPDIR=$(SRCDIR)/.. | ||
1419 | 199 | |||
1420 | 200 | -TOPDIR=$(CDIR)/.. | ||
1421 | 201 | |||
1422 | 202 | FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \ | ||
1423 | 203 | gzip.o memset.o memcpy.o setjmp.o longjmp.o | ||
1424 | 204 | diff --git a/tools/Makefile b/tools/Makefile | ||
1425 | 205 | index 8858224..97083d7 100644 | ||
1426 | 206 | --- a/tools/Makefile | ||
1427 | 207 | +++ b/tools/Makefile | ||
1428 | 208 | @@ -23,10 +23,15 @@ | ||
1429 | 209 | # to use this program. | ||
1430 | 210 | # | ||
1431 | 211 | |||
1432 | 212 | -include ../Make.defaults | ||
1433 | 213 | -include ../Make.rules | ||
1434 | 214 | +SRCDIR = . | ||
1435 | 215 | + | ||
1436 | 216 | +VPATH = $(SRCDIR) | ||
1437 | 217 | + | ||
1438 | 218 | +include $(SRCDIR)/../Make.defaults | ||
1439 | 219 | +include $(SRCDIR)/../Make.rules | ||
1440 | 220 | + | ||
1441 | 221 | +TOPDIR=$(SRCDIR)/.. | ||
1442 | 222 | |||
1443 | 223 | -TOPDIR=$(CDIR)/.. | ||
1444 | 224 | |||
1445 | 225 | FILES=eliloalt.o | ||
1446 | 226 | TARGET=eliloalt | ||
1447 | 227 | diff --git a/x86_64/Makefile b/x86_64/Makefile | ||
1448 | 228 | index 4af4b8d..7ade312 100644 | ||
1449 | 229 | --- a/x86_64/Makefile | ||
1450 | 230 | +++ b/x86_64/Makefile | ||
1451 | 231 | @@ -23,10 +23,15 @@ | ||
1452 | 232 | # to use this program. | ||
1453 | 233 | # | ||
1454 | 234 | |||
1455 | 235 | -include ../Make.defaults | ||
1456 | 236 | -include ../Make.rules | ||
1457 | 237 | +SRCDIR = . | ||
1458 | 238 | + | ||
1459 | 239 | +VPATH = $(SRCDIR) | ||
1460 | 240 | + | ||
1461 | 241 | +include $(SRCDIR)/../Make.defaults | ||
1462 | 242 | +include $(SRCDIR)/../Make.rules | ||
1463 | 243 | + | ||
1464 | 244 | +TOPDIR=$(SRCDIR)/.. | ||
1465 | 245 | |||
1466 | 246 | -TOPDIR=$(CDIR)/.. | ||
1467 | 247 | |||
1468 | 248 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | ||
1469 | 249 | #FILES=system.o config.o plain_loader.o | ||
1470 | 250 | @@ -38,13 +43,13 @@ all: $(TARGET) | ||
1471 | 251 | system.o: rmswitch.h | ||
1472 | 252 | |||
1473 | 253 | rmswitch.h: bin_to_h.c rmswitch.S | ||
1474 | 254 | - $(CC) -o bin_to_h bin_to_h.c | ||
1475 | 255 | - $(AS) -o rmswitch.o rmswitch.S | ||
1476 | 256 | + $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c | ||
1477 | 257 | + $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S | ||
1478 | 258 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | ||
1479 | 259 | ./bin_to_h <rmswitch >rmswitch.h | ||
1480 | 260 | |||
1481 | 261 | $(TARGET): $(FILES) | ||
1482 | 262 | - $(LD) -r -o $@ $(FILES) | ||
1483 | 263 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1484 | 264 | |||
1485 | 265 | clean: | ||
1486 | 266 | $(RM) -f $(TARGET) $(FILES) | ||
1487 | 0 | 267 | ||
1488 | === removed file 'debian/patches/debian-changes-3.12-3' | |||
1489 | --- debian/patches/debian-changes-3.12-3 2010-06-08 13:42:05 +0000 | |||
1490 | +++ debian/patches/debian-changes-3.12-3 1970-01-01 00:00:00 +0000 | |||
1491 | @@ -1,284 +0,0 @@ | |||
1492 | 1 | Description: Upstream changes introduced in version 3.12-3 | ||
1493 | 2 | This patch has been created by dpkg-source during the package build. | ||
1494 | 3 | Here's the last changelog entry, hopefully it gives details on why | ||
1495 | 4 | those changes were made: | ||
1496 | 5 | . | ||
1497 | 6 | elilo (3.12-3) unstable; urgency=low | ||
1498 | 7 | . | ||
1499 | 8 | * fix paths and options to build both 32 and 64 bit versions on either | ||
1500 | 9 | flavor of build host, closes: #574713 | ||
1501 | 10 | * don't generate noise when following symlink since that's now the normal | ||
1502 | 11 | situation, closes: #581068 | ||
1503 | 12 | . | ||
1504 | 13 | The person named in the Author field signed this changelog entry. | ||
1505 | 14 | Author: Bdale Garbee <bdale@gag.com> | ||
1506 | 15 | Bug-Debian: http://bugs.debian.org/574713 | ||
1507 | 16 | Bug-Debian: http://bugs.debian.org/581068 | ||
1508 | 17 | |||
1509 | 18 | --- | ||
1510 | 19 | The information above should follow the Patch Tagging Guidelines, please | ||
1511 | 20 | checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here | ||
1512 | 21 | are templates for supplementary fields that you might want to add: | ||
1513 | 22 | |||
1514 | 23 | Origin: <vendor|upstream|other>, <url of original patch> | ||
1515 | 24 | Bug: <url in upstream bugtracker> | ||
1516 | 25 | Bug-Debian: http://bugs.debian.org/<bugnumber> | ||
1517 | 26 | Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> | ||
1518 | 27 | Forwarded: <no|not-needed|url proving that it has been forwarded> | ||
1519 | 28 | Reviewed-By: <name and email of someone who approved the patch> | ||
1520 | 29 | Last-Update: <YYYY-MM-DD> | ||
1521 | 30 | |||
1522 | 31 | --- elilo-3.12.orig/Makefile | ||
1523 | 32 | +++ elilo-3.12/Makefile | ||
1524 | 33 | @@ -25,15 +25,19 @@ | ||
1525 | 34 | # to use this program. | ||
1526 | 35 | # | ||
1527 | 36 | |||
1528 | 37 | -include Make.defaults | ||
1529 | 38 | -TOPDIR=. | ||
1530 | 39 | +SRCDIR = . | ||
1531 | 40 | + | ||
1532 | 41 | +VPATH = $(SRCDIR) | ||
1533 | 42 | + | ||
1534 | 43 | +include $(SRCDIR)/Make.defaults | ||
1535 | 44 | +TOPDIR = $(SRCDIR) | ||
1536 | 45 | |||
1537 | 46 | |||
1538 | 47 | CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o | ||
1539 | 48 | LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds | ||
1540 | 49 | |||
1541 | 50 | LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS) | ||
1542 | 51 | -LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) | ||
1543 | 52 | +LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name) | ||
1544 | 53 | FORMAT = efi-app-$(ARCH) | ||
1545 | 54 | |||
1546 | 55 | FILESYSTEM = | ||
1547 | 56 | @@ -87,7 +91,8 @@ fileops.o : Make.defaults | ||
1548 | 57 | chooser.o : Make.defaults | ||
1549 | 58 | |||
1550 | 59 | $(SUBDIRS): dummy | ||
1551 | 60 | - $(MAKE) -C $@ | ||
1552 | 61 | + mkdir -p $@ | ||
1553 | 62 | + $(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH) | ||
1554 | 63 | |||
1555 | 64 | dummy: | ||
1556 | 65 | |||
1557 | 66 | @@ -106,4 +111,4 @@ ifeq ($(GCC_VERSION),2) | ||
1558 | 67 | @exit 1 | ||
1559 | 68 | endif | ||
1560 | 69 | |||
1561 | 70 | -include Make.rules | ||
1562 | 71 | +include $(SRCDIR)/Make.rules | ||
1563 | 72 | --- elilo-3.12.orig/devschemes/Makefile | ||
1564 | 73 | +++ elilo-3.12/devschemes/Makefile | ||
1565 | 74 | @@ -23,10 +23,15 @@ | ||
1566 | 75 | # to use this program. | ||
1567 | 76 | # | ||
1568 | 77 | |||
1569 | 78 | -include ../Make.defaults | ||
1570 | 79 | -include ../Make.rules | ||
1571 | 80 | +SRCDIR = . | ||
1572 | 81 | + | ||
1573 | 82 | +VPATH = $(SRCDIR) | ||
1574 | 83 | + | ||
1575 | 84 | +include $(SRCDIR)/../Make.defaults | ||
1576 | 85 | +include $(SRCDIR)/../Make.rules | ||
1577 | 86 | + | ||
1578 | 87 | +TOPDIR=$(SRCDIR)/.. | ||
1579 | 88 | |||
1580 | 89 | -TOPDIR=$(CDIR)/.. | ||
1581 | 90 | |||
1582 | 91 | FILES=simple.o | ||
1583 | 92 | |||
1584 | 93 | @@ -40,7 +45,7 @@ all: $(TARGET) | ||
1585 | 94 | # without doing make clean. | ||
1586 | 95 | # | ||
1587 | 96 | $(TARGET): $(FILES) | ||
1588 | 97 | - $(LD) -r -o $@ $(FILES) | ||
1589 | 98 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1590 | 99 | |||
1591 | 100 | clean: | ||
1592 | 101 | $(RM) -f $(TARGET) $(FILES) | ||
1593 | 102 | --- elilo-3.12.orig/ia64/Makefile | ||
1594 | 103 | +++ elilo-3.12/ia64/Makefile | ||
1595 | 104 | @@ -23,10 +23,15 @@ | ||
1596 | 105 | # to use this program. | ||
1597 | 106 | # | ||
1598 | 107 | |||
1599 | 108 | -include ../Make.defaults | ||
1600 | 109 | -include ../Make.rules | ||
1601 | 110 | +SRCDIR = . | ||
1602 | 111 | + | ||
1603 | 112 | +VPATH = $(SRCDIR) | ||
1604 | 113 | + | ||
1605 | 114 | +include $(SRCDIR)/../Make.defaults | ||
1606 | 115 | +include $(SRCDIR)/../Make.rules | ||
1607 | 116 | + | ||
1608 | 117 | +TOPDIR=$(SRCDIR)/.. | ||
1609 | 118 | |||
1610 | 119 | -TOPDIR=$(CDIR)/.. | ||
1611 | 120 | |||
1612 | 121 | FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \ | ||
1613 | 122 | gzip.o memset.o memcpy.o setjmp.o longjmp.o | ||
1614 | 123 | --- elilo-3.12.orig/choosers/Makefile | ||
1615 | 124 | +++ elilo-3.12/choosers/Makefile | ||
1616 | 125 | @@ -23,10 +23,15 @@ | ||
1617 | 126 | # to use this program. | ||
1618 | 127 | # | ||
1619 | 128 | |||
1620 | 129 | -include ../Make.defaults | ||
1621 | 130 | -include ../Make.rules | ||
1622 | 131 | +SRCDIR = . | ||
1623 | 132 | + | ||
1624 | 133 | +VPATH = $(SRCDIR) | ||
1625 | 134 | + | ||
1626 | 135 | +include $(SRCDIR)/../Make.defaults | ||
1627 | 136 | +include $(SRCDIR)/../Make.rules | ||
1628 | 137 | + | ||
1629 | 138 | +TOPDIR=$(SRCDIR)/.. | ||
1630 | 139 | |||
1631 | 140 | -TOPDIR=$(CDIR)/.. | ||
1632 | 141 | |||
1633 | 142 | FILES= | ||
1634 | 143 | |||
1635 | 144 | @@ -43,11 +48,11 @@ TARGET=choosers.o | ||
1636 | 145 | all: $(TARGET) | ||
1637 | 146 | |||
1638 | 147 | $(TARGET): check-choosers $(TOPDIR)/Make.defaults $(FILES) | ||
1639 | 148 | - $(LD) -o $@ -r $(FILES) | ||
1640 | 149 | + $(LD) $(LD3264) -o $@ -r $(FILES) | ||
1641 | 150 | |||
1642 | 151 | clean: | ||
1643 | 152 | $(RM) -f $(TARGET) $(FILES) | ||
1644 | 153 | - | ||
1645 | 154 | + | ||
1646 | 155 | check-choosers: | ||
1647 | 156 | @if [ -n "$(FILES)" ]; then \ | ||
1648 | 157 | exit 0; \ | ||
1649 | 158 | --- elilo-3.12.orig/ia32/Makefile | ||
1650 | 159 | +++ elilo-3.12/ia32/Makefile | ||
1651 | 160 | @@ -23,10 +23,15 @@ | ||
1652 | 161 | # to use this program. | ||
1653 | 162 | # | ||
1654 | 163 | |||
1655 | 164 | -include ../Make.defaults | ||
1656 | 165 | -include ../Make.rules | ||
1657 | 166 | +SRCDIR = . | ||
1658 | 167 | + | ||
1659 | 168 | +VPATH = $(SRCDIR) | ||
1660 | 169 | + | ||
1661 | 170 | +include $(SRCDIR)/../Make.defaults | ||
1662 | 171 | +include $(SRCDIR)/../Make.rules | ||
1663 | 172 | + | ||
1664 | 173 | +TOPDIR=$(SRCDIR)/.. | ||
1665 | 174 | |||
1666 | 175 | -TOPDIR=$(CDIR)/.. | ||
1667 | 176 | |||
1668 | 177 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | ||
1669 | 178 | |||
1670 | 179 | @@ -37,13 +42,13 @@ all: $(TARGET) | ||
1671 | 180 | system.o: rmswitch.h | ||
1672 | 181 | |||
1673 | 182 | rmswitch.h: bin_to_h.c rmswitch.S | ||
1674 | 183 | - $(CC) -o bin_to_h bin_to_h.c | ||
1675 | 184 | - $(AS) -o rmswitch.o rmswitch.S | ||
1676 | 185 | + $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c | ||
1677 | 186 | + $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S | ||
1678 | 187 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | ||
1679 | 188 | ./bin_to_h <rmswitch >rmswitch.h | ||
1680 | 189 | |||
1681 | 190 | $(TARGET): $(FILES) | ||
1682 | 191 | - $(LD) -r -o $@ $(FILES) | ||
1683 | 192 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1684 | 193 | |||
1685 | 194 | clean: | ||
1686 | 195 | $(RM) -f $(TARGET) $(FILES) | ||
1687 | 196 | --- elilo-3.12.orig/x86_64/Makefile | ||
1688 | 197 | +++ elilo-3.12/x86_64/Makefile | ||
1689 | 198 | @@ -23,10 +23,15 @@ | ||
1690 | 199 | # to use this program. | ||
1691 | 200 | # | ||
1692 | 201 | |||
1693 | 202 | -include ../Make.defaults | ||
1694 | 203 | -include ../Make.rules | ||
1695 | 204 | +SRCDIR = . | ||
1696 | 205 | + | ||
1697 | 206 | +VPATH = $(SRCDIR) | ||
1698 | 207 | + | ||
1699 | 208 | +include $(SRCDIR)/../Make.defaults | ||
1700 | 209 | +include $(SRCDIR)/../Make.rules | ||
1701 | 210 | + | ||
1702 | 211 | +TOPDIR=$(SRCDIR)/.. | ||
1703 | 212 | |||
1704 | 213 | -TOPDIR=$(CDIR)/.. | ||
1705 | 214 | |||
1706 | 215 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | ||
1707 | 216 | #FILES=system.o config.o plain_loader.o | ||
1708 | 217 | @@ -38,13 +43,13 @@ all: $(TARGET) | ||
1709 | 218 | system.o: rmswitch.h | ||
1710 | 219 | |||
1711 | 220 | rmswitch.h: bin_to_h.c rmswitch.S | ||
1712 | 221 | - $(CC) -o bin_to_h bin_to_h.c | ||
1713 | 222 | - $(AS) -o rmswitch.o rmswitch.S | ||
1714 | 223 | + $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c | ||
1715 | 224 | + $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S | ||
1716 | 225 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | ||
1717 | 226 | ./bin_to_h <rmswitch >rmswitch.h | ||
1718 | 227 | |||
1719 | 228 | $(TARGET): $(FILES) | ||
1720 | 229 | - $(LD) -r -o $@ $(FILES) | ||
1721 | 230 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1722 | 231 | |||
1723 | 232 | clean: | ||
1724 | 233 | $(RM) -f $(TARGET) $(FILES) | ||
1725 | 234 | --- elilo-3.12.orig/tools/Makefile | ||
1726 | 235 | +++ elilo-3.12/tools/Makefile | ||
1727 | 236 | @@ -23,10 +23,15 @@ | ||
1728 | 237 | # to use this program. | ||
1729 | 238 | # | ||
1730 | 239 | |||
1731 | 240 | -include ../Make.defaults | ||
1732 | 241 | -include ../Make.rules | ||
1733 | 242 | +SRCDIR = . | ||
1734 | 243 | + | ||
1735 | 244 | +VPATH = $(SRCDIR) | ||
1736 | 245 | + | ||
1737 | 246 | +include $(SRCDIR)/../Make.defaults | ||
1738 | 247 | +include $(SRCDIR)/../Make.rules | ||
1739 | 248 | + | ||
1740 | 249 | +TOPDIR=$(SRCDIR)/.. | ||
1741 | 250 | |||
1742 | 251 | -TOPDIR=$(CDIR)/.. | ||
1743 | 252 | |||
1744 | 253 | FILES=eliloalt.o | ||
1745 | 254 | TARGET=eliloalt | ||
1746 | 255 | --- elilo-3.12.orig/fs/Makefile | ||
1747 | 256 | +++ elilo-3.12/fs/Makefile | ||
1748 | 257 | @@ -23,10 +23,15 @@ | ||
1749 | 258 | # to use this program. | ||
1750 | 259 | # | ||
1751 | 260 | |||
1752 | 261 | -include ../Make.defaults | ||
1753 | 262 | -include ../Make.rules | ||
1754 | 263 | +SRCDIR = . | ||
1755 | 264 | + | ||
1756 | 265 | +VPATH = $(SRCDIR) | ||
1757 | 266 | + | ||
1758 | 267 | +include $(SRCDIR)/../Make.defaults | ||
1759 | 268 | +include $(SRCDIR)/../Make.rules | ||
1760 | 269 | + | ||
1761 | 270 | +TOPDIR=$(SRCDIR)/.. | ||
1762 | 271 | |||
1763 | 272 | -TOPDIR=$(CDIR)/.. | ||
1764 | 273 | |||
1765 | 274 | FILES= | ||
1766 | 275 | ifeq ($(CONFIG_localfs),y) | ||
1767 | 276 | @@ -55,7 +60,7 @@ all: $(TARGET) | ||
1768 | 277 | # without doing make clean. | ||
1769 | 278 | # | ||
1770 | 279 | $(TARGET): check-filesystems $(TOPDIR)/Make.defaults $(FILES) | ||
1771 | 280 | - $(LD) -r -o $@ $(FILES) | ||
1772 | 281 | + $(LD) $(LD3264) -r -o $@ $(FILES) | ||
1773 | 282 | |||
1774 | 283 | clean: | ||
1775 | 284 | $(RM) -f $(TARGET) $(FILES) | ||
1776 | 285 | 0 | ||
1777 | === modified file 'debian/patches/fix-paths.diff' | |||
1778 | --- debian/patches/fix-paths.diff 2010-06-08 13:42:05 +0000 | |||
1779 | +++ debian/patches/fix-paths.diff 2013-12-06 20:30:39 +0000 | |||
1780 | @@ -12,7 +12,7 @@ | |||
1781 | 12 | 12 | ||
1782 | 13 | OPTIMFLAGS = -O2 | 13 | OPTIMFLAGS = -O2 |
1783 | 14 | DEBUGFLAGS = -Wall | 14 | DEBUGFLAGS = -Wall |
1785 | 15 | -CFLAGS = $(OPTIMFLAGS) -fno-strict-aliasing -fpic -fshort-wchar $(DEBUGFLAGS) | 15 | -CFLAGS = $(OPTIMFLAGS) -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar $(DEBUGFLAGS) |
1786 | 16 | +CFLAGS = $(ARCH3264) $(OPTIMFLAGS) -fpic -fshort-wchar $(DEBUGFLAGS) | 16 | +CFLAGS = $(ARCH3264) $(OPTIMFLAGS) -fpic -fshort-wchar $(DEBUGFLAGS) |
1787 | 17 | +ASFLAGS = $(ARCH3264) | 17 | +ASFLAGS = $(ARCH3264) |
1788 | 18 | LDFLAGS = -nostdlib -znocombreloc | 18 | LDFLAGS = -nostdlib -znocombreloc |
1789 | 19 | 19 | ||
1790 | === modified file 'debian/patches/series' | |||
1791 | --- debian/patches/series 2011-08-22 21:17:34 +0000 | |||
1792 | +++ debian/patches/series 2013-12-06 20:30:39 +0000 | |||
1793 | @@ -1,3 +1,3 @@ | |||
1794 | 1 | fix-paths.diff | 1 | fix-paths.diff |
1795 | 2 | apple.diff | 2 | apple.diff |
1797 | 3 | debian-changes-3.12-3 | 3 | cross-build.diff |
1798 | 4 | 4 | ||
1799 | === added file 'debian/po/da.po' | |||
1800 | --- debian/po/da.po 1970-01-01 00:00:00 +0000 | |||
1801 | +++ debian/po/da.po 2013-12-06 20:30:39 +0000 | |||
1802 | @@ -0,0 +1,86 @@ | |||
1803 | 1 | # Danish translation elilo. | ||
1804 | 2 | # Copyright (C) 2010 elilo & nedenstående oversættere. | ||
1805 | 3 | # This file is distributed under the same license as the elilo package. | ||
1806 | 4 | # Joe Hansen (joedalton2@yahoo.dk), 2010. | ||
1807 | 5 | # | ||
1808 | 6 | msgid "" | ||
1809 | 7 | msgstr "" | ||
1810 | 8 | "Project-Id-Version: elilo\n" | ||
1811 | 9 | "Report-Msgid-Bugs-To: bdale@gag.com\n" | ||
1812 | 10 | "POT-Creation-Date: 2007-03-13 08:22+0100\n" | ||
1813 | 11 | "PO-Revision-Date: 2010-11-04 12:42+0000\n" | ||
1814 | 12 | "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" | ||
1815 | 13 | "Language-Team: Danish <dansk@dansk-gruppen.dk>\n" | ||
1816 | 14 | "Language: da\n" | ||
1817 | 15 | "MIME-Version: 1.0\n" | ||
1818 | 16 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1819 | 17 | "Content-Transfer-Encoding: 8bit\n" | ||
1820 | 18 | |||
1821 | 19 | #. Type: boolean | ||
1822 | 20 | #. Description | ||
1823 | 21 | #: ../elilo.templates:1001 | ||
1824 | 22 | msgid "Automatically run elilo?" | ||
1825 | 23 | msgstr "Kør automatisk elilo?" | ||
1826 | 24 | |||
1827 | 25 | #. Type: boolean | ||
1828 | 26 | #. Description | ||
1829 | 27 | #: ../elilo.templates:1001 | ||
1830 | 28 | msgid "" | ||
1831 | 29 | "It is necessary to run /usr/sbin/elilo to install the new elilo binary into " | ||
1832 | 30 | "the EFI partition." | ||
1833 | 31 | msgstr "" | ||
1834 | 32 | "Det er nødvendigt at køre /usr/sbin/elilo for at installere den nye binære " | ||
1835 | 33 | "elilo til EFI-partitionen." | ||
1836 | 34 | |||
1837 | 35 | #. Type: boolean | ||
1838 | 36 | #. Description | ||
1839 | 37 | #: ../elilo.templates:1001 | ||
1840 | 38 | msgid "" | ||
1841 | 39 | "WARNING: This procedure will write data into the debian directory of the EFI " | ||
1842 | 40 | "disk partition, possibly overwriting files installed there by hand." | ||
1843 | 41 | msgstr "" | ||
1844 | 42 | "ADVARSEL: Denne procedure vil skrive data til debianmappen på EFI-" | ||
1845 | 43 | "diskpartitionen, og muligvis overskrive filer installeret der manuelt." | ||
1846 | 44 | |||
1847 | 45 | #. Type: boolean | ||
1848 | 46 | #. Description | ||
1849 | 47 | #: ../elilo.templates:1001 | ||
1850 | 48 | msgid "" | ||
1851 | 49 | "Not installing the new elilo binary on the EFI disk partition may leave the " | ||
1852 | 50 | "system in an unbootable state. Alternatives to automatic updating of the " | ||
1853 | 51 | "partition include running /usr/sbin/elilo by hand, or installing the new /" | ||
1854 | 52 | "usr/lib/elilo/elilo.efi executable into the EFI disk partition manually." | ||
1855 | 53 | msgstr "" | ||
1856 | 54 | "Undladelse af at installere den nye binære elilo på EFI-diskpartionen kan " | ||
1857 | 55 | "efterlade systemet i en tilstand, hvor det ikke kan startes op. Alternativer " | ||
1858 | 56 | "til automatisk opdatering af partitionen inkluderer at køre /usr/sbin/elilo " | ||
1859 | 57 | "manuelt, eller installere den nye kørbare /usr/lib/elilo/elilo.efi i EFI-" | ||
1860 | 58 | "diskpartitionen manuelt." | ||
1861 | 59 | |||
1862 | 60 | #. Type: boolean | ||
1863 | 61 | #. Description | ||
1864 | 62 | #: ../elilo.templates:2001 | ||
1865 | 63 | msgid "Reformat and reload EFI partition?" | ||
1866 | 64 | msgstr "Genformater og genindlæs EFI-partition?" | ||
1867 | 65 | |||
1868 | 66 | #. Type: boolean | ||
1869 | 67 | #. Description | ||
1870 | 68 | #: ../elilo.templates:2001 | ||
1871 | 69 | msgid "" | ||
1872 | 70 | "The structure of files in the EFI disk partition has changed since pre-3.2 " | ||
1873 | 71 | "versions of the elilo package. The EFI boot manager entry for Debian needs " | ||
1874 | 72 | "to be updated to reflect these changes." | ||
1875 | 73 | msgstr "" | ||
1876 | 74 | "Strukturen på filer i EFI-diskpartitionen har ændret sig siden pre-3.2-" | ||
1877 | 75 | "versionerne af elilopakken. Debians punkt i EFI-opstartshåndteringen skal " | ||
1878 | 76 | "opdateres for at afspejle disse ændringer." | ||
1879 | 77 | |||
1880 | 78 | #. Type: boolean | ||
1881 | 79 | #. Description | ||
1882 | 80 | #: ../elilo.templates:2001 | ||
1883 | 81 | msgid "" | ||
1884 | 82 | "In most cases, if no manual changes to the EFI partition content need to be " | ||
1885 | 83 | "preserved, this update can be handled automatically." | ||
1886 | 84 | msgstr "" | ||
1887 | 85 | "I de fleste tilfælde, hvor der ikke er behov for at bevare manuelle " | ||
1888 | 86 | "ændringer, kan denne opdatering håndteres automatisk." | ||
1889 | 0 | 87 | ||
1890 | === added file 'debian/po/pl.po' | |||
1891 | --- debian/po/pl.po 1970-01-01 00:00:00 +0000 | |||
1892 | +++ debian/po/pl.po 2013-12-06 20:30:39 +0000 | |||
1893 | @@ -0,0 +1,90 @@ | |||
1894 | 1 | # Copyright (C) 2007 | ||
1895 | 2 | # This file is distributed under the same license as the elilo package. | ||
1896 | 3 | # | ||
1897 | 4 | # Michał Kułach <michal.kulach@gmail.com>, 2012. | ||
1898 | 5 | msgid "" | ||
1899 | 6 | msgstr "" | ||
1900 | 7 | "Project-Id-Version: \n" | ||
1901 | 8 | "Report-Msgid-Bugs-To: bdale@gag.com\n" | ||
1902 | 9 | "POT-Creation-Date: 2007-03-13 08:22+0100\n" | ||
1903 | 10 | "PO-Revision-Date: 2012-01-26 13:57+0100\n" | ||
1904 | 11 | "Last-Translator: Michał Kułach <michal.kulach@gmail.com>\n" | ||
1905 | 12 | "Language-Team: Polish <debian-l10n-polish@lists.debian.org>\n" | ||
1906 | 13 | "Language: pl\n" | ||
1907 | 14 | "MIME-Version: 1.0\n" | ||
1908 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1909 | 16 | "Content-Transfer-Encoding: 8bit\n" | ||
1910 | 17 | "X-Generator: Lokalize 1.2\n" | ||
1911 | 18 | "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " | ||
1912 | 19 | "|| n%100>=20) ? 1 : 2);\n" | ||
1913 | 20 | |||
1914 | 21 | #. Type: boolean | ||
1915 | 22 | #. Description | ||
1916 | 23 | #: ../elilo.templates:1001 | ||
1917 | 24 | msgid "Automatically run elilo?" | ||
1918 | 25 | msgstr "Uruchomić elilo automatycznie?" | ||
1919 | 26 | |||
1920 | 27 | #. Type: boolean | ||
1921 | 28 | #. Description | ||
1922 | 29 | #: ../elilo.templates:1001 | ||
1923 | 30 | msgid "" | ||
1924 | 31 | "It is necessary to run /usr/sbin/elilo to install the new elilo binary into " | ||
1925 | 32 | "the EFI partition." | ||
1926 | 33 | msgstr "" | ||
1927 | 34 | "Konieczne jest uruchomienie /usr/sbin/elilo, aby zainstalować nowy plik " | ||
1928 | 35 | "binarny elilo na partycji EFI." | ||
1929 | 36 | |||
1930 | 37 | #. Type: boolean | ||
1931 | 38 | #. Description | ||
1932 | 39 | #: ../elilo.templates:1001 | ||
1933 | 40 | msgid "" | ||
1934 | 41 | "WARNING: This procedure will write data into the debian directory of the EFI " | ||
1935 | 42 | "disk partition, possibly overwriting files installed there by hand." | ||
1936 | 43 | msgstr "" | ||
1937 | 44 | "OSTRZEŻENIE: Ta procedura zapisze dane do katalogu debian na partycji " | ||
1938 | 45 | "dyskowej EFI, potencjalnie nadpisując pliki, które zostały tam zainstalowane " | ||
1939 | 46 | "ręcznie." | ||
1940 | 47 | |||
1941 | 48 | #. Type: boolean | ||
1942 | 49 | #. Description | ||
1943 | 50 | #: ../elilo.templates:1001 | ||
1944 | 51 | msgid "" | ||
1945 | 52 | "Not installing the new elilo binary on the EFI disk partition may leave the " | ||
1946 | 53 | "system in an unbootable state. Alternatives to automatic updating of the " | ||
1947 | 54 | "partition include running /usr/sbin/elilo by hand, or installing the new /" | ||
1948 | 55 | "usr/lib/elilo/elilo.efi executable into the EFI disk partition manually." | ||
1949 | 56 | msgstr "" | ||
1950 | 57 | "Niezainstalowanie nowego pliku binarnego elilo na partycji dyskowej EFI może " | ||
1951 | 58 | "uniemożliwić ponowny rozruch systemu. Alternatywami dla automatycznego " | ||
1952 | 59 | "uaktualnienia partycji są: ręczne uruchomienie /usr/sbin/elilo lub ręczne " | ||
1953 | 60 | "zainstalowanie nowego pliku wykonywalnego /usr/lib/elilo/elilo.efi na " | ||
1954 | 61 | "partycji dyskowej EFI." | ||
1955 | 62 | |||
1956 | 63 | #. Type: boolean | ||
1957 | 64 | #. Description | ||
1958 | 65 | #: ../elilo.templates:2001 | ||
1959 | 66 | msgid "Reformat and reload EFI partition?" | ||
1960 | 67 | msgstr "Sformatować i załadować partycję EFI ponownie?" | ||
1961 | 68 | |||
1962 | 69 | #. Type: boolean | ||
1963 | 70 | #. Description | ||
1964 | 71 | #: ../elilo.templates:2001 | ||
1965 | 72 | msgid "" | ||
1966 | 73 | "The structure of files in the EFI disk partition has changed since pre-3.2 " | ||
1967 | 74 | "versions of the elilo package. The EFI boot manager entry for Debian needs " | ||
1968 | 75 | "to be updated to reflect these changes." | ||
1969 | 76 | msgstr "" | ||
1970 | 77 | "Struktura plików na partycji dyskowej EFI zmieniła się od czasu wersji " | ||
1971 | 78 | "pre-3.2 pakietu elilo. Wpis dla Debiana w menedżerze rozruchu EFI musi " | ||
1972 | 79 | "zostać uaktualniony, aby uwzględnić te zmiany." | ||
1973 | 80 | |||
1974 | 81 | #. Type: boolean | ||
1975 | 82 | #. Description | ||
1976 | 83 | #: ../elilo.templates:2001 | ||
1977 | 84 | msgid "" | ||
1978 | 85 | "In most cases, if no manual changes to the EFI partition content need to be " | ||
1979 | 86 | "preserved, this update can be handled automatically." | ||
1980 | 87 | msgstr "" | ||
1981 | 88 | "W większości przypadków, jeśli nie ma potrzeby zachowania, dokonanych " | ||
1982 | 89 | "ręcznie, zmian w zawartości partycji EFI, uaktualnienie może zostać wykonane " | ||
1983 | 90 | "automatycznie." | ||
1984 | 0 | 91 | ||
1985 | === modified file 'debian/rules' | |||
1986 | --- debian/rules 2011-08-22 21:17:34 +0000 | |||
1987 | +++ debian/rules 2013-12-06 20:30:39 +0000 | |||
1988 | @@ -7,13 +7,9 @@ | |||
1989 | 7 | 7 | ||
1990 | 8 | buildarch := $(shell dpkg-architecture -qDEB_BUILD_ARCH) | 8 | buildarch := $(shell dpkg-architecture -qDEB_BUILD_ARCH) |
1991 | 9 | 9 | ||
1999 | 10 | configure: configure-stamp | 10 | build: build-arch build-indep |
2000 | 11 | configure-stamp: | 11 | build-arch: build-stamp |
2001 | 12 | dh_testdir | 12 | build-indep: build-stamp |
1995 | 13 | |||
1996 | 14 | touch configure-stamp | ||
1997 | 15 | |||
1998 | 16 | build: configure-stamp build-stamp | ||
2002 | 17 | build-stamp: | 13 | build-stamp: |
2003 | 18 | dh_testdir | 14 | dh_testdir |
2004 | 19 | 15 | ||
2005 | @@ -34,7 +30,7 @@ | |||
2006 | 34 | clean: | 30 | clean: |
2007 | 35 | dh_testdir | 31 | dh_testdir |
2008 | 36 | dh_testroot | 32 | dh_testroot |
2010 | 37 | rm -f build-stamp configure-stamp | 33 | rm -f build-stamp |
2011 | 38 | 34 | ||
2012 | 39 | [ ! -f Makefile ] || $(MAKE) clean | 35 | [ ! -f Makefile ] || $(MAKE) clean |
2013 | 40 | 36 | ||
2014 | @@ -107,4 +103,4 @@ | |||
2015 | 107 | dh_builddeb | 103 | dh_builddeb |
2016 | 108 | 104 | ||
2017 | 109 | binary: binary-indep binary-arch | 105 | binary: binary-indep binary-arch |
2019 | 110 | .PHONY: build clean binary-indep binary-arch binary install configure | 106 | .PHONY: build-indep build-arch build clean binary-indep binary-arch binary install |
2020 | 111 | 107 | ||
2021 | === modified file 'devschemes/Makefile' | |||
2022 | --- devschemes/Makefile 2009-11-01 22:37:21 +0000 | |||
2023 | +++ devschemes/Makefile 2013-12-06 20:30:39 +0000 | |||
2024 | @@ -23,15 +23,10 @@ | |||
2025 | 23 | # to use this program. | 23 | # to use this program. |
2026 | 24 | # | 24 | # |
2027 | 25 | 25 | ||
2037 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
2038 | 27 | 27 | include ../Make.rules | |
2039 | 28 | VPATH = $(SRCDIR) | 28 | |
2040 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
2032 | 30 | include $(SRCDIR)/../Make.defaults | ||
2033 | 31 | include $(SRCDIR)/../Make.rules | ||
2034 | 32 | |||
2035 | 33 | TOPDIR=$(SRCDIR)/.. | ||
2036 | 34 | |||
2041 | 35 | 30 | ||
2042 | 36 | FILES=simple.o | 31 | FILES=simple.o |
2043 | 37 | 32 | ||
2044 | @@ -45,7 +40,7 @@ | |||
2045 | 45 | # without doing make clean. | 40 | # without doing make clean. |
2046 | 46 | # | 41 | # |
2047 | 47 | $(TARGET): $(FILES) | 42 | $(TARGET): $(FILES) |
2049 | 48 | $(LD) $(LD3264) -r -o $@ $(FILES) | 43 | $(LD) -r -o $@ $(FILES) |
2050 | 49 | 44 | ||
2051 | 50 | clean: | 45 | clean: |
2052 | 51 | $(RM) -f $(TARGET) $(FILES) | 46 | $(RM) -f $(TARGET) $(FILES) |
2053 | 52 | 47 | ||
2054 | === modified file 'elilo.c' | |||
2055 | --- elilo.c 2011-08-22 21:17:34 +0000 | |||
2056 | +++ elilo.c 2013-12-06 20:30:39 +0000 | |||
2057 | @@ -95,7 +95,7 @@ | |||
2058 | 95 | INTN | 95 | INTN |
2059 | 96 | kernel_load(EFI_HANDLE image, CHAR16 *kname, kdesc_t *kd, memdesc_t *imem, memdesc_t *mmem) | 96 | kernel_load(EFI_HANDLE image, CHAR16 *kname, kdesc_t *kd, memdesc_t *imem, memdesc_t *mmem) |
2060 | 97 | { | 97 | { |
2062 | 98 | CHAR16 kernel[CMDLINE_MAXLEN]; | 98 | CHAR16 kernel[FILENAME_MAXLEN]; |
2063 | 99 | 99 | ||
2064 | 100 | /* | 100 | /* |
2065 | 101 | * Do the vm image switch here | 101 | * Do the vm image switch here |
2066 | 102 | 102 | ||
2067 | === modified file 'elilo.h' | |||
2068 | --- elilo.h 2011-08-22 21:17:34 +0000 | |||
2069 | +++ elilo.h 2013-12-06 20:30:39 +0000 | |||
2070 | @@ -29,7 +29,7 @@ | |||
2071 | 29 | #ifndef __ELILO_H__ | 29 | #ifndef __ELILO_H__ |
2072 | 30 | #define __ELILO_H__ | 30 | #define __ELILO_H__ |
2073 | 31 | 31 | ||
2075 | 32 | #define ELILO_VERSION L"3.12" | 32 | #define ELILO_VERSION L"3.14" |
2076 | 33 | 33 | ||
2077 | 34 | #include <efi.h> | 34 | #include <efi.h> |
2078 | 35 | 35 | ||
2079 | @@ -54,6 +54,10 @@ | |||
2080 | 54 | #define ROUNDUP(x,a) (((x) + (a) - 1) & ~((a) - 1)) | 54 | #define ROUNDUP(x,a) (((x) + (a) - 1) & ~((a) - 1)) |
2081 | 55 | #define ROUNDDOWN(x,a) ((x) & ~((a) - 1)) | 55 | #define ROUNDDOWN(x,a) ((x) & ~((a) - 1)) |
2082 | 56 | 56 | ||
2083 | 57 | #ifndef UINT32_MAX | ||
2084 | 58 | #define UINT32_MAX ((UINT32)-1) | ||
2085 | 59 | #endif | ||
2086 | 60 | |||
2087 | 57 | /* | 61 | /* |
2088 | 58 | * Elilo Boot modes | 62 | * Elilo Boot modes |
2089 | 59 | */ | 63 | */ |
2090 | @@ -65,7 +69,8 @@ | |||
2091 | 65 | #define ELILO_DEFAULT_TIMEOUT ELILO_TIMEOUT_INFINITY | 69 | #define ELILO_DEFAULT_TIMEOUT ELILO_TIMEOUT_INFINITY |
2092 | 66 | #define ELILO_TIMEOUT_INFINITY (~0UL) | 70 | #define ELILO_TIMEOUT_INFINITY (~0UL) |
2093 | 67 | 71 | ||
2095 | 68 | #define CMDLINE_MAXLEN 512 /* needed by ia32 */ | 72 | #define CMDLINE_MAXLEN 2048 |
2096 | 73 | #define PATHNAME_MAXLEN 512 | ||
2097 | 69 | #define FILENAME_MAXLEN 256 | 74 | #define FILENAME_MAXLEN 256 |
2098 | 70 | #define MAX_ARGS 256 | 75 | #define MAX_ARGS 256 |
2099 | 71 | /* Just pick an arbitrary number that's high enough for now :o) */ | 76 | /* Just pick an arbitrary number that's high enough for now :o) */ |
2100 | @@ -212,6 +217,7 @@ | |||
2101 | 212 | extern INTN sysdeps_getopt(INTN, INTN, CHAR16 *); | 217 | extern INTN sysdeps_getopt(INTN, INTN, CHAR16 *); |
2102 | 213 | extern VOID sysdeps_print_cmdline_opts(VOID); | 218 | extern VOID sysdeps_print_cmdline_opts(VOID); |
2103 | 214 | extern INTN sysdeps_register_options(VOID); | 219 | extern INTN sysdeps_register_options(VOID); |
2104 | 220 | extern VOID *sysdeps_checkfix_initrd(VOID *, memdesc_t *); | ||
2105 | 215 | 221 | ||
2106 | 216 | #define CHAR_SLASH L'/' | 222 | #define CHAR_SLASH L'/' |
2107 | 217 | #define CHAR_BACKSLASH L'\\' | 223 | #define CHAR_BACKSLASH L'\\' |
2108 | 218 | 224 | ||
2109 | === modified file 'fileops.c' | |||
2110 | --- fileops.c 2008-06-19 19:06:08 +0000 | |||
2111 | +++ fileops.c 2013-12-06 20:30:39 +0000 | |||
2112 | @@ -497,7 +497,7 @@ | |||
2113 | 497 | 497 | ||
2114 | 498 | str2 = str == NULL ? L"Unknown" : str; | 498 | str2 = str == NULL ? L"Unknown" : str; |
2115 | 499 | 499 | ||
2117 | 500 | DBG_PRT((L"%s : %-8s : %s\n", dev_tab[idx].name, | 500 | DBG_PRT((L"%s : %-8s : %s", dev_tab[idx].name, |
2118 | 501 | (dev_tab[idx].fops ? dev_tab[idx].fops->name: L"N/A"), str2)); | 501 | (dev_tab[idx].fops ? dev_tab[idx].fops->name: L"N/A"), str2)); |
2119 | 502 | 502 | ||
2120 | 503 | if (str) FreePool(str); | 503 | if (str) FreePool(str); |
2121 | 504 | 504 | ||
2122 | === modified file 'fs/Makefile' | |||
2123 | --- fs/Makefile 2009-11-01 22:37:21 +0000 | |||
2124 | +++ fs/Makefile 2013-12-06 20:30:39 +0000 | |||
2125 | @@ -23,15 +23,10 @@ | |||
2126 | 23 | # to use this program. | 23 | # to use this program. |
2127 | 24 | # | 24 | # |
2128 | 25 | 25 | ||
2138 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
2139 | 27 | 27 | include ../Make.rules | |
2140 | 28 | VPATH = $(SRCDIR) | 28 | |
2141 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
2133 | 30 | include $(SRCDIR)/../Make.defaults | ||
2134 | 31 | include $(SRCDIR)/../Make.rules | ||
2135 | 32 | |||
2136 | 33 | TOPDIR=$(SRCDIR)/.. | ||
2137 | 34 | |||
2142 | 35 | 30 | ||
2143 | 36 | FILES= | 31 | FILES= |
2144 | 37 | ifeq ($(CONFIG_localfs),y) | 32 | ifeq ($(CONFIG_localfs),y) |
2145 | @@ -59,17 +54,13 @@ | |||
2146 | 59 | # XXX: does not trigger recompile when changing filesystem selection | 54 | # XXX: does not trigger recompile when changing filesystem selection |
2147 | 60 | # without doing make clean. | 55 | # without doing make clean. |
2148 | 61 | # | 56 | # |
2159 | 62 | $(TARGET): check-filesystems $(TOPDIR)/Make.defaults $(FILES) | 57 | $(TARGET): $(TOPDIR)/Make.defaults $(FILES) |
2160 | 63 | $(LD) $(LD3264) -r -o $@ $(FILES) | 58 | @if [ -z "$(FILES)" ]; then \ |
2151 | 64 | |||
2152 | 65 | clean: | ||
2153 | 66 | $(RM) -f $(TARGET) $(FILES) | ||
2154 | 67 | |||
2155 | 68 | check-filesystems: | ||
2156 | 69 | @if [ -n "$(FILES)" ]; then \ | ||
2157 | 70 | exit 0; \ | ||
2158 | 71 | else \ | ||
2161 | 72 | echo "You need to define at least one filesystem in Make.defaults"; \ | 59 | echo "You need to define at least one filesystem in Make.defaults"; \ |
2162 | 73 | exit 1; \ | 60 | exit 1; \ |
2163 | 74 | fi | 61 | fi |
2164 | 62 | $(LD) -r -o $@ $(FILES) | ||
2165 | 63 | |||
2166 | 64 | clean: | ||
2167 | 65 | $(RM) -f $(TARGET) $(FILES) | ||
2168 | 75 | 66 | ||
2169 | 76 | 67 | ||
2170 | === modified file 'fs/localfs.c' | |||
2171 | --- fs/localfs.c 2008-06-19 19:06:08 +0000 | |||
2172 | +++ fs/localfs.c 2013-12-06 20:30:39 +0000 | |||
2173 | @@ -98,7 +98,7 @@ | |||
2174 | 98 | 98 | ||
2175 | 99 | DBG_PRT((L"localfs_open on %s\n", name)); | 99 | DBG_PRT((L"localfs_open on %s\n", name)); |
2176 | 100 | 100 | ||
2178 | 101 | status = uefi_call_wrapper(lfs->volume->Open, 5, lfs->volume, &fh, name, EFI_FILE_MODE_READ, 0); | 101 | status = uefi_call_wrapper(lfs->volume->Open, 5, lfs->volume, &fh, name, EFI_FILE_MODE_READ, (UINT64)0); |
2179 | 102 | if (status == EFI_SUCCESS) { | 102 | if (status == EFI_SUCCESS) { |
2180 | 103 | *fd = LOCALFS_F2FD(fh); | 103 | *fd = LOCALFS_F2FD(fh); |
2181 | 104 | } | 104 | } |
2182 | 105 | 105 | ||
2183 | === modified file 'glue_netfs.c' | |||
2184 | --- glue_netfs.c 2011-08-22 21:17:34 +0000 | |||
2185 | +++ glue_netfs.c 2013-12-06 20:30:39 +0000 | |||
2186 | @@ -65,6 +65,19 @@ | |||
2187 | 65 | static CHAR16 *hexa=L"0123456789ABCDEF"; | 65 | static CHAR16 *hexa=L"0123456789ABCDEF"; |
2188 | 66 | 66 | ||
2189 | 67 | static VOID | 67 | static VOID |
2190 | 68 | convert_mac2hex(UINT8 *hw_addr,INTN l, CHAR16 *str) | ||
2191 | 69 | { | ||
2192 | 70 | UINTN i; | ||
2193 | 71 | |||
2194 | 72 | for (i=0 ; i < l; i++) { | ||
2195 | 73 | str[3*i] = hexa[(hw_addr[i] & 0xf0)>>4]; | ||
2196 | 74 | str[3*i+1] = hexa[hw_addr[i] & 0x0f]; | ||
2197 | 75 | str[3*i+2] = ':'; | ||
2198 | 76 | } | ||
2199 | 77 | str[3*l-1]='\0'; | ||
2200 | 78 | } | ||
2201 | 79 | |||
2202 | 80 | static VOID | ||
2203 | 68 | convert_ip2hex(UINT8 *ip, INTN l, CHAR16 *str) | 81 | convert_ip2hex(UINT8 *ip, INTN l, CHAR16 *str) |
2204 | 69 | { | 82 | { |
2205 | 70 | UINTN i; | 83 | UINTN i; |
2206 | @@ -153,6 +166,8 @@ | |||
2207 | 153 | set_var(VAR_NETFS_DOMAINAME, info.domainame); | 166 | set_var(VAR_NETFS_DOMAINAME, info.domainame); |
2208 | 154 | 167 | ||
2209 | 155 | if (info.using_pxe) { | 168 | if (info.using_pxe) { |
2210 | 169 | DBG_PRT((L"netfs_setdefaults: using_pxe")); | ||
2211 | 170 | |||
2212 | 156 | status = netfs->netfs_query_layer(netfs, 0, NETFS_CONFIG_LAYER, maxlen, config[0].fname); | 171 | status = netfs->netfs_query_layer(netfs, 0, NETFS_CONFIG_LAYER, maxlen, config[0].fname); |
2213 | 157 | if (EFI_ERROR(status)) { | 172 | if (EFI_ERROR(status)) { |
2214 | 158 | StrnCpy(config[0].fname, NETFS_DEFAULT_CONFIG, maxlen-1); | 173 | StrnCpy(config[0].fname, NETFS_DEFAULT_CONFIG, maxlen-1); |
2215 | @@ -181,6 +196,8 @@ | |||
2216 | 181 | # endif | 196 | # endif |
2217 | 182 | 197 | ||
2218 | 183 | # define CONFIG_EXTENSION L".conf\0" | 198 | # define CONFIG_EXTENSION L".conf\0" |
2219 | 199 | |||
2220 | 200 | DBG_PRT((L"netfs_setdefaults: machine specific (!using_pxe)")); | ||
2221 | 184 | /* | 201 | /* |
2222 | 185 | * will try machine/subnet specific files first. | 202 | * will try machine/subnet specific files first. |
2223 | 186 | * the filenames are constructed based on the IP(v4) address | 203 | * the filenames are constructed based on the IP(v4) address |
2224 | @@ -206,6 +223,12 @@ | |||
2225 | 206 | 223 | ||
2226 | 207 | StrnCpy(config[6].fname, str, maxlen-1); | 224 | StrnCpy(config[6].fname, str, maxlen-1); |
2227 | 208 | StrnCpy(config[6].fname+2, CONFIG_EXTENSION, 6); | 225 | StrnCpy(config[6].fname+2, CONFIG_EXTENSION, 6); |
2228 | 226 | |||
2229 | 227 | /* use the MAC address as a possible file name as well */ | ||
2230 | 228 | convert_mac2hex(info.hw_addr,6,str); | ||
2231 | 229 | StrnCpy(config[7].fname, str, maxlen-1); | ||
2232 | 230 | StrnCpy(config[7].fname+17, CONFIG_EXTENSION, 6); | ||
2233 | 231 | |||
2234 | 209 | #else | 232 | #else |
2235 | 210 | StrnCpy(config[0].fname, NETFS_DEFAULT_CONFIG, maxlen-1); | 233 | StrnCpy(config[0].fname, NETFS_DEFAULT_CONFIG, maxlen-1); |
2236 | 211 | config[0].fname[maxlen-1] = CHAR_NULL; | 234 | config[0].fname[maxlen-1] = CHAR_NULL; |
2237 | 212 | 235 | ||
2238 | === modified file 'ia32/Makefile' | |||
2239 | --- ia32/Makefile 2010-03-15 16:24:32 +0000 | |||
2240 | +++ ia32/Makefile 2013-12-06 20:30:39 +0000 | |||
2241 | @@ -23,15 +23,10 @@ | |||
2242 | 23 | # to use this program. | 23 | # to use this program. |
2243 | 24 | # | 24 | # |
2244 | 25 | 25 | ||
2254 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
2255 | 27 | 27 | include ../Make.rules | |
2256 | 28 | VPATH = $(SRCDIR) | 28 | |
2257 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
2249 | 30 | include $(SRCDIR)/../Make.defaults | ||
2250 | 31 | include $(SRCDIR)/../Make.rules | ||
2251 | 32 | |||
2252 | 33 | TOPDIR=$(SRCDIR)/.. | ||
2253 | 34 | |||
2258 | 35 | 30 | ||
2259 | 36 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | 31 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o |
2260 | 37 | 32 | ||
2261 | @@ -42,13 +37,13 @@ | |||
2262 | 42 | system.o: rmswitch.h | 37 | system.o: rmswitch.h |
2263 | 43 | 38 | ||
2264 | 44 | rmswitch.h: bin_to_h.c rmswitch.S | 39 | rmswitch.h: bin_to_h.c rmswitch.S |
2267 | 45 | $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c | 40 | $(CC) -o bin_to_h bin_to_h.c |
2268 | 46 | $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S | 41 | $(AS) -o rmswitch.o rmswitch.S |
2269 | 47 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | 42 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o |
2270 | 48 | ./bin_to_h <rmswitch >rmswitch.h | 43 | ./bin_to_h <rmswitch >rmswitch.h |
2271 | 49 | 44 | ||
2272 | 50 | $(TARGET): $(FILES) | 45 | $(TARGET): $(FILES) |
2274 | 51 | $(LD) $(LD3264) -r -o $@ $(FILES) | 46 | $(LD) -r -o $@ $(FILES) |
2275 | 52 | 47 | ||
2276 | 53 | clean: | 48 | clean: |
2277 | 54 | $(RM) -f $(TARGET) $(FILES) | 49 | $(RM) -f $(TARGET) $(FILES) |
2278 | 55 | 50 | ||
2279 | === modified file 'ia32/bzimage.c' | |||
2280 | --- ia32/bzimage.c 2011-08-22 21:17:34 +0000 | |||
2281 | +++ ia32/bzimage.c 2013-12-06 20:30:39 +0000 | |||
2282 | @@ -169,7 +169,7 @@ | |||
2283 | 169 | kernel_start)); | 169 | kernel_start)); |
2284 | 170 | } | 170 | } |
2285 | 171 | 171 | ||
2287 | 172 | kernel_load_address = kernel_start; | 172 | kernel_load_address = NULL; /* allocate anywhere! */ |
2288 | 173 | 173 | ||
2289 | 174 | if (alloc_kmem(kernel_start, EFI_SIZE_TO_PAGES(kernel_size)) != 0) { | 174 | if (alloc_kmem(kernel_start, EFI_SIZE_TO_PAGES(kernel_size)) != 0) { |
2290 | 175 | /* | 175 | /* |
2291 | 176 | 176 | ||
2292 | === modified file 'ia32/system.c' | |||
2293 | --- ia32/system.c 2009-12-08 23:48:32 +0000 | |||
2294 | +++ ia32/system.c 2013-12-06 20:30:39 +0000 | |||
2295 | @@ -149,6 +149,12 @@ | |||
2296 | 149 | return 0; | 149 | return 0; |
2297 | 150 | } | 150 | } |
2298 | 151 | 151 | ||
2299 | 152 | VOID * | ||
2300 | 153 | sysdeps_checkfix_initrd(VOID *start_addr, memdesc_t *imem) | ||
2301 | 154 | { | ||
2302 | 155 | return start_addr; | ||
2303 | 156 | } | ||
2304 | 157 | |||
2305 | 152 | VOID | 158 | VOID |
2306 | 153 | sysdeps_free_boot_params(boot_params_t *bp) | 159 | sysdeps_free_boot_params(boot_params_t *bp) |
2307 | 154 | { | 160 | { |
2308 | @@ -201,7 +207,19 @@ | |||
2309 | 201 | (VOID **)Gop_handle); | 207 | (VOID **)Gop_handle); |
2310 | 202 | 208 | ||
2311 | 203 | if (EFI_ERROR(efi_status) && efi_status != EFI_BUFFER_TOO_SMALL) { | 209 | if (EFI_ERROR(efi_status) && efi_status != EFI_BUFFER_TOO_SMALL) { |
2313 | 204 | ERR_PRT((L"LocateHandle GopProtocol failed.")); | 210 | Print(L"LocateHandle GopProtocol failed.\n"); |
2314 | 211 | Print(L"--Either no graphics head is installed,\n" \ | ||
2315 | 212 | "--efi console is set to serial, or,\n" \ | ||
2316 | 213 | "--the EFI firmware version of this machine is\n" \ | ||
2317 | 214 | "--older than UEFI 2.0. and does not support GOP"); | ||
2318 | 215 | Print(L"you can SAFELY IGNORE this error. elilo will\n" \ | ||
2319 | 216 | "default to text-mode.\n Alternatively you can " \ | ||
2320 | 217 | "now force text mode by setting config variable\n" \ | ||
2321 | 218 | "text_mode=1 for x86 in elilo.conf or via cmdline.\n\n"); | ||
2322 | 219 | Print(L"However if this is the last text output you see\n" \ | ||
2323 | 220 | "ensure that your kernel console command line\n " \ | ||
2324 | 221 | "variable matches up with the actual efi boot menu\n" \ | ||
2325 | 222 | "console output settings. for example efi console\n\n"); | ||
2326 | 205 | return -1; | 223 | return -1; |
2327 | 206 | } | 224 | } |
2328 | 207 | Gop_handle = alloc(size, 0); | 225 | Gop_handle = alloc(size, 0); |
2329 | 208 | 226 | ||
2330 | === modified file 'ia64/Makefile' | |||
2331 | --- ia64/Makefile 2009-11-01 22:37:21 +0000 | |||
2332 | +++ ia64/Makefile 2013-12-06 20:30:39 +0000 | |||
2333 | @@ -23,15 +23,10 @@ | |||
2334 | 23 | # to use this program. | 23 | # to use this program. |
2335 | 24 | # | 24 | # |
2336 | 25 | 25 | ||
2346 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
2347 | 27 | 27 | include ../Make.rules | |
2348 | 28 | VPATH = $(SRCDIR) | 28 | |
2349 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
2341 | 30 | include $(SRCDIR)/../Make.defaults | ||
2342 | 31 | include $(SRCDIR)/../Make.rules | ||
2343 | 32 | |||
2344 | 33 | TOPDIR=$(SRCDIR)/.. | ||
2345 | 34 | |||
2350 | 35 | 30 | ||
2351 | 36 | FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \ | 31 | FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \ |
2352 | 37 | gzip.o memset.o memcpy.o setjmp.o longjmp.o | 32 | gzip.o memset.o memcpy.o setjmp.o longjmp.o |
2353 | 38 | 33 | ||
2354 | === modified file 'ia64/system.c' | |||
2355 | --- ia64/system.c 2009-11-01 22:37:21 +0000 | |||
2356 | +++ ia64/system.c 2013-12-06 20:30:39 +0000 | |||
2357 | @@ -140,6 +140,12 @@ | |||
2358 | 140 | return 0; | 140 | return 0; |
2359 | 141 | } | 141 | } |
2360 | 142 | 142 | ||
2361 | 143 | VOID * | ||
2362 | 144 | sysdeps_checkfix_initrd(VOID *start_addr, memdesc_t *imem) | ||
2363 | 145 | { | ||
2364 | 146 | return start_addr; | ||
2365 | 147 | } | ||
2366 | 148 | |||
2367 | 143 | /* Flush data cache [addr; addr + len], and sync with icache. */ | 149 | /* Flush data cache [addr; addr + len], and sync with icache. */ |
2368 | 144 | void | 150 | void |
2369 | 145 | flush_dcache (CHAR8 *addr, UINT64 len) | 151 | flush_dcache (CHAR8 *addr, UINT64 len) |
2370 | 146 | 152 | ||
2371 | === modified file 'initrd.c' | |||
2372 | --- initrd.c 2009-12-08 23:48:32 +0000 | |||
2373 | +++ initrd.c 2013-12-06 20:30:39 +0000 | |||
2374 | @@ -41,7 +41,11 @@ | |||
2375 | 41 | load_file(CHAR16 *filename, memdesc_t *image) | 41 | load_file(CHAR16 *filename, memdesc_t *image) |
2376 | 42 | { | 42 | { |
2377 | 43 | EFI_STATUS status; | 43 | EFI_STATUS status; |
2379 | 44 | VOID *start_addr = NULL; | 44 | /* |
2380 | 45 | * Actually using the value from sysdeps_initrd_get_addr() | ||
2381 | 46 | * instead of NULL is no change for ia64! | ||
2382 | 47 | */ | ||
2383 | 48 | VOID *start_addr = image->start_addr; | ||
2384 | 45 | UINTN pgcnt; | 49 | UINTN pgcnt; |
2385 | 46 | UINT64 size = 0; | 50 | UINT64 size = 0; |
2386 | 47 | fops_fd_t fd; | 51 | fops_fd_t fd; |
2387 | @@ -71,7 +75,11 @@ | |||
2388 | 71 | /* round up to get required number of pages (4KB) */ | 75 | /* round up to get required number of pages (4KB) */ |
2389 | 72 | image->pgcnt = pgcnt = EFI_SIZE_TO_PAGES(image->size); | 76 | image->pgcnt = pgcnt = EFI_SIZE_TO_PAGES(image->size); |
2390 | 73 | 77 | ||
2392 | 74 | start_addr = alloc_pages(pgcnt, EfiLoaderData, start_addr ? AllocateAddress : AllocateAnyPages, 0 ); | 78 | start_addr = alloc_pages(pgcnt, EfiLoaderData, |
2393 | 79 | start_addr ? AllocateAddress : AllocateAnyPages, start_addr); | ||
2394 | 80 | |||
2395 | 81 | start_addr = sysdeps_checkfix_initrd(start_addr, image); | ||
2396 | 82 | |||
2397 | 75 | if (start_addr == NULL) { | 83 | if (start_addr == NULL) { |
2398 | 76 | ERR_PRT((L"Failed to allocate %d pages for %s image", pgcnt, | 84 | ERR_PRT((L"Failed to allocate %d pages for %s image", pgcnt, |
2399 | 77 | filename)); | 85 | filename)); |
2400 | 78 | 86 | ||
2401 | === modified file 'strops.c' | |||
2402 | --- strops.c 2004-02-14 22:21:36 +0000 | |||
2403 | +++ strops.c 2013-12-06 20:30:39 +0000 | |||
2404 | @@ -41,11 +41,11 @@ | |||
2405 | 41 | { | 41 | { |
2406 | 42 | CHAR16 *res = dst; | 42 | CHAR16 *res = dst; |
2407 | 43 | 43 | ||
2409 | 44 | while (size-- && (*dst++ = *src++) != CHAR_NULL); | 44 | while (size && size-- && (*dst++ = *src++) != CHAR_NULL); |
2410 | 45 | /* | 45 | /* |
2411 | 46 | * does the null padding | 46 | * does the null padding |
2412 | 47 | */ | 47 | */ |
2414 | 48 | while (size-- > 0) *dst++ = CHAR_NULL; | 48 | while (size && size-- > 0) *dst++ = CHAR_NULL; |
2415 | 49 | 49 | ||
2416 | 50 | return res; | 50 | return res; |
2417 | 51 | } | 51 | } |
2418 | @@ -55,11 +55,11 @@ | |||
2419 | 55 | { | 55 | { |
2420 | 56 | CHAR8 *res = dst; | 56 | CHAR8 *res = dst; |
2421 | 57 | 57 | ||
2423 | 58 | while (size-- && (*dst++ = (CHAR8)*src++) != '\0'); | 58 | while (size && size-- && (*dst++ = (CHAR8)*src++) != '\0'); |
2424 | 59 | /* | 59 | /* |
2425 | 60 | * does the null padding | 60 | * does the null padding |
2426 | 61 | */ | 61 | */ |
2428 | 62 | while (size-- > 0) *dst++ = '\0'; | 62 | while (size && size-- > 0) *dst++ = '\0'; |
2429 | 63 | 63 | ||
2430 | 64 | return res; | 64 | return res; |
2431 | 65 | } | 65 | } |
2432 | @@ -76,11 +76,11 @@ | |||
2433 | 76 | { | 76 | { |
2434 | 77 | CHAR8 *res = dst; | 77 | CHAR8 *res = dst; |
2435 | 78 | 78 | ||
2437 | 79 | while (size-- && (*dst++ = *src++) != '\0'); | 79 | while (size && size-- && (*dst++ = *src++) != '\0'); |
2438 | 80 | /* | 80 | /* |
2439 | 81 | * does the null padding | 81 | * does the null padding |
2440 | 82 | */ | 82 | */ |
2442 | 83 | while (size-- > 0) *dst++ = '\0'; | 83 | while (size && size-- > 0) *dst++ = '\0'; |
2443 | 84 | 84 | ||
2444 | 85 | return res; | 85 | return res; |
2445 | 86 | } | 86 | } |
2446 | 87 | 87 | ||
2447 | === modified file 'tools/Makefile' | |||
2448 | --- tools/Makefile 2009-11-01 22:37:21 +0000 | |||
2449 | +++ tools/Makefile 2013-12-06 20:30:39 +0000 | |||
2450 | @@ -23,15 +23,10 @@ | |||
2451 | 23 | # to use this program. | 23 | # to use this program. |
2452 | 24 | # | 24 | # |
2453 | 25 | 25 | ||
2463 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
2464 | 27 | 27 | include ../Make.rules | |
2465 | 28 | VPATH = $(SRCDIR) | 28 | |
2466 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
2458 | 30 | include $(SRCDIR)/../Make.defaults | ||
2459 | 31 | include $(SRCDIR)/../Make.rules | ||
2460 | 32 | |||
2461 | 33 | TOPDIR=$(SRCDIR)/.. | ||
2462 | 34 | |||
2467 | 35 | 30 | ||
2468 | 36 | FILES=eliloalt.o | 31 | FILES=eliloalt.o |
2469 | 37 | TARGET=eliloalt | 32 | TARGET=eliloalt |
2470 | 38 | 33 | ||
2471 | === modified file 'tools/eliloalt.c' | |||
2472 | --- tools/eliloalt.c 2004-02-14 22:21:36 +0000 | |||
2473 | +++ tools/eliloalt.c 2013-12-06 20:30:39 +0000 | |||
2474 | @@ -47,8 +47,10 @@ | |||
2475 | 47 | #define ELILOALT_VERSION "0.02" | 47 | #define ELILOALT_VERSION "0.02" |
2476 | 48 | 48 | ||
2477 | 49 | #define ELILO_ALT_NAME "EliloAlt" | 49 | #define ELILO_ALT_NAME "EliloAlt" |
2479 | 50 | #define EFIVAR_DIR "/proc/efi/vars" | 50 | #define EFIVAR_DIR "/sys/firmware/efi/vars" |
2480 | 51 | #define OFIVAR_DIR "/proc/efi/vars" | ||
2481 | 51 | #define ELILO_ALTVAR EFIVAR_DIR"/"ELILO_ALT_NAME"-00000000-0000-0000-0000-000000000000" | 52 | #define ELILO_ALTVAR EFIVAR_DIR"/"ELILO_ALT_NAME"-00000000-0000-0000-0000-000000000000" |
2482 | 53 | #define OLILO_ALTVAR OFIVAR_DIR"/"ELILO_ALT_NAME"-00000000-0000-0000-0000-000000000000" | ||
2483 | 52 | 54 | ||
2484 | 53 | #define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001 | 55 | #define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001 |
2485 | 54 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 | 56 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 |
2486 | @@ -80,7 +82,9 @@ | |||
2487 | 80 | uint32_t attributes; | 82 | uint32_t attributes; |
2488 | 81 | } __attribute__((packed)) efi_variable_t; | 83 | } __attribute__((packed)) efi_variable_t; |
2489 | 82 | 84 | ||
2490 | 85 | static char *efivar_dir = EFIVAR_DIR; | ||
2491 | 83 | static char *elilo_alt_name = ELILO_ALT_NAME; | 86 | static char *elilo_alt_name = ELILO_ALT_NAME; |
2492 | 87 | static char *elilo_altvar = ELILO_ALTVAR; | ||
2493 | 84 | 88 | ||
2494 | 85 | static struct option cmd_options[]={ | 89 | static struct option cmd_options[]={ |
2495 | 86 | { "version", 0, 0, 1}, | 90 | { "version", 0, 0, 1}, |
2496 | @@ -129,9 +133,15 @@ | |||
2497 | 129 | if (getuid() != 0) { | 133 | if (getuid() != 0) { |
2498 | 130 | fatal_error("This program must be run as root\n"); | 134 | fatal_error("This program must be run as root\n"); |
2499 | 131 | } | 135 | } |
2503 | 132 | efi_vars = opendir(EFIVAR_DIR); | 136 | efi_vars = opendir(efivar_dir); |
2504 | 133 | if (efi_vars == NULL) { | 137 | if (efi_vars == NULL) { |
2505 | 134 | fatal_error("Cannot access %s\n", EFIVAR_DIR); | 138 | efivar_dir = OFIVAR_DIR; |
2506 | 139 | elilo_altvar = OLILO_ALTVAR; | ||
2507 | 140 | efi_vars = opendir(efivar_dir); | ||
2508 | 141 | } | ||
2509 | 142 | if (efi_vars == NULL) { | ||
2510 | 143 | fatal_error("Can access neither %s nor %s\n", | ||
2511 | 144 | EFIVAR_DIR, efivar_dir); | ||
2512 | 135 | } | 145 | } |
2513 | 136 | if (!find_entry) { | 146 | if (!find_entry) { |
2514 | 137 | closedir(efi_vars); | 147 | closedir(efi_vars); |
2515 | @@ -143,9 +153,10 @@ | |||
2516 | 143 | break; | 153 | break; |
2517 | 144 | } | 154 | } |
2518 | 145 | if (entry == NULL) { | 155 | if (entry == NULL) { |
2520 | 146 | fatal_error("Cannot find entry in %s\n", EFIVAR_DIR); | 156 | fatal_error("Cannot find entry in %s\n", efivar_dir); |
2521 | 147 | } | 157 | } |
2523 | 148 | sprintf(name, "%s/%s", EFIVAR_DIR, entry->d_name); | 158 | snprintf(name, 1023, "%s/%s", efivar_dir, entry->d_name); |
2524 | 159 | name[1023] = 0; | ||
2525 | 149 | closedir(efi_vars); | 160 | closedir(efi_vars); |
2526 | 150 | return name; | 161 | return name; |
2527 | 151 | } | 162 | } |
2528 | @@ -158,7 +169,7 @@ | |||
2529 | 158 | 169 | ||
2530 | 159 | check_proc_efi(0); | 170 | check_proc_efi(0); |
2531 | 160 | 171 | ||
2533 | 161 | fd = open(ELILO_ALTVAR, O_WRONLY); | 172 | fd = open(elilo_altvar, O_WRONLY); |
2534 | 162 | if (fd == -1) { | 173 | if (fd == -1) { |
2535 | 163 | fatal_error("variable not defined\n"); | 174 | fatal_error("variable not defined\n"); |
2536 | 164 | } | 175 | } |
2537 | @@ -176,7 +187,7 @@ | |||
2538 | 176 | 187 | ||
2539 | 177 | r = write(fd, &var, sizeof(var)); | 188 | r = write(fd, &var, sizeof(var)); |
2540 | 178 | if (r != sizeof(var)) { | 189 | if (r != sizeof(var)) { |
2542 | 179 | fatal_error("Variable %s defined but invalid content\n", ELILO_ALTVAR); | 190 | fatal_error("Variable %s defined but invalid content\n", elilo_altvar); |
2543 | 180 | } | 191 | } |
2544 | 181 | close(fd); | 192 | close(fd); |
2545 | 182 | } | 193 | } |
2546 | @@ -191,7 +202,7 @@ | |||
2547 | 191 | 202 | ||
2548 | 192 | check_proc_efi(0); | 203 | check_proc_efi(0); |
2549 | 193 | 204 | ||
2551 | 194 | fd = open(ELILO_ALTVAR, O_RDONLY); | 205 | fd = open(elilo_altvar, O_RDONLY); |
2552 | 195 | if (fd == -1) { | 206 | if (fd == -1) { |
2553 | 196 | fatal_error("variable not defined\n"); | 207 | fatal_error("variable not defined\n"); |
2554 | 197 | } | 208 | } |
2555 | @@ -200,7 +211,7 @@ | |||
2556 | 200 | 211 | ||
2557 | 201 | r = read(fd, &var, sizeof(var)); | 212 | r = read(fd, &var, sizeof(var)); |
2558 | 202 | if (r != sizeof(var)) { | 213 | if (r != sizeof(var)) { |
2560 | 203 | fatal_error("Variable %s defined but invalid content\n", ELILO_ALTVAR); | 214 | fatal_error("Variable %s defined but invalid content\n", elilo_altvar); |
2561 | 204 | } | 215 | } |
2562 | 205 | printf("EliloAlt=\""); | 216 | printf("EliloAlt=\""); |
2563 | 206 | for(i=0; i < var.datasize; i+=1){ | 217 | for(i=0; i < var.datasize; i+=1){ |
2564 | @@ -231,7 +242,7 @@ | |||
2565 | 231 | 242 | ||
2566 | 232 | fd = open(name, O_WRONLY); | 243 | fd = open(name, O_WRONLY); |
2567 | 233 | if (fd == -1) { | 244 | if (fd == -1) { |
2569 | 234 | fatal_error("can't open %s: %s\n", ELILO_ALTVAR, strerror(errno)); | 245 | fatal_error("can't open %s: %s\n", elilo_altvar, strerror(errno)); |
2570 | 235 | } | 246 | } |
2571 | 236 | 247 | ||
2572 | 237 | memset(&var, 0, sizeof(var)); | 248 | memset(&var, 0, sizeof(var)); |
2573 | @@ -256,7 +267,7 @@ | |||
2574 | 256 | 267 | ||
2575 | 257 | r = write(fd, &var, sizeof(var)); | 268 | r = write(fd, &var, sizeof(var)); |
2576 | 258 | if (r != sizeof(var)) { | 269 | if (r != sizeof(var)) { |
2578 | 259 | fatal_error("Variable %s defined but invalid content %d\n", ELILO_ALTVAR, r); | 270 | fatal_error("Variable %s defined but invalid content %d\n", elilo_altvar, r); |
2579 | 260 | } | 271 | } |
2580 | 261 | close(fd); | 272 | close(fd); |
2581 | 262 | 273 | ||
2582 | 263 | 274 | ||
2583 | === modified file 'x86_64/Makefile' | |||
2584 | --- x86_64/Makefile 2011-08-22 21:17:34 +0000 | |||
2585 | +++ x86_64/Makefile 2013-12-06 20:30:39 +0000 | |||
2586 | @@ -23,15 +23,10 @@ | |||
2587 | 23 | # to use this program. | 23 | # to use this program. |
2588 | 24 | # | 24 | # |
2589 | 25 | 25 | ||
2599 | 26 | SRCDIR = . | 26 | include ../Make.defaults |
2600 | 27 | 27 | include ../Make.rules | |
2601 | 28 | VPATH = $(SRCDIR) | 28 | |
2602 | 29 | 29 | TOPDIR=$(CDIR)/.. | |
2594 | 30 | include $(SRCDIR)/../Make.defaults | ||
2595 | 31 | include $(SRCDIR)/../Make.rules | ||
2596 | 32 | |||
2597 | 33 | TOPDIR=$(SRCDIR)/.. | ||
2598 | 34 | |||
2603 | 35 | 30 | ||
2604 | 36 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o | 31 | FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o |
2605 | 37 | #FILES=system.o config.o plain_loader.o | 32 | #FILES=system.o config.o plain_loader.o |
2606 | @@ -43,13 +38,13 @@ | |||
2607 | 43 | system.o: rmswitch.h | 38 | system.o: rmswitch.h |
2608 | 44 | 39 | ||
2609 | 45 | rmswitch.h: bin_to_h.c rmswitch.S | 40 | rmswitch.h: bin_to_h.c rmswitch.S |
2612 | 46 | $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c | 41 | $(CC) -o bin_to_h bin_to_h.c |
2613 | 47 | $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S | 42 | $(AS) -o rmswitch.o rmswitch.S |
2614 | 48 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o | 43 | $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o |
2615 | 49 | ./bin_to_h <rmswitch >rmswitch.h | 44 | ./bin_to_h <rmswitch >rmswitch.h |
2616 | 50 | 45 | ||
2617 | 51 | $(TARGET): $(FILES) | 46 | $(TARGET): $(FILES) |
2619 | 52 | $(LD) $(LD3264) -r -o $@ $(FILES) | 47 | $(LD) -r -o $@ $(FILES) |
2620 | 53 | 48 | ||
2621 | 54 | clean: | 49 | clean: |
2622 | 55 | $(RM) -f $(TARGET) $(FILES) | 50 | $(RM) -f $(TARGET) $(FILES) |
2623 | 56 | 51 | ||
2624 | === modified file 'x86_64/bzimage.c' | |||
2625 | --- x86_64/bzimage.c 2011-08-22 21:17:34 +0000 | |||
2626 | +++ x86_64/bzimage.c 2013-12-06 20:30:39 +0000 | |||
2627 | @@ -36,6 +36,129 @@ | |||
2628 | 36 | 36 | ||
2629 | 37 | UINTN kernel_size = 0x800000; /* 8M (default x86_64 bzImage size limit) */ | 37 | UINTN kernel_size = 0x800000; /* 8M (default x86_64 bzImage size limit) */ |
2630 | 38 | 38 | ||
2631 | 39 | static VOID * | ||
2632 | 40 | bzImage_alloc() | ||
2633 | 41 | { | ||
2634 | 42 | UINTN pages = EFI_SIZE_TO_PAGES(kernel_size); | ||
2635 | 43 | int reloc_kernel = 0; | ||
2636 | 44 | VOID *kla, *kend = kernel_start + kernel_size; | ||
2637 | 45 | UINT32 kalign, kmask; | ||
2638 | 46 | boot_params_t *ps = param_start; | ||
2639 | 47 | |||
2640 | 48 | /* | ||
2641 | 49 | * Get address for kernel from header, if applicable & available. | ||
2642 | 50 | */ | ||
2643 | 51 | if ((ps->s.hdr_major < 2) || | ||
2644 | 52 | (ps->s.hdr_major == 2 && ps->s.hdr_minor < 5)) { | ||
2645 | 53 | reloc_kernel = 0; | ||
2646 | 54 | } else { | ||
2647 | 55 | if (ps->s.kernel_start >= DEFAULT_KERNEL_START) | ||
2648 | 56 | kernel_start = (void *)(UINT64)ps->s.kernel_start; | ||
2649 | 57 | reloc_kernel = ps->s.relocatable_kernel; | ||
2650 | 58 | kalign = ps->s.kernel_alignment; | ||
2651 | 59 | kmask = kalign - 1; | ||
2652 | 60 | VERB_PRT(3, Print(L"kernel header (%d.%d) suggests kernel " | ||
2653 | 61 | "start at address "PTR_FMT" (%srelocatable!)\n", | ||
2654 | 62 | ps->s.hdr_major, ps->s.hdr_minor, ps->s.kernel_start, | ||
2655 | 63 | (reloc_kernel ? L"": L"not "))); | ||
2656 | 64 | } | ||
2657 | 65 | |||
2658 | 66 | /* | ||
2659 | 67 | * Best effort for old (< 2.6.20) and non-relocatable kernels | ||
2660 | 68 | */ | ||
2661 | 69 | if (alloc_kmem(kernel_start, pages) == 0) { | ||
2662 | 70 | VERB_PRT(3, Print(L"kernel_start: "PTR_FMT" kernel_size: %d\n", | ||
2663 | 71 | kernel_start, kernel_size)); | ||
2664 | 72 | return kernel_start; | ||
2665 | 73 | } else if ( ! reloc_kernel ) { | ||
2666 | 74 | /* | ||
2667 | 75 | * Couldn't get desired address--just load it anywhere and | ||
2668 | 76 | * (try to) move it later. It's the only chance for non- | ||
2669 | 77 | * relocatable kernels, but it breaks occassionally... | ||
2670 | 78 | */ | ||
2671 | 79 | ERR_PRT((L"Kernel header (%d.%d) suggests kernel " | ||
2672 | 80 | "start at address "PTR_FMT" (non relocatable!)\n" | ||
2673 | 81 | "This address is not available, so an attempt" | ||
2674 | 82 | "is made to copy the kernel there later on\n" | ||
2675 | 83 | "BEWARE: this is unsupported and may not work. " | ||
2676 | 84 | "Please update your kernel.\n", | ||
2677 | 85 | ps->s.hdr_major, ps->s.hdr_minor, ps->s.kernel_start)); | ||
2678 | 86 | kla = (VOID *)(UINT32_MAX - kernel_size); | ||
2679 | 87 | /* NULL would preserve the "anywhere" semantic, */ | ||
2680 | 88 | /* but it would not prevent allocation above 4GB! */ | ||
2681 | 89 | |||
2682 | 90 | if (alloc_kmem_anywhere(&kla, pages) != 0) { | ||
2683 | 91 | /* out of luck */ | ||
2684 | 92 | return NULL; | ||
2685 | 93 | } | ||
2686 | 94 | VERB_PRT(3, Print(L"kernel_start: "PTR_FMT | ||
2687 | 95 | " kernel_size: %d loading at: "PTR_FMT"\n", | ||
2688 | 96 | kernel_start, kernel_size, kla)); | ||
2689 | 97 | return kla; | ||
2690 | 98 | } | ||
2691 | 99 | |||
2692 | 100 | |||
2693 | 101 | /* Is 'ps->s.kernel_alignment' guaranteed to be sane? */ | ||
2694 | 102 | if (kalign < EFI_PAGE_SIZE) { | ||
2695 | 103 | kalign = EFI_PAGE_SIZE; | ||
2696 | 104 | kmask = EFI_PAGE_MASK; | ||
2697 | 105 | } | ||
2698 | 106 | DBG_PRT((L"alignment: kernel=0x%x efi_page=0x%x : 0x%x\n", | ||
2699 | 107 | ps->s.kernel_alignment, EFI_PAGE_SIZE, kalign)); | ||
2700 | 108 | |||
2701 | 109 | /* | ||
2702 | 110 | * Couldn't get the preferred address, but luckily it's | ||
2703 | 111 | * a relocatable kernel, so ... | ||
2704 | 112 | * | ||
2705 | 113 | * 1. use 'find_kernel_memory()' (like Itanium) | ||
2706 | 114 | * 2. try out the 16 lowest possible aligned addresses (> 0) | ||
2707 | 115 | * 3. get enough memory to align "creatively" | ||
2708 | 116 | * 4. forget alignment (and start praying)... | ||
2709 | 117 | */ | ||
2710 | 118 | |||
2711 | 119 | /* 1. */ | ||
2712 | 120 | if ((find_kernel_memory(kernel_start, kend, kalign, &kla) != 0) || | ||
2713 | 121 | (alloc_kmem(kla, pages) != 0)) { | ||
2714 | 122 | kla = NULL; | ||
2715 | 123 | } | ||
2716 | 124 | |||
2717 | 125 | /* 2. */ | ||
2718 | 126 | if ( ! kla && (UINT64)kernel_start < kalign ) { | ||
2719 | 127 | int i; | ||
2720 | 128 | for ( i = 1; i < 16 && !kla; i++ ) { | ||
2721 | 129 | VOID *tmp = (VOID *)((UINT64)kalign * i); | ||
2722 | 130 | if (alloc_kmem(tmp, pages) == 0) { | ||
2723 | 131 | kla = tmp; | ||
2724 | 132 | } | ||
2725 | 133 | } | ||
2726 | 134 | } | ||
2727 | 135 | |||
2728 | 136 | /* 3. */ | ||
2729 | 137 | if ( ! kla ) { | ||
2730 | 138 | UINTN apages = EFI_SIZE_TO_PAGES(kernel_size + kmask); | ||
2731 | 139 | kla = (VOID *)(UINT32_MAX - kernel_size - kmask); | ||
2732 | 140 | |||
2733 | 141 | if (alloc_kmem_anywhere(&kla, apages) == 0) { | ||
2734 | 142 | kla = (VOID *)(((UINT64)kla + kmask) & ~kmask); | ||
2735 | 143 | } else { | ||
2736 | 144 | kla = NULL; | ||
2737 | 145 | } | ||
2738 | 146 | } | ||
2739 | 147 | |||
2740 | 148 | /* 4. last resort */ | ||
2741 | 149 | if ( ! kla ) { | ||
2742 | 150 | kla = (VOID *)(UINT32_MAX - kernel_size); | ||
2743 | 151 | if (alloc_kmem_anywhere(&kla, pages) != 0) { | ||
2744 | 152 | return NULL; | ||
2745 | 153 | } | ||
2746 | 154 | } | ||
2747 | 155 | |||
2748 | 156 | kernel_start = kla; | ||
2749 | 157 | VERB_PRT(1, Print(L"relocating kernel_start: "PTR_FMT | ||
2750 | 158 | " kernel_size: %d\n", kernel_start, kernel_size)); | ||
2751 | 159 | return kla; | ||
2752 | 160 | } | ||
2753 | 161 | |||
2754 | 39 | static INTN | 162 | static INTN |
2755 | 40 | bzImage_probe(CHAR16 *kname) | 163 | bzImage_probe(CHAR16 *kname) |
2756 | 41 | { | 164 | { |
2757 | @@ -158,53 +281,34 @@ | |||
2758 | 158 | * Allocate memory for kernel. | 281 | * Allocate memory for kernel. |
2759 | 159 | */ | 282 | */ |
2760 | 160 | 283 | ||
2791 | 161 | /* | 284 | kernel_load_address = bzImage_alloc(); |
2792 | 162 | * Get correct address for kernel from header, if applicable & available. | 285 | if ( ! kernel_load_address ) { |
2793 | 163 | */ | 286 | ERR_PRT((L"Could not allocate memory for kernel.")); |
2794 | 164 | if ((param_start->s.hdr_major == 2) && | 287 | free(param_start); |
2795 | 165 | (param_start->s.hdr_minor >= 6) && | 288 | param_start = NULL; |
2796 | 166 | (param_start->s.kernel_start >= DEFAULT_KERNEL_START)) { | 289 | param_size = 0; |
2797 | 167 | kernel_start = (void *)param_start->s.kernel_start; | 290 | fops_close(fd); |
2798 | 168 | VERB_PRT(3, Print(L"kernel header suggests kernel start at address "PTR_FMT"\n", | 291 | return -1; |
2799 | 169 | kernel_start)); | 292 | } |
2770 | 170 | } | ||
2771 | 171 | |||
2772 | 172 | kernel_load_address = kernel_start; | ||
2773 | 173 | |||
2774 | 174 | if (alloc_kmem(kernel_start, EFI_SIZE_TO_PAGES(kernel_size)) != 0) { | ||
2775 | 175 | /* | ||
2776 | 176 | * Couldn't get desired address--just load it anywhere and move it later. | ||
2777 | 177 | * (Easier than relocating kernel, and also works with non-relocatable kernels.) | ||
2778 | 178 | */ | ||
2779 | 179 | if (alloc_kmem_anywhere(&kernel_load_address, EFI_SIZE_TO_PAGES(kernel_size)) != 0) { | ||
2780 | 180 | ERR_PRT((L"Could not allocate memory for kernel.")); | ||
2781 | 181 | free(param_start); | ||
2782 | 182 | param_start = NULL; | ||
2783 | 183 | param_size = 0; | ||
2784 | 184 | fops_close(fd); | ||
2785 | 185 | return -1; | ||
2786 | 186 | } | ||
2787 | 187 | } | ||
2788 | 188 | |||
2789 | 189 | VERB_PRT(3, Print(L"kernel_start: "PTR_FMT" kernel_size: %d loading at: "PTR_FMT"\n", | ||
2790 | 190 | kernel_start, kernel_size, kernel_load_address)); | ||
2800 | 191 | 293 | ||
2801 | 192 | /* | 294 | /* |
2802 | 193 | * Now read the rest of the kernel image into memory. | 295 | * Now read the rest of the kernel image into memory. |
2803 | 194 | */ | 296 | */ |
2804 | 195 | 297 | ||
2806 | 196 | DBG_PRT((L"reading kernel image...\n")); | 298 | Print(L"Loading kernel %s... ", kname); |
2807 | 197 | 299 | ||
2808 | 198 | size = kernel_size; | 300 | size = kernel_size; |
2809 | 199 | efi_status = fops_read(fd, kernel_load_address, &size); | 301 | efi_status = fops_read(fd, kernel_load_address, &size); |
2810 | 200 | if (EFI_ERROR(efi_status) || size < 0x10000) { | 302 | if (EFI_ERROR(efi_status) || size < 0x10000) { |
2812 | 201 | ERR_PRT((L"Error reading kernel image %s.", kname)); | 303 | ERR_PRT((L"Error reading kernel image (0x%x).", efi_status)); |
2813 | 202 | free(param_start); | 304 | free(param_start); |
2814 | 203 | param_start = NULL; | 305 | param_start = NULL; |
2815 | 204 | param_size = 0; | 306 | param_size = 0; |
2816 | 205 | fops_close(fd); | 307 | fops_close(fd); |
2817 | 206 | free_kmem(); | 308 | free_kmem(); |
2818 | 207 | return -1; | 309 | return -1; |
2819 | 310 | } else { | ||
2820 | 311 | Print(L" done\n"); | ||
2821 | 208 | } | 312 | } |
2822 | 209 | 313 | ||
2823 | 210 | DBG_PRT((L"kernel image read: %d bytes, %d Kbytes\n", size, size / 1024)); | 314 | DBG_PRT((L"kernel image read: %d bytes, %d Kbytes\n", size, size / 1024)); |
2824 | 211 | 315 | ||
2825 | === modified file 'x86_64/config.c' | |||
2826 | --- x86_64/config.c 2008-06-19 19:06:08 +0000 | |||
2827 | +++ x86_64/config.c 2013-12-06 20:30:39 +0000 | |||
2828 | @@ -33,15 +33,23 @@ | |||
2829 | 33 | 33 | ||
2830 | 34 | typedef struct { | 34 | typedef struct { |
2831 | 35 | UINTN legacy_free_boot; | 35 | UINTN legacy_free_boot; |
2832 | 36 | UINTN text_mode; | ||
2833 | 36 | } x86_64_global_config_t; | 37 | } x86_64_global_config_t; |
2834 | 37 | 38 | ||
2835 | 38 | 39 | ||
2836 | 40 | #define x86_64_opt_offsetof(option) (&((sys_img_options_t *)(0x0))->option) | ||
2837 | 41 | |||
2838 | 39 | static x86_64_global_config_t x86_64_gconf; | 42 | static x86_64_global_config_t x86_64_gconf; |
2839 | 40 | 43 | ||
2840 | 41 | static config_option_t sysdeps_global_options[]={ | 44 | static config_option_t sysdeps_global_options[]={ |
2841 | 42 | {OPT_BOOL, OPT_GLOBAL, L"legacy-free", NULL, NULL, &x86_64_gconf.legacy_free_boot} | 45 | {OPT_BOOL, OPT_GLOBAL, L"legacy-free", NULL, NULL, &x86_64_gconf.legacy_free_boot} |
2842 | 43 | }; | 46 | }; |
2843 | 44 | 47 | ||
2844 | 48 | static config_option_t sysdeps_image_options[]={ | ||
2845 | 49 | {OPT_BOOL, OPT_IMAGE_SYS, L"text-mode", NULL, NULL, x86_64_opt_offsetof(text_mode)} | ||
2846 | 50 | }; | ||
2847 | 51 | |||
2848 | 52 | |||
2849 | 45 | /* | 53 | /* |
2850 | 46 | * X86_64 operations that need to be done only once and just before | 54 | * X86_64 operations that need to be done only once and just before |
2851 | 47 | * entering the main loop of the loader | 55 | * entering the main loop of the loader |
2852 | @@ -81,6 +89,14 @@ | |||
2853 | 81 | return x86_64_gconf.legacy_free_boot ? 1 : 0; | 89 | return x86_64_gconf.legacy_free_boot ? 1 : 0; |
2854 | 82 | } | 90 | } |
2855 | 83 | 91 | ||
2856 | 92 | |||
2857 | 93 | INTN | ||
2858 | 94 | x86_64_text_mode(VOID) | ||
2859 | 95 | { | ||
2860 | 96 | return (elilo_opt.sys_img_opts && | ||
2861 | 97 | elilo_opt.sys_img_opts->text_mode == TRUE) ? 1 : 0; | ||
2862 | 98 | } | ||
2863 | 99 | |||
2864 | 84 | INTN | 100 | INTN |
2865 | 85 | sysdeps_register_options(VOID) | 101 | sysdeps_register_options(VOID) |
2866 | 86 | { | 102 | { |
2867 | @@ -89,14 +105,11 @@ | |||
2868 | 89 | ret = register_config_options(sysdeps_global_options, | 105 | ret = register_config_options(sysdeps_global_options, |
2869 | 90 | sizeof(sysdeps_global_options)/sizeof(config_option_t), | 106 | sizeof(sysdeps_global_options)/sizeof(config_option_t), |
2870 | 91 | OPTIONS_GROUP_GLOBAL); | 107 | OPTIONS_GROUP_GLOBAL); |
2871 | 92 | #if 0 | ||
2872 | 93 | /* no per image options yet */ | ||
2873 | 94 | if (ret == -1 ) return ret; | 108 | if (ret == -1 ) return ret; |
2874 | 95 | 109 | ||
2875 | 96 | ret = register_config_options(sysdeps_image_options, | 110 | ret = register_config_options(sysdeps_image_options, |
2876 | 97 | sizeof(sysdeps_image_options)/sizeof(config_option_t), | 111 | sizeof(sysdeps_image_options)/sizeof(config_option_t), |
2877 | 98 | OPTIONS_GROUP_IMAGE); | 112 | OPTIONS_GROUP_IMAGE); |
2878 | 99 | #endif | ||
2879 | 100 | 113 | ||
2880 | 101 | return ret; | 114 | return ret; |
2881 | 102 | } | 115 | } |
2882 | 103 | 116 | ||
2883 | === modified file 'x86_64/sysdeps.h' | |||
2884 | --- x86_64/sysdeps.h 2009-12-08 23:48:32 +0000 | |||
2885 | +++ x86_64/sysdeps.h 2013-12-06 20:30:39 +0000 | |||
2886 | @@ -107,12 +107,12 @@ | |||
2887 | 107 | /* 0x06 */ UINT8 orig_video_mode; /* LDR */ | 107 | /* 0x06 */ UINT8 orig_video_mode; /* LDR */ |
2888 | 108 | /* 0x07 */ UINT8 orig_video_cols; /* LDR */ | 108 | /* 0x07 */ UINT8 orig_video_cols; /* LDR */ |
2889 | 109 | 109 | ||
2891 | 110 | /* 0x08 */ UINT16 unused_1; /* unused */ | 110 | /* 0x08 */ UINT16 pad_1; /* unused */ |
2892 | 111 | 111 | ||
2893 | 112 | /* %%TBD */ | 112 | /* %%TBD */ |
2894 | 113 | /* 0x0A */ UINT16 orig_ega_bx; /* LDR */ | 113 | /* 0x0A */ UINT16 orig_ega_bx; /* LDR */ |
2895 | 114 | 114 | ||
2897 | 115 | /* 0x0C */ UINT16 unused_2; /* unused */ | 115 | /* 0x0C */ UINT16 pad_2; /* unused */ |
2898 | 116 | 116 | ||
2899 | 117 | /* Screen height before passing control to kernel. */ | 117 | /* Screen height before passing control to kernel. */ |
2900 | 118 | /* 0x0E */ UINT8 orig_video_rows; /* LDR */ | 118 | /* 0x0E */ UINT8 orig_video_rows; /* LDR */ |
2901 | @@ -174,7 +174,7 @@ | |||
2902 | 174 | /* 0x4E */ UINT32 bios_code_len; /* LDR */ | 174 | /* 0x4E */ UINT32 bios_code_len; /* LDR */ |
2903 | 175 | /* 0x52 */ UINT16 bios_data_len; /* LDR */ | 175 | /* 0x52 */ UINT16 bios_data_len; /* LDR */ |
2904 | 176 | 176 | ||
2906 | 177 | /* 0x54 */ UINT8 unused_3[0x2C]; /* unused */ | 177 | /* 0x54 */ UINT8 pad_3[0x2C]; /* unused */ |
2907 | 178 | 178 | ||
2908 | 179 | /* %%TBD */ | 179 | /* %%TBD */ |
2909 | 180 | /* 0x80 */ UINT8 hd0_info[0x10]; /* LDR */ | 180 | /* 0x80 */ UINT8 hd0_info[0x10]; /* LDR */ |
2910 | @@ -184,7 +184,7 @@ | |||
2911 | 184 | /* 0xA0 */ UINT16 mca_info_len; /* LDR */ | 184 | /* 0xA0 */ UINT16 mca_info_len; /* LDR */ |
2912 | 185 | /* 0xA2 */ UINT8 mca_info_buf[0x10]; /* LDR */ | 185 | /* 0xA2 */ UINT8 mca_info_buf[0x10]; /* LDR */ |
2913 | 186 | 186 | ||
2915 | 187 | /* 0xB2 */ UINT8 unused_4[0x10E]; /* unused */ | 187 | /* 0xB2 */ UINT8 pad_4[0x10E]; /* unused */ |
2916 | 188 | 188 | ||
2917 | 189 | /* EFI boot loader signature. */ | 189 | /* EFI boot loader signature. */ |
2918 | 190 | /* 0x1C0 */ UINT8 efi_loader_sig[4]; /* LDR */ | 190 | /* 0x1C0 */ UINT8 efi_loader_sig[4]; /* LDR */ |
2919 | @@ -209,9 +209,9 @@ | |||
2920 | 209 | /* Available contiguous extended memory in KB. */ | 209 | /* Available contiguous extended memory in KB. */ |
2921 | 210 | /* 0x1E0 */ UINT32 alt_mem_k; /* LDR */ | 210 | /* 0x1E0 */ UINT32 alt_mem_k; /* LDR */ |
2922 | 211 | 211 | ||
2924 | 212 | /* 0x1E4 */ UINT32 unused_51; /* unused */ | 212 | /* 0x1E4 */ UINT32 pad_51; /* unused */ |
2925 | 213 | /* 0x1E8 */ UINT8 e820_nrmap; | 213 | /* 0x1E8 */ UINT8 e820_nrmap; |
2927 | 214 | /* 0x1E9 */ UINT32 unused_52[2]; /* unused */ | 214 | /* 0x1E9 */ UINT32 pad_52[2]; /* unused */ |
2928 | 215 | 215 | ||
2929 | 216 | /* Size of setup code in sectors (1 sector == 512 bytes). */ | 216 | /* Size of setup code in sectors (1 sector == 512 bytes). */ |
2930 | 217 | /* 0x1F1 */ UINT8 setup_sectors; /* BLD */ | 217 | /* 0x1F1 */ UINT8 setup_sectors; /* BLD */ |
2931 | @@ -220,15 +220,10 @@ | |||
2932 | 220 | /* 0x1F2 */ UINT16 mount_root_rdonly; /* BLD */ | 220 | /* 0x1F2 */ UINT16 mount_root_rdonly; /* BLD */ |
2933 | 221 | 221 | ||
2934 | 222 | /* %%TBD */ | 222 | /* %%TBD */ |
2944 | 223 | /* 0x1F4 */ UINT16 sys_size; /* BLD */ | 223 | /* 0x1F4 */ UINT32 sys_size; /* BLD */ |
2945 | 224 | 224 | ||
2946 | 225 | /* %%TBD */ | 225 | /* %%TBD */ |
2947 | 226 | /* 0x1F6 */ UINT16 swap_dev; /* BLD */ | 226 | /* 0x1F8 */ UINT16 ram_size_DNU; /* BLD */ |
2939 | 227 | |||
2940 | 228 | /* %%TBD */ | ||
2941 | 229 | /* 0x1F8 */ UINT16 ramdisk_flags; /* BLD */ | ||
2942 | 230 | #define RAMDISK_PROMPT 0x8000 | ||
2943 | 231 | #define RAMDISK_LOAD 0x4000 | ||
2948 | 232 | 227 | ||
2949 | 233 | /* %%TBD */ | 228 | /* %%TBD */ |
2950 | 234 | /* 0x1FA */ UINT16 video_mode_flag; /* BLD */ | 229 | /* 0x1FA */ UINT16 video_mode_flag; /* BLD */ |
2951 | @@ -236,12 +231,8 @@ | |||
2952 | 236 | /* %%TBD */ | 231 | /* %%TBD */ |
2953 | 237 | /* 0x1FC */ UINT16 orig_root_dev; /* BLD */ | 232 | /* 0x1FC */ UINT16 orig_root_dev; /* BLD */ |
2954 | 238 | 233 | ||
2955 | 239 | /* 0x1FE */ UINT8 unused_6; /* unused */ | ||
2956 | 240 | |||
2957 | 241 | /* %%TBD */ | 234 | /* %%TBD */ |
2961 | 242 | /* 0x1FF */ UINT8 aux_dev_info; /* LDR */ | 235 | /* 0x1FE */ UINT16 boot_flag; /* ? */ |
2959 | 243 | #define NO_MOUSE 0x00 | ||
2960 | 244 | #define FOUND_MOUSE 0xAA | ||
2962 | 245 | 236 | ||
2963 | 246 | /* Jump past setup data (not used in EFI). */ | 237 | /* Jump past setup data (not used in EFI). */ |
2964 | 247 | /* 0x200 */ UINT16 jump; /* BLD */ | 238 | /* 0x200 */ UINT16 jump; /* BLD */ |
2965 | @@ -283,16 +274,21 @@ | |||
2966 | 283 | /* 0x21C */ UINT32 initrd_size; /* LDR */ | 274 | /* 0x21C */ UINT32 initrd_size; /* LDR */ |
2967 | 284 | 275 | ||
2968 | 285 | /* %%TBD */ | 276 | /* %%TBD */ |
2970 | 286 | /* 0x220 */ UINT32 bootsect_helper; /* BLD */ | 277 | /* 0x220 */ UINT32 bootsect_helper_DNU; /* BLD */ |
2971 | 287 | 278 | ||
2972 | 288 | /* %%TBD */ | 279 | /* %%TBD */ |
2973 | 289 | /* 0x224 */ UINT16 heap_end_ptr; /* LDR */ | 280 | /* 0x224 */ UINT16 heap_end_ptr; /* LDR */ |
2974 | 290 | 281 | ||
2975 | 291 | /* %%TBD */ | 282 | /* %%TBD */ |
2977 | 292 | /* 0x226 */ UINT16 unused_7; /* LDR */ | 283 | /* 0x226 */ UINT8 ext_loader_ver; /* LDR */ |
2978 | 284 | /* 0x227 */ UINT8 ext_loader_type; /* LDR */ | ||
2979 | 293 | 285 | ||
2980 | 294 | /* 0x228 */ UINT32 cmdline_addr; /* LDR */ | 286 | /* 0x228 */ UINT32 cmdline_addr; /* LDR */ |
2982 | 295 | /* 0x22C */ UINT32 unused_8[41]; | 287 | /* 0x22C */ UINT32 initrd_addr_max; /* BLD */ |
2983 | 288 | /* 0x230 */ UINT32 kernel_alignment; /* BLD */ | ||
2984 | 289 | /* 0x234 */ UINT8 relocatable_kernel; /* BLD */ | ||
2985 | 290 | /* 0x235 */ UINT8 pad_8[3]; | ||
2986 | 291 | /* 0x238 */ UINT32 pad_9[38]; | ||
2987 | 296 | /* 0x2D0 */ UINT8 e820_map[2560]; | 292 | /* 0x2D0 */ UINT8 e820_map[2560]; |
2988 | 297 | } s; | 293 | } s; |
2989 | 298 | } boot_params_t; | 294 | } boot_params_t; |
2990 | @@ -368,6 +364,7 @@ | |||
2991 | 368 | extern UINTN rmswitch_size; | 364 | extern UINTN rmswitch_size; |
2992 | 369 | 365 | ||
2993 | 370 | extern INTN x86_64_use_legacy_free_boot(); | 366 | extern INTN x86_64_use_legacy_free_boot(); |
2994 | 367 | extern INTN x86_64_text_mode(); | ||
2995 | 371 | 368 | ||
2996 | 372 | /* | 369 | /* |
2997 | 373 | * How to jump to kernel code | 370 | * How to jump to kernel code |
2998 | @@ -382,7 +379,6 @@ | |||
2999 | 382 | UINT16 kernel_cs; | 379 | UINT16 kernel_cs; |
3000 | 383 | } jumpvector; | 380 | } jumpvector; |
3001 | 384 | VOID *jump_start; | 381 | VOID *jump_start; |
3002 | 385 | uint64_t temp; | ||
3003 | 386 | 382 | ||
3004 | 387 | /* | 383 | /* |
3005 | 388 | * Disable interrupts. | 384 | * Disable interrupts. |
3006 | @@ -390,22 +386,16 @@ | |||
3007 | 390 | asm volatile ( "cli" : : ); | 386 | asm volatile ( "cli" : : ); |
3008 | 391 | 387 | ||
3009 | 392 | /* | 388 | /* |
3016 | 393 | * Relocate kernel (if needed), and initrd (if present). | 389 | * Relocate kernel (if needed). |
3017 | 394 | * Copy kernel first, in case kernel was loaded overlapping where we're | 390 | * This assumes that the initrd didn't get loaded overlapping where |
3018 | 395 | * planning to copy the initrd. This assumes that the initrd didn't | 391 | * we're planning to copy the kernel, but that's pretty unlikely |
3019 | 396 | * get loaded overlapping where we're planning to copy the kernel, but | 392 | * since we couldn't alloc that space for the kernel (or the kernel |
3020 | 397 | * that's pretty unlikely since we couldn't alloc that space for the | 393 | * would already be there). |
3015 | 398 | * kernel (or the kernel would already be there). | ||
3021 | 399 | */ | 394 | */ |
3022 | 400 | if (kernel_start != kernel_load_address) { | 395 | if (kernel_start != kernel_load_address) { |
3023 | 401 | MEMCPY(kernel_start, kernel_load_address, kernel_size); | 396 | MEMCPY(kernel_start, kernel_load_address, kernel_size); |
3024 | 402 | } | 397 | } |
3025 | 403 | 398 | ||
3026 | 404 | if (bp->s.initrd_start) { | ||
3027 | 405 | temp = bp->s.initrd_start; | ||
3028 | 406 | MEMCPY(INITRD_START, temp , bp->s.initrd_size); | ||
3029 | 407 | bp->s.initrd_start = INITRD_START; | ||
3030 | 408 | } | ||
3031 | 409 | /* | 399 | /* |
3032 | 410 | * Copy boot sector, setup data and command line | 400 | * Copy boot sector, setup data and command line |
3033 | 411 | * to final resting place. We need to copy | 401 | * to final resting place. We need to copy |
3034 | @@ -468,7 +458,8 @@ | |||
3035 | 468 | } | 458 | } |
3036 | 469 | 459 | ||
3037 | 470 | typedef struct sys_img_options { | 460 | typedef struct sys_img_options { |
3039 | 471 | UINT8 nothing_yet; | 461 | UINT8 dummy; /* forces non-zero offset for first field */ |
3040 | 462 | UINT8 text_mode; /* do not try to initialize Graphics Output Protocol */ | ||
3041 | 472 | } sys_img_options_t; | 463 | } sys_img_options_t; |
3042 | 473 | 464 | ||
3043 | 474 | #endif /* __ELILO_SYSDEPS_X86_64_H__ */ | 465 | #endif /* __ELILO_SYSDEPS_X86_64_H__ */ |
3044 | 475 | 466 | ||
3045 | === modified file 'x86_64/system.c' | |||
3046 | --- x86_64/system.c 2009-12-08 23:48:32 +0000 | |||
3047 | +++ x86_64/system.c 2013-12-06 20:30:39 +0000 | |||
3048 | @@ -38,11 +38,19 @@ | |||
3049 | 38 | */ | 38 | */ |
3050 | 39 | #include <efi.h> | 39 | #include <efi.h> |
3051 | 40 | #include <efilib.h> | 40 | #include <efilib.h> |
3052 | 41 | #include <string.h> | ||
3053 | 41 | 42 | ||
3054 | 42 | #include "elilo.h" | 43 | #include "elilo.h" |
3055 | 43 | #include "loader.h" | 44 | #include "loader.h" |
3056 | 44 | #include "rmswitch.h" | 45 | #include "rmswitch.h" |
3057 | 45 | 46 | ||
3058 | 47 | #define DEBUG_CREATE_BOOT_PARAMS 0 | ||
3059 | 48 | #if DEBUG_CREATE_BOOT_PARAMS | ||
3060 | 49 | #define DPR(a) do { if (elilo_opt.debug) { Print a; } } while ( 0 ) | ||
3061 | 50 | #else | ||
3062 | 51 | #define DPR(a) | ||
3063 | 52 | #endif | ||
3064 | 53 | |||
3065 | 46 | extern loader_ops_t bzimage_loader, plain_loader, gzip_loader; | 54 | extern loader_ops_t bzimage_loader, plain_loader, gzip_loader; |
3066 | 47 | 55 | ||
3067 | 48 | /* | 56 | /* |
3068 | @@ -105,14 +113,16 @@ | |||
3069 | 105 | UINTN high_ext_mem = 32 * 1024 * 1024; | 113 | UINTN high_ext_mem = 32 * 1024 * 1024; |
3070 | 106 | 114 | ||
3071 | 107 | /* This starting address will hold true for all of the loader types for now */ | 115 | /* This starting address will hold true for all of the loader types for now */ |
3073 | 108 | VOID *kernel_start = (void *)DEFAULT_KERNEL_START; | 116 | VOID *kernel_start = (VOID *)DEFAULT_KERNEL_START; |
3074 | 109 | 117 | ||
3075 | 110 | /* The kernel may load elsewhere if EFI firmware reserves kernel_start */ | 118 | /* The kernel may load elsewhere if EFI firmware reserves kernel_start */ |
3077 | 111 | VOID *kernel_load_address = DEFAULT_KERNEL_START; | 119 | VOID *kernel_load_address = (VOID *)DEFAULT_KERNEL_START; |
3078 | 112 | 120 | ||
3079 | 113 | VOID *initrd_start = NULL; | 121 | VOID *initrd_start = NULL; |
3080 | 114 | UINTN initrd_size = 0; | 122 | UINTN initrd_size = 0; |
3081 | 115 | 123 | ||
3082 | 124 | INTN e820_map_overflow = 0; | ||
3083 | 125 | |||
3084 | 116 | INTN | 126 | INTN |
3085 | 117 | sysdeps_init(EFI_HANDLE dev) | 127 | sysdeps_init(EFI_HANDLE dev) |
3086 | 118 | { | 128 | { |
3087 | @@ -131,10 +141,8 @@ | |||
3088 | 131 | /* | 141 | /* |
3089 | 132 | * initrd_get_addr() | 142 | * initrd_get_addr() |
3090 | 133 | * Compute a starting address for the initial RAMdisk image. | 143 | * Compute a starting address for the initial RAMdisk image. |
3095 | 134 | * For now, this image is placed immediately after the end of | 144 | * For now we suggest 'initrd_addr_max' with room for 32MB, |
3096 | 135 | * the kernel memory. Inside the start_kernel() code, the | 145 | * as image->pgcnt is not initialized yet. |
3093 | 136 | * RAMdisk image will be relocated to the top of available | ||
3094 | 137 | * extended memory. | ||
3097 | 138 | */ | 146 | */ |
3098 | 139 | INTN | 147 | INTN |
3099 | 140 | sysdeps_initrd_get_addr(kdesc_t *kd, memdesc_t *imem) | 148 | sysdeps_initrd_get_addr(kdesc_t *kd, memdesc_t *imem) |
3100 | @@ -146,10 +154,12 @@ | |||
3101 | 146 | return -1; | 154 | return -1; |
3102 | 147 | } | 155 | } |
3103 | 148 | 156 | ||
3106 | 149 | VERB_PRT(3, Print(L"kstart="PTR_FMT" kentry="PTR_FMT" kend="PTR_FMT"\n", | 157 | VERB_PRT(3, Print(L"initrd_addr_max="PTR_FMT" reserve=%d\n", |
3107 | 150 | kd->kstart, kd->kentry, kd->kend)); | 158 | param_start->s.initrd_addr_max, 32*MB)); |
3108 | 151 | 159 | ||
3110 | 152 | imem->start_addr = kd->kend; | 160 | imem->start_addr = (VOID *) |
3111 | 161 | (((UINT64)param_start->s.initrd_addr_max - 32*MB + 1) | ||
3112 | 162 | & ~EFI_PAGE_MASK); | ||
3113 | 153 | 163 | ||
3114 | 154 | VERB_PRT(3, Print(L"initrd start_addr="PTR_FMT" pgcnt=%d\n", | 164 | VERB_PRT(3, Print(L"initrd start_addr="PTR_FMT" pgcnt=%d\n", |
3115 | 155 | imem->start_addr, imem->pgcnt)); | 165 | imem->start_addr, imem->pgcnt)); |
3116 | @@ -157,6 +167,48 @@ | |||
3117 | 157 | return 0; | 167 | return 0; |
3118 | 158 | } | 168 | } |
3119 | 159 | 169 | ||
3120 | 170 | |||
3121 | 171 | /* | ||
3122 | 172 | * checkfix_initrd() | ||
3123 | 173 | * Check and possibly fix allocation of initrd memory. | ||
3124 | 174 | */ | ||
3125 | 175 | VOID * | ||
3126 | 176 | sysdeps_checkfix_initrd(VOID *start_addr, memdesc_t *imem) | ||
3127 | 177 | { | ||
3128 | 178 | UINTN pgcnt = EFI_SIZE_TO_PAGES(imem->size); | ||
3129 | 179 | UINT64 initrd_addr_max = (UINT64)param_start->s.initrd_addr_max; | ||
3130 | 180 | UINT64 ki_max = initrd_addr_max - imem->size + 1; | ||
3131 | 181 | VOID *ki_max_addr; | ||
3132 | 182 | |||
3133 | 183 | VERB_PRT( 3, Print(L"loadfile: start_addr="PTR_FMT | ||
3134 | 184 | " ki_max_addr="PTR_FMT"\n", start_addr, (VOID *)ki_max)); | ||
3135 | 185 | if (ki_max > UINT32_MAX) { | ||
3136 | 186 | ERR_PRT((L"Force kernel specified initrd_addr_max="PTR_FMT | ||
3137 | 187 | " below 4GB\n", (VOID *)initrd_addr_max)); | ||
3138 | 188 | ki_max = UINT32_MAX - imem->size + 1; | ||
3139 | 189 | } | ||
3140 | 190 | ki_max_addr = (VOID *)ki_max; | ||
3141 | 191 | |||
3142 | 192 | if ((UINT64)start_addr > ki_max) { | ||
3143 | 193 | VERB_PRT(1, Print(L"initrd start_addr="PTR_FMT" above " | ||
3144 | 194 | "limit="PTR_FMT"\n", start_addr, ki_max_addr)); | ||
3145 | 195 | free(start_addr); | ||
3146 | 196 | start_addr = NULL; | ||
3147 | 197 | } | ||
3148 | 198 | /* so either the initial allocation failed or it's been to high! */ | ||
3149 | 199 | if (start_addr == NULL) { | ||
3150 | 200 | start_addr = alloc_pages(pgcnt, EfiLoaderData, | ||
3151 | 201 | AllocateMaxAddress, ki_max_addr); | ||
3152 | 202 | } | ||
3153 | 203 | if ((UINT64)start_addr > ki_max) { | ||
3154 | 204 | ERR_PRT((L"Failed to allocate %d pages below %dMB", | ||
3155 | 205 | pgcnt, (param_start->s.initrd_addr_max+1)>>20)); | ||
3156 | 206 | free(start_addr); | ||
3157 | 207 | start_addr = NULL; | ||
3158 | 208 | } | ||
3159 | 209 | return start_addr; | ||
3160 | 210 | } | ||
3161 | 211 | |||
3162 | 160 | VOID | 212 | VOID |
3163 | 161 | sysdeps_free_boot_params(boot_params_t *bp) | 213 | sysdeps_free_boot_params(boot_params_t *bp) |
3164 | 162 | { | 214 | { |
3165 | @@ -199,6 +251,10 @@ | |||
3166 | 199 | UINTN size1; | 251 | UINTN size1; |
3167 | 200 | UINT8 i; | 252 | UINT8 i; |
3168 | 201 | 253 | ||
3169 | 254 | if (x86_64_text_mode() == 1) { | ||
3170 | 255 | Print((L"Skip GOP init, force text-mode.\n")); | ||
3171 | 256 | return -1; | ||
3172 | 257 | } | ||
3173 | 202 | efi_status = uefi_call_wrapper( | 258 | efi_status = uefi_call_wrapper( |
3174 | 203 | BS->LocateHandle, | 259 | BS->LocateHandle, |
3175 | 204 | 5, | 260 | 5, |
3176 | @@ -209,7 +265,19 @@ | |||
3177 | 209 | (VOID **)Gop_handle); | 265 | (VOID **)Gop_handle); |
3178 | 210 | 266 | ||
3179 | 211 | if (EFI_ERROR(efi_status) && efi_status != EFI_BUFFER_TOO_SMALL) { | 267 | if (EFI_ERROR(efi_status) && efi_status != EFI_BUFFER_TOO_SMALL) { |
3181 | 212 | ERR_PRT((L"LocateHandle GopProtocol failed.")); | 268 | Print(L"LocateHandle GopProtocol failed.\n"); |
3182 | 269 | Print(L"--Either no graphics head is installed,\n" \ | ||
3183 | 270 | "--efi console is set to serial, or,\n" \ | ||
3184 | 271 | "--the EFI firmware version of this machine is\n" \ | ||
3185 | 272 | "--older than UEFI 2.0. and does not support GOP"); | ||
3186 | 273 | Print(L"you can SAFELY IGNORE this error. elilo will\n" \ | ||
3187 | 274 | "default to text-mode.\n Alternatively you can " \ | ||
3188 | 275 | "now force text mode by setting config variable\n" \ | ||
3189 | 276 | "text_mode=1 for x86 in elilo.conf or via cmdline.\n\n"); | ||
3190 | 277 | Print(L"However if this is the last text output you see\n" \ | ||
3191 | 278 | "ensure that your kernel console command line\n " \ | ||
3192 | 279 | "variable matches up with the actual efi boot menu\n" \ | ||
3193 | 280 | "console output settings.\n\n"); | ||
3194 | 213 | return -1; | 281 | return -1; |
3195 | 214 | } | 282 | } |
3196 | 215 | Gop_handle = alloc(size, 0); | 283 | Gop_handle = alloc(size, 0); |
3197 | @@ -326,10 +394,56 @@ | |||
3198 | 326 | return 0; | 394 | return 0; |
3199 | 327 | } | 395 | } |
3200 | 328 | 396 | ||
3201 | 397 | CHAR16 * | ||
3202 | 398 | StrStr(IN const CHAR16 *h, IN const CHAR16 *n) | ||
3203 | 399 | { | ||
3204 | 400 | const CHAR16 *t = h; | ||
3205 | 401 | CHAR16 *res; | ||
3206 | 402 | int len = 0, i; | ||
3207 | 403 | |||
3208 | 404 | len = StrLen((CHAR16 *)n); | ||
3209 | 405 | while(*t != CHAR_NULL) { | ||
3210 | 406 | res = StrChr( t, n[0]); | ||
3211 | 407 | if (!res) return res; | ||
3212 | 408 | for( i = 1; i < len && res[i] != CHAR_NULL && res[i] == n[i]; i++); | ||
3213 | 409 | if ( i == len ) return res; | ||
3214 | 410 | t = res + 1; | ||
3215 | 411 | if (t > h + CMDLINE_MAXLEN) return (CHAR16 *)0; | ||
3216 | 412 | } | ||
3217 | 413 | |||
3218 | 414 | return (CHAR16 *)0; | ||
3219 | 415 | } | ||
3220 | 416 | |||
3221 | 417 | CHAR8 * | ||
3222 | 418 | StrStr8(IN const CHAR8 *h, IN const CHAR8 *n) | ||
3223 | 419 | { | ||
3224 | 420 | const CHAR8 *t = h; | ||
3225 | 421 | CHAR8 *res; | ||
3226 | 422 | int len = 0, i; | ||
3227 | 423 | |||
3228 | 424 | len = strlena((CHAR8 *)n); | ||
3229 | 425 | while(*t != 0) { | ||
3230 | 426 | res = strchra( t, n[0]); | ||
3231 | 427 | if (!res) return res; | ||
3232 | 428 | for( i = 1; i < len && res[i] != 0 && res[i] == n[i]; i++); | ||
3233 | 429 | if ( i == len ) return res; | ||
3234 | 430 | t = res + 1; | ||
3235 | 431 | if (t > (h + CMDLINE_MAXLEN)) return (CHAR8 *)0; | ||
3236 | 432 | } | ||
3237 | 433 | |||
3238 | 434 | return (CHAR8 *)0; | ||
3239 | 435 | } | ||
3240 | 436 | |||
3241 | 329 | /* Convert EFI memory map to E820 map for the operating system | 437 | /* Convert EFI memory map to E820 map for the operating system |
3242 | 330 | * This code is based on a Linux kernel patch submitted by Edgar Hucek | 438 | * This code is based on a Linux kernel patch submitted by Edgar Hucek |
3243 | 331 | */ | 439 | */ |
3244 | 332 | 440 | ||
3245 | 441 | #if DEBUG_CREATE_BOOT_PARAMS | ||
3246 | 442 | static int e820_max = 6; | ||
3247 | 443 | #else | ||
3248 | 444 | static int e820_max = E820_MAX; | ||
3249 | 445 | #endif | ||
3250 | 446 | |||
3251 | 333 | /* Add a memory region to the e820 map */ | 447 | /* Add a memory region to the e820 map */ |
3252 | 334 | static void add_memory_region (struct e820entry *e820_map, | 448 | static void add_memory_region (struct e820entry *e820_map, |
3253 | 335 | int *e820_nr_map, | 449 | int *e820_nr_map, |
3254 | @@ -338,21 +452,56 @@ | |||
3255 | 338 | unsigned int type) | 452 | unsigned int type) |
3256 | 339 | { | 453 | { |
3257 | 340 | int x = *e820_nr_map; | 454 | int x = *e820_nr_map; |
3264 | 341 | 455 | static unsigned long long estart = 0ULL; | |
3265 | 342 | if (x == E820_MAX) { | 456 | static unsigned long esize = 0L; |
3266 | 343 | Print(L"Too many entries in the memory map!\n"); | 457 | static unsigned int etype = -1; |
3267 | 344 | return; | 458 | static int merge = 0; |
3268 | 345 | } | 459 | |
3269 | 346 | 460 | if (x == 0) | |
3270 | 461 | DPR((L"AMR: %3s %4s %16s/%12s/%s\n", | ||
3271 | 462 | L"idx", L" ", L"start", L"size", L"type")); | ||
3272 | 463 | |||
3273 | 464 | /* merge adjacent regions of same type */ | ||
3274 | 347 | if ((x > 0) && e820_map[x-1].addr + e820_map[x-1].size == start | 465 | if ((x > 0) && e820_map[x-1].addr + e820_map[x-1].size == start |
3276 | 348 | && e820_map[x-1].type == type) | 466 | && e820_map[x-1].type == type) { |
3277 | 349 | e820_map[x-1].size += size; | 467 | e820_map[x-1].size += size; |
3279 | 350 | else { | 468 | estart = e820_map[x-1].addr; |
3280 | 469 | esize = e820_map[x-1].size; | ||
3281 | 470 | etype = e820_map[x-1].type; | ||
3282 | 471 | merge++; | ||
3283 | 472 | return; | ||
3284 | 473 | } | ||
3285 | 474 | /* fill up to E820_MAX */ | ||
3286 | 475 | if ( x < e820_max ) { | ||
3287 | 351 | e820_map[x].addr = start; | 476 | e820_map[x].addr = start; |
3288 | 352 | e820_map[x].size = size; | 477 | e820_map[x].size = size; |
3289 | 353 | e820_map[x].type = type; | 478 | e820_map[x].type = type; |
3290 | 354 | (*e820_nr_map)++; | 479 | (*e820_nr_map)++; |
3292 | 355 | } | 480 | if (merge) DPR((L"AMR: %3d ==> %016llx/%012lx/%d (%d)\n", |
3293 | 481 | x-1, estart, esize, etype, merge)); | ||
3294 | 482 | merge=0; | ||
3295 | 483 | DPR((L"AMR: %3d add %016llx/%012lx/%d\n", | ||
3296 | 484 | x, start, size, type)); | ||
3297 | 485 | return; | ||
3298 | 486 | } | ||
3299 | 487 | /* different type means another region didn't fit */ | ||
3300 | 488 | /* or same type, but there's a hole */ | ||
3301 | 489 | if (etype != type || (estart + esize) != start) { | ||
3302 | 490 | if (merge) DPR((L"AMR: %3d ===> %016llx/%012lx/%d (%d)\n", | ||
3303 | 491 | e820_map_overflow, estart, esize, etype, merge)); | ||
3304 | 492 | merge = 0; | ||
3305 | 493 | estart = start; | ||
3306 | 494 | esize = size; | ||
3307 | 495 | etype = type; | ||
3308 | 496 | e820_map_overflow++; | ||
3309 | 497 | DPR((L"AMR: %3d OVER %016llx/%012lx/%d\n", | ||
3310 | 498 | e820_map_overflow, start, size, type)); | ||
3311 | 499 | return; | ||
3312 | 500 | } | ||
3313 | 501 | /* same type and no hole, merge it */ | ||
3314 | 502 | estart += esize; | ||
3315 | 503 | esize += size; | ||
3316 | 504 | merge++; | ||
3317 | 356 | } | 505 | } |
3318 | 357 | 506 | ||
3319 | 358 | void fill_e820map(boot_params_t *bp, mmap_desc_t *mdesc) | 507 | void fill_e820map(boot_params_t *bp, mmap_desc_t *mdesc) |
3320 | @@ -431,6 +580,7 @@ | |||
3321 | 431 | break; | 580 | break; |
3322 | 432 | default: | 581 | default: |
3323 | 433 | /* We should not hit this case */ | 582 | /* We should not hit this case */ |
3324 | 583 | DBG_PRT((L"hit default!?")); | ||
3325 | 434 | add_memory_region(e820_map, &e820_nr_map, | 584 | add_memory_region(e820_map, &e820_nr_map, |
3326 | 435 | md->PhysicalStart, | 585 | md->PhysicalStart, |
3327 | 436 | md->NumberOfPages << EFI_PAGE_SHIFT, | 586 | md->NumberOfPages << EFI_PAGE_SHIFT, |
3328 | @@ -444,6 +594,8 @@ | |||
3329 | 444 | 594 | ||
3330 | 445 | /* | 595 | /* |
3331 | 446 | * x86_64 specific boot parameters initialization routine | 596 | * x86_64 specific boot parameters initialization routine |
3332 | 597 | * | ||
3333 | 598 | * Note: debug and verbose messages have already been turned off! | ||
3334 | 447 | */ | 599 | */ |
3335 | 448 | INTN | 600 | INTN |
3336 | 449 | sysdeps_create_boot_params( | 601 | sysdeps_create_boot_params( |
3337 | @@ -459,6 +611,12 @@ | |||
3338 | 459 | UINT8 row, col; | 611 | UINT8 row, col; |
3339 | 460 | UINT8 mode; | 612 | UINT8 mode; |
3340 | 461 | UINT16 hdr_version; | 613 | UINT16 hdr_version; |
3341 | 614 | UINT8 e820_map_overflow_warned = 0; | ||
3342 | 615 | |||
3343 | 616 | #if DEBUG_CREATE_BOOT_PARAMS | ||
3344 | 617 | elilo_opt.debug=1; | ||
3345 | 618 | elilo_opt.verbose=5; | ||
3346 | 619 | #endif | ||
3347 | 462 | 620 | ||
3348 | 463 | DBG_PRT((L"fill_boot_params()\n")); | 621 | DBG_PRT((L"fill_boot_params()\n")); |
3349 | 464 | 622 | ||
3350 | @@ -493,17 +651,9 @@ | |||
3351 | 493 | hdr_version = (bp->s.hdr_major << 8) | bp->s.hdr_minor; | 651 | hdr_version = (bp->s.hdr_major << 8) | bp->s.hdr_minor; |
3352 | 494 | 652 | ||
3353 | 495 | /* | 653 | /* |
3355 | 496 | * Clear out unused memory in boot sector image. | 654 | * Do NOT clear out unknown memory in boot sector image. |
3356 | 655 | * This breaks boot protocol >= 2.10 (2.6.31). | ||
3357 | 497 | */ | 656 | */ |
3358 | 498 | bp->s.unused_1 = 0; | ||
3359 | 499 | bp->s.unused_2 = 0; | ||
3360 | 500 | ZeroMem(&bp->s.unused_3, sizeof bp->s.unused_3); | ||
3361 | 501 | ZeroMem(&bp->s.unused_4, sizeof bp->s.unused_4); | ||
3362 | 502 | ZeroMem(&bp->s.unused_51, sizeof bp->s.unused_51); | ||
3363 | 503 | ZeroMem(&bp->s.unused_52, sizeof bp->s.unused_52); | ||
3364 | 504 | bp->s.unused_6 = 0; | ||
3365 | 505 | bp->s.unused_7 = 0; | ||
3366 | 506 | ZeroMem(bp->s.unused_8, sizeof bp->s.unused_8); | ||
3367 | 507 | 657 | ||
3368 | 508 | /* | 658 | /* |
3369 | 509 | * Tell kernel this was loaded by an advanced loader type. | 659 | * Tell kernel this was loaded by an advanced loader type. |
3370 | @@ -553,19 +703,19 @@ | |||
3371 | 553 | DBG_PRT((L"initrd->start_addr="PTR_FMT" initrd->pgcnt=%d\n", | 703 | DBG_PRT((L"initrd->start_addr="PTR_FMT" initrd->pgcnt=%d\n", |
3372 | 554 | initrd->start_addr, initrd->pgcnt)); | 704 | initrd->start_addr, initrd->pgcnt)); |
3373 | 555 | 705 | ||
3376 | 556 | /* These RAMdisk flags are not needed, just zero them. */ | 706 | /* These RAMdisk flags are not needed, just zero them. NOT!*/ |
3377 | 557 | bp->s.ramdisk_flags = 0; | 707 | /* 'ramdisk_flags' (@0x1F8) is called 'ram_size' in the meantime, */ |
3378 | 708 | /* see Documentation/x86/boot.txt. */ | ||
3379 | 558 | 709 | ||
3380 | 559 | if (initrd->start_addr && initrd->pgcnt) { | 710 | if (initrd->start_addr && initrd->pgcnt) { |
3381 | 711 | if ( (UINT64)initrd->start_addr > UINT32_MAX ) { | ||
3382 | 712 | ERR_PRT((L"Start of initrd out of reach (>4GB).")); | ||
3383 | 713 | free_kmem(); | ||
3384 | 714 | return -1; | ||
3385 | 715 | } | ||
3386 | 560 | /* %%TBD - This will probably have to be changed. */ | 716 | /* %%TBD - This will probably have to be changed. */ |
3387 | 561 | bp->s.initrd_start = (UINT32)(UINT64)initrd->start_addr; | 717 | bp->s.initrd_start = (UINT32)(UINT64)initrd->start_addr; |
3388 | 562 | bp->s.initrd_size = (UINT32)(initrd->size); | 718 | bp->s.initrd_size = (UINT32)(initrd->size); |
3389 | 563 | /* | ||
3390 | 564 | * This is the RAMdisk root device for RedHat 2.2.x | ||
3391 | 565 | * kernels (major 0x01, minor 0x00). | ||
3392 | 566 | */ | ||
3393 | 567 | |||
3394 | 568 | bp->s.orig_root_dev = 0x0100; | ||
3395 | 569 | } else { | 719 | } else { |
3396 | 570 | bp->s.initrd_start = 0; | 720 | bp->s.initrd_start = 0; |
3397 | 571 | bp->s.initrd_size = 0; | 721 | bp->s.initrd_size = 0; |
3398 | @@ -590,11 +740,6 @@ | |||
3399 | 590 | ZeroMem(bp->s.mca_info_buf, sizeof bp->s.mca_info_buf); | 740 | ZeroMem(bp->s.mca_info_buf, sizeof bp->s.mca_info_buf); |
3400 | 591 | 741 | ||
3401 | 592 | /* | 742 | /* |
3402 | 593 | * Pointing device presence. The kernel will detect this. | ||
3403 | 594 | */ | ||
3404 | 595 | bp->s.aux_dev_info = NO_MOUSE; | ||
3405 | 596 | |||
3406 | 597 | /* | ||
3407 | 598 | * EFI loader signature | 743 | * EFI loader signature |
3408 | 599 | */ | 744 | */ |
3409 | 600 | CopyMem(bp->s.efi_loader_sig, EFI_LOADER_SIG_X64, 4); | 745 | CopyMem(bp->s.efi_loader_sig, EFI_LOADER_SIG_X64, 4); |
3410 | @@ -602,6 +747,11 @@ | |||
3411 | 602 | /* | 747 | /* |
3412 | 603 | * Kernel entry point. | 748 | * Kernel entry point. |
3413 | 604 | */ | 749 | */ |
3414 | 750 | if ( (UINT64)kernel_start != (UINT32)(UINT64)kernel_start ) { | ||
3415 | 751 | ERR_PRT((L"Start of kernel (will be) out of reach (>4GB).")); | ||
3416 | 752 | free_kmem(); | ||
3417 | 753 | return -1; | ||
3418 | 754 | } | ||
3419 | 605 | bp->s.kernel_start = (UINT32)(UINT64)kernel_start; | 755 | bp->s.kernel_start = (UINT32)(UINT64)kernel_start; |
3420 | 606 | 756 | ||
3421 | 607 | /* | 757 | /* |
3422 | @@ -692,11 +842,9 @@ | |||
3423 | 692 | CHECK_OFFSET(setup_sectors, 0x1F1, L"%xh"); | 842 | CHECK_OFFSET(setup_sectors, 0x1F1, L"%xh"); |
3424 | 693 | CHECK_OFFSET(mount_root_rdonly, 0x1F2, L"%xh"); | 843 | CHECK_OFFSET(mount_root_rdonly, 0x1F2, L"%xh"); |
3425 | 694 | CHECK_OFFSET(sys_size, 0x1F4, L"%xh"); | 844 | CHECK_OFFSET(sys_size, 0x1F4, L"%xh"); |
3426 | 695 | CHECK_OFFSET(swap_dev, 0x1F6, L"%xh"); | ||
3427 | 696 | CHECK_OFFSET(ramdisk_flags, 0x1F8, L"%xh"); | ||
3428 | 697 | CHECK_OFFSET(video_mode_flag, 0x1FA, L"%xh"); | 845 | CHECK_OFFSET(video_mode_flag, 0x1FA, L"%xh"); |
3429 | 698 | CHECK_OFFSET(orig_root_dev, 0x1FC, L"%xh"); | 846 | CHECK_OFFSET(orig_root_dev, 0x1FC, L"%xh"); |
3431 | 699 | CHECK_OFFSET(aux_dev_info, 0x1FF, L"%xh"); | 847 | CHECK_OFFSET(boot_flag, 0x1FE, L"%xh"); |
3432 | 700 | CHECK_OFFSET(jump, 0x200, L"%xh"); | 848 | CHECK_OFFSET(jump, 0x200, L"%xh"); |
3433 | 701 | CHECK_OFFSET(setup_sig, 0x202, L"'%-4.4a'"); | 849 | CHECK_OFFSET(setup_sig, 0x202, L"'%-4.4a'"); |
3434 | 702 | CHECK_OFFSET(hdr_minor, 0x206, L"%xh"); | 850 | CHECK_OFFSET(hdr_minor, 0x206, L"%xh"); |
3435 | @@ -710,9 +858,9 @@ | |||
3436 | 710 | CHECK_OFFSET(kernel_start, 0x214, L"%xh"); | 858 | CHECK_OFFSET(kernel_start, 0x214, L"%xh"); |
3437 | 711 | CHECK_OFFSET(initrd_start, 0x218, L"%xh"); | 859 | CHECK_OFFSET(initrd_start, 0x218, L"%xh"); |
3438 | 712 | CHECK_OFFSET(initrd_size, 0x21C, L"%xh"); | 860 | CHECK_OFFSET(initrd_size, 0x21C, L"%xh"); |
3439 | 713 | CHECK_OFFSET(bootsect_helper, 0x220, L"%xh"); | ||
3440 | 714 | CHECK_OFFSET(heap_end_ptr, 0x224, L"%xh"); | 861 | CHECK_OFFSET(heap_end_ptr, 0x224, L"%xh"); |
3441 | 715 | CHECK_OFFSET(cmdline_addr, 0x228, L"%xh"); | 862 | CHECK_OFFSET(cmdline_addr, 0x228, L"%xh"); |
3442 | 863 | CHECK_OFFSET(e820_map, 0x2D0, L"%xh"); | ||
3443 | 716 | 864 | ||
3444 | 717 | if (test) { | 865 | if (test) { |
3445 | 718 | ERR_PRT((L"Boot sector and/or setup parameter alignment error.")); | 866 | ERR_PRT((L"Boot sector and/or setup parameter alignment error.")); |
3446 | @@ -802,6 +950,31 @@ | |||
3447 | 802 | * and update the bootparam accordingly | 950 | * and update the bootparam accordingly |
3448 | 803 | */ | 951 | */ |
3449 | 804 | fill_e820map(bp, &mdesc); | 952 | fill_e820map(bp, &mdesc); |
3450 | 953 | |||
3451 | 954 | #if DEBUG_CREATE_BOOT_PARAMS | ||
3452 | 955 | if ( e820_map_overflow == 0 ) | ||
3453 | 956 | e820_map_overflow = -1; /* force second get_memmap()! */ | ||
3454 | 957 | #endif | ||
3455 | 958 | if (e820_map_overflow && !e820_map_overflow_warned) { | ||
3456 | 959 | CHAR8 *aem = (CHAR8 *)"add_efi_memmap"; | ||
3457 | 960 | e820_map_overflow_warned++; | ||
3458 | 961 | |||
3459 | 962 | #if DEBUG_CREATE_BOOT_PARAMS | ||
3460 | 963 | elilo_opt.debug=0; | ||
3461 | 964 | elilo_opt.verbose=0; | ||
3462 | 965 | #endif | ||
3463 | 966 | if (e820_map_overflow == -1 || StrStr8(cmdline, aem)) { | ||
3464 | 967 | /* Print(L"...mapping again, silently!\n"); */ | ||
3465 | 968 | goto do_memmap; | ||
3466 | 969 | } | ||
3467 | 970 | |||
3468 | 971 | Print(L"\nCAUTION: EFI memory map has %d more entr%a" | ||
3469 | 972 | " than E820 map supports.\n" | ||
3470 | 973 | "To access all memory, '%a' may be necessary.\n\n", | ||
3471 | 974 | e820_map_overflow, (e820_map_overflow==1)?"y":"ies", | ||
3472 | 975 | aem); | ||
3473 | 976 | goto do_memmap; | ||
3474 | 977 | } | ||
3475 | 805 | 978 | ||
3476 | 806 | return 0; | 979 | return 0; |
3477 | 807 | } | 980 | } |
Thanks so much! I uploaded this to trusty.