X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=lfs%2Fcdrom;h=56d1fa8fe1f55601ec9600f4caba862543db7c7c;hp=b00e4a54e0799a07a668eb1e77962e22e079ed85;hb=d618d67e010e94e1ef26f2570abe9d6748e90416;hpb=0ce1e4906e0f9db3c5ef4c1e9dd53449cc1d63d9 diff --git a/lfs/cdrom b/lfs/cdrom index b00e4a54e0..56d1fa8fe1 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2013 IPFire Team # +# Copyright (C) 2007-2018 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -35,37 +35,96 @@ else TAR_OPTIONS = --lzma endif -ISO_ARGS = -J -r -v \ - -A "$(NAME) $(VERSION) $(BUILD_ARCH)" \ - -V "$(NAME) $(VERSION) $(BUILD_ARCH)" \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - -b boot/isolinux/isolinux.bin \ - -c boot/isolinux/boot.catalog - -# Only build a stub ISO for ARM +HAS_MEMTEST = 0 +HAS_IPXE = 0 +HAS_ISOLINUX = 0 +HAS_KERNEL = 1 + +ifeq "$(BUILD_PLATFORM)" "x86" + HAS_MEMTEST = 1 + HAS_IPXE = 1 + HAS_ISOLINUX = 1 +endif + ifeq "$(BUILD_ARCH)" "armv5tel" - ISO_ARGS = -J -r -V "$(NAME) $(VERSION) $(BUILD_ARCH)" + HAS_KERNEL = 0 endif +ISO_ARGS = -J -r -v \ + -A "$(NAME) $(VERSION) $(BUILD_ARCH)" \ + -V "$(NAME) $(VERSION) $(BUILD_ARCH)" + ISOHYBRID_ARGS = +ifeq "$(HAS_ISOLINUX)" "1" + ISO_ARGS += \ + -no-emul-boot \ + -boot-load-size 4 \ + -boot-info-table \ + -b boot/isolinux/isolinux.bin \ + -c boot/isolinux/boot.catalog +endif + ifeq "$(EFI)" "1" ISO_ARGS += \ -eltorito-alt-boot \ - -e boot/isolinux/efiboot.img + -e boot/isolinux/efiboot.img \ + -no-emul-boot ISOHYBRID_ARGS += --uefi endif -HAS_MEMTEST = 0 -HAS_IPXE = 0 - -ifeq "$(BUILD_PLATFORM)" "x86" - HAS_MEMTEST = 1 - HAS_IPXE = 1 -endif +GRUB_EFI_MODULES = \ + all_video \ + at_keyboard \ + boot \ + bitmap_scale \ + cat \ + chain \ + configfile \ + disk \ + echo \ + efi_gop \ + efi_uga \ + ext2 \ + extcmd \ + fat \ + file \ + font \ + fxterm_menu \ + gfxterm \ + gfxmenu \ + gfxterm_background \ + gzio \ + halt \ + help \ + iso9660 \ + jpeg \ + loadbios \ + loadenv \ + loopback \ + linux \ + ls \ + memdisk \ + minicmd \ + nativedisk \ + normal \ + ntfs \ + part_gpt \ + part_msdos \ + png \ + probe \ + reboot \ + regexp \ + search \ + search_fs_file \ + search_fs_uuid \ + search_label \ + tar \ + test \ + tga \ + true \ + usb_keyboard ############################################################################### # Top-level Rules @@ -117,14 +176,23 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cp $(DIR_SRC)/doc/COPYING /install/cdrom/ cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc - # Make the ISO mkdir -p /install/cdrom/boot/isolinux - dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog -ifneq "$(BUILD_ARCH)" "armv5tel" + +ifeq "$(HAS_KERNEL)" "1" cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz - dracut --force -a "installer" --strip --xz /install/cdrom/boot/isolinux/instroot $(KVER)-ipfire + dracut --force --early-microcode -a "installer" --strip --xz /install/cdrom/boot/isolinux/instroot $(KVER)-ipfire +endif + +ifeq "$(HAS_ISOLINUX)" "1" + dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog cp $(DIR_SRC)/config/syslinux/boot.png /install/cdrom/boot/isolinux/boot.png cp /usr/share/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin + cp /usr/share/hwdata/pci.ids /install/cdrom/boot/isolinux/pci.ids + cp -vf /usr/share/syslinux/*.c32 /install/cdrom/boot/isolinux/ + sed -e "s/VERSION/$(VERSION) - Core $(CORE)/g" \ + $(DIR_SRC)/config/syslinux/syslinux.cfg \ + > /install/cdrom/boot/isolinux/isolinux.cfg +endif ifeq "$(HAS_MEMTEST)" "1" # Install memtest @@ -143,12 +211,12 @@ ifeq "$(EFI)" "1" # Build a GRUB EFI image mkdir -pv /install/cdrom/EFI/BOOT grub-mkimage \ - --format=$(BUILD_ARCH)-efi \ + --format=$(GRUB_ARCH)-efi \ --output=/install/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi \ --config=/tmp/grub-efi.cfg \ --compression=xz \ --prefix=/EFI/BOOT \ - $(GRUB_EFI_MODULES) + $$(for mod in $(GRUB_EFI_MODULES); do [ -f "/usr/lib/grub/$(GRUB_ARCH)-efi/$${mod}.mod" ] && echo "$${mod}"; done) # Install GRUB configuration mkdir -pv /install/cdrom/EFI/BOOT @@ -173,12 +241,6 @@ ifeq "$(EFI)" "1" rm -rf /install/efiboot.img /tmp/grub-efi.cfg endif - cp /usr/share/hwdata/pci.ids /install/cdrom/boot/isolinux/pci.ids - cp -vf /usr/share/syslinux/*.c32 /install/cdrom/boot/isolinux/ - sed -e "s/VERSION/$(VERSION) - Core $(CORE)/g" \ - $(DIR_SRC)/config/syslinux/syslinux.cfg \ - > /install/cdrom/boot/isolinux/isolinux.cfg -endif cd /install/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \ xargs md5sum > md5sum.txt @@ -186,4 +248,6 @@ endif cd /install/cdrom && mkisofs $(ISO_ARGS) \ -o /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso . +ifeq "$(HAS_ISOLINUX)" "1" isohybrid $(ISOHYBRID_ARGS) /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso +endif