]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/bootstrap/server/src/Make.rules
update
[l4.git] / l4 / pkg / bootstrap / server / src / Make.rules
index d7deb11dcc276e59f71a4144d5af734626e925c3..efa24401237fe994df0190922dc3660789f7cbd5 100644 (file)
@@ -4,8 +4,8 @@
 # - BOOTSTRAP_SEARCH_PATH
 # - BOOTSTRAP_ELF_NAME
 # - BOOTSTRAP_MODULES_LIST
-# - BOOTSTRAP_OMIT_RAW
-# - BOOTSTRAP_OMIT_UIMAGE
+# - BOOTSTRAP_DO_RAW_IMAGE
+# - BOOTSTRAP_DO_UIMAGE
 # - BOOTSTRAP_UIMAGE_COMPRESSION: set to none, gzip, or bzip2
 # - BOOTSTRAP_CMDLINE: compiled-in command line, only used if no cmdline
 #                      given via multi-boot boot loader (e.g. on arm)
@@ -14,6 +14,7 @@ DEFAULT_RELOC_arm   := 0x01000000
 DEFAULT_RELOC_x86   := 0x002d0000
 DEFAULT_RELOC_amd64 := 0x002d0000
 DEFAULT_RELOC_ppc32 := 0x002d0000
+DEFAULT_RELOC_sparc := 0x00100000
 RELOC_PHYS          := y
 LDFLAGS              = -Bstatic
 EXTRA_GENERAL_D_DEP  = .redo-change-tracker
@@ -23,8 +24,16 @@ BOOTSTRAP_LD_dep    := $(SRC_DIR)/ldscript.inc
 
 include $(L4DIR)/mk/Makeconf
 -include $(OBJ_DIR)/Makeconf.local
--include $(L4DIR)/conf/Makeconf.bootstrap
--include $(OBJ_BASE)/Makeconf.bootstrap
+-include $(L4DIR)/conf/Makeconf.boot
+-include $(OBJ_BASE)/conf/Makeconf.boot
+
+# Checks added Nov 2010:
+ifneq ($(wildcard $(L4DIR)/conf/Makeconf.bootstrap),)
+$(error $(L4DIR)/conf/Makeconf.bootstrap not used anymore. Please use $(L4DIR)/conf/Makeconf.boot now)
+endif
+ifneq ($(wildcard $(OBJ_BASE)/Makeconf.bootstrap),)
+$(error $(OBJ_BASE)/Makeconf.bootstrap not used anymore. Please use $(OBJ_BASE)/conf/Makeconf.boot now)
+endif
 
 BOOTSTRAP_SEARCH_PATH        ?= .
 BOOTSTRAP_MODULES_LIST       ?= $(SRC_DIR)/modules.list
@@ -64,6 +73,7 @@ PLATFORM_TYPE-arm   = $(ARM_PLATFORM_TYPE)
 PLATFORM_TYPE-ppc32 = $(PPC_PLATFORM_TYPE)
 PLATFORM_TYPE-x86   = $(X86_PLATFORM_TYPE)
 PLATFORM_TYPE-amd64 = $(X86_PLATFORM_TYPE)
+PLATFORM_TYPE-sparc = $(SPARC_PLATFORM_TYPE)
 PLATFORM_TYPE       = $(PLATFORM_TYPE-$(ARCH))
 endif
 
@@ -75,8 +85,10 @@ SUPPORT_CC_arm-omap3evm   := support_omap3evm.cc
 SUPPORT_CC_arm-beagleboard:= support_beagleboard.cc
 SUPPORT_CC_arm-tegra2     := support_tegra2.cc
 SUPPORT_CC_arm-imx21      := support_imx.cc
+SUPPORT_CC_arm-imx35      := support_imx.cc
 SUPPORT_CC_arm-imx51      := support_imx.cc
 SUPPORT_CC_arm-om         := support_om.cc
+SUPPORT_CC_arm-kirkwood   := support_kirkwood.cc
 DEFAULT_RELOC_arm-imx21   := 0x00200000  # because of blob
 
 ifneq ($(DEFAULT_RELOC_arm-$(PLATFORM_TYPE)),)
@@ -89,20 +101,22 @@ SUPPORT_CC_x86-pc         := support_x86_pc.cc
 
 SUPPORT_CC_amd64-pc       := support_x86_pc.cc
 
+SUPPORT_CC_sparc-leon3    := support_sparc_leon3.cc
+
 SRC_C          += exec.c module.c
 SRC_CC         += region.cc startup.cc init_kip_v2.cc init_kip_v4.cc \
-                   libc_support+.cc patch.cc
+                   libc_support+.cc patch.cc koptions.cc
 
-SRC_CC_x86     += ARCH-x86/reboot.cc
-SRC_CC_amd64   += ARCH-x86/reboot.cc
-SRC_C_x86      += base_critical.c ARCH-x86/serial.c
-SRC_C_amd64    += base_critical.c ARCH-x86/serial.c
+SRC_CC_x86     += ARCH-x86/reboot.cc ARCH-x86/serial.cc
+SRC_CC_amd64   += ARCH-x86/reboot.cc ARCH-x86/serial.cc
+SRC_C_x86      += base_critical.c
+SRC_C_amd64    += base_critical.c
 SRC_CC_arm             += ARCH-arm/reboot.cc
 SRC_CC_ppc32    += ARCH-ppc32/init_kip_v2-arch.cc \
                   ARCH-ppc32/reboot.cc
