Changeset 4872160 in mainline for boot/Makefile.grub


Ignore:
Timestamp:
2010-05-04T10:44:55Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
568db0f
Parents:
bb252ca
Message:

new boot infrastructure

  • more code and metadata unification
  • import of up-to-date implementations from the kernel
  • the boot loaders should behave more similarly on all platforms
  • support for deflate compressed (LZ77) boot components
    • this again allows feasible boot images to be created on mips32
  • IA64 is still not booting
    • the broken forked GNU EFI library has been removed, a replacement of the functionality is on its way
File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/Makefile.grub

    rbb252ca r4872160  
    11#
    2 # Copyright (c) 2005 Martin Decky
    3 # Copyright (c) 2007 Jakub Jermar
     2# Copyright (c) 2006 Martin Decky
    43# All rights reserved.
    54#
     
    2827#
    2928
     29.PHONY: all build_dist clean
     30
    3031include Makefile.common
    3132
    32 .PHONY: all clean
     33STAGE2 = grub/stage2_eltorito
     34STAGE2_IN = boot/$(STAGE2)
    3335
    34 all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
     36all: $(BOOT_OUTPUT)
     37
     38$(BOOT_OUTPUT): build_dist
     39        mkisofs -J -r -b $(STAGE2_IN) -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(DISTROOT)/
     40
     41build_dist: clean
     42        mkdir -p $(DISTROOT)/boot/grub
     43        cp $(STAGE2) $(DISTROOT)/boot/grub/
     44        for module in $(COMPONENTS) ; do \
     45                cp "$$module" $(DISTROOT)/boot/ ; \
     46        done
     47       
     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
     53        for module in $(MODULES) ; do \
     54                if [ "$$module" = "kernel.bin" ] ; then \
     55                        echo "  kernel /boot/$$module" >> $(DISTROOT)/boot/grub/menu.lst ; \
     56                else \
     57                        echo "  module /boot/$$module" >> $(DISTROOT)/boot/grub/menu.lst ; \
     58                fi \
     59        done
    3760
    3861clean:
    39         rm -f $(USPACEDIR)/dist/srv/*
    40         rm -f $(USPACEDIR)/dist/app/*
    41         rm -f $(USPACEDIR)/dist/cfg/net/*
    42 
    43         for file in $(RD_SRVS) ; do \
    44                 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \
    45         done
    46         for file in $(RD_APPS) ; do \
    47                 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \
    48         done
    49         for file in $(NET_CFG) ; do \
    50                 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \
    51         done
    52         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs
    53         find . -name '*.o' -follow -exec rm \{\} \;
    54         find . -name '*.co' -follow -exec rm \{\} \;
     62        rm -fr $(DISTROOT)
Note: See TracChangeset for help on using the changeset viewer.