- Timestamp:
- 2010-01-10T12:16:59Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c77a64f
- Parents:
- 309ede1 (diff), 1ac3a52 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- boot
- Files:
-
- 16 added
- 1 deleted
- 15 edited
-
Makefile (modified) (1 diff)
-
Makefile.common (added)
-
arch/amd64/Makefile.inc (modified) (2 diffs)
-
arch/amd64/grub/menu.lst (deleted)
-
arch/arm32/Makefile.inc (modified) (1 diff)
-
arch/arm32/loader/Makefile (modified) (2 diffs)
-
arch/arm32/loader/Makefile.build (added)
-
arch/arm32/loader/Makefile.common (added)
-
arch/arm32/loader/Makefile.toolchain (added)
-
arch/ia32/Makefile.inc (modified) (1 diff, 1 prop)
-
arch/ia64/Makefile.inc (modified) (1 diff)
-
arch/ia64/loader/Makefile (modified) (2 diffs)
-
arch/ia64/loader/Makefile.build (added)
-
arch/ia64/loader/Makefile.common (added)
-
arch/ia64/loader/Makefile.toolchain (added)
-
arch/ia64/loader/gefi/HelenOS/Makefile (modified) (1 diff)
-
arch/mips32/Makefile.inc (modified) (1 diff)
-
arch/mips32/loader/Makefile (modified) (2 diffs)
-
arch/mips32/loader/Makefile.build (added)
-
arch/mips32/loader/Makefile.common (added)
-
arch/mips32/loader/Makefile.toolchain (added)
-
arch/ppc32/Makefile.inc (modified) (2 diffs)
-
arch/ppc32/loader/Makefile (modified) (2 diffs)
-
arch/ppc32/loader/Makefile.build (added)
-
arch/ppc32/loader/Makefile.common (added)
-
arch/ppc32/loader/Makefile.toolchain (added)
-
arch/sparc64/Makefile.inc (modified) (3 diffs)
-
arch/sparc64/loader/Makefile (modified) (2 diffs)
-
arch/sparc64/loader/Makefile.build (added)
-
arch/sparc64/loader/Makefile.common (added)
-
arch/sparc64/loader/Makefile.toolchain (added)
-
tools/pack.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r309ede1 r5f70118 47 47 48 48 generic_clean: 49 -rmgeneric/*.o genarch/*.o49 rm -f generic/*.o genarch/*.o -
boot/arch/amd64/Makefile.inc
r309ede1 r5f70118 27 27 # 28 28 29 TMP = distroot 29 include Makefile.common 30 30 31 INIT_TASKS = \ 32 $(USPACEDIR)/srv/ns/ns \ 33 $(USPACEDIR)/srv/loader/loader \ 34 $(USPACEDIR)/app/init/init \ 35 $(USPACEDIR)/srv/devmap/devmap \ 36 $(USPACEDIR)/srv/bd/rd/rd \ 37 $(USPACEDIR)/srv/vfs/vfs 38 ifeq ($(RDFMT),tmpfs) 39 INIT_TASKS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 40 endif 41 ifeq ($(RDFMT),fat) 42 INIT_TASKS += $(USPACEDIR)/srv/fs/fat/fat 43 endif 31 RD_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/c_mouse/c_mouse 44 36 45 RD_SRVS = \ 46 $(USPACEDIR)/srv/pci/pci \ 47 $(USPACEDIR)/srv/fb/fb \ 48 $(USPACEDIR)/srv/kbd/kbd \ 49 $(USPACEDIR)/srv/console/console \ 50 $(USPACEDIR)/srv/fs/devfs/devfs \ 51 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 52 $(USPACEDIR)/srv/fs/fat/fat \ 53 $(USPACEDIR)/srv/bd/ata_bd/ata_bd \ 54 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 55 $(USPACEDIR)/srv/part/mbr_part/mbr_part 56 57 RD_APPS = \ 58 $(USPACEDIR)/app/getvc/getvc \ 59 $(USPACEDIR)/app/tetris/tetris \ 60 $(USPACEDIR)/app/tester/tester \ 61 $(USPACEDIR)/app/trace/trace \ 62 $(USPACEDIR)/app/klog/klog \ 63 $(USPACEDIR)/app/bdsh/bdsh 37 MODULES := $(notdir $(COMPONENTS)) 64 38 65 39 build: $(BASE)/image.iso 66 40 67 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito arch/$(BARCH)/grub/menu.lst$(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS)41 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) 68 42 mkdir -p $(TMP)/boot/grub 69 43 cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ 70 ifneq ($(RDFMT),tmpfs) 71 cat arch/$(BARCH)/grub/menu.lst | grep -v "tmpfs" > $(TMP)/boot/grub/menu.lst 72 endif 73 ifneq ($(RDFMT),fat) 74 cat arch/$(BARCH)/grub/menu.lst | grep -v "fat" > $(TMP)/boot/grub/menu.lst 75 endif 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 76 58 cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ 77 59 for task in $(INIT_TASKS) ; do \ … … 84 66 cp $$file $(USPACEDIR)/dist/app/ ; \ 85 67 done 68 86 69 ifeq ($(RDFMT),tmpfs) 87 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/ initrd.fs70 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/$(INITRD).fs 88 71 endif 89 72 ifeq ($(RDFMT),fat) 90 $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/ initrd.fs73 $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/$(INITRD).fs 91 74 endif 92 $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/ initrd.fs $(TMP)/boot/initrd.img93 rm $(TMP)/boot/ initrd.fs75 $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/$(INITRD).fs $(TMP)/boot/$(INITRD).img 76 rm $(TMP)/boot/$(INITRD).fs 94 77 mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/ 95 78 96 79 clean: 97 -for file in $(RD_SRVS) ; do \80 for file in $(RD_SRVS) ; do \ 98 81 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 99 82 done 100 -for file in $(RD_APPS) ; do \83 for file in $(RD_APPS) ; do \ 101 84 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 102 85 done 103 -rm -fr $(TMP)104 -rm -f $(BASE)/image.iso86 rm -fr $(TMP) 87 rm -f $(BASE)/image.iso -
boot/arch/arm32/Makefile.inc
r309ede1 r5f70118 29 29 build: $(BASE)/image.boot 30 30 31 $(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot 32 cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot 33 34 depend: 35 -rm arch/$(BARCH)/loader/image.boot 36 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 33 cp arch/$(BARCH)/loader/image.boot $@ 39 34 40 35 clean: 41 make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)42 -rm -f $(BASE)/image.boot36 $(MAKE) -C arch/$(BARCH)/loader clean 37 rm -f $(BASE)/image.boot -
boot/arch/arm32/loader/Makefile
r309ede1 r5f70118 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf32-littlearm 40 BFD_ARCH = arm 41 TARGET = arm-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 endif 51 52 ifeq ($(COMPILER),gcc_cross) 53 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 54 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 55 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 56 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 57 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 58 endif 59 60 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../.. -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -pipe 61 62 SOURCES = \ 63 main.c \ 64 boot.S \ 65 asm.S \ 66 mm.c \ 67 print/print.c \ 68 _components.c \ 69 ../../../generic/printf.c \ 70 ../../../generic/string.c \ 71 ../../../genarch/division.c 72 73 COMPONENTS = \ 74 $(KERNELDIR)/kernel.bin \ 75 $(USPACEDIR)/srv/ns/ns \ 76 $(USPACEDIR)/srv/loader/loader \ 77 $(USPACEDIR)/app/init/init \ 78 $(USPACEDIR)/srv/devmap/devmap \ 79 $(USPACEDIR)/srv/bd/rd/rd \ 80 $(USPACEDIR)/srv/vfs/vfs 81 ifeq ($(RDFMT),tmpfs) 82 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 83 endif 84 ifeq ($(RDFMT),fat) 85 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 86 endif 87 88 RD_SRVS = \ 89 $(USPACEDIR)/srv/fb/fb \ 90 $(USPACEDIR)/srv/kbd/kbd \ 91 $(USPACEDIR)/srv/console/console \ 92 $(USPACEDIR)/srv/fs/devfs/devfs \ 93 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 94 $(USPACEDIR)/srv/fs/fat/fat \ 95 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 96 $(USPACEDIR)/srv/part/mbr_part/mbr_part 97 ifeq ($(MACHINE),testarm) 98 RD_SRVS += \ 99 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd 100 endif 101 102 RD_APPS = \ 103 $(USPACEDIR)/app/getvc/getvc \ 104 $(USPACEDIR)/app/tetris/tetris \ 105 $(USPACEDIR)/app/tester/tester \ 106 $(USPACEDIR)/app/trace/trace \ 107 $(USPACEDIR)/app/klog/klog \ 108 $(USPACEDIR)/app/bdsh/bdsh 109 110 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 111 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 112 113 .PHONY: all clean depend 114 115 all: image.boot 116 117 -include Makefile.depend 118 119 image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 120 $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ 121 122 depend: 123 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 124 37 125 38 clean: 126 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) ; do \ 127 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 128 41 done 129 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) ; do \ 130 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 131 44 done 132 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend 133 134 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 135 for file in $(RD_SRVS) ; do \ 136 cp $$file $(USPACEDIR)/dist/srv/ ; \ 137 done 138 for file in $(RD_APPS) ; do \ 139 cp $$file $(USPACEDIR)/dist/app/ ; \ 140 done 141 ifeq ($(RDFMT),tmpfs) 142 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 143 endif 144 ifeq ($(RDFMT),fat) 145 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 146 endif 147 ../../../../tools/mkhord.py 4096 initrd.fs initrd.img 148 rm initrd.fs 149 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img 150 151 %.o: %.S 152 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 153 154 %.o: %.c 155 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ia32/Makefile.inc
-
Property mode
changed from
100644to120000
r309ede1 r5f70118 1 # 2 # Copyright (c) 2006 Martin Decky 3 # All rights reserved. 4 # 5 # Redistribution and use in source and binary forms, with or without 6 # modification, are permitted provided that the following conditions 7 # are met: 8 # 9 # - Redistributions of source code must retain the above copyright 10 # notice, this list of conditions and the following disclaimer. 11 # - Redistributions in binary form must reproduce the above copyright 12 # notice, this list of conditions and the following disclaimer in the 13 # documentation and/or other materials provided with the distribution. 14 # - The name of the author may not be used to endorse or promote products 15 # derived from this software without specific prior written permission. 16 # 17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # 28 29 TMP = distroot 30 31 INIT_TASKS = \ 32 $(USPACEDIR)/srv/ns/ns \ 33 $(USPACEDIR)/srv/loader/loader \ 34 $(USPACEDIR)/app/init/init \ 35 $(USPACEDIR)/srv/devmap/devmap \ 36 $(USPACEDIR)/srv/bd/rd/rd \ 37 $(USPACEDIR)/srv/vfs/vfs 38 ifeq ($(RDFMT),tmpfs) 39 INIT_TASKS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 40 endif 41 ifeq ($(RDFMT),fat) 42 INIT_TASKS += $(USPACEDIR)/srv/fs/fat/fat 43 endif 44 45 RD_SRVS = \ 46 $(USPACEDIR)/srv/pci/pci \ 47 $(USPACEDIR)/srv/fb/fb \ 48 $(USPACEDIR)/srv/kbd/kbd \ 49 $(USPACEDIR)/srv/console/console \ 50 $(USPACEDIR)/srv/fs/devfs/devfs \ 51 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 52 $(USPACEDIR)/srv/fs/fat/fat \ 53 $(USPACEDIR)/srv/bd/ata_bd/ata_bd \ 54 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 55 $(USPACEDIR)/srv/part/mbr_part/mbr_part 56 57 RD_APPS = \ 58 $(USPACEDIR)/app/getvc/getvc \ 59 $(USPACEDIR)/app/tetris/tetris \ 60 $(USPACEDIR)/app/tester/tester \ 61 $(USPACEDIR)/app/trace/trace \ 62 $(USPACEDIR)/app/klog/klog \ 63 $(USPACEDIR)/app/bdsh/bdsh 64 65 build: $(BASE)/image.iso 66 67 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito arch/$(BARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) 68 mkdir -p $(TMP)/boot/grub 69 cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ 70 ifneq ($(RDFMT),tmpfs) 71 cat arch/$(BARCH)/grub/menu.lst | grep -v "tmpfs" > $(TMP)/boot/grub/menu.lst 72 endif 73 ifneq ($(RDFMT),fat) 74 cat arch/$(BARCH)/grub/menu.lst | grep -v "fat" > $(TMP)/boot/grub/menu.lst 75 endif 76 cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ 77 for task in $(INIT_TASKS) ; do \ 78 cp $$task $(TMP)/boot/ ; \ 79 done 80 for file in $(RD_SRVS) ; do \ 81 cp $$file $(USPACEDIR)/dist/srv/ ; \ 82 done 83 for file in $(RD_APPS) ; do \ 84 cp $$file $(USPACEDIR)/dist/app/ ; \ 85 done 86 ifeq ($(RDFMT),tmpfs) 87 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs 88 endif 89 ifeq ($(RDFMT),fat) 90 $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs 91 endif 92 $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/initrd.fs $(TMP)/boot/initrd.img 93 rm $(TMP)/boot/initrd.fs 94 mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/ 95 96 clean: 97 -for file in $(RD_SRVS) ; do \ 98 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 99 done 100 -for file in $(RD_APPS) ; do \ 101 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 102 done 103 -rm -fr $(TMP) 104 -rm -f $(BASE)/image.iso 1 ../amd64/Makefile.inc -
Property mode
changed from
-
boot/arch/ia64/Makefile.inc
r309ede1 r5f70118 29 29 build: $(BASE)/image.boot 30 30 31 $(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot 32 cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 33 cp arch/$(BARCH)/loader/image.boot $@ 33 34 34 depend: 35 -rm arch/$(BARCH)/loader/image.boot 36 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 39 40 clean: generic_clean 41 make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 42 -rm -f $(BASE)/image.boot 35 clean: 36 $(MAKE) -C arch/$(BARCH)/loader clean 37 rm -f $(BASE)/image.boot $(BASE)/hello.efi $(BASE)/image.bin -
boot/arch/ia64/loader/Makefile
r309ede1 r5f70118 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf64-ia64-little 40 BFD_ARCH = ia64 41 TARGET = ia64-pc-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 GEFI_PREFIX = 51 endif 52 53 ifeq ($(COMPILER),icc_native) 54 CC = icc 55 AS = as 56 LD = ld 57 OBJCOPY = objcopy 58 OBJDUMP = objdump 59 endif 60 61 ifeq ($(COMPILER),gcc_cross) 62 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 63 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 64 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 65 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 66 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 67 GEFI_PREFIX = $(TOOLCHAIN_DIR)/$(TARGET)- 68 endif 69 70 #-mno-pic means do not use gp + imm22 to address data 71 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -I../../../../kernel/generic/include -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -pipe 72 73 SOURCES = \ 74 main.c \ 75 ../../../generic/printf.c \ 76 ../../../generic/string.c \ 77 ../../../genarch/balloc.c \ 78 _components.c \ 79 asm.S \ 80 boot.S 81 82 NOCOMPONENTS = \ 83 $(KERNELDIR)/kernel.bin 84 COMPONENTS = \ 85 $(KERNELDIR)/kernel.bin \ 86 $(USPACEDIR)/srv/ns/ns \ 87 $(USPACEDIR)/srv/loader/loader \ 88 $(USPACEDIR)/app/init/init \ 89 $(USPACEDIR)/srv/devmap/devmap \ 90 $(USPACEDIR)/srv/bd/rd/rd \ 91 $(USPACEDIR)/srv/vfs/vfs 92 ifeq ($(RDFMT),tmpfs) 93 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 94 endif 95 ifeq ($(RDFMT),fat) 96 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 97 endif 98 99 RD_SRVS = \ 100 $(USPACEDIR)/srv/fb/fb \ 101 $(USPACEDIR)/srv/kbd/kbd \ 102 $(USPACEDIR)/srv/console/console \ 103 $(USPACEDIR)/srv/fs/devfs/devfs \ 104 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 105 $(USPACEDIR)/srv/fs/fat/fat \ 106 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 107 $(USPACEDIR)/srv/part/mbr_part/mbr_part 108 109 RD_APPS = \ 110 $(USPACEDIR)/app/getvc/getvc \ 111 $(USPACEDIR)/app/tetris/tetris \ 112 $(USPACEDIR)/app/tester/tester \ 113 $(USPACEDIR)/app/trace/trace \ 114 $(USPACEDIR)/app/klog/klog \ 115 $(USPACEDIR)/app/bdsh/bdsh 116 117 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 118 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 119 120 .PHONY: all clean depend 121 122 all: hello.efi disasm 123 124 -include Makefile.depend 125 126 hello.efi: image.boot 127 make -C gefi/HelenOS PREFIX=$(GEFI_PREFIX) 128 cp gefi/HelenOS/hello.efi ../../../../ 129 cp gefi/HelenOS/image.bin ../../../../ 130 131 image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 132 $(LD) -Map image.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ 133 134 depend: 135 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 136 37 137 38 clean: 138 -for file in $(RD_SRVS) ; do \ 39 $(MAKE) -C gefi clean 40 $(MAKE) -C gefi/HelenOS clean 41 for file in $(RD_SRVS) ; do \ 139 42 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 140 43 done 141 -for file in $(RD_APPS) ; do \44 for file in $(RD_APPS) ; do \ 142 45 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 143 46 done 144 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) image.boot image.map image.disasm initrd.img image.boot Makefile.depend ../../../../image.bin ../../../../hello.efi 145 make -C gefi clean 146 make -C gefi/HelenOS clean 147 148 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 149 for file in $(RD_SRVS) ; do \ 150 cp $$file $(USPACEDIR)/dist/srv/ ; \ 151 done 152 for file in $(RD_APPS) ; do \ 153 cp $$file $(USPACEDIR)/dist/app/ ; \ 154 done 155 ifeq ($(RDFMT),tmpfs) 156 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 157 endif 158 ifeq ($(RDFMT),fat) 159 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 160 endif 161 ../../../../tools/mkhord.py 16384 initrd.fs initrd.img 162 rm initrd.fs 163 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned long" $(COMPONENTS) ./initrd.img 164 165 %.o: %.S 166 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 167 168 %.o: %.c 169 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 170 171 disasm: image.boot 172 $(OBJDUMP) -d image.boot > image.disasm 47 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(HELLO) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 48 find . -name '*.o' -follow -exec rm \{\} \; 49 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ia64/loader/gefi/HelenOS/Makefile
r309ede1 r5f70118 69 69 70 70 gefi: 71 make-C .. prefix=$(PREFIX)71 $(MAKE) -C .. prefix=$(PREFIX) -
boot/arch/mips32/Makefile.inc
r309ede1 r5f70118 29 29 build: $(BASE)/image.boot 30 30 31 $(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot 32 cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot 33 34 depend: 35 -rm arch/$(BARCH)/loader/image.boot 36 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 33 cp arch/$(BARCH)/loader/image.boot $@ 39 34 40 35 clean: 41 make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)42 -rm -f $(BASE)/image.boot36 $(MAKE) -C arch/$(BARCH)/loader clean 37 rm -f $(BASE)/image.boot -
boot/arch/mips32/loader/Makefile
r309ede1 r5f70118 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_ARCH = mips 40 TARGET = mipsel-linux-gnu 41 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32/bin 42 43 ifeq ($(MACHINE),lgxemul) 44 BFD_NAME = elf32-tradlittlemips 45 BFD = ecoff-littlemips 46 endif 47 ifeq ($(MACHINE),bgxemul) 48 BFD_NAME = elf32-tradbigmips 49 BFD = ecoff-bigmips 50 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32eb/bin 51 TARGET = mips-linux-gnu 52 endif 53 ifeq ($(MACHINE),msim) 54 BFD_NAME = elf32-tradlittlemips 55 BFD = binary 56 endif 57 58 ifeq ($(COMPILER),gcc_native) 59 CC = gcc 60 AS = as 61 LD = ld 62 OBJCOPY = objcopy 63 OBJDUMP = objdump 64 endif 65 66 ifeq ($(COMPILER),gcc_cross) 67 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 68 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 69 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 70 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 71 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 72 endif 73 74 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3 -pipe 75 76 SOURCES = \ 77 main.c \ 78 msim.c \ 79 _components.c \ 80 ../../../generic/printf.c \ 81 ../../../generic/string.c \ 82 asm.S \ 83 boot.S 84 85 COMPONENTS = \ 86 $(KERNELDIR)/kernel.bin \ 87 $(USPACEDIR)/srv/ns/ns \ 88 $(USPACEDIR)/srv/loader/loader \ 89 $(USPACEDIR)/app/init/init \ 90 $(USPACEDIR)/srv/devmap/devmap \ 91 $(USPACEDIR)/srv/bd/rd/rd \ 92 $(USPACEDIR)/srv/vfs/vfs 93 ifeq ($(RDFMT),tmpfs) 94 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 95 endif 96 ifeq ($(RDFMT),fat) 97 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 98 endif 99 100 RD_SRVS = \ 101 $(USPACEDIR)/srv/fb/fb \ 102 $(USPACEDIR)/srv/kbd/kbd \ 103 $(USPACEDIR)/srv/console/console \ 104 $(USPACEDIR)/srv/fs/devfs/devfs \ 105 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 106 $(USPACEDIR)/srv/fs/fat/fat \ 107 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 108 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd \ 109 $(USPACEDIR)/srv/part/mbr_part/mbr_part 110 111 RD_APPS = \ 112 $(USPACEDIR)/app/getvc/getvc \ 113 $(USPACEDIR)/app/tetris/tetris \ 114 $(USPACEDIR)/app/tester/tester \ 115 $(USPACEDIR)/app/trace/trace \ 116 $(USPACEDIR)/app/bdsh/bdsh \ 117 $(USPACEDIR)/app/klog/klog 118 119 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 120 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 121 122 .PHONY: all clean depend 123 124 all: image.boot 125 126 -include Makefile.depend 127 128 image.boot: image.raw 129 $(OBJCOPY) -O $(BFD) $< $@ 130 131 image.raw: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 132 $(LD) -no-check-sections -N -T _link.ld -o $@ $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 133 134 depend: 135 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 136 37 137 38 clean: 138 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) ; do \ 139 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 140 41 done 141 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) ; do \ 142 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 143 44 done 144 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.raw image.boot Makefile.depend 145 146 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 147 for file in $(RD_SRVS) ; do \ 148 cp $$file $(USPACEDIR)/dist/srv/ ; \ 149 done 150 for file in $(RD_APPS) ; do \ 151 cp $$file $(USPACEDIR)/dist/app/ ; \ 152 done 153 ifeq ($(RDFMT),tmpfs) 154 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 155 endif 156 ifeq ($(RDFMT),fat) 157 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 158 endif 159 ../../../../tools/mkhord.py 16384 initrd.fs initrd.img 160 rm initrd.fs 161 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned int" $(COMPONENTS) ./initrd.img 162 163 %.o: %.S 164 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 165 166 %.o: %.c 167 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(RAW) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ppc32/Makefile.inc
r309ede1 r5f70118 27 27 # 28 28 29 TMP = distroot 29 include Makefile.common 30 30 31 31 build: $(BASE)/image.iso 32 32 33 $(BASE)/image.iso: dependarch/$(BARCH)/loader/image.boot33 $(BASE)/image.iso: arch/$(BARCH)/loader/image.boot 34 34 mkdir -p $(TMP)/boot 35 35 mkdir -p $(TMP)/ppc … … 41 41 mkisofs -hfs -part -map arch/$(BARCH)/yaboot/maps -no-desktop -hfs-volid "HelenOS" -hfs-bless $(TMP)/boot -r -o $@ $(TMP)/ 42 42 43 depend:44 -rm arch/$(BARCH)/loader/image.boot45 46 43 arch/$(BARCH)/loader/image.boot: 47 $(MAKE) -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)44 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 48 45 49 46 clean: generic_clean 50 $(MAKE) -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)51 -rm -fr $(TMP)52 -rm -f $(BASE)/image.iso47 $(MAKE) -C arch/$(BARCH)/loader clean 48 rm -fr $(TMP) 49 rm -f $(BASE)/image.iso -
boot/arch/ppc32/loader/Makefile
r309ede1 r5f70118 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf32-powerpc 40 BFD_ARCH = powerpc:common 41 TARGET = ppc-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc32/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 endif 51 52 ifeq ($(COMPILER),gcc_cross) 53 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 54 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 55 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 56 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 57 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 58 endif 59 60 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32 -pipe 61 62 SOURCES = \ 63 main.c \ 64 _components.c \ 65 ../../../generic/printf.c \ 66 ../../../generic/string.c \ 67 ../../../genarch/balloc.c \ 68 ../../../genarch/ofw.c \ 69 ../../../genarch/ofw_tree.c \ 70 ofwarch.c \ 71 asm.S \ 72 boot.S 73 74 COMPONENTS = \ 75 $(KERNELDIR)/kernel.bin \ 76 $(USPACEDIR)/srv/ns/ns \ 77 $(USPACEDIR)/app/init/init \ 78 $(USPACEDIR)/srv/loader/loader \ 79 $(USPACEDIR)/srv/devmap/devmap \ 80 $(USPACEDIR)/srv/bd/rd/rd \ 81 $(USPACEDIR)/srv/vfs/vfs 82 ifeq ($(RDFMT),tmpfs) 83 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 84 endif 85 ifeq ($(RDFMT),fat) 86 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 87 endif 88 89 RD_SRVS = \ 90 $(USPACEDIR)/srv/fb/fb \ 91 $(USPACEDIR)/srv/kbd/kbd \ 92 $(USPACEDIR)/srv/console/console \ 93 $(USPACEDIR)/srv/fs/devfs/devfs \ 94 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 95 $(USPACEDIR)/srv/fs/fat/fat \ 96 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 97 $(USPACEDIR)/srv/part/mbr_part/mbr_part 98 99 RD_APPS = \ 100 $(USPACEDIR)/app/getvc/getvc \ 101 $(USPACEDIR)/app/tetris/tetris \ 102 $(USPACEDIR)/app/tester/tester \ 103 $(USPACEDIR)/app/trace/trace \ 104 $(USPACEDIR)/app/bdsh/bdsh \ 105 $(USPACEDIR)/app/klog/klog 106 107 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 108 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 109 110 .PHONY: all clean depend 111 112 all: image.boot 113 114 -include Makefile.depend 115 116 image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 117 $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ 118 119 depend: 120 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 121 37 122 38 clean: 123 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) ; do \ 124 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 125 41 done 126 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) ; do \ 127 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 128 44 done 129 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend 130 131 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 132 for file in $(RD_SRVS) ; do \ 133 cp $$file $(USPACEDIR)/dist/srv/ ; \ 134 done 135 for file in $(RD_APPS) ; do \ 136 cp $$file $(USPACEDIR)/dist/app/ ; \ 137 done 138 ifeq ($(RDFMT),tmpfs) 139 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 140 endif 141 ifeq ($(RDFMT),fat) 142 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 143 endif 144 ../../../../tools/mkhord.py 4096 initrd.fs initrd.img 145 rm initrd.fs 146 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img 147 148 %.o: %.S 149 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 150 151 %.o: %.c 152 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/sparc64/Makefile.inc
r309ede1 r5f70118 27 27 # 28 28 29 TMP = distroot 29 include Makefile.common 30 30 31 31 ifeq ($(CONFIG_AOUT_ISOFS_B),y) … … 37 37 build: $(BASE)/image.iso 38 38 39 $(BASE)/image.iso: dependarch/$(BARCH)/loader/image.boot39 $(BASE)/image.iso: arch/$(BARCH)/loader/image.boot 40 40 mkdir -p $(TMP)/boot 41 41 mkdir -p $(TMP)/HelenOS … … 54 54 mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o $@ $(TMP)/ 55 55 56 depend:57 -rm arch/$(BARCH)/loader/image.boot58 59 56 arch/$(BARCH)/loader/image.boot: 60 $(MAKE) -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)57 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 61 58 62 59 clean: generic_clean 63 $(MAKE) -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)64 -rm -fr $(TMP)65 -rm -f $(BASE)/image.iso60 $(MAKE) -C arch/$(BARCH)/loader clean 61 rm -fr $(TMP) 62 rm -f $(BASE)/image.iso -
boot/arch/sparc64/loader/Makefile
r309ede1 r5f70118 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf64-sparc 40 BFD_ARCH = sparc 41 TARGET = sparc64-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/sparc64/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 endif 51 52 ifeq ($(COMPILER),gcc_cross) 53 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 54 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 55 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 56 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 57 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 58 endif 59 60 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=ultrasparc -m64 -mno-fpu -pipe 61 62 SOURCES = \ 63 main.c \ 64 _components.c \ 65 ../../../generic/printf.c \ 66 ../../../generic/string.c \ 67 ../../../genarch/balloc.c \ 68 ../../../genarch/ofw.c \ 69 ../../../genarch/ofw_tree.c \ 70 ofwarch.c \ 71 asm.S \ 72 boot.S 73 74 # 75 # All components that go to image.boot without the ramdisk. 76 # 77 COMPONENTS = \ 78 $(KERNELDIR)/kernel.bin \ 79 $(USPACEDIR)/srv/ns/ns \ 80 $(USPACEDIR)/app/init/init \ 81 $(USPACEDIR)/srv/loader/loader \ 82 $(USPACEDIR)/srv/devmap/devmap \ 83 $(USPACEDIR)/srv/bd/rd/rd \ 84 $(USPACEDIR)/srv/vfs/vfs 85 ifeq ($(RDFMT),tmpfs) 86 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 87 endif 88 ifeq ($(RDFMT),fat) 89 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 90 endif 91 92 # 93 # Final list of all components that go to image.boot. 94 # 95 ALL_COMPONENTS = $(COMPONENTS) 96 ifeq ($(CONFIG_RD_EXTERNAL),n) 97 ALL_COMPONENTS += ./initrd.img 98 endif 99 100 RD_SRVS = \ 101 $(USPACEDIR)/srv/fb/fb \ 102 $(USPACEDIR)/srv/kbd/kbd \ 103 $(USPACEDIR)/srv/console/console \ 104 $(USPACEDIR)/srv/fs/devfs/devfs \ 105 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 106 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 107 $(USPACEDIR)/srv/part/mbr_part/mbr_part 108 109 ifeq ($(MACHINE),generic) 110 RD_SRVS += \ 111 $(USPACEDIR)/srv/fs/fat/fat \ 112 $(USPACEDIR)/srv/cir/fhc/fhc \ 113 $(USPACEDIR)/srv/cir/obio/obio 114 endif 115 116 RD_APPS = \ 117 $(USPACEDIR)/app/getvc/getvc \ 118 $(USPACEDIR)/app/tetris/tetris \ 119 $(USPACEDIR)/app/trace/trace \ 120 $(USPACEDIR)/app/bdsh/bdsh \ 121 $(USPACEDIR)/app/klog/klog 122 123 ifeq ($(MACHINE),generic) 124 RD_APPS += \ 125 $(USPACEDIR)/app/tester/tester 126 endif 127 128 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 129 ALL_COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(ALL_COMPONENTS)))) 130 131 .PHONY: all clean depend 132 133 all: image.boot disasm 134 135 -include Makefile.depend 136 137 image.boot: depend _components.h _link.ld $(ALL_COMPONENT_OBJECTS) $(OBJECTS) 138 $(LD) -Map image.map -no-check-sections -N -T _link.ld $(ALL_COMPONENT_OBJECTS) $(OBJECTS) -o $@ 139 140 depend: 141 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 142 37 143 38 clean: 144 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) $(RD_SRVS_GENERIC) ; do \ 145 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 146 41 done 147 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) $(RD_APPS_GENERIC) ; do \ 148 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 149 44 done 150 -rm -f _components.h _components.c _link.ld $(ALL_COMPONENT_OBJECTS) $(OBJECTS) initrd.img image.boot image.map image.disasm Makefile.depend 151 152 _components.h _components.c _link.ld $(ALL_COMPONENT_OBJECTS): $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 153 for file in $(RD_SRVS) ; do \ 154 cp $$file $(USPACEDIR)/dist/srv/ ; \ 155 done 156 for file in $(RD_APPS) ; do \ 157 cp $$file $(USPACEDIR)/dist/app/ ; \ 158 done 159 ifeq ($(RDFMT),tmpfs) 160 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 161 endif 162 ifeq ($(RDFMT),fat) 163 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 164 endif 165 ../../../../tools/mkhord.py 16384 initrd.fs initrd.img 166 rm initrd.fs 167 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 1 "unsigned long" $(ALL_COMPONENTS) 168 169 %.o: %.S 170 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 171 172 %.o: %.c 173 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 174 175 disasm: image.boot 176 $(OBJDUMP) -d image.boot > image.disasm 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/tools/pack.py
r309ede1 r5f70118 72 72 plainname = os.path.splitext(basename)[0] 73 73 path = os.path.dirname(task) 74 object = plainname + ". o"74 object = plainname + ".co" 75 75 symbol = "_binary_" + basename.replace(".", "_") 76 76 macro = plainname.upper()
Note:
See TracChangeset
for help on using the changeset viewer.
