Some versions of Linux apparently complain if initrds are not aligned to a page boundary. Fix by changing INITRD_ALIGN from 4 bytes to 4096 bytes. The amount of padding at the end of each initrd will now often be sufficient to allow the cpio header to be prepended without crossing an alignment boundary. The final location of the initrd may therefore end up being slightly higher than the post-shuffle location. bzimage_load_initrd() must therefore now copy the initrd body prior to copying the cpio header, otherwise the start of the initrd body may be overwritten by the cpio header. (Note that the guarantee that an initrd will never need to overwrite an initrd at a higher location still holds, since the overall length of each initrd cannot decrease as a result of adding a cpio header.) Reported-by: Dave Hansen <dave@sr71.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
360 |
|
360 |
|
361 |
|
361 |
|
362 |
|
362 |
|
363 |
|
|
|
|
363 |
|
|
364 |
|
364 |
|
365 |
|
365 |
|
366 |
|
366 |
|
|
|
||
368 |
|
368 |
|
369 |
|
369 |
|
370 |
|
370 |
|
371 |
|
|
|
|
371 |
|
|
372 |
|
372 |
|
373 |
|
373 |
|
374 |
|
374 |
|
|
|
||
383 |
|
383 |
|
384 |
|
384 |
|
385 |
|
385 |
|
386 |
|
|
|
387 |
|
|
|
388 |
|
|
|
389 |
|
|
|
390 |
|
|
|
391 |
|
|
|
392 |
|
|
|
393 |
|
|
|
394 |
|
|
|
395 |
|
|
|
396 |
|
|
|
397 |
|
|
|
|
386 |
|
|
|
387 |
|
|
|
388 |
|
|
398 |
|
389 |
|
399 |
|
390 |
|
400 |
|
|
|
401 |
|
|
|
402 |
|
|
|
|
391 |
|
|
403 |
|
392 |
|
|
393 |
|
|
|
394 |
|
|
|
395 |
|
|
|
396 |
|
|
|
397 |
|
|
|
398 |
|
|
|
399 |
|
|
404 |
|
400 |
|
405 |
|
401 |
|
406 |
|
402 |
|
|
|
||
13 |
|
13 |
|
14 |
|
14 |
|
15 |
|
15 |
|
16 |
|
|
|
|
16 |
|
|
|
17 |
|
|
17 |
|
18 |
|
18 |
|
|
|
|
19 |
|
|
19 |
|
20 |
|
20 |
|
21 |
|
21 |
|
22 |
|