Changeset 41f7564 in mainline


Ignore:
Timestamp:
2006-07-17T00:53:53Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
231fcb2
Parents:
41c4444
Message:

cleanup and unify the build system

Files:
3 added
2 deleted
21 edited
1 moved

Legend:

Unmodified
Added
Removed
  • boot/Makefile

    r41c4444 r41f7564  
    3030#
    3131
     32-include ../version
    3233-include Makefile.config
    3334
    34 ## Common flags
     35## Paths
    3536#
    3637
     
    3839KERNELDIR = $(BASE)/kernel
    3940USPACEDIR = $(BASE)/uspace
    40 
    41 ## Setup arch configuration
    42 #
    43 
    44 -include arch/$(ARCH)/Makefile.inc
    45 
    46 ifeq ($(ARCH),xen32)
    47         UARCH = ia32
    48 else
    49         UARCH = $(ARCH)
    50 endif
    5141
    5242ifeq ($(CONFIG_DEBUG),y)
     
    5848endif
    5949
    60 .PHONY: all build config distclean arch_distclean clean kernel uspace clean_kernel clean_uspace distclean_kernel distclean_uspace
     50.PHONY: all build config distclean clean generic_clean
    6151
    6252all:
    63         tools/config.py default
    64         $(MAKE) -C . build $(ARCH)
     53        ../tools/config.py boot.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) $(IMAGE)
     54        $(MAKE) -C . build
     55
     56-include arch/$(ARCH)/Makefile.inc
    6557
    6658config:
    67         tools/config.py
     59        ../tools/config.py boot.config
    6860
    69 distclean: clean arch_distclean
     61distclean: clean
    7062        -rm Makefile.config
    7163
    72 kernel:
    73         $(MAKE) -C $(KERNELDIR) NARCH=$(ARCH)
    74 
    75 uspace:
    76         $(MAKE) -C $(USPACEDIR) NARCH=$(UARCH)
    77 
    78 clean_kernel:
    79         $(MAKE) -C $(KERNELDIR) clean ARCH=$(ARCH)
    80 
    81 clean_uspace:
    82         $(MAKE) -C $(USPACEDIR) clean ARCH=$(UARCH)
    83 
    84 clean_boot_gen:
     64generic_clean:
    8565        -rm generic/*.o genarch/*.o
    86 
    87 distclean_kernel:
    88         $(MAKE) -C $(KERNELDIR) distclean ARCH=$(ARCH)
    89 
    90 distclean_uspace:
    91         $(MAKE) -C $(USPACEDIR) distclean ARCH=$(UARCH)
  • boot/arch/amd64/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 build: image.iso
     29TASKS = \
     30        $(USPACEDIR)/init/init \
     31        $(USPACEDIR)/ns/ns \
     32        $(USPACEDIR)/pci/pci \
     33        $(USPACEDIR)/fb/fb \
     34        $(USPACEDIR)/kbd/kbd \
     35        $(USPACEDIR)/console/console \
     36        $(USPACEDIR)/tetris/tetris \
     37        $(USPACEDIR)/ipcc/ipcc \
     38        $(USPACEDIR)/klog/klog
    3039
    31 image.iso: kernel uspace
     40build: $(BASE)/image.iso
     41
     42$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(TASKS)
    3243        mkdir -p arch/$(ARCH)/iso/boot/grub
    3344        cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
    3445        cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/
    3546        cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
    36         cp $(USPACEDIR)/init/init arch/$(ARCH)/iso/boot/
    37         cp $(USPACEDIR)/ns/ns arch/$(ARCH)/iso/boot/
    38         cp $(USPACEDIR)/pci/pci arch/$(ARCH)/iso/boot/
    39         cp $(USPACEDIR)/fb/fb arch/$(ARCH)/iso/boot/
    40         cp $(USPACEDIR)/kbd/kbd arch/$(ARCH)/iso/boot/
    41         cp $(USPACEDIR)/console/console arch/$(ARCH)/iso/boot/
    42         cp $(USPACEDIR)/tetris/tetris arch/$(ARCH)/iso/boot/
    43         cp $(USPACEDIR)/ipcc/ipcc arch/$(ARCH)/iso/boot/
    44         cp $(USPACEDIR)/klog/klog arch/$(ARCH)/iso/boot/
    45         mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o image.iso arch/$(ARCH)/iso/
     47        for task in $(TASKS) ; do \
     48                cp $$task arch/$(ARCH)/iso/boot/ ; \
     49        done
     50        mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
    4651
    47 clean: clean_kernel clean_uspace
     52clean:
    4853        -rm -fr arch/$(ARCH)/iso
    49         -rm -f image.iso
    50 
    51 arch_distclean: distclean_kernel distclean_uspace
     54        -rm -f $(BASE)/image.iso
  • boot/arch/ia32/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 build: image.iso
     29TASKS = \
     30        $(USPACEDIR)/init/init \
     31        $(USPACEDIR)/ns/ns \
     32        $(USPACEDIR)/pci/pci \
     33        $(USPACEDIR)/fb/fb \
     34        $(USPACEDIR)/kbd/kbd \
     35        $(USPACEDIR)/console/console \
     36        $(USPACEDIR)/tetris/tetris \
     37        $(USPACEDIR)/ipcc/ipcc \
     38        $(USPACEDIR)/klog/klog
    3039
    31 image.iso: kernel uspace
     40build: $(BASE)/image.iso
     41
     42$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(TASKS)
    3243        mkdir -p arch/$(ARCH)/iso/boot/grub
    3344        cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
    3445        cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/
    3546        cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
    36         cp $(USPACEDIR)/init/init arch/$(ARCH)/iso/boot/
    37         cp $(USPACEDIR)/ns/ns arch/$(ARCH)/iso/boot/
    38         cp $(USPACEDIR)/pci/pci arch/$(ARCH)/iso/boot/
    39         cp $(USPACEDIR)/fb/fb arch/$(ARCH)/iso/boot/
    40         cp $(USPACEDIR)/kbd/kbd arch/$(ARCH)/iso/boot/
    41         cp $(USPACEDIR)/console/console arch/$(ARCH)/iso/boot/
    42         cp $(USPACEDIR)/tetris/tetris arch/$(ARCH)/iso/boot/
    43         cp $(USPACEDIR)/ipcc/ipcc arch/$(ARCH)/iso/boot/
    44         cp $(USPACEDIR)/klog/klog arch/$(ARCH)/iso/boot/
    45         mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o image.iso arch/$(ARCH)/iso/
     47        for task in $(TASKS) ; do \
     48                cp $$task arch/$(ARCH)/iso/boot/ ; \
     49        done
     50        mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
    4651
    47 clean: clean_kernel clean_uspace
     52clean:
    4853        -rm -fr arch/$(ARCH)/iso
    49         -rm -f image.iso
    50 
    51 arch_distclean: distclean_kernel distclean_uspace
     54        -rm -f $(BASE)/image.iso
  • boot/arch/ia64/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 VMAXLMA_SRC=$(KERNELDIR)/contrib/arch/ia64/vmaxlma.c
     29VMAXLMA_SRC = tools/ia64/vmaxlma.c
    3030
    31 build: kernel.bin
     31build: $(BASE)/kernel.bin
    3232
    33 kernel.bin: kernel uspace vmaxlma
    34         cp $(KERNELDIR)/kernel.bin .
    35         ./vmaxlma kernel.bin
     33$(BASE)/kernel.bin: $(KERNELDIR)/kernel.bin vmaxlma
     34        cp $(KERNELDIR)/kernel.bin $(BASE)/kernel.bin
     35        ./vmaxlma $(BASE)/kernel.bin
    3636
    3737vmaxlma: $(VMAXLMA_SRC)
    38         gcc $(VMAXLMA_SRC) -o $@
     38        $(CC) $(VMAXLMA_SRC) -o $@
    3939
    40 clean: clean_kernel clean_uspace
    41         -rm -f kernel.bin vmaxlma
    42 
    43 arch_distclean: distclean_kernel distclean_uspace
     40clean:
     41        -rm -f $(BASE)/kernel.bin vmaxlma
  • boot/arch/mips32/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 build: image.boot
     29build: $(BASE)/image.boot
    3030
    31 image.boot: kernel uspace
    32         make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(CONFIG_IMAGE)
    33         cp arch/$(ARCH)/loader/image.boot image.boot
     31$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
     32        cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot
    3433
    35 clean: clean_boot_gen clean_kernel clean_uspace
    36         make -C arch/$(ARCH)/loader clean
    37         -rm -f image.boot
     34depend:
     35        -rm arch/$(ARCH)/loader/image.boot
    3836
    39 arch_distclean: distclean_kernel distclean_uspace
     37arch/$(ARCH)/loader/image.boot:
     38        make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(IMAGE)
     39
     40clean:
     41        make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(IMAGE)
     42        -rm -f $(BASE)/image.boot
  • boot/arch/ppc32/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 build: image.boot
     29build: $(BASE)/image.boot
    3030
    31 image.boot: kernel uspace
     31$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
     32        cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot
     33
     34depend:
     35        -rm arch/$(ARCH)/loader/image.boot
     36
     37arch/$(ARCH)/loader/image.boot:
    3238        make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
    33         cp arch/$(ARCH)/loader/image.boot image.boot
    3439
    35 clean: clean_boot_gen clean_kernel clean_uspace
    36         make -C arch/$(ARCH)/loader clean KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
    37         -rm -f image.boot
    38 
    39 arch_distclean: distclean_kernel distclean_uspace
     40clean: generic_clean
     41        make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
     42        -rm -f $(BASE)/image.boot
  • boot/arch/ppc64/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 build: image.boot
     29build: $(BASE)/image.boot
    3030
    31 image.boot: kernel uspace
     31$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
     32        cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot
     33
     34depend:
     35        -rm arch/$(ARCH)/loader/image.boot
     36
     37arch/$(ARCH)/loader/image.boot:
    3238        make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
    33         cp arch/$(ARCH)/loader/image.boot image.boot
    3439
    35 clean: clean_boot_gen clean_kernel clean_uspace
    36         make -C arch/$(ARCH)/loader clean KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
    37         -rm -f image.boot
    38 
    39 arch_distclean: distclean_kernel distclean_uspace
     40clean: generic_clean
     41        make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
     42        -rm -f $(BASE)/image.boot
  • boot/arch/sparc64/Makefile.inc

    r41c4444 r41f7564  
    2929TMP=distroot
    3030
    31 build: image.iso
     31build: $(BASE)/image.iso
    3232
    33 image.iso: kernel
    34         make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(CONFIG_IMAGE)
     33$(BASE)/image.iso: depend arch/$(ARCH)/loader/image.boot
    3534        mkdir -p $(TMP)/boot
    3635        mkdir -p $(TMP)/HelenOS
     
    3837        cp arch/$(ARCH)/silo/README arch/$(ARCH)/silo/COPYING arch/$(ARCH)/silo/silo.conf $(TMP)/boot
    3938        cp arch/$(ARCH)/loader/image.boot $(TMP)/HelenOS/image.boot
    40         mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o image.iso $(TMP)/
     39        mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o $(BASE)/image.iso $(TMP)/
    4140
    42 clean: clean_boot_gen clean_kernel
    43          make -C arch/$(ARCH)/loader clean
     41depend:
     42        -rm arch/$(ARCH)/loader/image.boot
     43
     44arch/$(ARCH)/loader/image.boot:
     45        make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
     46
     47clean: generic_clean
     48        make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
    4449        -rm -fr $(TMP)
    45         -rm -f image.iso
    46 
    47 arch_distclean: distclean_kernel
     50        -rm -f $(BASE)/image.iso
  • boot/arch/xen32/Makefile.inc

    r41c4444 r41f7564  
    2727#
    2828
    29 build: image.iso
     29TASKS = \
     30        $(USPACEDIR)/init/init \
     31        $(USPACEDIR)/ns/ns \
     32        $(USPACEDIR)/pci/pci \
     33        $(USPACEDIR)/fb/fb \
     34        $(USPACEDIR)/kbd/kbd \
     35        $(USPACEDIR)/console/console \
     36        $(USPACEDIR)/tetris/tetris \
     37        $(USPACEDIR)/ipcc/ipcc \
     38        $(USPACEDIR)/klog/klog
    3039
    31 image.iso: kernel uspace
     40build: $(BASE)/image.iso
     41
     42$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/grub/xen.gz $(KERNELDIR)/kernel.bin $(TASKS)
    3243        mkdir -p arch/$(ARCH)/iso/boot/grub
    3344        cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
     
    3546        cp arch/$(ARCH)/grub/xen.gz arch/$(ARCH)/iso/boot/
    3647        cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
    37         cp $(USPACEDIR)/init/init arch/$(ARCH)/iso/boot/
    38         cp $(USPACEDIR)/ns/ns arch/$(ARCH)/iso/boot/
    39         cp $(USPACEDIR)/pci/pci arch/$(ARCH)/iso/boot/
    40         cp $(USPACEDIR)/fb/fb arch/$(ARCH)/iso/boot/
    41         cp $(USPACEDIR)/kbd/kbd arch/$(ARCH)/iso/boot/
    42         cp $(USPACEDIR)/console/console arch/$(ARCH)/iso/boot/
    43         cp $(USPACEDIR)/tetris/tetris arch/$(ARCH)/iso/boot/
    44         cp $(USPACEDIR)/ipcc/ipcc arch/$(ARCH)/iso/boot/
    45         cp $(USPACEDIR)/klog/klog arch/$(ARCH)/iso/boot/
    46         mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o image.iso arch/$(ARCH)/iso/
     48        for task in $(TASKS) ; do \
     49                cp $$task arch/$(ARCH)/iso/boot/ ; \
     50        done
     51        mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
    4752
    48 clean: clean_kernel clean_uspace
     53clean:
    4954        -rm -fr arch/$(ARCH)/iso
    50         -rm -f image.iso
    51 
    52 arch_distclean: distclean_kernel distclean_uspace
     55        -rm -f $(BASE)/image.iso
  • boot/boot.config

    r41c4444 r41f7564  
    1212! ARCH (choice)
    1313
    14 # PPC32 Compiler
     14# Compiler
    1515@ "cross" Cross-compiler
    1616@ "native" Native
    17 ! [ARCH=ppc32] PPC32_COMPILER (choice)
    18 % [ARCH=ppc32] SAVEAS PPC32_COMPILER COMPILER
    19 
    20 # PPC64 Compiler
    21 @ "cross" Cross-compiler
    22 @ "native" Native
    23 ! [ARCH=ppc64] PPC64_COMPILER (choice)
    24 % [ARCH=ppc64] SAVEAS PPC64_COMPILER COMPILER
    25 
    26 # MIPS32 Compiler
    27 @ "cross" Cross-compiler
    28 @ "native" Native
    29 ! [ARCH=mips32] MIPS32_COMPILER (choice)
    30 % [ARCH=mips32] SAVEAS MIPS32_COMPILER COMPILER
     17! COMPILER (choice)
    3118
    3219# Debug bootloader
     
    3926@ "binary" Binary image (MSIM)
    4027@ "ecoff" Ecoff image (GXEmul)
    41 ! [ARCH=mips32] CONFIG_IMAGE (choice)
     28! [ARCH=mips32] IMAGE (choice)
  • kernel/Makefile

    r41c4444 r41f7564  
    2727#
    2828
    29 ## Kernel release
    30 #
    31 
    32 VERSION = 0
    33 PATCHLEVEL = 2
    34 SUBLEVEL = 0
    35 EXTRAVERSION = 2
    36 NAME = Daylight
    37 ifdef EXTRAVERSION
    38 RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION)
    39 else
    40 RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
    41 endif
    4229
    4330## Include configuration
    4431#
    4532
     33-include ../version
    4634-include Makefile.config
    4735
     
    5038
    5139DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" -DKERNEL
    52 CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/ 
     40CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
    5341LFLAGS = -M
    5442AFLAGS =
     
    7159        DEFS += -DCONFIG_DEBUG
    7260endif
     61
    7362ifeq ($(CONFIG_DEBUG_SPINLOCK),y)
    7463        DEFS += -DCONFIG_DEBUG_SPINLOCK
    7564endif
     65
    7666ifeq ($(CONFIG_DEBUG_AS_WATCHPOINT),y)
    7767        DEFS += -DCONFIG_DEBUG_AS_WATCHPOINT
    7868endif
     69
    7970ifeq ($(CONFIG_FPU_LAZY),y)
    8071        DEFS += -DCONFIG_FPU_LAZY
    8172endif
     73
    8274ifeq ($(CONFIG_DEBUG_ALLREGS),y)
    8375        DEFS += -DCONFIG_DEBUG_ALLREGS
    8476endif
     77
    8578ifeq ($(CONFIG_VHPT),y)
    8679        DEFS += -DCONFIG_VHPT
    8780endif
     81
    8882ifeq ($(CONFIG_POWEROFF),y)
    8983        DEFS += -DCONFIG_POWEROFF
    9084endif
     85
    9186ifeq ($(CONFIG_FB),y)
    92 ifeq ($(ARCH),ia32)
    93         DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
    94         DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
    95         DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
    96 endif
    97 ifeq ($(ARCH),amd64)
    98         DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
    99         DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
    100         DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
    101 endif
    102 ifeq ($(ARCH),xen32)
    103         DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
    104         DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
    105         DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
    106 endif
     87        ifeq ($(ARCH),ia32)
     88                DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
     89                DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
     90                DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
     91        endif
     92       
     93        ifeq ($(ARCH),amd64)
     94                DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
     95                DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
     96                DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
     97        endif
     98       
     99        ifeq ($(ARCH),xen32)
     100                DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
     101                DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
     102                DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
     103        endif
    107104endif
    108105
     
    205202
    206203all:
    207         tools/config.py default $(NARCH)
    208 ifdef NARCH
    209  ifneq ($(ARCH), $(NARCH))
    210         $(MAKE) -C . clean
    211  endif
    212 endif
     204        ../tools/config.py kernel.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) $(MACHINE)
    213205        $(MAKE) -C . build
    214206
     
    217209config:
    218210        -rm Makefile.depend
    219         tools/config.py
     211        tools/config.py kernel.config
    220212
    221213-include Makefile.depend
     
    227219        -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld
    228220        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
    229         for arch in arch/*; do \
    230             [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null;\
    231         done;exit 0
     221        for arch in arch/* ; do \
     222            [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \
     223        done ; exit 0
    232224
    233225archlinks:
  • kernel/arch/amd64/Makefile.inc

    r41c4444 r41f7564  
    3636TOOLCHAIN_DIR = /usr/local/amd64/bin
    3737
    38 ## Make some default assumptions
    39 #
    40 
    41 ifndef CPU
    42         CPU = opteron
    43 endif
    44 
    4538CFLAGS += -fno-unwind-tables -m64 -mcmodel=kernel -mno-red-zone
    46 DEFS += -D_CPU=${CPU} -D__64_BITS__
     39DEFS += -DMACHINE=$(MACHINE) -D__64_BITS__
    4740
    4841## Accepted CPUs
    4942#
    5043
    51 ifeq ($(CPU),opteron)
     44ifeq ($(MACHINE),opteron)
    5245        CFLAGS += -march=opteron
    5346        DEFS += -DFENCES=p4
  • kernel/arch/ia32/Makefile.inc

    r41c4444 r41f7564  
    3636TOOLCHAIN_DIR = /usr/local/i686/bin
    3737
    38 ## Make some default assumptions
    39 #
    40 
    41 ifndef IA32_CPU
    42         IA32_CPU = pentium4
    43 endif
    44 
    45 DEFS += -D_CPU=${IA32_CPU} -D__32_BITS__
     38DEFS += -DMACHINE=$(MACHINE) -D__32_BITS__
    4639
    4740## Accepted CPUs
    4841#
    4942
    50 ifeq ($(IA32_CPU),athlon-xp)
     43ifeq ($(MACHINE),athlon-xp)
    5144        CFLAGS += -march=athlon-xp -mmmx -msse -m3dnow
    5245        DEFS += -DCONFIG_FENCES_P3
     
    5447        CONFIG_HT = n
    5548endif
    56 ifeq ($(IA32_CPU),athlon-mp)
     49ifeq ($(MACHINE),athlon-mp)
    5750        CFLAGS += -march=athlon-mp -mmmx -msse -m3dnow
    5851        DEFS += -DCONFIG_FENCES_P3
    5952        CONFIG_HT = n
    6053endif
    61 ifeq ($(IA32_CPU),pentium3)
     54ifeq ($(MACHINE),pentium3)
    6255        CFLAGS += -march=pentium3 -mmmx -msse
    6356        DEFS += -DCONFIG_FENCES_P3
    6457        CONFIG_HT = n
    6558endif
    66 ifeq ($(IA32_CPU),prescott)
     59ifeq ($(MACHINE),prescott)
    6760        CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -msse3
    6861        DEFS += -DCONFIG_FENCES_P4
    6962endif
    70 ifeq ($(IA32_CPU),pentium4)
     63ifeq ($(MACHINE),pentium4)
    7164        CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2
    7265        DEFS += -DCONFIG_FENCES_P4
  • kernel/arch/ia64/Makefile.inc

    r41c4444 r41f7564  
    3535TARGET = ia64-pc-linux-gnu
    3636TOOLCHAIN_DIR = /usr/local/ia64/bin
    37 
    38 ## Make some default assumptions
    39 #
    4037
    4138INIT0_ADDRESS = 0xe000000000400000
  • kernel/arch/mips32/Makefile.inc

    r41c4444 r41f7564  
    3434TOOLCHAIN_DIR = /usr/local/mipsel/bin
    3535
    36 ## Make some default assumptions
    37 #
    38 
    39 ifndef MIPS_MACHINE
    40         MIPS_MACHINE = msim
    41 endif
    42 
    4336KERNEL_LOAD_ADDRESS = 0x80100000
    4437INIT_ADDRESS = 0x81000000
     
    4740CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss
    4841
    49 DEFS += -D__32_BITS__ -DMACHINE=${MIPS_MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} -DINIT_ADDRESS=${INIT_ADDRESS} -DINIT_SIZE=${INIT_SIZE}
     42DEFS += -D__32_BITS__ -DMACHINE=$(MACHINE) -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} -DINIT_ADDRESS=${INIT_ADDRESS} -DINIT_SIZE=${INIT_SIZE}
    5043
    5144## Compile with hierarchical page tables support.
     
    6457#
    6558
    66 ifeq ($(MIPS_MACHINE),indy)
     59ifeq ($(MACHINE),indy)
    6760        # GCC 4.0.1 compiled for mipsEL has problems compiling in
    6861        # BigEndian mode with the swl/swr/lwl/lwr instructions.
     
    7871        INIT_SIZE = 0
    7972endif
    80 ifeq ($(MIPS_MACHINE),lgxemul)
     73ifeq ($(MACHINE),lgxemul)
    8174        BFD_NAME = elf32-tradlittlemips
    8275        BFD = binary
    8376        CFLAGS += -DFB_BIG_ENDIAN -DARCH_HAS_FPU -mips3
    8477endif
    85 ifeq ($(MIPS_MACHINE),bgxemul)
     78ifeq ($(MACHINE),bgxemul)
    8679        BFD_NAME = elf32-bigmips
    8780        BFD = ecoff-bigmips
     
    9184        INIT_ADDRESS = 0x81800000
    9285endif
    93 ifeq ($(MIPS_MACHINE),simics)
     86ifeq ($(MACHINE),simics)
    9487        # SIMICS 4kc emulation is broken, although for instructions
    9588        # that do not bother us
     
    10093        TLBCNT = 16
    10194endif
    102 ifeq ($(MIPS_MACHINE),msim)
     95ifeq ($(MACHINE),msim)
    10396        BFD_NAME = elf32-tradlittlemips
    10497        BFD = binary
  • kernel/arch/ppc32/Makefile.inc

    r41c4444 r41f7564  
    3535TARGET = ppc-linux-gnu
    3636TOOLCHAIN_DIR = /usr/local/ppc/bin
    37 
    38 ## Make some default assumptions
    39 #
    4037
    4138CFLAGS += -mcpu=powerpc -msoft-float -m32
  • kernel/arch/ppc64/Makefile.inc

    r41c4444 r41f7564  
    3636TOOLCHAIN_DIR = /usr/local/ppc64/bin
    3737
    38 ## Make some default assumptions
    39 #
    40 
    4138CFLAGS += -mcpu=powerpc64 -msoft-float -m64
    4239AFLAGS += -a64
  • kernel/arch/sparc64/Makefile.inc

    r41c4444 r41f7564  
    3535TARGET = sparc64-linux-gnu
    3636TOOLCHAIN_DIR = /usr/local/sparc64/bin
    37 
    38 ## Make some default assumptions
    39 #
    4037
    4138CFLAGS += -mcpu=ultrasparc -m64
  • kernel/kernel.config

    r41c4444 r41f7564  
    88@ "ppc32" PowerPC 32-bit
    99@ "ppc64" PowerPC 64-bit
    10 @ "sparc64" Sun UltraSPARC
     10@ "sparc64" Sun UltraSPARC 64-bit
    1111@ "xen32" Xen 32-bit
    1212! ARCH (choice)
    13 
    14 # IA32 Compiler
    15 @ "cross" Cross-compiler
    16 @ "native" Native
    17 ! [ARCH=ia32] IA32_COMPILER (choice)
    18 % [ARCH=ia32] SAVEAS IA32_COMPILER COMPILER
    19 
    20 # AMD64 Compiler
    21 @ "cross" Cross-compiler
    22 @ "native" Native
    23 ! [ARCH=amd64] AMD64_COMPILER (choice)
    24 % [ARCH=amd64] SAVEAS AMD64_COMPILER COMPILER
    2513
    2614# Compiler
    2715@ "cross" Cross-compiler
    2816@ "native" Native
    29 ! [(ARCH!=amd64)&(ARCH!=ia32)] OTHER_COMPILER (choice)
    30 % [(ARCH!=amd64)&(ARCH!=ia32)] SAVEAS OTHER_COMPILER COMPILER
    31 
     17! COMPILER (choice)
    3218
    3319# CPU type
     
    3723@ "athlon-mp" Athlon MP
    3824@ "prescott" Prescott
    39 ! [ARCH=ia32|ARCH=xen32] IA32_CPU (choice)
     25! [ARCH=ia32|ARCH=xen32] MACHINE (choice)
    4026
    41 # MIPS Machine type
     27# CPU type
     28@ "opteron" Opteron
     29! [ARCH=amd64] MACHINE (choice)
     30
     31# Machine type
    4232@ "msim" MSIM Simulator
    4333@ "simics" Virtutech Simics simulator
     
    4535@ "bgxemul" GXEmul Big Endian
    4636@ "indy" SGI Indy
    47 ! [ARCH=mips32] MIPS_MACHINE (choice)
     37! [ARCH=mips32] MACHINE (choice)
    4838
    4939# Framebuffer support
    50 ! [(ARCH=mips32&MIPS_MACHINE=lgxemul)|(ARCH=mips32&MIPS_MACHINE=bgxemul)|(ARCH=ia32)|(ARCH=amd64)|(ARCH=xen32)] CONFIG_FB (y/n)
     40! [(ARCH=mips32&MACHINE=lgxemul)|(ARCH=mips32&MACHINE=bgxemul)|(ARCH=ia32)|(ARCH=amd64)|(ARCH=xen32)] CONFIG_FB (y/n)
    5141
    5242# Framebuffer width
    53 @ "320"
    5443@ "640"
    5544@ "800"
     
    6453
    6554# Framebuffer height
    66 @ "200"
    67 @ "240"
    68 @ "400"
    6955@ "480"
    7056@ "600"
     
    8571! [(ARCH=ia32|ARCH=amd64|ARCH=xen32)&CONFIG_FB=y] CONFIG_VESA_BPP (choice)
    8672
    87 
    88 
    8973# Support for SMP
    9074! [ARCH=ia32|ARCH=amd64|ARCH=xen32] CONFIG_SMP (y/n)
     
    9781
    9882# Lazy FPU context switching
    99 ! [(ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics)|ARCH=amd64|ARCH=ia32|ARCH=ia64|ARCH=xen32] CONFIG_FPU_LAZY (y/n)
     83! [(ARCH=mips32&MACHINE!=msim&MACHINE!=simics)|ARCH=amd64|ARCH=ia32|ARCH=ia64|ARCH=xen32] CONFIG_FPU_LAZY (y/n)
    10084
    10185# Power off on halt
     
    117101
    118102# Use VHPT
    119 ! [ARCH=ia64] CONFIG_VHPT (y/n)
     103! [ARCH=ia64] CONFIG_VHPT (n/y)
    120104
    121105## Run-time configuration directives
     
    134118@ [ARCH=ia32|ARCH=amd64|ARCH=ia64|ARCH=xen32] "fpu/fpu1" Intel fpu test 1
    135119@ [ARCH=ia32|ARCH=amd64|ARCH=xen32] "fpu/sse1" Intel Sse test 1
    136 @ [ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics] "fpu/mips1" Mips FPU test 1
     120@ [ARCH=mips32&MACHINE!=msim&MACHINE!=simics] "fpu/mips1" MIPS FPU test 1
    137121@ "print/print1" Printf test 1
    138122@ "thread/thread1" Thread test 1
     
    140124@ "mm/falloc1" Frame Allocation test 1
    141125@ "mm/falloc2" Frame Allocation test 2
    142 @ "mm/slab1" SLAB test1 - No CPU-cache
     126@ "mm/slab1" SLAB test1 - No CPU cache
    143127@ "mm/slab2" SLAB test2 - SMP CPU cache
    144128@ "fault/fault1" Write to NULL (maybe page fault)
    145129@ "sysinfo" Sysinfo fill and dump test
    146130@ [ARCH=ia64] "mm/purge1" Itanium TLB purge test
    147 @ [ARCH=mips32] "debug/mips1" Mips breakpoint-debug test
     131@ [ARCH=mips32] "debug/mips1" MIPS breakpoint-debug test
    148132! CONFIG_TEST (choice)
  • tools/config.py

    r41c4444 r41f7564  
    11#!/usr/bin/env python
    22"""
    3 Boot configuration script
     3HelenOS configuration script
    44"""
    55import sys
     
    88import commands
    99
    10 INPUT = 'boot.config'
     10INPUT = sys.argv[1]
    1111OUTPUT = 'Makefile.config'
    1212TMPOUTPUT = 'Makefile.config.tmp'
     
    122122        self.dlgcmd = os.environ.get('DIALOG','dialog')
    123123        self.title = ''
    124         self.backtitle = 'HelenOS Kernel Configuration'
     124        self.backtitle = 'HelenOS Configuration'
    125125       
    126126        if os.system('%s --print-maxsize >/dev/null 2>&1' % self.dlgcmd) != 0:
     
    445445        dlg = NoDialog()
    446446
    447     if len(sys.argv) >= 2 and sys.argv[1]=='default':
     447    if len(sys.argv) >= 3 and sys.argv[2]=='default':
    448448        defmode = True
    449449    else:
     
    455455        read_defaults(OUTPUT, defaults)
    456456
    457         # Get ARCH from command line if specified       
    458     if len(sys.argv) >= 3:
    459         defaults['ARCH'] = sys.argv[2]
     457        # Get ARCH from command line if specified
     458    if len(sys.argv) >= 4:
     459        defaults['ARCH'] = sys.argv[3]
     460       
     461        # Get COMPILER from command line if specified
     462    if len(sys.argv) >= 5:
     463        defaults['COMPILER'] = sys.argv[4]
     464       
     465        # Get CONFIG_DEBUG from command line if specified
     466    if len(sys.argv) >= 6:
     467        defaults['CONFIG_DEBUG'] = sys.argv[5]
     468       
     469        # Get MACHINE/IMAGE from command line if specified
     470    if len(sys.argv) >= 7:
     471        defaults['MACHINE'] = sys.argv[6]
     472        defaults['IMAGE'] = sys.argv[6]
    460473
    461474    # Dry run only with defaults
  • uspace/Makefile

    r41c4444 r41f7564  
    3030#
    3131
     32-include ../version
    3233-include Makefile.config
    3334
     
    4849        DIRS += pci
    4950endif
     51
    5052ifeq ($(ARCH), ia32)
    5153        DIRS += pci
    5254endif
    5355
    54 CFLAGS += -DCONFIG_MIPS_FPU
     56ifeq ($(ARCH), mips32)
     57        CFLAGS += -DCONFIG_MIPS_FPU
     58endif
     59
     60ifeq ($(ARCH), mips32eb)
     61        CFLAGS += -DCONFIG_MIPS_FPU
     62endif
    5563
    5664BUILDS := $(addsuffix .build,$(DIRS))
     
    6068
    6169all:
    62         tools/config.py default $(NARCH)
    63 ifdef NARCH
    64  ifneq ($(ARCH), $(NARCH))
    65         $(MAKE) -C . clean
    66  endif
    67 endif
     70        ../tools/config.py uspace.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG)
    6871        $(MAKE) -C . build
    6972
    7073config:
    71         tools/config.py
     74        ../tools/config.py uspace.config
    7275
    7376build: $(BUILDS)
  • uspace/uspace.config

    r41c4444 r41f7564  
    99@ "ppc32" PowerPC 32-bit
    1010@ "ppc64" PowerPC 64-bit
     11@ "sparc64" Sun UltraSPARC 64-bit
    1112! ARCH (choice)
    1213
    13 # IA32 Compiler
     14# Compiler
    1415@ "cross" Cross-compiler
    1516@ "native" Native
    16 ! [ARCH=ia32] IA32_COMPILER (choice)
    17 % [ARCH=ia32] SAVEAS IA32_COMPILER COMPILER
     17! COMPILER (choice)
    1818
    19 # PPC32 Compiler
    20 @ "cross" Cross-compiler
    21 @ "native" Native
    22 ! [ARCH=ppc32] PPC32_COMPILER (choice)
    23 % [ARCH=ppc32] SAVEAS PPC32_COMPILER COMPILER
    24 
    25 # PPC64 Compiler
    26 @ "cross" Cross-compiler
    27 @ "native" Native
    28 ! [ARCH=ppc64] PPC64_COMPILER (choice)
    29 % [ARCH=ppc64] SAVEAS PPC64_COMPILER COMPILER
    30 
    31 # MIPS FPU support
    32 ! [ARCH=mips32|ARCH=mips32eb] CONFIG_MIPS_FPU (n/y)
    33 
     19# General debuging and assert checking
     20! CONFIG_DEBUG (y/n)
Note: See TracChangeset for help on using the changeset viewer.