2006-04-06 20:31:14 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# mkisofs to build to target iso9660 filesystems
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
MKISOFS_SOURCE:=cdrtools-2.01.tar.bz2
|
|
|
|
MKISOFS_SITE:=ftp://ftp.berlios.de/pub/cdrecord/
|
|
|
|
MKISOFS_DIR:=$(BUILD_DIR)/cdrtools-2.01
|
|
|
|
MKISOFS_TARGET:=$(MKISOFS_DIR)/mkisofs/OBJ/i686-linux-cc/mkisofs
|
|
|
|
|
|
|
|
$(DL_DIR)/$(MKISOFS_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(MKISOFS_SITE)/$(MKISOFS_SOURCE)
|
|
|
|
|
|
|
|
mkisofs-source: $(DL_DIR)/$(MKISOFS_SOURCE)
|
|
|
|
|
|
|
|
$(MKISOFS_DIR)/.unpacked: $(DL_DIR)/$(MKISOFS_SOURCE)
|
|
|
|
bzcat $(DL_DIR)/$(MKISOFS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(MKISOFS_DIR) target/iso9660/ \*.patch
|
|
|
|
touch $(MKISOFS_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(MKISOFS_DIR)/.configured: $(MKISOFS_DIR)/.unpacked
|
|
|
|
(cd $(MKISOFS_DIR); rm -rf config.cache; \
|
|
|
|
);
|
|
|
|
touch $(MKISOFS_DIR)/.configured
|
|
|
|
|
|
|
|
$(MKISOFS_TARGET): $(MKISOFS_DIR)/.configured
|
|
|
|
$(MAKE) -C $(MKISOFS_DIR)
|
|
|
|
touch -c $(MKISOFS_DIR)/mkisofs
|
|
|
|
|
|
|
|
mkisofs: $(MKISOFS_TARGET)
|
|
|
|
|
|
|
|
mkisofs-clean:
|
|
|
|
-$(MAKE) -C $(MKISOFS_DIR) clean
|
|
|
|
|
|
|
|
mkisofs-dirclean:
|
|
|
|
rm -rf $(MKISOFS_DIR)
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Build the iso96600 root filesystem image
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
ISO9660_TARGET_DIR=$(BUILD_DIR)/iso9660
|
|
|
|
ISO9660_TARGET:=$(subst ",,$(BR2_TARGET_ROOTFS_ISO9660_OUTPUT))
|
|
|
|
ISO9660_BOOT_MENU:=$(subst ",,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
|
|
|
|
|
|
|
|
ISO9660_OPTS:=
|
|
|
|
|
|
|
|
ifeq ($(strip $(BR2_TARGET_ROOTFS_ISO9660_SQUASH)),y)
|
|
|
|
ISO9660_OPTS+=-U
|
|
|
|
endif
|
|
|
|
|
2006-04-07 22:30:43 +02:00
|
|
|
$(ISO9660_TARGET): host-fakeroot $(EXT2_TARGET) grub mkisofs
|
2006-04-06 20:31:14 +02:00
|
|
|
mkdir -p $(ISO9660_TARGET_DIR)
|
|
|
|
mkdir -p $(ISO9660_TARGET_DIR)/boot/grub
|
|
|
|
cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/
|
|
|
|
cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
|
|
|
|
cp $(LINUX_KERNEL) $(ISO9660_TARGET_DIR)/kernel
|
|
|
|
cp $(EXT2_TARGET) $(ISO9660_TARGET_DIR)/initrd
|
2006-04-07 22:30:43 +02:00
|
|
|
# Use fakeroot to pretend all target binaries are owned by root
|
2006-04-10 19:48:53 +02:00
|
|
|
rm -f $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET)
|
2006-04-08 00:42:15 +02:00
|
|
|
touch $(STAGING_DIR)/.fakeroot.00000
|
2006-04-10 19:48:53 +02:00
|
|
|
cat $(STAGING_DIR)/.fakeroot* > $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET)
|
2006-04-06 20:31:14 +02:00
|
|
|
-$(STAGING_DIR)/usr/bin/fakeroot \
|
2006-04-10 19:48:53 +02:00
|
|
|
-i $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET) \
|
|
|
|
-s $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET) -- \
|
2006-04-06 20:31:14 +02:00
|
|
|
chown -R root:root $(ISO9660_TARGET_DIR)
|
2006-04-07 22:30:43 +02:00
|
|
|
# Use fakeroot so mkisofs believes the previous fakery
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
2006-04-10 19:48:53 +02:00
|
|
|
-i $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET) \
|
|
|
|
-s $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET) -- \
|
2006-04-07 22:30:43 +02:00
|
|
|
$(MKISOFS_TARGET) \
|
|
|
|
-R -b boot/grub/stage2_eltorito -no-emul-boot \
|
|
|
|
-boot-load-size 4 -boot-info-table \
|
2006-04-06 20:31:14 +02:00
|
|
|
-o $(ISO9660_TARGET) \
|
|
|
|
$(ISO9660_TARGET_DIR)
|
2006-04-10 19:48:53 +02:00
|
|
|
-@rm -f $(STAGING_DIR)/_fakeroot.$(notdir $ISO9660_TARGET)
|
2006-04-06 20:31:14 +02:00
|
|
|
|
|
|
|
iso9660root: $(ISO9660_TARGET)
|
|
|
|
echo $(ISO9660_TARGET)
|
|
|
|
@ls -l $(ISO9660_TARGET)
|
|
|
|
|
|
|
|
iso9660root-source: mkisofs-source
|
|
|
|
|
|
|
|
iso9660root-clean: mkisofs-clean
|
|
|
|
|
|
|
|
iso9660root-dirclean: mkisofs-dirclean
|
|
|
|
rm -rf $(ISO9660_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_TARGET_ROOTFS_ISO9660)),y)
|
|
|
|
TARGETS+=iso9660root
|
|
|
|
endif
|