2013-06-07 05:54:13 +08:00
|
|
|
################################################################################
|
2006-04-07 02:31:14 +08:00
|
|
|
#
|
|
|
|
# Build the iso96600 root filesystem image
|
|
|
|
#
|
2013-06-07 05:54:13 +08:00
|
|
|
################################################################################
|
2006-04-07 02:31:14 +08:00
|
|
|
|
2015-06-09 06:21:37 +08:00
|
|
|
ROOTFS_ISO9660_TARGET_DIR = $(BUILD_DIR)/rootfs-iso9660.tmp
|
|
|
|
ROOTFS_ISO9660_BOOT_MENU = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
|
2006-04-07 02:31:14 +08:00
|
|
|
|
2014-10-19 02:23:59 +08:00
|
|
|
ROOTFS_ISO9660_DEPENDENCIES = grub host-cdrkit host-fakeroot linux rootfs-cpio
|
|
|
|
|
2015-06-09 06:21:35 +08:00
|
|
|
ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
|
|
|
|
define ROOTFS_ISO9660_SPLASHSCREEN
|
2015-06-09 06:21:39 +08:00
|
|
|
$(INSTALL) -D -m 0644 $(TARGET_DIR)/boot/grub/splash.xpm.gz \
|
2015-06-09 06:21:38 +08:00
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/splash.xpm.gz
|
2015-06-09 06:21:35 +08:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define ROOTFS_ISO9660_SPLASHSCREEN
|
2015-06-09 06:21:37 +08:00
|
|
|
$(SED) '/^splashimage/d' $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
2015-06-09 06:21:35 +08:00
|
|
|
endef
|
2013-12-30 01:33:46 +08:00
|
|
|
endif
|
2015-06-09 06:21:35 +08:00
|
|
|
|
2013-12-28 22:56:37 +08:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
2015-06-09 06:21:35 +08:00
|
|
|
define ROOTFS_ISO9660_INITRD
|
2015-06-09 06:21:40 +08:00
|
|
|
$(SED) '/__INITRD_PATH__/d' $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
2015-06-09 06:21:35 +08:00
|
|
|
endef
|
2013-12-28 22:56:37 +08:00
|
|
|
else
|
2015-06-09 06:21:35 +08:00
|
|
|
define ROOTFS_ISO9660_INITRD
|
2014-11-22 00:19:08 +08:00
|
|
|
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \
|
2015-06-09 06:21:40 +08:00
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/initrd
|
|
|
|
$(SED) "s%__INITRD_PATH__%/boot/initrd%" \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
2015-06-09 06:21:35 +08:00
|
|
|
endef
|
2013-12-28 22:56:37 +08:00
|
|
|
endif
|
2006-04-07 02:31:14 +08:00
|
|
|
|
2015-06-09 06:21:35 +08:00
|
|
|
define ROOTFS_ISO9660_PREPARATION
|
2015-06-09 06:21:37 +08:00
|
|
|
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
|
|
|
|
mkdir -p $(ROOTFS_ISO9660_TARGET_DIR)
|
2015-06-09 06:21:35 +08:00
|
|
|
$(INSTALL) -D -m 0644 $(GRUB_DIR)/stage2/stage2_eltorito \
|
2015-06-09 06:21:37 +08:00
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/stage2_eltorito
|
|
|
|
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_BOOT_MENU) \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
2015-06-09 06:21:40 +08:00
|
|
|
$(INSTALL) -D -m 0644 $(LINUX_IMAGE_PATH) \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
|
|
|
|
$(SED) "s%__KERNEL_PATH__%/boot/$(LINUX_IMAGE_NAME)%" \
|
|
|
|
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
2015-06-09 06:21:35 +08:00
|
|
|
$(ROOTFS_ISO9660_SPLASHSCREEN)
|
|
|
|
$(ROOTFS_ISO9660_INITRD)
|
|
|
|
endef
|
2006-04-07 02:31:14 +08:00
|
|
|
|
2015-06-09 06:21:35 +08:00
|
|
|
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_PREPARATION
|
2014-10-19 02:23:59 +08:00
|
|
|
|
2015-06-09 06:21:35 +08:00
|
|
|
define ROOTFS_ISO9660_CMD
|
2015-06-09 06:21:36 +08:00
|
|
|
$(HOST_DIR)/usr/bin/genisoimage -J -R -b boot/grub/stage2_eltorito \
|
2015-06-09 06:21:35 +08:00
|
|
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
2015-06-09 06:21:37 +08:00
|
|
|
-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
|
2015-06-09 06:21:35 +08:00
|
|
|
endef
|
2015-04-13 00:37:46 +08:00
|
|
|
|
2015-06-09 06:21:35 +08:00
|
|
|
$(eval $(call ROOTFS_TARGET,iso9660))
|