Changeset 4872160 in mainline for boot/arch/amd64/Makefile.inc


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 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/amd64/Makefile.inc

    rbb252ca r4872160  
    2727#
    2828
    29 include Makefile.common
     29PAGE_SIZE = 4096
    3030
    3131RD_SRVS += \
    32         $(USPACEDIR)/srv/bd/ata_bd/ata_bd \
    33         $(USPACEDIR)/srv/hw/char/i8042/i8042 \
    34         $(USPACEDIR)/srv/hw/bus/pci/pci \
    35         $(USPACEDIR)/srv/hid/char_mouse/char_ms
     32        $(USPACE_PATH)/srv/bd/ata_bd/ata_bd \
     33        $(USPACE_PATH)/srv/hw/char/i8042/i8042 \
     34        $(USPACE_PATH)/srv/hw/bus/pci/pci \
     35        $(USPACE_PATH)/srv/hid/char_mouse/char_ms
    3636
    37 MODULES := $(notdir $(COMPONENTS))
    38 
    39 build: $(BASE)/image.iso
    40 
    41 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito $(COMPONENTS) $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) $(CFG)
    42         mkdir -p $(TMP)/boot/grub
    43         cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/
    44        
    45         echo "default 0" > $(TMP)/boot/grub/menu.lst
    46         echo "timeout 10" >> $(TMP)/boot/grub/menu.lst
    47         echo "" >> $(TMP)/boot/grub/menu.lst
    48         echo "title=HelenOS" >> $(TMP)/boot/grub/menu.lst
    49         echo "  root (cd)" >> $(TMP)/boot/grub/menu.lst
    50         for module in $(MODULES) $(INITRD).img ; do \
    51                 if [ $$module = kernel.bin ] ; then \
    52                         echo "  kernel /boot/$$module" >> $(TMP)/boot/grub/menu.lst ; \
    53                 else \
    54                         echo "  module /boot/$$module" >> $(TMP)/boot/grub/menu.lst ; \
    55                 fi \
    56         done
    57        
    58         rm -f $(USPACEDIR)/dist/srv/*
    59         rm -f $(USPACEDIR)/dist/app/*
    60         rm -f $(USPACEDIR)/dist/cfg/net/*
    61        
    62         cp $(KERNELDIR)/kernel.bin $(TMP)/boot/
    63         for task in $(INIT_TASKS) ; do \
    64                 cp $$task $(TMP)/boot/ ; \
    65         done
    66         for file in $(RD_SRVS) ; do \
    67                 cp $$file $(USPACEDIR)/dist/srv/ ; \
    68         done
    69         for file in $(RD_APPS) ; do \
    70                 cp $$file $(USPACEDIR)/dist/app/ ; \
    71         done
    72         for file in $(NET_CFG) ; do \
    73                 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \
    74         done
    75        
    76 ifeq ($(RDFMT),tmpfs)
    77         $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/$(INITRD).fs
    78 endif
    79 ifeq ($(RDFMT),fat)
    80         $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/$(INITRD).fs
    81 endif
    82         $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/$(INITRD).fs $(TMP)/boot/$(INITRD).img
    83         rm $(TMP)/boot/$(INITRD).fs
    84         mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/
    85 
    86 clean:
    87         rm -f $(USPACEDIR)/dist/srv/*
    88         rm -f $(USPACEDIR)/dist/app/*
    89         rm -f $(USPACEDIR)/dist/cfg/net/*
    90 
    91         for file in $(RD_SRVS) ; do \
    92                 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \
    93         done
    94         for file in $(RD_APPS) ; do \
    95                 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \
    96         done
    97         for file in $(NET_CFG) ; do \
    98                 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \
    99         done
    100         rm -fr $(TMP)
    101         rm -f $(BASE)/image.iso
     37BOOT_OUTPUT = $(ROOT_PATH)/image.iso
     38PREBUILD = $(INITRD).img
     39BUILD = Makefile.grub
Note: See TracChangeset for help on using the changeset viewer.