]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
fs/iso9660: support building a real iso9660 filesystem
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 8 Jun 2015 22:21:41 +0000 (00:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 14 Jun 2015 21:21:10 +0000 (23:21 +0200)
commit7080eef9b878069c5eb8c52ee520e98b92120d15
treef1fb84923038eebed5e9622e3fd83db1f855f5eb
parent168cce04969029f0b7365691b4a5ca91c7f5af53
fs/iso9660: support building a real iso9660 filesystem

Until now, the iso9660 filesystem handling only supported using an
initrd/initramfs to store the root filesystem, which is very different
from what we do with the other filesystems.

This commit changes the iso9660 logic to also allow using directly an
iso9660 filesystem to store the root filesystem. A new option,
BR2_TARGET_ROOTFS_ISO9660_INITRD, is created to tell the iso9660 that
we want to use an initrd and not directly the root filesystem in
iso9660 format. This option defaults to 'y' to preserve the existing
behavior.

After this commit, we therefore have three possibilities:

 * BR2_TARGET_ROOTFS_ISO9660=y, with BR2_TARGET_ROOTFS_INITRAMFS and
   BR2_TARGET_ROOTFS_ISO9660_INITRD disabled. In this case, the
   iso9660 filesystem is directly the contents of the root filesystem
   (since is possible thanks to the Rockridge extensions that were
   already enabled using the -R option of genisoimage). Obviously, it
   means that the root filesystem is read-only.

 * BR2_TARGET_ROOTFS_ISO9660=y and BR2_TARGET_ROOTFS_INITRAMFS=y (the
   value of BR2_TARGET_ROOTFS_ISO9660_INITRD doesn't matter). In this
   case, the root filesystem is already linked into the kernel image
   itself, as an initramfs. So the iso9660 filesystem doesn't contain
   the root filesystem as is, but just the bootloader and the kernel
   image.

 * BR2_TARGET_ROOTFS_ISO9660=y, BR2_TARGET_ROOTFS_ISO9660_INITRD=y and
   BR2_TARGET_ROOTFS_INITRAMFS disabled. In this case, a separate
   initrd is used. The iso9660 filesystem only contains the
   bootloader, the kernel and the initrd.

In order to support the first case out of the box, root=/dev/sr0 is
added on the kernel command line in the example Grub configuration
file, so that the kernel knows where the root filesystem is
located. This argument is ignored when initrd/initramfs are used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
fs/iso9660/Config.in
fs/iso9660/iso9660.mk
fs/iso9660/menu.lst