Changeset 28fcaee in mainline for boot/Makefile.grub
- Timestamp:
- 2019-08-17T12:49:43Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 643640a
- Parents:
- fd6c8b1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-28 13:28:59)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-17 12:49:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.grub
rfd6c8b1 r28fcaee 27 27 # 28 28 29 .PHONY: all build_dist clean 29 .PHONY: all 30 all: 30 31 31 include Makefile.common32 33 GRUB = grub/$(BARCH)-$(GRUB_ARCH)34 BOOT = $(DISTROOT)/boot35 BOOT_CONFIG = $(BOOT)/grub/grub.cfg36 37 ELTORITO = boot/grub/$(GRUB_ARCH).img38 IMAGE = $(DISTROOT)/$(ELTORITO)39 40 ifeq ($(GRUB_ARCH),pc)41 MULTIBOOT_CMD = multiboot42 MODULE_CMD = module43 endif44 ifeq ($(GRUB_ARCH),efi)45 MULTIBOOT_CMD = multiboot246 MODULE_CMD = module247 endif48 49 all: $(POST_OUTPUT)50 51 $(POST_OUTPUT): build_dist52 ifeq ($(GRUB_ARCH),pc)53 $(GENISOIMAGE) -J -r -input-charset utf-8 -V "HelenOS-CD" -eltorito-boot $(ELTORITO) -no-emul-boot -boot-info-table -o $@ $(DISTROOT)/54 endif55 ifeq ($(GRUB_ARCH),efi)56 $(GENISOIMAGE) -J -r -input-charset utf-8 -V "HelenOS-CD" --efi-boot $(ELTORITO) -o $@ $(DISTROOT)/57 endif58 59 build_dist: clean $(COMPONENTS)60 mkdir -p $(BOOT)61 cp -r -L $(GRUB) $(BOOT)/grub62 ifeq ($(GRUB_ARCH),efi)63 gunzip $(IMAGE)64 endif65 66 ifeq ($(GRUB_LOADER),multiboot)67 for module in $(COMPONENTS) ; do \68 cp "$$module" $(BOOT)/ ; \69 done70 endif71 ifeq ($(GRUB_LOADER),chainloader)72 cp "$(BOOT_OUTPUT)" $(BOOT)/73 endif74 75 echo "set default=0" > $(BOOT_CONFIG)76 echo "set timeout=10" >> $(BOOT_CONFIG)77 echo "" >> $(BOOT_CONFIG)78 79 ifeq ($(GRUB_ARCH),pc)80 echo "insmod vbe" >> $(BOOT_CONFIG)81 echo "insmod vga" >> $(BOOT_CONFIG)82 endif83 ifeq ($(GRUB_ARCH),efi)84 echo "insmod efi_gop" >> $(BOOT_CONFIG)85 echo "insmod efi_uga" >> $(BOOT_CONFIG)86 endif87 echo "" >> $(BOOT_CONFIG)88 89 echo "menuentry 'HelenOS $(RELEASE)' --class helenos --class os {" >> $(BOOT_CONFIG)90 ifeq ($(GRUB_LOADER),multiboot)91 for module in $(MODULES) ; do \92 echo " echo 'Loading $$module'" >> $(BOOT_CONFIG) ; \93 if [ "$$module" = "kernel.elf" ] ; then \94 echo " $(MULTIBOOT_CMD) /boot/$$module" >> $(BOOT_CONFIG) ; \95 else \96 echo " $(MODULE_CMD) /boot/$$module /boot/$$module" >> $(BOOT_CONFIG) ; \97 fi \98 done99 endif100 ifeq ($(GRUB_LOADER),chainloader)101 echo " echo 'Loading $(BOOT_OUTPUT)'" >> $(BOOT_CONFIG)102 echo " chainloader /boot/$(BOOT_OUTPUT)" >> $(BOOT_CONFIG)103 echo " boot" >> $(BOOT_CONFIG)104 endif105 echo "}" >> $(BOOT_CONFIG)106 107 clean:108 rm -fr $(DISTROOT)109 110 include Makefile.initrd
Note:
See TracChangeset
for help on using the changeset viewer.