Rob Landley 675d992b40 Move the modules archive under docs.
If you build kernel modules, it archives them up separately and then appends
them to the initramfs.cpio.gz so you don't have to rebuild the kernel
to rebuild the filesystem. But this leaves a file lying around at the top
level which is not used to launch qemu, and those go in "docs".
2023-12-16 05:52:58 -06:00
..
2023-12-16 05:52:58 -06:00
2023-09-01 15:20:36 -05:00
2023-07-30 04:25:10 -05:00

Use ./run-qemu.sh to boot system image to a shell prompt, "exit" when done.

Additional arguments to run-qemu.sh are QEMU arguments,
$KARGS contains additional linux kernel arguments. For example:

  KARGS=quiet ./run-qemu.sh -hda docs/linux-fullconfig
  # cat /dev/?da
  # exit

To extract the root filesystem from cpio.gz and chroot into it

  ( mkdir fs && cd fs && zcat ../initramfs.cpio.gz | cpio -i -d -H newc )
  chroot fs /init

To recreate the initramfs.cpio.gz from fs directory

  ( cd fs && find . -printf '%P\n' | cpio -o -H newc -R +0:+0 | gzip ) \
    > initramfs.cpio.gz