All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] x86 disk image and modules initramfs generation
@ 2021-04-19 23:02 H. Peter Anvin
  2021-04-19 23:02 ` [PATCH v2 1/3] x86/boot: Modernize genimage script; hdimage support; remove bzlilo H. Peter Anvin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: H. Peter Anvin @ 2021-04-19 23:02 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Andy Lutomirski,
	Alexander Viro, Masahiro Yamada, Michal Marek
  Cc: Linux Kernel Mailing List, Kbuild Mailing List, H. Peter Anvin

From: "H. Peter Anvin" (Intel) <hpa@zytor.com>

When compiling on a different machine than the runtime target,
including but not limited to simulators, it is rather handy to be able
to produce a bootable image. The scripts for that in x86 are
relatively old, and assume a BIOS system.

This adds a build target to generate a hdimage which can be booted
either from BIOS or EFI, and modernizes the genimage.sh script
including adding the ability to add an arbitrary number of initramfs
files (limited only by the length of the command line.)

Possibly more controversial, at least from a Kbuild design perspective
(as usual I'm the guy who wants to do something with Kbuild which it
seems it was never really designed to do), is add the ability to
create an initramfs image which includes all the built modules. Some
distributions cannot be easily booted without modules in initramfs,
and this creates an image which can be added to initramfs to provide
the kernel modules, as finalized by "make modules_install".

The final patch put these two together, and allows the modules
initramfs to be included in the x86 boot image.

---

Fixes in v2:

1/3: correct command line generation for multiple initrds
2/3: no change
3/3: append, don't overwrite FDINITRD when adding modules.img

 Makefile                     |  17 ++-
 arch/x86/Makefile            |   8 +-
 arch/x86/boot/.gitignore     |   1 +
 arch/x86/boot/Makefile       |  62 +++++----
 arch/x86/boot/genimage.sh    | 294 +++++++++++++++++++++++++++++++------------
 arch/x86/boot/mtools.conf.in |   3 +
 usr/.gitignore               |   3 +
 usr/Kconfig                  |  31 ++---
 usr/Makefile                 |  39 +++++-
 9 files changed, 331 insertions(+), 127 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-22 18:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 23:02 [PATCH 0/3] x86 disk image and modules initramfs generation H. Peter Anvin
2021-04-19 23:02 ` [PATCH v2 1/3] x86/boot: Modernize genimage script; hdimage support; remove bzlilo H. Peter Anvin
2021-04-19 23:02 ` [PATCH v2 2/3] usr, modules: Add build target for creating a modules initramfs image H. Peter Anvin
2021-04-22 18:55   ` Masahiro Yamada
2021-04-19 23:02 ` [PATCH v2 3/3] x86/boot: Add option to add modules.img to {fd,hd,iso}image H. Peter Anvin
2021-04-20  8:30 ` [PATCH 0/3] x86 disk image and modules initramfs generation David Laight
2021-04-20  8:39   ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.