- Timestamp:
- 2010-03-27T09:22:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36a75a2
- Parents:
- cd82bb1 (diff), eaf22d4 (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:
-
- 1 added
- 1 deleted
- 31 edited
-
Makefile (modified) (2 diffs)
-
Makefile.common (added)
-
arch/amd64/Makefile.inc (modified) (3 diffs, 1 prop)
-
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 (modified) (4 diffs)
-
arch/arm32/loader/Makefile.common (modified) (1 diff)
-
arch/arm32/loader/Makefile.toolchain (modified) (1 diff)
-
arch/ia64/Makefile.inc (modified) (1 diff)
-
arch/ia64/loader/Makefile (modified) (2 diffs)
-
arch/ia64/loader/Makefile.build (modified) (5 diffs)
-
arch/ia64/loader/Makefile.common (modified) (2 diffs)
-
arch/ia64/loader/Makefile.toolchain (modified) (1 diff)
-
arch/ia64/loader/gefi/HelenOS/Makefile (modified) (4 diffs)
-
arch/ia64/loader/gefi/Make.defaults (modified) (2 diffs)
-
arch/mips32/Makefile.inc (modified) (1 diff)
-
arch/mips32/loader/Makefile (modified) (2 diffs)
-
arch/mips32/loader/Makefile.build (modified) (4 diffs)
-
arch/mips32/loader/Makefile.common (modified) (1 diff)
-
arch/mips32/loader/Makefile.toolchain (modified) (3 diffs)
-
arch/ppc32/Makefile.inc (modified) (2 diffs)
-
arch/ppc32/loader/Makefile (modified) (2 diffs)
-
arch/ppc32/loader/Makefile.build (modified) (4 diffs)
-
arch/ppc32/loader/Makefile.common (modified) (1 diff)
-
arch/ppc32/loader/Makefile.toolchain (modified) (1 diff)
-
arch/sparc64/Makefile.inc (modified) (2 diffs)
-
arch/sparc64/loader/Makefile (modified) (2 diffs)
-
arch/sparc64/loader/Makefile.build (modified) (4 diffs)
-
arch/sparc64/loader/Makefile.common (modified) (1 diff)
-
arch/sparc64/loader/Makefile.toolchain (modified) (1 diff)
-
arch/sparc64/loader/asm.S (modified) (2 diffs)
-
arch/sparc64/loader/main.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
rcd82bb1 r371bd7d 30 30 # 31 31 32 -include ../Makefile.common 32 33 -include ../Makefile.config 33 -include ../config.defs34 34 35 35 ## Paths … … 42 42 .PHONY: all build clean generic_clean 43 43 44 all: ../Makefile.co nfig ../config.h ../config.defsbuild44 all: ../Makefile.common ../Makefile.config ../config.h build 45 45 46 46 -include arch/$(BARCH)/Makefile.inc -
boot/arch/amd64/Makefile.inc
-
Property mode
changed from
100644to100755
rcd82bb1 r371bd7d 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/char_mouse/char_ms 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/edit/edit \ 59 $(USPACEDIR)/app/getvc/getvc \ 60 $(USPACEDIR)/app/redir/redir \ 61 $(USPACEDIR)/app/tetris/tetris \ 62 $(USPACEDIR)/app/tester/tester \ 63 $(USPACEDIR)/app/trace/trace \ 64 $(USPACEDIR)/app/klog/klog \ 65 $(USPACEDIR)/app/bdsh/bdsh 37 MODULES := $(notdir $(COMPONENTS)) 66 38 67 39 build: $(BASE)/image.iso 68 40 69 $(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) $(CFG) 70 42 mkdir -p $(TMP)/boot/grub 71 43 cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ 72 ifneq ($(RDFMT),tmpfs) 73 cat arch/$(BARCH)/grub/menu.lst | grep -v "tmpfs" > $(TMP)/boot/grub/menu.lst 74 endif 75 ifneq ($(RDFMT),fat) 76 cat arch/$(BARCH)/grub/menu.lst | grep -v "fat" > $(TMP)/boot/grub/menu.lst 77 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 58 rm -f $(USPACEDIR)/dist/srv/* 59 rm -f $(USPACEDIR)/dist/app/* 60 rm -f $(USPACEDIR)/dist/cfg/net/* 61 78 62 cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ 79 63 for task in $(INIT_TASKS) ; do \ … … 86 70 cp $$file $(USPACEDIR)/dist/app/ ; \ 87 71 done 72 for file in $(NET_CFG) ; do \ 73 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \ 74 done 75 88 76 ifeq ($(RDFMT),tmpfs) 89 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/ initrd.fs77 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/$(INITRD).fs 90 78 endif 91 79 ifeq ($(RDFMT),fat) 92 $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/ initrd.fs80 $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/$(INITRD).fs 93 81 endif 94 $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/ initrd.fs $(TMP)/boot/initrd.img95 rm $(TMP)/boot/ initrd.fs82 $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/$(INITRD).fs $(TMP)/boot/$(INITRD).img 83 rm $(TMP)/boot/$(INITRD).fs 96 84 mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/ 97 85 98 86 clean: 87 rm -f $(USPACEDIR)/dist/srv/* 88 rm -f $(USPACEDIR)/dist/app/* 89 rm -f $(USPACEDIR)/dist/cfg/net/* 90 99 91 for file in $(RD_SRVS) ; do \ 100 92 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 103 95 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 104 96 done 97 for file in $(NET_CFG) ; do \ 98 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \ 99 done 105 100 rm -fr $(TMP) 106 101 rm -f $(BASE)/image.iso -
Property mode
changed from
-
boot/arch/arm32/Makefile.inc
rcd82bb1 r371bd7d 30 30 31 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader 32 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 33 33 cp arch/$(BARCH)/loader/image.boot $@ 34 34 -
boot/arch/arm32/loader/Makefile
rcd82bb1 r371bd7d 32 32 .PHONY: all clean 33 33 34 all: ../../../../version ../../../../Makefile.co nfig ../../../../config.h ../../../../config.defs34 all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/* 40 rm -f $(USPACEDIR)/dist/app/* 41 rm -f $(USPACEDIR)/dist/cfg/net/* 42 39 43 for file in $(RD_SRVS) ; do \ 40 44 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 43 47 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 44 48 done 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 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 46 53 find . -name '*.o' -follow -exec rm \{\} \; 47 54 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/arm32/loader/Makefile.build
rcd82bb1 r371bd7d 32 32 33 33 include ../../../../version 34 include ../../../../Makefile.common 34 35 include ../../../../Makefile.config 35 include ../../../../config.defs36 36 include Makefile.common 37 37 include Makefile.toolchain … … 51 51 ../../../genarch/division.c 52 52 53 COMPONENTS = \54 $(KERNELDIR)/kernel.bin \55 $(USPACEDIR)/srv/ns/ns \56 $(USPACEDIR)/srv/loader/loader \57 $(USPACEDIR)/app/init/init \58 $(USPACEDIR)/srv/devmap/devmap \59 $(USPACEDIR)/srv/bd/rd/rd \60 $(USPACEDIR)/srv/vfs/vfs61 ifeq ($(RDFMT),tmpfs)62 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs63 endif64 ifeq ($(RDFMT),fat)65 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat66 endif67 68 53 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 69 54 COMPONENT_OBJECTS := $(addsuffix .co,$(basename $(notdir $(COMPONENTS)))) $(INITRD).co … … 80 65 %.o: %.S $(DEPEND) 81 66 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 67 ifeq ($(PRECHECK),y) 68 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 69 endif 82 70 83 71 %.o: %.c $(DEPEND) 84 72 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 73 ifeq ($(PRECHECK),y) 74 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 75 endif 85 76 86 77 $(DEPEND): 78 rm -f $(USPACEDIR)/dist/srv/* 79 rm -f $(USPACEDIR)/dist/app/* 80 rm -f $(USPACEDIR)/dist/cfg/net/* 81 87 82 for file in $(RD_SRVS) ; do \ 88 83 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 90 85 for file in $(RD_APPS) ; do \ 91 86 cp $$file $(USPACEDIR)/dist/app/ ; \ 87 done 88 for file in $(NET_CFG) ; do \ 89 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \ 92 90 done 93 91 ifeq ($(RDFMT),tmpfs) -
boot/arch/arm32/loader/Makefile.common
rcd82bb1 r371bd7d 31 31 # 32 32 33 include ../../../Makefile.common 34 33 35 DEPEND = Makefile.depend 34 36 DEPEND_PREV = $(DEPEND).prev 37 JOB = image.job 35 38 OUTPUT = image.boot 36 39 37 40 LINK = _link.ld 38 41 COMPS = _components 39 INITRD = initrd40 42 41 43 KERNELDIR = ../../../../kernel 42 44 USPACEDIR = ../../../../uspace 43 45 44 RD_SRVS = \ 45 $(USPACEDIR)/srv/fb/fb \ 46 $(USPACEDIR)/srv/kbd/kbd \ 47 $(USPACEDIR)/srv/console/console \ 48 $(USPACEDIR)/srv/fs/devfs/devfs \ 49 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 50 $(USPACEDIR)/srv/fs/fat/fat \ 51 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 52 $(USPACEDIR)/srv/part/mbr_part/mbr_part \ 53 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd 54 55 RD_APPS = \ 56 $(USPACEDIR)/app/edit/edit \ 57 $(USPACEDIR)/app/getvc/getvc \ 58 $(USPACEDIR)/app/redir/redir \ 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 46 RD_SRVS += $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd -
boot/arch/arm32/loader/Makefile.toolchain
rcd82bb1 r371bd7d 27 27 # 28 28 29 ## Toolchain configuration30 #31 32 ifndef CROSS_PREFIX33 CROSS_PREFIX = /usr/local34 endif35 36 29 BFD_NAME = elf32-littlearm 37 30 BFD_ARCH = arm 38 TARGET = arm-linux-gnu39 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin40 31 41 ifeq ($(COMPILER),gcc_native) 42 CC = gcc 43 AS = as 44 LD = ld 45 OBJCOPY = objcopy 46 OBJDUMP = objdump 47 endif 48 49 ifeq ($(COMPILER),gcc_cross) 50 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 51 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 52 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 53 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 54 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 55 endif 32 JOBFILE = ../../../../tools/jobfile.py 56 33 57 34 CFLAGS = \ -
boot/arch/ia64/Makefile.inc
rcd82bb1 r371bd7d 30 30 31 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader 32 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 33 33 cp arch/$(BARCH)/loader/image.boot $@ 34 34 -
boot/arch/ia64/loader/Makefile
rcd82bb1 r371bd7d 29 29 30 30 include Makefile.common 31 include ../../../../Makefile.common 32 include ../../../../Makefile.config 31 33 32 34 .PHONY: all clean 33 35 34 all: ../../../../version ../../../../Makefile.co nfig ../../../../config.h ../../../../config.defs36 all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h 35 37 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 38 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 37 39 38 40 clean: 39 41 $(MAKE) -C gefi clean 40 42 $(MAKE) -C gefi/HelenOS clean 43 44 rm -f $(USPACEDIR)/dist/srv/* 45 rm -f $(USPACEDIR)/dist/app/* 46 rm -f $(USPACEDIR)/dist/cfg/net/* 47 41 48 for file in $(RD_SRVS) ; do \ 42 49 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 45 52 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 46 53 done 47 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(HELLO) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 54 for file in $(NET_CFG) ; do \ 55 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \ 56 done 57 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(HELLO) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 48 58 find . -name '*.o' -follow -exec rm \{\} \; 49 59 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ia64/loader/Makefile.build
rcd82bb1 r371bd7d 32 32 33 33 include ../../../../version 34 include ../../../../Makefile.common 34 35 include ../../../../Makefile.config 35 include ../../../../config.defs36 36 include Makefile.common 37 37 include Makefile.toolchain … … 49 49 boot.S 50 50 51 COMPONENTS = \52 $(KERNELDIR)/kernel.bin \53 $(USPACEDIR)/srv/ns/ns \54 $(USPACEDIR)/srv/loader/loader \55 $(USPACEDIR)/app/init/init \56 $(USPACEDIR)/srv/devmap/devmap \57 $(USPACEDIR)/srv/bd/rd/rd \58 $(USPACEDIR)/srv/vfs/vfs59 ifeq ($(RDFMT),tmpfs)60 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs61 endif62 ifeq ($(RDFMT),fat)63 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat64 endif65 66 51 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 67 52 COMPONENT_OBJECTS := $(addsuffix .co,$(basename $(notdir $(COMPONENTS)))) $(INITRD).co … … 75 60 $(OUTPUT): $(OBJECTS) $(COMPONENT_OBJECTS) $(LINK) 76 61 $(LD) -no-check-sections -N -T $(LINK) $(COMPONENT_OBJECTS) $(OBJECTS) -o $@ 77 $(MAKE) -C gefi/HelenOS PREFIX=$(GEFI_PREFIX)62 $(MAKE) -C gefi/HelenOS 78 63 cp gefi/HelenOS/hello.efi ../../../../ 79 64 cp gefi/HelenOS/image.bin ../../../../ … … 81 66 %.o: %.S $(DEPEND) 82 67 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 68 ifeq ($(PRECHECK),y) 69 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 70 endif 83 71 84 72 %.o: %.c $(DEPEND) 85 73 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 74 ifeq ($(PRECHECK),y) 75 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 76 endif 86 77 87 78 $(DEPEND): 79 rm -f $(USPACEDIR)/dist/srv/* 80 rm -f $(USPACEDIR)/dist/app/* 81 rm -f $(USPACEDIR)/dist/cfg/net/* 82 88 83 for file in $(RD_SRVS) ; do \ 89 84 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 91 86 for file in $(RD_APPS) ; do \ 92 87 cp $$file $(USPACEDIR)/dist/app/ ; \ 88 done 89 for file in $(NET_CFG) ; do \ 90 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \ 93 91 done 94 92 ifeq ($(RDFMT),tmpfs) -
boot/arch/ia64/loader/Makefile.common
rcd82bb1 r371bd7d 31 31 # 32 32 33 include ../../../../Makefile.common 34 include ../../../../Makefile.config 35 include ../../../Makefile.common 36 33 37 DEPEND = Makefile.depend 34 38 DEPEND_PREV = $(DEPEND).prev 39 JOB = image.job 35 40 OUTPUT = image.boot 36 41 HELLO = hello.efi … … 38 43 LINK = _link.ld 39 44 COMPS = _components 40 INITRD = initrd41 45 42 46 KERNELDIR = ../../../../kernel 43 47 USPACEDIR = ../../../../uspace 44 48 45 RD_SRVS = \ 46 $(USPACEDIR)/srv/fb/fb \ 47 $(USPACEDIR)/srv/kbd/kbd \ 48 $(USPACEDIR)/srv/console/console \ 49 $(USPACEDIR)/srv/fs/devfs/devfs \ 50 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 51 $(USPACEDIR)/srv/fs/fat/fat \ 52 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 53 $(USPACEDIR)/srv/part/mbr_part/mbr_part 54 55 RD_APPS = \ 56 $(USPACEDIR)/app/edit/edit \ 57 $(USPACEDIR)/app/getvc/getvc \ 58 $(USPACEDIR)/app/redir/redir \ 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 49 ifeq ($(MACHINE),i460GX) 50 RD_SRVS += \ 51 $(USPACEDIR)/srv/hw/char/i8042/i8042 \ 52 $(USPACEDIR)/srv/hid/char_mouse/char_ms 53 endif -
boot/arch/ia64/loader/Makefile.toolchain
rcd82bb1 r371bd7d 27 27 # 28 28 29 ## Toolchain configuration30 #31 32 ifndef CROSS_PREFIX33 CROSS_PREFIX = /usr/local34 endif35 36 29 BFD_NAME = elf64-ia64-little 37 30 BFD_ARCH = ia64 38 TARGET = ia64-pc-linux-gnu39 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin40 31 41 ifeq ($(COMPILER),gcc_native) 42 CC = gcc 43 AS = as 44 LD = ld 45 OBJCOPY = objcopy 46 OBJDUMP = objdump 47 GEFI_PREFIX = 48 endif 49 50 ifeq ($(COMPILER),icc) 51 CC = icc 52 AS = as 53 LD = ld 54 OBJCOPY = objcopy 55 OBJDUMP = objdump 56 GEFI_PREFIX = 57 endif 58 59 ifeq ($(COMPILER),gcc_cross) 60 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 61 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 62 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 63 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 64 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 65 GEFI_PREFIX = $(TOOLCHAIN_DIR)/$(TARGET)- 66 endif 32 JOBFILE = ../../../../tools/jobfile.py 67 33 68 34 CFLAGS = \ -
boot/arch/ia64/loader/gefi/HelenOS/Makefile
rcd82bb1 r371bd7d 22 22 # 23 23 24 prefix=$(PREFIX)25 24 include ../Make.defaults 26 25 CDIR=$(TOPDIR)/.. … … 33 32 FORMAT = efi-app-$(ARCH) 34 33 35 all: gefihello.efi34 all: hello.efi 36 35 37 36 clean: … … 46 45 #When selected first lines or second lines, select if image is linked into hello or not - usefull for network boot 47 46 #hello.so: hello.o image.o division.o 48 hello.so: hello.o image.bin division.o 47 hello.so: hello.o image.bin division.o gefi 49 48 # $(LD) $(LDFLAGS) -Map hello.map hello.o division.o image.o -o hello.so $(LOADLIBES) #link image inside hello 50 49 $(LD) $(LDFLAGS) -Map hello.map hello.o division.o -o hello.so $(LOADLIBES) #dont link image inside hello … … 69 68 70 69 gefi: 71 $(MAKE) -C .. prefix=$(PREFIX)70 $(MAKE) -C .. -
boot/arch/ia64/loader/gefi/Make.defaults
rcd82bb1 r371bd7d 26 26 # lib and include under the root 27 27 # 28 29 include ../../../../../Makefile.common 30 28 31 INSTALLROOT=/usr/local 29 32 … … 31 34 32 35 ARCH = ia64 33 INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol 36 INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol 34 37 CPPFLAGS = -DCONFIG_$(ARCH) 35 38 CFLAGS = -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -frename-registers -mfixed-range=f32-f127 36 39 LDFLAGS = -nostdlib 37 40 INSTALL = install 38 39 CC = $(prefix)gcc40 AS = $(prefix)as41 LD = $(prefix)ld42 AR = $(prefix)ar43 RANLIB = $(prefix)ranlib44 OBJCOPY = $(prefix)objcopy45 OBJDUMP = $(prefix)objdump -
boot/arch/mips32/Makefile.inc
rcd82bb1 r371bd7d 30 30 31 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader 32 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 33 33 cp arch/$(BARCH)/loader/image.boot $@ 34 34 -
boot/arch/mips32/loader/Makefile
rcd82bb1 r371bd7d 32 32 .PHONY: all clean 33 33 34 all: ../../../../version ../../../../Makefile.co nfig ../../../../config.h ../../../../config.defs34 all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/* 40 rm -f $(USPACEDIR)/dist/app/* 41 rm -f $(USPACEDIR)/dist/cfg/net/* 42 39 43 for file in $(RD_SRVS) ; do \ 40 44 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 43 47 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 44 48 done 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(RAW) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 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) $(RAW) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 53 find . -name '*.o' -follow -exec rm \{\} \; 47 54 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/mips32/loader/Makefile.build
rcd82bb1 r371bd7d 32 32 33 33 include ../../../../version 34 include ../../../../Makefile.common 34 35 include ../../../../Makefile.config 35 include ../../../../config.defs36 36 include Makefile.common 37 37 include Makefile.toolchain … … 48 48 asm.S \ 49 49 boot.S 50 51 COMPONENTS = \52 $(KERNELDIR)/kernel.bin \53 $(USPACEDIR)/srv/ns/ns \54 $(USPACEDIR)/srv/loader/loader \55 $(USPACEDIR)/app/init/init \56 $(USPACEDIR)/srv/devmap/devmap \57 $(USPACEDIR)/srv/bd/rd/rd \58 $(USPACEDIR)/srv/vfs/vfs59 ifeq ($(RDFMT),tmpfs)60 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs61 endif62 ifeq ($(RDFMT),fat)63 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat64 endif65 50 66 51 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) … … 81 66 %.o: %.S $(DEPEND) 82 67 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 68 ifeq ($(PRECHECK),y) 69 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 70 endif 83 71 84 72 %.o: %.c $(DEPEND) 85 73 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 74 ifeq ($(PRECHECK),y) 75 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 76 endif 86 77 87 78 $(DEPEND): 79 rm -f $(USPACEDIR)/dist/srv/* 80 rm -f $(USPACEDIR)/dist/app/* 81 rm -f $(USPACEDIR)/dist/cfg/net/* 82 88 83 for file in $(RD_SRVS) ; do \ 89 84 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 91 86 for file in $(RD_APPS) ; do \ 92 87 cp $$file $(USPACEDIR)/dist/app/ ; \ 88 done 89 for file in $(NET_CFG) ; do \ 90 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \ 93 91 done 94 92 ifeq ($(RDFMT),tmpfs) -
boot/arch/mips32/loader/Makefile.common
rcd82bb1 r371bd7d 31 31 # 32 32 33 include ../../../Makefile.common 34 33 35 DEPEND = Makefile.depend 34 36 DEPEND_PREV = $(DEPEND).prev 35 37 RAW = image.raw 38 JOB = image.job 36 39 OUTPUT = image.boot 37 40 38 41 LINK = _link.ld 39 42 COMPS = _components 40 INITRD = initrd41 43 42 44 KERNELDIR = ../../../../kernel 43 45 USPACEDIR = ../../../../uspace 44 46 45 RD_SRVS = \ 46 $(USPACEDIR)/srv/fb/fb \ 47 $(USPACEDIR)/srv/kbd/kbd \ 48 $(USPACEDIR)/srv/console/console \ 49 $(USPACEDIR)/srv/fs/devfs/devfs \ 50 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 51 $(USPACEDIR)/srv/fs/fat/fat \ 52 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 53 $(USPACEDIR)/srv/part/mbr_part/mbr_part \ 54 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd 55 56 RD_APPS = \ 57 $(USPACEDIR)/app/edit/edit \ 58 $(USPACEDIR)/app/getvc/getvc \ 59 $(USPACEDIR)/app/redir/redir \ 60 $(USPACEDIR)/app/tetris/tetris \ 61 $(USPACEDIR)/app/tester/tester \ 62 $(USPACEDIR)/app/trace/trace \ 63 $(USPACEDIR)/app/klog/klog \ 64 $(USPACEDIR)/app/bdsh/bdsh 47 RD_SRVS += $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd -
boot/arch/mips32/loader/Makefile.toolchain
rcd82bb1 r371bd7d 27 27 # 28 28 29 ## Toolchain configuration 30 # 29 BFD_ARCH = mips 31 30 32 ifndef CROSS_PREFIX 33 CROSS_PREFIX = /usr/local 34 endif 35 36 BFD_ARCH = mips 37 TARGET = mipsel-linux-gnu 38 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32/bin 31 JOBFILE = ../../../../tools/jobfile.py 39 32 40 33 ifeq ($(MACHINE),lgxemul) … … 46 39 BFD_NAME = elf32-tradbigmips 47 40 BFD = ecoff-bigmips 48 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32eb/bin49 TARGET = mips-linux-gnu50 41 endif 51 42 … … 53 44 BFD_NAME = elf32-tradlittlemips 54 45 BFD = binary 55 endif56 57 ifeq ($(COMPILER),gcc_native)58 CC = gcc59 AS = as60 LD = ld61 OBJCOPY = objcopy62 OBJDUMP = objdump63 endif64 65 ifeq ($(COMPILER),gcc_cross)66 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc67 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as68 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld69 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy70 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump71 46 endif 72 47 -
boot/arch/ppc32/Makefile.inc
rcd82bb1 r371bd7d 27 27 # 28 28 29 TMP = distroot 29 include Makefile.common 30 30 31 31 build: $(BASE)/image.iso … … 42 42 43 43 arch/$(BARCH)/loader/image.boot: 44 $(MAKE) -C arch/$(BARCH)/loader 44 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 45 45 46 46 clean: generic_clean -
boot/arch/ppc32/loader/Makefile
rcd82bb1 r371bd7d 32 32 .PHONY: all clean 33 33 34 all: ../../../../version ../../../../Makefile.co nfig ../../../../config.h ../../../../config.defs34 all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/* 40 rm -f $(USPACEDIR)/dist/app/* 41 rm -f $(USPACEDIR)/dist/cfg/net/* 42 39 43 for file in $(RD_SRVS) ; do \ 40 44 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 43 47 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 44 48 done 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 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 46 53 find . -name '*.o' -follow -exec rm \{\} \; 47 54 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ppc32/loader/Makefile.build
rcd82bb1 r371bd7d 32 32 33 33 include ../../../../version 34 include ../../../../Makefile.common 34 35 include ../../../../Makefile.config 35 include ../../../../config.defs36 36 include Makefile.common 37 37 include Makefile.toolchain … … 52 52 boot.S 53 53 54 COMPONENTS = \55 $(KERNELDIR)/kernel.bin \56 $(USPACEDIR)/srv/ns/ns \57 $(USPACEDIR)/app/init/init \58 $(USPACEDIR)/srv/loader/loader \59 $(USPACEDIR)/srv/devmap/devmap \60 $(USPACEDIR)/srv/bd/rd/rd \61 $(USPACEDIR)/srv/vfs/vfs62 ifeq ($(RDFMT),tmpfs)63 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs64 endif65 ifeq ($(RDFMT),fat)66 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat67 endif68 69 54 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 70 55 COMPONENT_OBJECTS := $(addsuffix .co,$(basename $(notdir $(COMPONENTS)))) $(INITRD).co … … 81 66 %.o: %.S $(DEPEND) 82 67 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 68 ifeq ($(PRECHECK),y) 69 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 70 endif 83 71 84 72 %.o: %.c $(DEPEND) 85 73 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 74 ifeq ($(PRECHECK),y) 75 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 76 endif 86 77 87 78 $(DEPEND): 79 rm -f $(USPACEDIR)/dist/srv/* 80 rm -f $(USPACEDIR)/dist/app/* 81 rm -f $(USPACEDIR)/dist/cfg/net/* 82 88 83 for file in $(RD_SRVS) ; do \ 89 84 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 91 86 for file in $(RD_APPS) ; do \ 92 87 cp $$file $(USPACEDIR)/dist/app/ ; \ 88 done 89 for file in $(NET_CFG) ; do \ 90 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \ 93 91 done 94 92 ifeq ($(RDFMT),tmpfs) -
boot/arch/ppc32/loader/Makefile.common
rcd82bb1 r371bd7d 31 31 # 32 32 33 include ../../../Makefile.common 34 33 35 DEPEND = Makefile.depend 34 36 DEPEND_PREV = $(DEPEND).prev 37 JOB = image.job 35 38 OUTPUT = image.boot 36 39 37 40 LINK = _link.ld 38 41 COMPS = _components 39 INITRD = initrd40 42 41 43 KERNELDIR = ../../../../kernel 42 44 USPACEDIR = ../../../../uspace 43 45 44 RD_SRVS = \ 45 $(USPACEDIR)/srv/fb/fb \ 46 $(USPACEDIR)/srv/kbd/kbd \ 47 $(USPACEDIR)/srv/console/console \ 48 $(USPACEDIR)/srv/fs/devfs/devfs \ 49 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 50 $(USPACEDIR)/srv/fs/fat/fat \ 51 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 52 $(USPACEDIR)/srv/part/mbr_part/mbr_part 53 54 RD_APPS = \ 55 $(USPACEDIR)/app/edit/edit \ 56 $(USPACEDIR)/app/getvc/getvc \ 57 $(USPACEDIR)/app/redir/redir \ 58 $(USPACEDIR)/app/tetris/tetris \ 59 $(USPACEDIR)/app/tester/tester \ 60 $(USPACEDIR)/app/trace/trace \ 61 $(USPACEDIR)/app/klog/klog \ 62 $(USPACEDIR)/app/bdsh/bdsh 46 RD_SRVS += \ 47 $(USPACEDIR)/srv/hid/adb_mouse/adb_ms \ 48 $(USPACEDIR)/srv/hw/bus/cuda_adb/cuda_adb -
boot/arch/ppc32/loader/Makefile.toolchain
rcd82bb1 r371bd7d 27 27 # 28 28 29 ## Toolchain configuration30 #31 32 ifndef CROSS_PREFIX33 CROSS_PREFIX = /usr/local34 endif35 36 29 BFD_NAME = elf32-powerpc 37 30 BFD_ARCH = powerpc:common 38 TARGET = ppc-linux-gnu39 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc32/bin40 31 41 ifeq ($(COMPILER),gcc_native) 42 CC = gcc 43 AS = as 44 LD = ld 45 OBJCOPY = objcopy 46 OBJDUMP = objdump 47 endif 48 49 ifeq ($(COMPILER),gcc_cross) 50 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 51 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 52 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 53 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 54 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 55 endif 32 JOBFILE = ../../../../tools/jobfile.py 56 33 57 34 CFLAGS = \ -
boot/arch/sparc64/Makefile.inc
rcd82bb1 r371bd7d 27 27 # 28 28 29 TMP = distroot 29 include Makefile.common 30 30 31 31 ifeq ($(CONFIG_AOUT_ISOFS_B),y) … … 55 55 56 56 arch/$(BARCH)/loader/image.boot: 57 $(MAKE) -C arch/$(BARCH)/loader 57 $(MAKE) -C arch/$(BARCH)/loader PRECHECK=$(PRECHECK) 58 58 59 59 clean: generic_clean -
boot/arch/sparc64/loader/Makefile
rcd82bb1 r371bd7d 32 32 .PHONY: all clean 33 33 34 all: ../../../../version ../../../../Makefile.co nfig ../../../../config.h ../../../../config.defs34 all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/* 40 rm -f $(USPACEDIR)/dist/app/* 41 rm -f $(USPACEDIR)/dist/cfg/net/* 42 39 43 for file in $(RD_SRVS) $(RD_SRVS_GENERIC) ; do \ 40 44 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 43 47 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 44 48 done 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 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 46 53 find . -name '*.o' -follow -exec rm \{\} \; 47 54 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/sparc64/loader/Makefile.build
rcd82bb1 r371bd7d 32 32 33 33 include ../../../../version 34 include ../../../../Makefile.common 34 35 include ../../../../Makefile.config 35 include ../../../../config.defs36 36 include Makefile.common 37 37 include Makefile.toolchain … … 51 51 asm.S \ 52 52 boot.S 53 54 COMPONENTS = \55 $(KERNELDIR)/kernel.bin \56 $(USPACEDIR)/srv/ns/ns \57 $(USPACEDIR)/app/init/init \58 $(USPACEDIR)/srv/loader/loader \59 $(USPACEDIR)/srv/devmap/devmap \60 $(USPACEDIR)/srv/bd/rd/rd \61 $(USPACEDIR)/srv/vfs/vfs62 ifeq ($(RDFMT),tmpfs)63 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs64 endif65 ifeq ($(RDFMT),fat)66 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat67 endif68 53 69 54 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) … … 92 77 %.o: %.S $(DEPEND) 93 78 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 79 ifeq ($(PRECHECK),y) 80 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 81 endif 94 82 95 83 %.o: %.c $(DEPEND) 96 84 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 85 ifeq ($(PRECHECK),y) 86 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 87 endif 97 88 98 89 $(DEPEND): 90 rm -f $(USPACEDIR)/dist/srv/* 91 rm -f $(USPACEDIR)/dist/app/* 92 rm -f $(USPACEDIR)/dist/cfg/net/* 93 99 94 for file in $(RD_SRVS) ; do \ 100 95 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 102 97 for file in $(RD_APPS) ; do \ 103 98 cp $$file $(USPACEDIR)/dist/app/ ; \ 99 done 100 for file in $(NET_CFG) ; do \ 101 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \ 104 102 done 105 103 ifeq ($(RDFMT),tmpfs) -
boot/arch/sparc64/loader/Makefile.common
rcd82bb1 r371bd7d 31 31 # 32 32 33 include ../../../Makefile.common 34 33 35 DEPEND = Makefile.depend 34 36 DEPEND_PREV = $(DEPEND).prev 37 JOB = image.job 35 38 OUTPUT = image.boot 36 39 37 40 LINK = _link.ld 38 41 COMPS = _components 39 INITRD = initrd40 42 41 43 KERNELDIR = ../../../../kernel 42 44 USPACEDIR = ../../../../uspace 43 45 44 RD_SRVS = \45 $(USPACEDIR)/srv/fb/fb \46 $(USPACEDIR)/srv/kbd/kbd \47 $(USPACEDIR)/srv/console/console \48 $(USPACEDIR)/srv/fs/devfs/devfs \49 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \50 $(USPACEDIR)/srv/bd/file_bd/file_bd \51 $(USPACEDIR)/srv/part/mbr_part/mbr_part52 53 RD_APPS = \54 $(USPACEDIR)/app/edit/edit \55 $(USPACEDIR)/app/getvc/getvc \56 $(USPACEDIR)/app/redir/redir \57 $(USPACEDIR)/app/tetris/tetris \58 $(USPACEDIR)/app/trace/trace \59 $(USPACEDIR)/app/klog/klog \60 $(USPACEDIR)/app/bdsh/bdsh61 62 46 RD_SRVS_GENERIC = \ 63 47 $(USPACEDIR)/srv/fs/fat/fat \ 64 $(USPACEDIR)/srv/ cir/fhc/fhc \65 $(USPACEDIR)/srv/ cir/obio/obio48 $(USPACEDIR)/srv/hw/cir/fhc/fhc \ 49 $(USPACEDIR)/srv/hw/cir/obio/obio 66 50 67 51 RD_APPS_GENERIC = \ -
boot/arch/sparc64/loader/Makefile.toolchain
rcd82bb1 r371bd7d 27 27 # 28 28 29 ## Toolchain configuration30 #31 32 ifndef CROSS_PREFIX33 CROSS_PREFIX = /usr/local34 endif35 36 29 BFD_NAME = elf64-sparc 37 30 BFD_ARCH = sparc 38 TARGET = sparc64-linux-gnu39 TOOLCHAIN_DIR = $(CROSS_PREFIX)/sparc64/bin40 31 41 ifeq ($(COMPILER),gcc_native) 42 CC = gcc 43 AS = as 44 LD = ld 45 OBJCOPY = objcopy 46 OBJDUMP = objdump 47 endif 48 49 ifeq ($(COMPILER),gcc_cross) 50 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 51 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 52 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 53 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 54 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 55 endif 32 JOBFILE = ../../../../tools/jobfile.py 56 33 57 34 CFLAGS = \ -
boot/arch/sparc64/loader/asm.S
rcd82bb1 r371bd7d 115 115 */ 116 116 117 #if defined (SUN4U) 117 118 /* 118 119 * US3 processors have a write-invalidate cache, so explicitly … … 128 129 call icache_flush 129 130 nop 130 131 #endif 131 132 1: 132 133 membar #StoreStore -
boot/arch/sparc64/loader/main.c
rcd82bb1 r371bd7d 57 57 #endif 58 58 59 /** UltraSPARC subarchitecture - 1 for US, 3 for US3 */60 static uint8_t subarchitecture ;59 /** UltraSPARC subarchitecture - 1 for US, 3 for US3, 0 for other */ 60 static uint8_t subarchitecture = 0; 61 61 62 62 /** … … 69 69 static void version_print(void) 70 70 { 71 71 72 printf("HelenOS SPARC64 Bootloader\nRelease %s%s%s\n" 72 73 "Copyright (c) 2006 HelenOS project\n", … … 83 84 #define US_IIIi_CODE 0x15 84 85 85 /** 86 * Sets the global variables "subarchitecture" and "mid_mask" to 86 /* max. length of the "compatible" property of the root node */ 87 #define COMPATIBLE_PROP_MAXLEN 64 88 89 /* 90 * HelenOS bootloader will use these constants to distinguish particular 91 * UltraSPARC architectures 92 */ 93 #define COMPATIBLE_SUN4U 10 94 #define COMPATIBLE_SUN4V 20 95 96 /** US architecture. COMPATIBLE_SUN4U for sun4v, COMPATIBLE_SUN4V for sun4u */ 97 static uint8_t architecture; 98 99 /** 100 * Detects the UltraSPARC architecture (sun4u and sun4v currently supported) 101 * by inspecting the property called "compatible" in the OBP root node. 102 */ 103 static void detect_architecture(void) 104 { 105 phandle root = ofw_find_device("/"); 106 char compatible[COMPATIBLE_PROP_MAXLEN]; 107 108 if (ofw_get_property(root, "compatible", compatible, 109 COMPATIBLE_PROP_MAXLEN) <= 0) { 110 printf("Unable to determine architecture, default: sun4u.\n"); 111 architecture = COMPATIBLE_SUN4U; 112 return; 113 } 114 115 if (strcmp(compatible, "sun4v") == 0) { 116 architecture = COMPATIBLE_SUN4V; 117 } else { 118 /* 119 * As not all sun4u machines have "sun4u" in their "compatible" 120 * OBP property (e.g. Serengeti's OBP "compatible" property is 121 * "SUNW,Serengeti"), we will by default fallback to sun4u if 122 * an unknown value of the "compatible" property is encountered. 123 */ 124 architecture = COMPATIBLE_SUN4U; 125 } 126 } 127 128 129 /** 130 * Detects the subarchitecture (US, US3) of the sun4u 131 * processor. Sets the global variables "subarchitecture" and "mid_mask" to 87 132 * correct values. 88 133 */ … … 109 154 } 110 155 156 /** 157 * Performs sun4u-specific initialization. The components are expected 158 * to be already copied and boot allocator initialized. 159 * 160 * @param base kernel base virtual address 161 * @param top virtual address above which the boot allocator 162 * can make allocations 163 */ 164 static void bootstrap_sun4u(void *base, unsigned int top) 165 { 166 void *balloc_base; 167 /* 168 * Claim and map the physical memory for the boot allocator. 169 * Initialize the boot allocator. 170 */ 171 balloc_base = base + ALIGN_UP(top, PAGE_SIZE); 172 (void) ofw_claim_phys(bootinfo.physmem_start + balloc_base, 173 BALLOC_MAX_SIZE); 174 (void) ofw_map(bootinfo.physmem_start + balloc_base, balloc_base, 175 BALLOC_MAX_SIZE, -1); 176 balloc_init(&bootinfo.ballocs, (uintptr_t) balloc_base, 177 (uintptr_t) balloc_base); 178 179 printf("Setting up screens..."); 180 ofw_setup_screens(); 181 printf("done.\n"); 182 183 printf("Canonizing OpenFirmware device tree..."); 184 bootinfo.ofw_root = ofw_tree_build(); 185 printf("done.\n"); 186 187 #ifdef CONFIG_AP 188 printf("Checking for secondary processors..."); 189 if (!ofw_cpu(mid_mask, bootinfo.physmem_start)) 190 printf("Error: unable to get CPU properties\n"); 191 printf("done.\n"); 192 #endif 193 194 } 195 196 /** 197 * * Performs sun4v-specific initialization. The components are expected 198 * * to be already copied and boot allocator initialized. 199 * */ 200 static void bootstrap_sun4v(void) 201 { 202 /* 203 * When SILO booted, the OBP had established a virtual to physical 204 * memory mapping. This mapping is not an identity (because the 205 * physical memory starts on non-zero address) - this is not 206 * surprising. But! The mapping even does not map virtual address 207 * 0 onto the starting address of the physical memory, but onto an 208 * address which is 0x400000 bytes higher. The reason is that the 209 * OBP had already used the memory just at the beginning of the 210 * physical memory, so that memory cannot be used by SILO (nor 211 * bootloader). As for now, we solve it by a nasty workaround: 212 * we pretend that the physical memory starts 0x400000 bytes further 213 * than it actually does (and hence pretend that the physical memory 214 * is 0x400000 bytes smaller). Of course, the value 0x400000 will most 215 * probably depend on the machine and OBP version (the workaround now 216 * works on Simics). A solution would be to inspect the "available" 217 * property of the "/memory" node to find out which parts of memory 218 * are used by OBP and redesign the algorithm of copying 219 * kernel/init tasks/ramdisk from the bootable image to memory 220 * (which we must do anyway because of issues with claiming the memory 221 * on Serengeti). 222 */ 223 bootinfo.physmem_start += 0x400000; 224 bootinfo.memmap.zones[0].start += 0x400000; 225 bootinfo.memmap.zones[0].size -= 0x400000; 226 printf("The sun4v init finished."); 227 } 228 229 111 230 void bootstrap(void) 112 231 { 113 232 void *base = (void *) KERNEL_VIRTUAL_ADDRESS; 114 void *balloc_base;115 233 unsigned int top = 0; 116 234 unsigned int i; 117 235 unsigned int j; 118 236 119 version_print(); 120 121 detect_subarchitecture(); 237 detect_architecture(); 122 238 init_components(components); 123 239 … … 260 376 printf("done.\n"); 261 377 262 /* 263 * Claim and map the physical memory for the boot allocator. 264 * Initialize the boot allocator. 265 */ 266 balloc_base = base + ALIGN_UP(top, PAGE_SIZE); 267 (void) ofw_claim_phys(bootinfo.physmem_start + balloc_base, 268 BALLOC_MAX_SIZE); 269 (void) ofw_map(bootinfo.physmem_start + balloc_base, balloc_base, 270 BALLOC_MAX_SIZE, -1); 271 balloc_init(&bootinfo.ballocs, (uintptr_t) balloc_base, 272 (uintptr_t) balloc_base); 273 274 printf("Setting up screens..."); 275 ofw_setup_screens(); 276 printf("done.\n"); 277 278 printf("Canonizing OpenFirmware device tree..."); 279 bootinfo.ofw_root = ofw_tree_build(); 280 printf("done.\n"); 281 282 #ifdef CONFIG_AP 283 printf("Checking for secondary processors..."); 284 if (!ofw_cpu(mid_mask, bootinfo.physmem_start)) 285 printf("Error: unable to get CPU properties\n"); 286 printf("done.\n"); 287 #endif 378 /* perform architecture-specific initialization */ 379 if (architecture == COMPATIBLE_SUN4U) { 380 bootstrap_sun4u(base, top); 381 } else if (architecture == COMPATIBLE_SUN4V) { 382 bootstrap_sun4v(); 383 } else { 384 printf("Unknown architecture.\n"); 385 halt(); 386 } 288 387 289 388 printf("Booting the kernel...\n");
Note:
See TracChangeset
for help on using the changeset viewer.
