Changes in boot/Makefile.grub [4872160:7174403] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.grub
r4872160 r7174403 31 31 include Makefile.common 32 32 33 STAGE2 = grub/stage2_eltorito 34 STAGE2_IN = boot/$(STAGE2) 33 GRUB = grub.$(GRUB_ARCH) 34 BOOT = $(DISTROOT)/boot 35 36 ELTORITO = boot/grub/$(GRUB_ARCH).img 37 IMAGE = $(DISTROOT)/$(ELTORITO) 38 39 ifeq ($(GRUB_ARCH),pc) 40 BOOT_CONFIG = $(BOOT)/grub/i386-pc/grub.cfg 41 MULTIBOOT_CMD = multiboot 42 MODULE_CMD = module 43 endif 44 ifeq ($(GRUB_ARCH),efi) 45 BOOT_CONFIG = $(BOOT)/grub/grub.cfg 46 MULTIBOOT_CMD = multiboot2 47 MODULE_CMD = module2 48 endif 35 49 36 50 all: $(BOOT_OUTPUT) 37 51 38 52 $(BOOT_OUTPUT): build_dist 39 mkisofs -J -r -b $(STAGE2_IN) -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(DISTROOT)/ 53 ifeq ($(GRUB_ARCH),pc) 54 $(GENISOIMAGE) -J -r -input-charset utf-8 -V "HelenOS boot ISO" -eltorito-boot $(ELTORITO) -no-emul-boot -boot-load-size 64 -boot-info-table -o $@ $(DISTROOT)/ 55 endif 56 ifeq ($(GRUB_ARCH),efi) 57 $(GENISOIMAGE) -J -r -input-charset utf-8 -V "HelenOS boot ISO" -efi-boot $(ELTORITO) -o $@ $(DISTROOT)/ 58 endif 40 59 41 60 build_dist: clean 42 mkdir -p $(DISTROOT)/boot/grub 43 cp $(STAGE2) $(DISTROOT)/boot/grub/ 61 mkdir -p $(BOOT) 62 cp -r $(GRUB) $(BOOT)/grub 63 ifeq ($(GRUB_ARCH),efi) 64 gunzip $(IMAGE) 65 endif 66 44 67 for module in $(COMPONENTS) ; do \ 45 cp "$$module" $( DISTROOT)/boot/ ; \68 cp "$$module" $(BOOT)/ ; \ 46 69 done 47 70 48 echo "default 0" > $(DISTROOT)/boot/grub/menu.lst 49 echo "timeout 10" >> $(DISTROOT)/boot/grub/menu.lst 50 echo "" >> $(DISTROOT)/boot/grub/menu.lst 51 echo "title=HelenOS" >> $(DISTROOT)/boot/grub/menu.lst 52 echo " root (cd)" >> $(DISTROOT)/boot/grub/menu.lst 71 echo "set default=0" > $(BOOT_CONFIG) 72 echo "set timeout=10" >> $(BOOT_CONFIG) 73 echo "" >> $(BOOT_CONFIG) 74 75 ifeq ($(GRUB_ARCH),pc) 76 echo "insmod vbe" >> $(BOOT_CONFIG) 77 echo "insmod vga" >> $(BOOT_CONFIG) 78 endif 79 ifeq ($(GRUB_ARCH),efi) 80 echo "insmod efi_gop" >> $(BOOT_CONFIG) 81 echo "insmod efi_uga" >> $(BOOT_CONFIG) 82 endif 83 echo "" >> $(BOOT_CONFIG) 84 85 echo "menuentry 'HelenOS $(RELEASE)' --class helenos --class os {" >> $(BOOT_CONFIG) 53 86 for module in $(MODULES) ; do \ 87 echo " echo 'Loading $$module'" >> $(BOOT_CONFIG) ; \ 54 88 if [ "$$module" = "kernel.bin" ] ; then \ 55 echo " kernel /boot/$$module" >> $(DISTROOT)/boot/grub/menu.lst; \89 echo " $(MULTIBOOT_CMD) /boot/$$module" >> $(BOOT_CONFIG) ; \ 56 90 else \ 57 echo " module /boot/$$module" >> $(DISTROOT)/boot/grub/menu.lst; \91 echo " $(MODULE_CMD) /boot/$$module /boot/$$module" >> $(BOOT_CONFIG) ; \ 58 92 fi \ 59 93 done 94 echo "}" >> $(BOOT_CONFIG) 60 95 61 96 clean:
Note:
See TracChangeset
for help on using the changeset viewer.