Changeset 28fcaee in mainline for boot/Makefile.grub


Ignore:
Timestamp:
2019-08-17T12:49:43Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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)
Message:

amd64 boot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.grub

    rfd6c8b1 r28fcaee  
    2727#
    2828
    29 .PHONY: all build_dist clean
     29.PHONY: all
     30all:
    3031
    31 include Makefile.common
    32 
    33 GRUB = grub/$(BARCH)-$(GRUB_ARCH)
    34 BOOT = $(DISTROOT)/boot
    35 BOOT_CONFIG = $(BOOT)/grub/grub.cfg
    36 
    37 ELTORITO = boot/grub/$(GRUB_ARCH).img
    38 IMAGE = $(DISTROOT)/$(ELTORITO)
    39 
    40 ifeq ($(GRUB_ARCH),pc)
    41         MULTIBOOT_CMD = multiboot
    42         MODULE_CMD = module
    43 endif
    44 ifeq ($(GRUB_ARCH),efi)
    45         MULTIBOOT_CMD = multiboot2
    46         MODULE_CMD = module2
    47 endif
    48 
    49 all: $(POST_OUTPUT)
    50 
    51 $(POST_OUTPUT): build_dist
    52 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 endif
    55 ifeq ($(GRUB_ARCH),efi)
    56         $(GENISOIMAGE) -J -r -input-charset utf-8 -V "HelenOS-CD" --efi-boot $(ELTORITO) -o $@ $(DISTROOT)/
    57 endif
    58 
    59 build_dist: clean $(COMPONENTS)
    60         mkdir -p $(BOOT)
    61         cp -r -L $(GRUB) $(BOOT)/grub
    62 ifeq ($(GRUB_ARCH),efi)
    63         gunzip $(IMAGE)
    64 endif
    65 
    66 ifeq ($(GRUB_LOADER),multiboot)
    67         for module in $(COMPONENTS) ; do \
    68                 cp "$$module" $(BOOT)/ ; \
    69         done
    70 endif
    71 ifeq ($(GRUB_LOADER),chainloader)
    72         cp "$(BOOT_OUTPUT)" $(BOOT)/
    73 endif
    74 
    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 endif
    83 ifeq ($(GRUB_ARCH),efi)
    84         echo "insmod efi_gop" >> $(BOOT_CONFIG)
    85         echo "insmod efi_uga" >> $(BOOT_CONFIG)
    86 endif
    87         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         done
    99 endif
    100 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 endif
    105         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.