Changeset 765678f in mainline for boot/Makefile.grub


Ignore:
Timestamp:
2011-11-25T13:12:40Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
14e9272, f4e508f
Parents:
0c0f823b
Message:

switch from GRUB Legacy to GRUB 2 (release 1.99)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.grub

    r0c0f823b r765678f  
    3131include Makefile.common
    3232
    33 STAGE2 = grub/stage2_eltorito
     33GRUB2 = grub
     34STAGE2 = $(GRUB2)/i386-pc/eltorito.img
    3435STAGE2_IN = boot/$(STAGE2)
    3536
     
    3738
    3839$(BOOT_OUTPUT): build_dist
    39         mkisofs -J -r -b $(STAGE2_IN) -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(DISTROOT)/
     40        mkisofs -J -r -input-charset utf-8 -b $(STAGE2_IN) -no-emul-boot -boot-load-size 64 -boot-info-table -o $@ $(DISTROOT)/
    4041
    4142build_dist: clean
    42         mkdir -p $(DISTROOT)/boot/grub
    43         cp $(STAGE2) $(DISTROOT)/boot/grub/
     43        mkdir -p $(DISTROOT)/boot
     44        cp -r $(GRUB2) $(DISTROOT)/boot
    4445        for module in $(COMPONENTS) ; do \
    4546                cp "$$module" $(DISTROOT)/boot/ ; \
    4647        done
    4748       
    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
     49        echo "set default=0" > $(DISTROOT)/boot/grub/i386-pc/grub.cfg
     50        echo "set timeout=10" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg
     51        echo "" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg
     52       
     53        echo "menuentry 'HelenOS $(RELEASE)' --class helenos --class os {" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg
     54        echo "  set root='(cd)'" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg
     55       
    5356        for module in $(MODULES) ; do \
     57                echo "" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg ; \
     58                echo "  echo 'Loading $$module'" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg ; \
    5459                if [ "$$module" = "kernel.bin" ] ; then \
    55                         echo "  kernel /boot/$$module" >> $(DISTROOT)/boot/grub/menu.lst ; \
     60                        echo "  multiboot /boot/$$module" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg ; \
    5661                else \
    57                         echo "  module /boot/$$module" >> $(DISTROOT)/boot/grub/menu.lst ; \
     62                        echo "  module /boot/$$module" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg ; \
    5863                fi \
    5964        done
     65       
     66        echo "}" >> $(DISTROOT)/boot/grub/i386-pc/grub.cfg
    6067
    6168clean:
Note: See TracChangeset for help on using the changeset viewer.