2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2006-04-06 20:31:14 +02:00
|
|
|
#
|
|
|
|
# Build the iso96600 root filesystem image
|
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2006-04-06 20:31:14 +02:00
|
|
|
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
#
|
|
|
|
# We need to handle three cases:
|
|
|
|
#
|
|
|
|
# 1. The ISO9660 filesystem will really be the real root filesystem
|
|
|
|
# itself. This is when BR2_TARGET_ROOTFS_ISO9660_INITRD is
|
|
|
|
# disabled.
|
|
|
|
#
|
|
|
|
# 2. The ISO9660 filesystem will be a filesystem with just a kernel
|
|
|
|
# image, initrd and grub. This is when
|
|
|
|
# BR2_TARGET_ROOTFS_ISO9660_INITRD is enabled, but
|
|
|
|
# BR2_TARGET_ROOTFS_INITRAMFS is disabled.
|
|
|
|
#
|
|
|
|
# 3. The ISO9660 filesystem will be a filesystem with just a kernel
|
|
|
|
# image and grub. This is like (2), except that the initrd is
|
|
|
|
# built into the kernel image. This is when
|
|
|
|
# BR2_TARGET_ROOTFS_INITRAMFS is enabled (regardless of the value
|
|
|
|
# of BR2_TARGET_ROOTFS_ISO9660_INITRD).
|
|
|
|
|
2015-06-09 00:21:37 +02:00
|
|
|
ROOTFS_ISO9660_BOOT_MENU = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
|
2006-04-06 20:31:14 +02:00
|
|
|
|
2015-06-09 00:21:43 +02:00
|
|
|
ROOTFS_ISO9660_DEPENDENCIES = host-cdrkit host-fakeroot linux
|
2014-10-18 20:23:59 +02:00
|
|
|
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
|
|
|
ROOTFS_ISO9660_USE_INITRD = YES
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_INITRD),y)
|
|
|
|
ROOTFS_ISO9660_USE_INITRD = YES
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
|
|
|
|
ROOTFS_ISO9660_TARGET_DIR = $(BUILD_DIR)/rootfs-iso9660.tmp
|
|
|
|
define ROOTFS_ISO9660_CREATE_TEMPDIR
|
|
|
|
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
|
|
|
|
mkdir -p $(ROOTFS_ISO9660_TARGET_DIR)
|
2015-06-09 00:21:35 +02:00
|
|
|
endef
|
|
|
|
else
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ROOTFS_ISO9660_TARGET_DIR = $(TARGET_DIR)
|
|
|
|
endif
|
|
|
|
|
2015-06-09 00:21:43 +02:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y)
|
|
|
|
ROOTFS_ISO9660_DEPENDENCIES += grub
|
2015-06-09 00:21:42 +02:00
|
|
|
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
|
|
|
ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/stage2_eltorito
|
2015-06-09 00:21:43 +02:00
|
|
|
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(GRUB_DIR)/stage2/stage2_eltorito \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/stage2_eltorito
|
2015-06-09 00:21:43 +02:00
|
|
|
endef
|
2015-06-09 00:21:48 +02:00
|
|
|
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB2),y)
|
|
|
|
ROOTFS_ISO9660_DEPENDENCIES += grub2
|
|
|
|
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub.cfg
|
|
|
|
ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/grub-eltorito.img
|
|
|
|
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
|
|
|
|
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/grub-eltorito.img \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub-eltorito.img
|
|
|
|
endef
|
2015-06-09 00:21:45 +02:00
|
|
|
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y)
|
|
|
|
ROOTFS_ISO9660_DEPENDENCIES += syslinux
|
|
|
|
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/isolinux.cfg
|
|
|
|
ROOTFS_ISO9660_BOOT_IMAGE = isolinux/isolinux.bin
|
|
|
|
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
|
|
|
|
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/syslinux/isolinux.bin \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/isolinux.bin
|
|
|
|
$(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/syslinux/ldlinux.c32 \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/ldlinux.c32
|
|
|
|
endef
|
2015-06-09 00:21:43 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
define ROOTFS_ISO9660_PREPARATION
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_BOOT_MENU) \
|
2015-06-09 00:21:42 +02:00
|
|
|
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
$(SED) "s%__KERNEL_PATH__%/boot/$(LINUX_IMAGE_NAME)%" \
|
2015-06-09 00:21:42 +02:00
|
|
|
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
|
2015-06-09 00:21:43 +02:00
|
|
|
$(ROOTFS_ISO9660_INSTALL_BOOTLOADER)
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_PREPARATION
|
|
|
|
|
2015-06-09 00:21:43 +02:00
|
|
|
# Grub splash screen disabling
|
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y)
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ifeq ($(BR2_TARGET_GRUB_SPLASH),)
|
|
|
|
define ROOTFS_ISO9660_DISABLE_SPLASHSCREEN
|
2015-06-09 00:21:42 +02:00
|
|
|
$(SED) '/^splashimage/d' $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
|
2015-06-09 00:21:35 +02:00
|
|
|
endef
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_SPLASHSCREEN
|
2013-12-29 18:33:46 +01:00
|
|
|
endif
|
2015-06-09 00:21:43 +02:00
|
|
|
endif
|
2015-06-09 00:21:35 +02:00
|
|
|
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
define ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
|
2015-06-09 00:21:42 +02:00
|
|
|
$(SED) '/__INITRD_PATH__/d' $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
|
2015-06-09 00:21:35 +02:00
|
|
|
endef
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
|
|
|
|
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
|
|
|
|
|
2015-06-09 00:21:43 +02:00
|
|
|
# Copy Grub splashscreen to temporary filesystem
|
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y)
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
|
|
|
|
define ROOTFS_ISO9660_INSTALL_SPLASHSCREEN
|
|
|
|
$(INSTALL) -D -m 0644 $(TARGET_DIR)/boot/grub/splash.xpm.gz \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/splash.xpm.gz
|
|
|
|
endef
|
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_INSTALL_SPLASHSCREEN
|
|
|
|
endif
|
2015-06-09 00:21:43 +02:00
|
|
|
endif
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
|
|
|
|
# Copy the kernel to temporary filesystem
|
|
|
|
define ROOTFS_ISO9660_COPY_KERNEL
|
|
|
|
$(INSTALL) -D -m 0644 $(LINUX_IMAGE_PATH) \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
|
|
|
|
endef
|
|
|
|
|
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_KERNEL
|
|
|
|
|
|
|
|
# If initramfs is used, disable loading the initrd as the rootfs is
|
|
|
|
# already inside the kernel image. Otherwise, make sure a cpio is
|
|
|
|
# generated and use it as the initrd.
|
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
|
2013-12-28 15:56:37 +01:00
|
|
|
else
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ROOTFS_ISO9660_DEPENDENCIES += rootfs-cpio
|
|
|
|
define ROOTFS_ISO9660_COPY_INITRD
|
2014-11-21 17:19:08 +01:00
|
|
|
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \
|
2015-06-09 00:21:40 +02:00
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/initrd
|
|
|
|
$(SED) "s%__INITRD_PATH__%/boot/initrd%" \
|
2015-06-09 00:21:42 +02:00
|
|
|
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
|
2015-06-09 00:21:35 +02:00
|
|
|
endef
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_INITRD
|
2013-12-28 15:56:37 +01:00
|
|
|
endif
|
2006-04-06 20:31:14 +02:00
|
|
|
|
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>
2015-06-09 00:21:41 +02:00
|
|
|
else # ROOTFS_ISO9660_USE_INITRD
|
|
|
|
|
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
|
|
|
|
|
|
|
|
endif # ROOTFS_ISO9660_USE_INITRD
|
2006-04-06 20:31:14 +02:00
|
|
|
|
2014-10-18 20:23:59 +02:00
|
|
|
|
2015-06-09 00:21:35 +02:00
|
|
|
define ROOTFS_ISO9660_CMD
|
2015-06-09 00:21:42 +02:00
|
|
|
$(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
|
2015-06-09 00:21:35 +02:00
|
|
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
2015-06-09 00:21:37 +02:00
|
|
|
-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
|
2015-06-09 00:21:35 +02:00
|
|
|
endef
|
2015-04-12 18:37:46 +02:00
|
|
|
|
2015-06-09 00:21:46 +02:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y)
|
|
|
|
define ROOTFS_ISO9660_GEN_HYBRID
|
|
|
|
$(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
|
|
|
|
endif
|
|
|
|
|
2015-06-09 00:21:35 +02:00
|
|
|
$(eval $(call ROOTFS_TARGET,iso9660))
|