+SRC_CC_sparc   += ARCH-sparc/reboot.cc
 SRC_CC          += $(SUPPORT_CC_$(ARCH)-$(PLATFORM_TYPE))
 SRC_S          += ARCH-$(ARCH)/crt0.S
-ASFLAGS_ARCH-arm/crt0.S += -march=armv6zk
 
 OPTS            = -g -Os $(CARCHFLAGS_$(ARCH)) $(CARCHFLAGS_$(ARCH)_$(CPU))
 DEFINES         += -DRAM_BASE=$(RAM_BASE)
@@ -154,7 +168,7 @@ ENTRY_FN := $(shell echo "$(ENTRY)" | tr '[ ]' '[_]' )
 # we need to re-do if some things change
 # we do not need to track BOOTSTRACE_CMDLINE as it's only used in startup.cc
 # and that is regenerated every time
-REDO_TEXT_CMD = echo "$(ENTRY) '$(COMPRESS)' '$(RAM_SIZE_MB)' '$(PLATFORM_TYPE)'"
+REDO_TEXT_CMD = echo "$(ENTRY) '$(COMPRESS)' '$(RAM_SIZE_MB)' '$(PLATFORM_TYPE)' '$(LOADER_MBI)'"
 .redo-change-tracker: FORCE
        $(VERBOSE)if  test ! -r "$@" ||                    \
                    ! $(REDO_TEXT_CMD) | cmp -s "$@"; then \
@@ -191,10 +205,10 @@ bootstrap_$(ENTRY_FN).uimage: bootstrap.uimage
            { echo -e "\nERROR: Missing at least one platform instantiation.\n"; \
              exit 1; } ; $(STRIP) $@
 
-   ifeq ($(BOOTSTRAP_OMIT_RAW),)
+   ifneq ($(BOOTSTRAP_DO_RAW_IMAGE)$(BOOTSTRAP_DO_UIMAGE),)
      BOOTSTRAP_RAW      := bootstrap.raw
      INSTALL_TARGET     += bootstrap.raw bootstrap_$(ENTRY_FN).raw
-     ifeq ($(BOOTSTRAP_OMIT_UIMAGE),)
+     ifneq ($(BOOTSTRAP_DO_UIMAGE),)
        ifneq ($(shell command -v $(MKIMAGE)),)
          BOOTSTRAP_UIMAGE   := bootstrap.uimage
          INSTALL_TARGET     += bootstrap.uimage bootstrap_$(ENTRY_FN).uimage
@@ -206,10 +220,11 @@ bootstrap_$(ENTRY_FN).uimage: bootstrap.uimage
  endif
 
 all:: $(addprefix $(IMAGES_DIR)/,$(INSTALL_TARGET))
-       $(VERBOSE)echo "Image size(s) in bytes:"
+       $(VERBOSE)echo "  Image size(s) in bytes:"
        $(VERBOSE)for f in $(filter bootstrap_$(ENTRY_FN).elf bootstrap.raw bootstrap.uimage, $(INSTALL_TARGET)); do \
-         find . -name $$f -printf " %20f:  %s\n"; \
+         find . -name $$f -printf " %30f:  %s\n"; \
        done
+       $(if $(BOOTSTRAP_DO_RAW_IMAGE),$(VERBOSE)echo "  Start address: $(patsubst -Ttext=%,%,$(LDFLAGS_bootstrap.elf))")
        $(VERBOSE)echo "  --> Build-Nr: $$(cat .build_nr)"
 
 # install images into easy to reach directory in build dir
@@ -222,11 +237,9 @@ $(IMAGES_DIR)/%: % $(IMAGES_DIR)/Makefile
 $(IMAGES_DIR)/Makefile: $(SRC_DIR)/Make.rules
        @echo "  ==> Preparing image directory"
        $(VERBOSE)install -d $(dir $@)
-       $(VERBOSE)$(ECHO) "# Automatically generated by bootstrap" > $@
-       $(VERBOSE)$(ECHO) "a:"                                    >> $@
-       $(VERBOSE)$(ECHO) "     \$$(MAKE) -C .. image"            >> $@
-       $(VERBOSE)$(ECHO) "%:"                                    >> $@
-       $(VERBOSE)$(ECHO) "     \$$(MAKE) -C .. image E=\"\$$@\"" >> $@
+       $(VERBOSE)$(ECHO) "# Automatically generated by bootstrap"                           > $@
+       $(VERBOSE)$(ECHO) "\$$(if \$$(MAKECMDGOALS),%,a):"                                  >> $@
+       $(VERBOSE)$(ECHO) "     \$$(MAKE) -C .. image \$$(if \$$(MAKECMDGOALS),E=\"\$$@\")" >> $@
 else
   INSTALL_TARGET = bootstrap
 endif # ENTRY
@@ -317,6 +330,7 @@ $(BOOTSTRAP_RAW): $(TARGET_BIN)
        @$(GEN_MESSAGE)
        $(VERBOSE)cp $< $@.tmp
        $(VERBOSE)$(OBJCOPY) -O binary $@.tmp $@
+       $(VERBOSE)chmod -x $@
        $(VERBOSE)$(RM) $@.tmp
 
 %.gzip: %